diff --git a/assets/index-BVCx4aDC.js b/assets/index-BVCx4aDC.js new file mode 100644 index 0000000..32c518c --- /dev/null +++ b/assets/index-BVCx4aDC.js @@ -0,0 +1,228 @@ +function t1(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var ii=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n1(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Pm={exports:{}},Gs={},Nm={exports:{}},xe={};/** + * @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 Ji=Symbol.for("react.element"),r1=Symbol.for("react.portal"),o1=Symbol.for("react.fragment"),i1=Symbol.for("react.strict_mode"),l1=Symbol.for("react.profiler"),s1=Symbol.for("react.provider"),a1=Symbol.for("react.context"),u1=Symbol.for("react.forward_ref"),c1=Symbol.for("react.suspense"),f1=Symbol.for("react.memo"),d1=Symbol.for("react.lazy"),Nd=Symbol.iterator;function p1(e){return e===null||typeof e!="object"?null:(e=Nd&&e[Nd]||e["@@iterator"],typeof e=="function"?e:null)}var Tm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Am=Object.assign,Dm={};function Ho(e,t,n){this.props=e,this.context=t,this.refs=Dm,this.updater=n||Tm}Ho.prototype.isReactComponent={};Ho.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ho.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Om(){}Om.prototype=Ho.prototype;function Nc(e,t,n){this.props=e,this.context=t,this.refs=Dm,this.updater=n||Tm}var Tc=Nc.prototype=new Om;Tc.constructor=Nc;Am(Tc,Ho.prototype);Tc.isPureReactComponent=!0;var Td=Array.isArray,jm=Object.prototype.hasOwnProperty,Ac={current:null},Mm={key:!0,ref:!0,__self:!0,__source:!0};function Im(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)jm.call(t,r)&&!Mm.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1>>1,ue=z[se];if(0>>1;seo(Xe,ee))_eo(J,Xe)?(z[se]=J,z[_e]=ee,se=_e):(z[se]=Xe,z[ve]=ee,se=ve);else if(_eo(J,ee))z[se]=J,z[_e]=ee,se=_e;else break e}}return B}function o(z,B){var ee=z.sortIndex-B.sortIndex;return ee!==0?ee:z.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var f=[],u=[],p=1,m=null,h=3,x=!1,C=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(z){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=z)r(u),B.sortIndex=B.expirationTime,t(f,B);else break;B=n(u)}}function _(z){if(E=!1,b(z),!C)if(n(f)!==null)C=!0,le(P);else{var B=n(u);B!==null&&ne(_,B.startTime-z)}}function P(z,B){C=!1,E&&(E=!1,y(A),A=-1),x=!0;var ee=h;try{for(b(B),m=n(f);m!==null&&(!(m.expirationTime>B)||z&&!V());){var se=m.callback;if(typeof se=="function"){m.callback=null,h=m.priorityLevel;var ue=se(m.expirationTime<=B);B=e.unstable_now(),typeof ue=="function"?m.callback=ue:m===n(f)&&r(f),b(B)}else r(f);m=n(f)}if(m!==null)var qe=!0;else{var ve=n(u);ve!==null&&ne(_,ve.startTime-B),qe=!1}return qe}finally{m=null,h=ee,x=!1}}var D=!1,N=null,A=-1,j=5,I=-1;function V(){return!(e.unstable_now()-Iz||125se?(z.sortIndex=ee,t(u,z),n(f)===null&&z===n(u)&&(E?(y(A),A=-1):E=!0,ne(_,ee-se))):(z.sortIndex=ue,t(f,z),C||x||(C=!0,le(P))),z},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(z){var B=h;return function(){var ee=h;h=B;try{return z.apply(this,arguments)}finally{h=ee}}}})(Hm);$m.exports=Hm;var _1=$m.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 k1=v,qt=_1;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gu=Object.prototype.hasOwnProperty,R1=/^[: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]*$/,Dd={},Od={};function P1(e){return gu.call(Od,e)?!0:gu.call(Dd,e)?!1:R1.test(e)?Od[e]=!0:(Dd[e]=!0,!1)}function N1(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function T1(e,t,n,r){if(t===null||typeof t>"u"||N1(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Pt(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var ht={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ht[e]=new Pt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ht[t]=new Pt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ht[e]=new Pt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ht[e]=new Pt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ht[e]=new Pt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ht[e]=new Pt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ht[e]=new Pt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ht[e]=new Pt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ht[e]=new Pt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Oc=/[\-:]([a-z])/g;function jc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Oc,jc);ht[t]=new Pt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Oc,jc);ht[t]=new Pt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Oc,jc);ht[t]=new Pt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ht[e]=new Pt(e,1,!1,e.toLowerCase(),null,!1,!1)});ht.xlinkHref=new Pt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ht[e]=new Pt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mc(e,t,n,r){var o=ht.hasOwnProperty(t)?ht[t]:null;(o!==null?o.type!==0:r||!(2a||o[l]!==i[a]){var f=` +`+o[l].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=l&&0<=a);break}}}finally{Aa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yi(e):""}function A1(e){switch(e.tag){case 5:return yi(e.type);case 16:return yi("Lazy");case 13:return yi("Suspense");case 19:return yi("SuspenseList");case 0:case 2:case 15:return e=Da(e.type,!1),e;case 11:return e=Da(e.type.render,!1),e;case 1:return e=Da(e.type,!0),e;default:return""}}function Su(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case co:return"Fragment";case uo:return"Portal";case yu:return"Profiler";case Ic:return"StrictMode";case wu:return"Suspense";case xu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bm:return(e.displayName||"Context")+".Consumer";case Wm:return(e._context.displayName||"Context")+".Provider";case Lc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fc:return t=e.displayName||null,t!==null?t:Su(e.type)||"Memo";case or:t=e._payload,e=e._init;try{return Su(e(t))}catch{}}return null}function D1(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Su(t);case 8:return t===Ic?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function yr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function O1(e){var t=qm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bl(e){e._valueTracker||(e._valueTracker=O1(e))}function Gm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function cs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Eu(e,t){var n=t.checked;return Ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Md(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=yr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Km(e,t){t=t.checked,t!=null&&Mc(e,"checked",t,!1)}function bu(e,t){Km(e,t);var n=yr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Cu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Cu(e,t.type,yr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Id(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Cu(e,t,n){(t!=="number"||cs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wi=Array.isArray;function Eo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Cl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Oi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bi={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},j1=["Webkit","ms","Moz","O"];Object.keys(bi).forEach(function(e){j1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bi[t]=bi[e]})});function Zm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||bi.hasOwnProperty(e)&&bi[e]?(""+t).trim():t+"px"}function Jm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Zm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var M1=Ye({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 Ru(e,t){if(t){if(M1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function Pu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Nu=null;function zc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tu=null,bo=null,Co=null;function zd(e){if(e=nl(e)){if(typeof Tu!="function")throw Error($(280));var t=e.stateNode;t&&(t=Zs(t),Tu(e.stateNode,e.type,t))}}function eh(e){bo?Co?Co.push(e):Co=[e]:bo=e}function th(){if(bo){var e=bo,t=Co;if(Co=bo=null,zd(e),t)for(e=0;e>>=0,e===0?32:31-(q1(e)/G1|0)|0}var _l=64,kl=4194304;function xi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ms(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var a=l&~o;a!==0?r=xi(a):(i&=l,i!==0&&(r=xi(i)))}else l=n&~o,l!==0?r=xi(l):i!==0&&(r=xi(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function el(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-dn(t),e[t]=n}function X1(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=_i),Kd=" ",Qd=!1;function Sh(e,t){switch(e){case"keyup":return _x.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fo=!1;function Rx(e,t){switch(e){case"compositionend":return Eh(t);case"keypress":return t.which!==32?null:(Qd=!0,Kd);case"textInput":return e=t.data,e===Kd&&Qd?null:e;default:return null}}function Px(e,t){if(fo)return e==="compositionend"||!Gc&&Sh(e,t)?(e=wh(),Zl=Bc=ar=null,fo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Jd(n)}}function kh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rh(){for(var e=window,t=cs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=cs(e.document)}return t}function Kc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Lx(e){var t=Rh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&kh(n.ownerDocument.documentElement,n)){if(r!==null&&Kc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ep(n,i);var l=ep(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,po=null,Iu=null,Ri=null,Lu=!1;function tp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lu||po==null||po!==cs(r)||(r=po,"selectionStart"in r&&Kc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ri&&zi(Ri,r)||(Ri=r,r=gs(Iu,"onSelect"),0vo||(e.current=Wu[vo],Wu[vo]=null,vo--)}function je(e,t){vo++,Wu[vo]=e.current,e.current=t}var wr={},xt=br(wr),Mt=br(!1),Hr=wr;function Oo(e,t){var n=e.type.contextTypes;if(!n)return wr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function It(e){return e=e.childContextTypes,e!=null}function ws(){Ue(Mt),Ue(xt)}function ap(e,t,n){if(xt.current!==wr)throw Error($(168));je(xt,t),je(Mt,n)}function Ih(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error($(108,D1(e)||"Unknown",o));return Ye({},n,r)}function xs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wr,Hr=xt.current,je(xt,e),je(Mt,Mt.current),!0}function up(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=Ih(e,t,Hr),r.__reactInternalMemoizedMergedChildContext=e,Ue(Mt),Ue(xt),je(xt,e)):Ue(Mt),je(Mt,n)}var In=null,Js=!1,qa=!1;function Lh(e){In===null?In=[e]:In.push(e)}function Qx(e){Js=!0,Lh(e)}function Cr(){if(!qa&&In!==null){qa=!0;var e=0,t=Ne;try{var n=In;for(Ne=1;e>=l,o-=l,Ln=1<<32-dn(t)+o|n<A?(j=N,N=null):j=N.sibling;var I=h(y,N,b[A],_);if(I===null){N===null&&(N=j);break}e&&N&&I.alternate===null&&t(y,N),g=i(I,g,A),D===null?P=I:D.sibling=I,D=I,N=j}if(A===b.length)return n(y,N),Be&&Dr(y,A),P;if(N===null){for(;AA?(j=N,N=null):j=N.sibling;var V=h(y,N,I.value,_);if(V===null){N===null&&(N=j);break}e&&N&&V.alternate===null&&t(y,N),g=i(V,g,A),D===null?P=V:D.sibling=V,D=V,N=j}if(I.done)return n(y,N),Be&&Dr(y,A),P;if(N===null){for(;!I.done;A++,I=b.next())I=m(y,I.value,_),I!==null&&(g=i(I,g,A),D===null?P=I:D.sibling=I,D=I);return Be&&Dr(y,A),P}for(N=r(y,N);!I.done;A++,I=b.next())I=x(N,y,A,I.value,_),I!==null&&(e&&I.alternate!==null&&N.delete(I.key===null?A:I.key),g=i(I,g,A),D===null?P=I:D.sibling=I,D=I);return e&&N.forEach(function(H){return t(y,H)}),Be&&Dr(y,A),P}function R(y,g,b,_){if(typeof b=="object"&&b!==null&&b.type===co&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case El:e:{for(var P=b.key,D=g;D!==null;){if(D.key===P){if(P=b.type,P===co){if(D.tag===7){n(y,D.sibling),g=o(D,b.props.children),g.return=y,y=g;break e}}else if(D.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===or&&dp(P)===D.type){n(y,D.sibling),g=o(D,b.props),g.ref=fi(y,D,b),g.return=y,y=g;break e}n(y,D);break}else t(y,D);D=D.sibling}b.type===co?(g=$r(b.props.children,y.mode,_,b.key),g.return=y,y=g):(_=ls(b.type,b.key,b.props,null,y.mode,_),_.ref=fi(y,g,b),_.return=y,y=_)}return l(y);case uo:e:{for(D=b.key;g!==null;){if(g.key===D)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){n(y,g.sibling),g=o(g,b.children||[]),g.return=y,y=g;break e}else{n(y,g);break}else t(y,g);g=g.sibling}g=eu(b,y.mode,_),g.return=y,y=g}return l(y);case or:return D=b._init,R(y,g,D(b._payload),_)}if(wi(b))return C(y,g,b,_);if(li(b))return E(y,g,b,_);Ol(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,g!==null&&g.tag===6?(n(y,g.sibling),g=o(g,b),g.return=y,y=g):(n(y,g),g=Ja(b,y.mode,_),g.return=y,y=g),l(y)):n(y,g)}return R}var Mo=Hh(!0),Uh=Hh(!1),bs=br(null),Cs=null,wo=null,Zc=null;function Jc(){Zc=wo=Cs=null}function ef(e){var t=bs.current;Ue(bs),e._currentValue=t}function qu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ko(e,t){Cs=e,Zc=wo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jt=!0),e.firstContext=null)}function tn(e){var t=e._currentValue;if(Zc!==e)if(e={context:e,memoizedValue:t,next:null},wo===null){if(Cs===null)throw Error($(308));wo=e,Cs.dependencies={lanes:0,firstContext:e}}else wo=wo.next=e;return t}var Ir=null;function tf(e){Ir===null?Ir=[e]:Ir.push(e)}function Wh(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,tf(t)):(n.next=o.next,o.next=n),t.interleaved=n,Un(e,r)}function Un(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ir=!1;function nf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bh(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ce&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Un(e,n)}return o=r.interleaved,o===null?(t.next=t,tf(r)):(t.next=o.next,o.next=t),r.interleaved=t,Un(e,n)}function es(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hc(e,n)}}function pp(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _s(e,t,n,r){var o=e.updateQueue;ir=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var f=a,u=f.next;f.next=null,l===null?i=u:l.next=u,l=f;var p=e.alternate;p!==null&&(p=p.updateQueue,a=p.lastBaseUpdate,a!==l&&(a===null?p.firstBaseUpdate=u:a.next=u,p.lastBaseUpdate=f))}if(i!==null){var m=o.baseState;l=0,p=u=f=null,a=i;do{var h=a.lane,x=a.eventTime;if((r&h)===h){p!==null&&(p=p.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var C=e,E=a;switch(h=t,x=n,E.tag){case 1:if(C=E.payload,typeof C=="function"){m=C.call(x,m,h);break e}m=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=E.payload,h=typeof C=="function"?C.call(x,m,h):C,h==null)break e;m=Ye({},m,h);break e;case 2:ir=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[a]:h.push(a))}else x={eventTime:x,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},p===null?(u=p=x,f=m):p=p.next=x,l|=h;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;h=a,a=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(p===null&&(f=m),o.baseState=f,o.firstBaseUpdate=u,o.lastBaseUpdate=p,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Br|=l,e.lanes=l,e.memoizedState=m}}function mp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ka.transition;Ka.transition={};try{e(!1),t()}finally{Ne=n,Ka.transition=r}}function sv(){return nn().memoizedState}function Jx(e,t,n){var r=vr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},av(e))uv(t,n);else if(n=Wh(e,t,n,r),n!==null){var o=_t();pn(n,e,r,o),cv(n,t,r)}}function eS(e,t,n){var r=vr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(av(e))uv(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,a=i(l,n);if(o.hasEagerState=!0,o.eagerState=a,mn(a,l)){var f=t.interleaved;f===null?(o.next=o,tf(t)):(o.next=f.next,f.next=o),t.interleaved=o;return}}catch{}finally{}n=Wh(e,t,o,r),n!==null&&(o=_t(),pn(n,e,r,o),cv(n,t,r))}}function av(e){var t=e.alternate;return e===Qe||t!==null&&t===Qe}function uv(e,t){Pi=Rs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cv(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hc(e,n)}}var Ps={readContext:tn,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useInsertionEffect:gt,useLayoutEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useMutableSource:gt,useSyncExternalStore:gt,useId:gt,unstable_isNewReconciler:!1},tS={readContext:tn,useCallback:function(e,t){return Cn().memoizedState=[e,t===void 0?null:t],e},useContext:tn,useEffect:vp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ns(4194308,4,nv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){return ns(4,2,e,t)},useMemo:function(e,t){var n=Cn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Cn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Jx.bind(null,Qe,e),[r.memoizedState,e]},useRef:function(e){var t=Cn();return e={current:e},t.memoizedState=e},useState:hp,useDebugValue:ff,useDeferredValue:function(e){return Cn().memoizedState=e},useTransition:function(){var e=hp(!1),t=e[0];return e=Zx.bind(null,e[1]),Cn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Qe,o=Cn();if(Be){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),dt===null)throw Error($(349));Wr&30||Kh(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,vp(Yh.bind(null,r,i,e),[e]),r.flags|=2048,Gi(9,Qh.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Cn(),t=dt.identifierPrefix;if(Be){var n=Fn,r=Ln;n=(r&~(1<<32-dn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[_n]=t,e[Ui]=r,xv(e,t,!1,!1),t.stateNode=e;e:{switch(l=Pu(n,r),n){case"dialog":$e("cancel",e),$e("close",e),o=r;break;case"iframe":case"object":case"embed":$e("load",e),o=r;break;case"video":case"audio":for(o=0;oFo&&(t.flags|=128,r=!0,di(i,!1),t.lanes=4194304)}else{if(!r)if(e=ks(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),di(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Be)return yt(t),null}else 2*et()-i.renderingStartTime>Fo&&n!==1073741824&&(t.flags|=128,r=!0,di(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=et(),t.sibling=null,n=Ke.current,je(Ke,r?n&1|2:n&1),t):(yt(t),null);case 22:case 23:return gf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ht&1073741824&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function uS(e,t){switch(Yc(t),t.tag){case 1:return It(t.type)&&ws(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Io(),Ue(Mt),Ue(xt),lf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return of(t),null;case 13:if(Ue(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));jo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(Ke),null;case 4:return Io(),null;case 10:return ef(t.type._context),null;case 22:case 23:return gf(),null;case 24:return null;default:return null}}var Ml=!1,wt=!1,cS=typeof WeakSet=="function"?WeakSet:Set,X=null;function xo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ze(e,t,r)}else n.current=null}function tc(e,t,n){try{n()}catch(r){Ze(e,t,r)}}var Rp=!1;function fS(e,t){if(Fu=hs,e=Rh(),Kc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,a=-1,f=-1,u=0,p=0,m=e,h=null;t:for(;;){for(var x;m!==n||o!==0&&m.nodeType!==3||(a=l+o),m!==i||r!==0&&m.nodeType!==3||(f=l+r),m.nodeType===3&&(l+=m.nodeValue.length),(x=m.firstChild)!==null;)h=m,m=x;for(;;){if(m===e)break t;if(h===n&&++u===o&&(a=l),h===i&&++p===r&&(f=l),(x=m.nextSibling)!==null)break;m=h,h=m.parentNode}m=x}n=a===-1||f===-1?null:{start:a,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(zu={focusedElem:e,selectionRange:n},hs=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var C=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(C!==null){var E=C.memoizedProps,R=C.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?E:un(t.type,E),R);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(_){Ze(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return C=Rp,Rp=!1,C}function Ni(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&tc(t,n,i)}o=o.next}while(o!==r)}}function na(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function nc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function bv(e){var t=e.alternate;t!==null&&(e.alternate=null,bv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_n],delete t[Ui],delete t[Uu],delete t[Gx],delete t[Kx])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Cv(e){return e.tag===5||e.tag===3||e.tag===4}function Pp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ys));else if(r!==4&&(e=e.child,e!==null))for(rc(e,t,n),e=e.sibling;e!==null;)rc(e,t,n),e=e.sibling}function oc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(oc(e,t,n),e=e.sibling;e!==null;)oc(e,t,n),e=e.sibling}var pt=null,cn=!1;function er(e,t,n){for(n=n.child;n!==null;)_v(e,t,n),n=n.sibling}function _v(e,t,n){if(Pn&&typeof Pn.onCommitFiberUnmount=="function")try{Pn.onCommitFiberUnmount(Ks,n)}catch{}switch(n.tag){case 5:wt||xo(n,t);case 6:var r=pt,o=cn;pt=null,er(e,t,n),pt=r,cn=o,pt!==null&&(cn?(e=pt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pt.removeChild(n.stateNode));break;case 18:pt!==null&&(cn?(e=pt,n=n.stateNode,e.nodeType===8?Va(e.parentNode,n):e.nodeType===1&&Va(e,n),Li(e)):Va(pt,n.stateNode));break;case 4:r=pt,o=cn,pt=n.stateNode.containerInfo,cn=!0,er(e,t,n),pt=r,cn=o;break;case 0:case 11:case 14:case 15:if(!wt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&tc(n,t,l),o=o.next}while(o!==r)}er(e,t,n);break;case 1:if(!wt&&(xo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ze(n,t,a)}er(e,t,n);break;case 21:er(e,t,n);break;case 22:n.mode&1?(wt=(r=wt)||n.memoizedState!==null,er(e,t,n),wt=r):er(e,t,n);break;default:er(e,t,n)}}function Np(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cS),t.forEach(function(r){var o=xS.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function an(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*pS(r/1960))-r,10e?16:e,ur===null)var r=!1;else{if(e=ur,ur=null,As=0,Ce&6)throw Error($(331));var o=Ce;for(Ce|=4,X=e.current;X!==null;){var i=X,l=i.child;if(X.flags&16){var a=i.deletions;if(a!==null){for(var f=0;fet()-hf?zr(e,0):mf|=n),Lt(e,t)}function Ov(e,t){t===0&&(e.mode&1?(t=kl,kl<<=1,!(kl&130023424)&&(kl=4194304)):t=1);var n=_t();e=Un(e,t),e!==null&&(el(e,t,n),Lt(e,n))}function wS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ov(e,n)}function xS(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($(314))}r!==null&&r.delete(t),Ov(e,n)}var jv;jv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jt=!1,sS(e,t,n);jt=!!(e.flags&131072)}else jt=!1,Be&&t.flags&1048576&&Fh(t,Es,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;rs(e,t),e=t.pendingProps;var o=Oo(t,xt.current);ko(t,n),o=af(null,t,r,e,o,n);var i=uf();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,It(r)?(i=!0,xs(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,nf(t),o.updater=ta,t.stateNode=o,o._reactInternals=t,Ku(t,r,e,n),t=Xu(null,t,r,!0,i,n)):(t.tag=0,Be&&i&&Qc(t),Ct(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(rs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=ES(r),e=un(r,e),o){case 0:t=Yu(null,t,r,e,n);break e;case 1:t=Cp(null,t,r,e,n);break e;case 11:t=Ep(null,t,r,e,n);break e;case 14:t=bp(null,t,r,un(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),Yu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),Cp(e,t,r,o,n);case 3:e:{if(gv(t),e===null)throw Error($(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Bh(e,t),_s(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Lo(Error($(423)),t),t=_p(e,t,r,n,o);break e}else if(r!==o){o=Lo(Error($(424)),t),t=_p(e,t,r,n,o);break e}else for(Wt=pr(t.stateNode.containerInfo.firstChild),Bt=t,Be=!0,fn=null,n=Uh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(jo(),r===o){t=Wn(e,t,n);break e}Ct(e,t,r,n)}t=t.child}return t;case 5:return Vh(t),e===null&&Vu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,$u(r,o)?l=null:i!==null&&$u(r,i)&&(t.flags|=32),vv(e,t),Ct(e,t,l,n),t.child;case 6:return e===null&&Vu(t),null;case 13:return yv(e,t,n);case 4:return rf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Mo(t,null,r,n):Ct(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),Ep(e,t,r,o,n);case 7:return Ct(e,t,t.pendingProps,n),t.child;case 8:return Ct(e,t,t.pendingProps.children,n),t.child;case 12:return Ct(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,je(bs,r._currentValue),r._currentValue=l,i!==null)if(mn(i.value,l)){if(i.children===o.children&&!Mt.current){t=Wn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){l=i.child;for(var f=a.firstContext;f!==null;){if(f.context===r){if(i.tag===1){f=zn(-1,n&-n),f.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var p=u.pending;p===null?f.next=f:(f.next=p.next,p.next=f),u.pending=f}}i.lanes|=n,f=i.alternate,f!==null&&(f.lanes|=n),qu(i.return,n,t),a.lanes|=n;break}f=f.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error($(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),qu(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}Ct(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ko(t,n),o=tn(o),r=r(o),t.flags|=1,Ct(e,t,r,n),t.child;case 14:return r=t.type,o=un(r,t.pendingProps),o=un(r.type,o),bp(e,t,r,o,n);case 15:return mv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),rs(e,t),t.tag=1,It(r)?(e=!0,xs(t)):e=!1,ko(t,n),fv(t,r,o),Ku(t,r,o,n),Xu(null,t,r,!0,e,n);case 19:return wv(e,t,n);case 22:return hv(e,t,n)}throw Error($(156,t.tag))};function Mv(e,t){return ah(e,t)}function SS(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,n,r){return new SS(e,t,n,r)}function wf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ES(e){if(typeof e=="function")return wf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Lc)return 11;if(e===Fc)return 14}return 2}function gr(e,t){var n=e.alternate;return n===null?(n=Jt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ls(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")wf(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case co:return $r(n.children,o,i,t);case Ic:l=8,o|=8;break;case yu:return e=Jt(12,n,t,o|2),e.elementType=yu,e.lanes=i,e;case wu:return e=Jt(13,n,t,o),e.elementType=wu,e.lanes=i,e;case xu:return e=Jt(19,n,t,o),e.elementType=xu,e.lanes=i,e;case Vm:return oa(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Wm:l=10;break e;case Bm:l=9;break e;case Lc:l=11;break e;case Fc:l=14;break e;case or:l=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=Jt(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function $r(e,t,n,r){return e=Jt(7,e,r,t),e.lanes=n,e}function oa(e,t,n,r){return e=Jt(22,e,r,t),e.elementType=Vm,e.lanes=n,e.stateNode={isHidden:!1},e}function Ja(e,t,n){return e=Jt(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bS(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ja(0),this.expirationTimes=ja(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ja(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function xf(e,t,n,r,o,i,l,a,f){return e=new bS(e,t,n,a,f),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Jt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},nf(i),e}function CS(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zv)}catch(e){console.error(e)}}zv(),zm.exports=Gt;var Zr=zm.exports;const NS=Zi(Zr);var Lp=Zr;vu.createRoot=Lp.createRoot,vu.hydrateRoot=Lp.hydrateRoot;var TS={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Fp=e=>{let t;const n=new Set,r=(p,m)=>{const h=typeof p=="function"?p(t):p;if(!Object.is(h,t)){const x=t;t=m??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(C=>C(t,x))}},o=()=>t,f={setState:r,getState:o,getInitialState:()=>u,subscribe:p=>(n.add(p),()=>n.delete(p)),destroy:()=>{(TS?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,f);return f},AS=e=>e?Fp(e):Fp;var $v={exports:{}},Hv={},Uv={exports:{}},Wv={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var zo=v;function DS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var OS=typeof Object.is=="function"?Object.is:DS,jS=zo.useState,MS=zo.useEffect,IS=zo.useLayoutEffect,LS=zo.useDebugValue;function FS(e,t){var n=t(),r=jS({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return IS(function(){o.value=n,o.getSnapshot=t,tu(o)&&i({inst:o})},[e,n,t]),MS(function(){return tu(o)&&i({inst:o}),e(function(){tu(o)&&i({inst:o})})},[e]),LS(n),n}function tu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!OS(e,n)}catch{return!0}}function zS(e,t){return t()}var $S=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?zS:FS;Wv.useSyncExternalStore=zo.useSyncExternalStore!==void 0?zo.useSyncExternalStore:$S;Uv.exports=Wv;var HS=Uv.exports;/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ua=v,US=HS;function WS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var BS=typeof Object.is=="function"?Object.is:WS,VS=US.useSyncExternalStore,qS=ua.useRef,GS=ua.useEffect,KS=ua.useMemo,QS=ua.useDebugValue;Hv.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=qS(null);if(i.current===null){var l={hasValue:!1,value:null};i.current=l}else l=i.current;i=KS(function(){function f(x){if(!u){if(u=!0,p=x,x=r(x),o!==void 0&&l.hasValue){var C=l.value;if(o(C,x))return m=C}return m=x}if(C=m,BS(p,x))return C;var E=r(x);return o!==void 0&&o(C,E)?C:(p=x,m=E)}var u=!1,p,m,h=n===void 0?null:n;return[function(){return f(t())},h===null?void 0:function(){return f(h())}]},[t,n,r,o]);var a=VS(e,i[0],i[1]);return GS(function(){l.hasValue=!0,l.value=a},[a]),QS(a),a};$v.exports=Hv;var YS=$v.exports;const XS=Zi(YS);var Bv={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:ZS}=Q,{useSyncExternalStoreWithSelector:JS}=XS;let zp=!1;const eE=e=>e;function tE(e,t=eE,n){(Bv?"production":void 0)!=="production"&&n&&!zp&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),zp=!0);const r=JS(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return ZS(r),r}const $p=e=>{(Bv?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?AS(e):e,n=(r,o)=>tE(t,r,o);return Object.assign(n,t),n},nE=e=>e?$p(e):$p;var Vv={exports:{}};const rE={},oE=Object.freeze(Object.defineProperty({__proto__:null,default:rE},Symbol.toStringTag,{value:"Module"})),nu=n1(oE);(function(e,t){var n=void 0,r=function(o){return n||(n=new Promise(function(i,l){var a=typeof o<"u"?o:{},f=a.onAbort;a.onAbort=function(s){l(new Error(s)),f&&f(s)},a.postRun=a.postRun||[],a.postRun.push(function(){i(a)}),e=void 0;var u;u||(u=typeof a<"u"?a:{}),u.onRuntimeInitialized=function(){function s(T,L){switch(typeof L){case"boolean":Jw(T,L?1:0);break;case"number":Yw(T,L);break;case"string":Xw(T,L,-1,-1);break;case"object":if(L===null)kd(T);else if(L.length!=null){var te=hl(L,ml);Zw(T,te,L.length,-1),yl(te)}else xl(T,"Wrong API use : tried to return a value of an unknown type ("+L+").",-1);break;default:kd(T)}}function c(T,L){for(var te=[],ce=0;ce>>0),T!=null){var L=this.filename,te="/",ce=L;if(te&&(te=typeof te=="string"?te:Zo(te),ce=L?Ft(te+"/"+L):te),L=De(!0,!0),ce=al(ce,(L!==void 0?L:438)&4095|32768,0),T){if(typeof T=="string"){te=Array(T.length);for(var we=0,Oe=T.length;we(s=_e(s)?new URL(s):_.normalize(s),b.readFileSync(s,c?void 0:"utf8")),g=s=>(s=R(s,!0),s.buffer||(s=new Uint8Array(s)),s),y=(s,c,d,S=!0)=>{s=_e(s)?new URL(s):_.normalize(s),b.readFile(s,S?void 0:"utf8",(k,O)=>{k?d(k):c(S?O.buffer:O)})},!u.thisProgram&&1"[Emscripten Module object]"}else(h||x)&&(x?E=self.location.href:typeof document<"u"&&document.currentScript&&(E=document.currentScript.src),E=E.indexOf("blob:")!==0?E.substr(0,E.replace(/[?#].*/,"").lastIndexOf("/")+1):"",R=s=>{var c=new XMLHttpRequest;return c.open("GET",s,!1),c.send(null),c.responseText},x&&(g=s=>{var c=new XMLHttpRequest;return c.open("GET",s,!1),c.responseType="arraybuffer",c.send(null),new Uint8Array(c.response)}),y=(s,c,d)=>{var S=new XMLHttpRequest;S.open("GET",s,!0),S.responseType="arraybuffer",S.onload=()=>{S.status==200||S.status==0&&S.response?c(S.response):d()},S.onerror=d,S.send(null)});var P=u.print||console.log.bind(console),D=u.printErr||console.error.bind(console);Object.assign(u,p),p=null,u.thisProgram&&(m=u.thisProgram);var N;u.wasmBinary&&(N=u.wasmBinary),typeof WebAssembly!="object"&&ve("no native wasm support detected");var A,j=!1,I,V,H,F,W,Z,le;function ne(){var s=A.buffer;u.HEAP8=I=new Int8Array(s),u.HEAP16=H=new Int16Array(s),u.HEAPU8=V=new Uint8Array(s),u.HEAPU16=new Uint16Array(s),u.HEAP32=F=new Int32Array(s),u.HEAPU32=W=new Uint32Array(s),u.HEAPF32=Z=new Float32Array(s),u.HEAPF64=le=new Float64Array(s)}var z=[],B=[],ee=[];function se(){var s=u.preRun.shift();z.unshift(s)}var ue=0,qe=null;function ve(s){var c;throw(c=u.onAbort)==null||c.call(u,s),s="Aborted("+s+")",D(s),j=!0,new WebAssembly.RuntimeError(s+". Build with -sASSERTIONS for more info.")}var Xe=s=>s.startsWith("data:application/octet-stream;base64,"),_e=s=>s.startsWith("file://"),J;if(J="sql-wasm.wasm",!Xe(J)){var ye=J;J=u.locateFile?u.locateFile(ye,E):E+ye}function Ie(s){if(s==J&&N)return new Uint8Array(N);if(g)return g(s);throw"both async and sync fetching of the wasm failed"}function K(s){if(!N&&(h||x)){if(typeof fetch=="function"&&!_e(s))return fetch(s,{credentials:"same-origin"}).then(c=>{if(!c.ok)throw"failed to load wasm binary file at '"+s+"'";return c.arrayBuffer()}).catch(()=>Ie(s));if(y)return new Promise((c,d)=>{y(s,S=>c(new Uint8Array(S)),d)})}return Promise.resolve().then(()=>Ie(s))}function ge(s,c,d){return K(s).then(S=>WebAssembly.instantiate(S,c)).then(S=>S).then(d,S=>{D(`failed to asynchronously prepare wasm: ${S}`),ve(S)})}function de(s,c){var d=J;N||typeof WebAssembly.instantiateStreaming!="function"||Xe(d)||_e(d)||C||typeof fetch!="function"?ge(d,s,c):fetch(d,{credentials:"same-origin"}).then(S=>WebAssembly.instantiateStreaming(S,s).then(c,function(k){return D(`wasm streaming compile failed: ${k}`),D("falling back to ArrayBuffer instantiation"),ge(d,s,c)}))}var Y,me,ut=s=>{for(;0>0];case"i8":return I[s>>0];case"i16":return H[s>>1];case"i32":return F[s>>2];case"i64":ve("to do getValue(i64) use WASM_BIGINT");case"float":return Z[s>>2];case"double":return le[s>>3];case"*":return W[s>>2];default:ve(`invalid type for getValue: ${c}`)}}function tt(s){var c="i32";switch(c.endsWith("*")&&(c="*"),c){case"i1":I[s>>0]=0;break;case"i8":I[s>>0]=0;break;case"i16":H[s>>1]=0;break;case"i32":F[s>>2]=0;break;case"i64":ve("to do setValue(i64) use WASM_BIGINT");case"float":Z[s>>2]=0;break;case"double":le[s>>3]=0;break;case"*":W[s>>2]=0;break;default:ve(`invalid type for setValue: ${c}`)}}var Nt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,ke=(s,c,d)=>{var S=c+d;for(d=c;s[d]&&!(d>=S);)++d;if(16k?S+=String.fromCharCode(k):(k-=65536,S+=String.fromCharCode(55296|k>>10,56320|k&1023))}}else S+=String.fromCharCode(k)}return S},rn=(s,c)=>s?ke(V,s,c):"",eo=(s,c)=>{for(var d=0,S=s.length-1;0<=S;S--){var k=s[S];k==="."?s.splice(S,1):k===".."?(s.splice(S,1),d++):d&&(s.splice(S,1),d--)}if(c)for(;d;d--)s.unshift("..");return s},Ft=s=>{var c=s.charAt(0)==="/",d=s.substr(-1)==="/";return(s=eo(s.split("/").filter(S=>!!S),!c).join("/"))||c||(s="."),s&&d&&(s+="/"),(c?"/":"")+s},yn=s=>{var c=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(s).slice(1);return s=c[0],c=c[1],!s&&!c?".":(c&&(c=c.substr(0,c.length-1)),s+c)},G=s=>{if(s==="/")return"/";s=Ft(s),s=s.replace(/\/$/,"");var c=s.lastIndexOf("/");return c===-1?s:s.substr(c+1)},oe=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return d=>crypto.getRandomValues(d);if(C)try{var s=nu;if(s.randomFillSync)return d=>s.randomFillSync(d);var c=s.randomBytes;return d=>(d.set(c(d.byteLength)),d)}catch{}ve("initRandomDevice")},Le=s=>(Le=oe())(s);function Pe(){for(var s="",c=!1,d=arguments.length-1;-1<=d&&!c;d--){if(c=0<=d?arguments[d]:"/",typeof c!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";s=c+"/"+s,c=c.charAt(0)==="/"}return s=eo(s.split("/").filter(S=>!!S),!c).join("/"),(c?"/":"")+s||"."}var nt=[],Tt=s=>{for(var c=0,d=0;d=S?c++:2047>=S?c+=2:55296<=S&&57343>=S?(c+=4,++d):c+=3}return c},St=(s,c,d,S)=>{if(!(0=M){var ae=s.charCodeAt(++O);M=65536+((M&1023)<<10)|ae&1023}if(127>=M){if(d>=S)break;c[d++]=M}else{if(2047>=M){if(d+1>=S)break;c[d++]=192|M>>6}else{if(65535>=M){if(d+2>=S)break;c[d++]=224|M>>12}else{if(d+3>=S)break;c[d++]=240|M>>18,c[d++]=128|M>>12&63}c[d++]=128|M>>6&63}c[d++]=128|M&63}}return c[d]=0,d-k};function on(s,c){var d=Array(Tt(s)+1);return s=St(s,d,0,d.length),c&&(d.length=s),d}var Yn=[];function Xn(s,c){Yn[s]={input:[],output:[],Xa:c},xa(s,Zn)}var Zn={open(s){var c=Yn[s.node.rdev];if(!c)throw new U(43);s.tty=c,s.seekable=!1},close(s){s.tty.Xa.fsync(s.tty)},fsync(s){s.tty.Xa.fsync(s.tty)},read(s,c,d,S){if(!s.tty||!s.tty.Xa.sb)throw new U(60);for(var k=0,O=0;O=c||(c=Math.max(c,d*(1048576>d?2:1.125)>>>0),d!=0&&(c=Math.max(c,256)),d=s.Ia,s.Ia=new Uint8Array(c),0=s.node.Ma)return 0;if(s=Math.min(s.node.Ma-k,S),8c)throw new U(28);return c},lb(s,c,d){Re(s.node,c+d),s.node.Ma=Math.max(s.node.Ma,c+d)},bb(s,c,d,S,k){if((s.node.mode&61440)!==32768)throw new U(43);if(s=s.node.Ia,k&2||s.buffer!==I.buffer){if((0{var d=0;return s&&(d|=365),c&&(d|=146),d},We=null,Et={},vt=[],wn=1,zt=null,xn=!0,U=null,to={};function At(s,c={}){if(s=Pe(s),!s)return{path:"",node:null};if(c=Object.assign({qb:!0,kb:0},c),8!!M);for(var d=We,S="/",k=0;k>>0)%zt.length}function Xf(s){var c=wa(s.parent.id,s.name);if(zt[c]===s)zt[c]=s.Wa;else for(c=zt[c];c;){if(c.Wa===s){c.Wa=s.Wa;break}c=c.Wa}}function Rr(s,c){var d;if(d=(d=no(s,"x"))?d:s.Ga.lookup?0:2)throw new U(d,s);for(d=zt[wa(s.id,c)];d;d=d.Wa){var S=d.name;if(d.parent.id===s.id&&S===c)return d}return s.Ga.lookup(s,c)}function Zf(s,c,d,S){return s=new gd(s,c,d,S),c=wa(s.parent.id,s.name),s.Wa=zt[c],zt[c]=s}function Qt(s){return(s&61440)===16384}function Jf(s){var c=["r","w","rw"][s&3];return s&512&&(c+="w"),c}function no(s,c){if(xn)return 0;if(!c.includes("r")||s.mode&292){if(c.includes("w")&&!(s.mode&146)||c.includes("x")&&!(s.mode&73))return 2}else return 2;return 0}function ed(s,c){try{return Rr(s,c),20}catch{}return no(s,"wx")}function td(s,c,d){try{var S=Rr(s,c)}catch(k){return k.Ka}if(s=no(s,"wx"))return s;if(d){if(!Qt(S.mode))return 54;if(S===S.parent||Zo(S)==="/")return 10}else if(Qt(S.mode))return 31;return 0}function Sw(){for(var s=0;4096>=s;s++)if(!vt[s])return s;throw new U(33)}function bt(s){if(s=vt[s],!s)throw new U(8);return s}function nd(s,c=-1){return ti||(ti=function(){this.$a={}},ti.prototype={},Object.defineProperties(ti.prototype,{object:{get(){return this.node},set(d){this.node=d}},flags:{get(){return this.$a.flags},set(d){this.$a.flags=d}},position:{get(){return this.$a.position},set(d){this.$a.position=d}}})),s=Object.assign(new ti,s),c==-1&&(c=Sw()),s.fd=c,vt[c]=s}var Ew={open(s){var c,d;s.Ha=Et[s.node.rdev].Ha,(d=(c=s.Ha).open)==null||d.call(c,s)},Ta(){throw new U(70)}};function xa(s,c){Et[s]={Ha:c}}function rd(s,c){var d=c==="/",S=!c;if(d&&We)throw new U(10);if(!d&&!S){var k=At(c,{qb:!1});if(c=k.path,k=k.node,k.Va)throw new U(10);if(!Qt(k.mode))throw new U(54)}c={type:s,Pb:{},tb:c,Cb:[]},s=s.Ra(c),s.Ra=c,c.root=s,d?We=s:k&&(k.Va=c,k.Ra&&k.Ra.Cb.push(c))}function al(s,c,d){var S=At(s,{parent:!0}).node;if(s=G(s),!s||s==="."||s==="..")throw new U(28);var k=ed(S,s);if(k)throw new U(k);if(!S.Ga.ab)throw new U(63);return S.Ga.ab(S,s,c,d)}function Sn(s,c){return al(s,(c!==void 0?c:511)&1023|16384,0)}function ul(s,c,d){typeof d>"u"&&(d=c,c=438),al(s,c|8192,d)}function Sa(s,c){if(!Pe(s))throw new U(44);var d=At(c,{parent:!0}).node;if(!d)throw new U(44);c=G(c);var S=ed(d,c);if(S)throw new U(S);if(!d.Ga.symlink)throw new U(63);d.Ga.symlink(d,c,s)}function od(s){var c=At(s,{parent:!0}).node;s=G(s);var d=Rr(c,s),S=td(c,s,!0);if(S)throw new U(S);if(!c.Ga.rmdir)throw new U(63);if(d.Va)throw new U(10);c.Ga.rmdir(c,s),Xf(d)}function id(s){var c=At(s,{parent:!0}).node;if(!c)throw new U(44);s=G(s);var d=Rr(c,s),S=td(c,s,!1);if(S)throw new U(S);if(!c.Ga.unlink)throw new U(63);if(d.Va)throw new U(10);c.Ga.unlink(c,s),Xf(d)}function ld(s){if(s=At(s).node,!s)throw new U(44);if(!s.Ga.readlink)throw new U(28);return Pe(Zo(s.parent),s.Ga.readlink(s))}function Jo(s,c){if(s=At(s,{Sa:!c}).node,!s)throw new U(44);if(!s.Ga.Pa)throw new U(63);return s.Ga.Pa(s)}function sd(s){return Jo(s,!0)}function cl(s,c){if(s=typeof s=="string"?At(s,{Sa:!0}).node:s,!s.Ga.Oa)throw new U(63);s.Ga.Oa(s,{mode:c&4095|s.mode&-4096,timestamp:Date.now()})}function ad(s,c){if(0>c)throw new U(28);if(s=typeof s=="string"?At(s,{Sa:!0}).node:s,!s.Ga.Oa)throw new U(63);if(Qt(s.mode))throw new U(31);if((s.mode&61440)!==32768)throw new U(28);var d=no(s,"w");if(d)throw new U(d);s.Ga.Oa(s,{size:c,timestamp:Date.now()})}function ro(s,c,d){if(s==="")throw new U(44);if(typeof c=="string"){var S={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[c];if(typeof S>"u")throw Error(`Unknown file open mode: ${c}`);c=S}if(d=c&64?(typeof d>"u"?438:d)&4095|32768:0,typeof s=="object")var k=s;else{s=Ft(s);try{k=At(s,{Sa:!(c&131072)}).node}catch{}}if(S=!1,c&64)if(k){if(c&128)throw new U(20)}else k=al(s,d,0),S=!0;if(!k)throw new U(44);if((k.mode&61440)===8192&&(c&=-513),c&65536&&!Qt(k.mode))throw new U(54);if(!S&&(d=k?(k.mode&61440)===40960?32:Qt(k.mode)&&(Jf(c)!=="r"||c&512)?31:no(k,Jf(c)):44))throw new U(d);return c&512&&!S&&ad(k,0),c&=-131713,k=nd({node:k,path:Zo(k),flags:c,seekable:!0,position:0,Ha:k.Ha,Fb:[],error:!1}),k.Ha.open&&k.Ha.open(k),!u.logReadFiles||c&1||(ba||(ba={}),s in ba||(ba[s]=1)),k}function Ea(s){if(s.fd===null)throw new U(8);s.hb&&(s.hb=null);try{s.Ha.close&&s.Ha.close(s)}catch(c){throw c}finally{vt[s.fd]=null}s.fd=null}function ud(s,c,d){if(s.fd===null)throw new U(8);if(!s.seekable||!s.Ha.Ta)throw new U(70);if(d!=0&&d!=1&&d!=2)throw new U(28);s.position=s.Ha.Ta(s,c,d),s.Fb=[]}function cd(s,c,d,S,k){if(0>S||0>k)throw new U(28);if(s.fd===null)throw new U(8);if((s.flags&2097155)===1)throw new U(8);if(Qt(s.node.mode))throw new U(31);if(!s.Ha.read)throw new U(28);var O=typeof k<"u";if(!O)k=s.position;else if(!s.seekable)throw new U(70);return c=s.Ha.read(s,c,d,S,k),O||(s.position+=c),c}function fd(s,c,d,S,k){if(0>S||0>k)throw new U(28);if(s.fd===null)throw new U(8);if(!(s.flags&2097155))throw new U(8);if(Qt(s.node.mode))throw new U(31);if(!s.Ha.write)throw new U(28);s.seekable&&s.flags&1024&&ud(s,0,2);var O=typeof k<"u";if(!O)k=s.position;else if(!s.seekable)throw new U(70);return c=s.Ha.write(s,c,d,S,k,void 0),O||(s.position+=c),c}function bw(s){var c,d=ro(s,d||0);s=Jo(s).size;var S=new Uint8Array(s);return cd(d,S,0,s,0),c=S,Ea(d),c}function dd(){U||(U=function(s,c){this.name="ErrnoError",this.node=c,this.Eb=function(d){this.Ka=d},this.Eb(s),this.message="FS error"},U.prototype=Error(),U.prototype.constructor=U,[44].forEach(s=>{to[s]=new U(s),to[s].stack=""}))}var pd;function ei(s,c,d){s=Ft("/dev/"+s);var S=De(!!c,!!d);md||(md=64);var k=md++<<8|0;xa(k,{open(O){O.seekable=!1},close(){var O;(O=d==null?void 0:d.buffer)!=null&&O.length&&d(10)},read(O,M,ae,Ee){for(var he=0,rt=0;rt>2]=S.dev,F[d+4>>2]=S.mode,W[d+8>>2]=S.nlink,F[d+12>>2]=S.uid,F[d+16>>2]=S.gid,F[d+20>>2]=S.rdev,me=[S.size>>>0,(Y=S.size,1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[d+24>>2]=me[0],F[d+28>>2]=me[1],F[d+32>>2]=4096,F[d+36>>2]=S.blocks,s=S.atime.getTime(),c=S.mtime.getTime();var k=S.ctime.getTime();return me=[Math.floor(s/1e3)>>>0,(Y=Math.floor(s/1e3),1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[d+40>>2]=me[0],F[d+44>>2]=me[1],W[d+48>>2]=s%1e3*1e3,me=[Math.floor(c/1e3)>>>0,(Y=Math.floor(c/1e3),1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[d+56>>2]=me[0],F[d+60>>2]=me[1],W[d+64>>2]=c%1e3*1e3,me=[Math.floor(k/1e3)>>>0,(Y=Math.floor(k/1e3),1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[d+72>>2]=me[0],F[d+76>>2]=me[1],W[d+80>>2]=k%1e3*1e3,me=[S.ino>>>0,(Y=S.ino,1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[d+88>>2]=me[0],F[d+92>>2]=me[1],0}var dl=void 0;function pl(){var s=F[+dl>>2];return dl+=4,s}var ni=(s,c)=>c+2097152>>>0<4194305-!!s?(s>>>0)+4294967296*c:NaN,Cw=[0,31,60,91,121,152,182,213,244,274,305,335],_w=[0,31,59,90,120,151,181,212,243,273,304,334],hd=s=>{var c=Tt(s)+1,d=gl(c);return d&&St(s,V,d,c),d},Ca={},vd=()=>{if(!_a){var s={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:m||"./this.program"},c;for(c in Ca)Ca[c]===void 0?delete s[c]:s[c]=Ca[c];var d=[];for(c in s)d.push(`${c}=${s[c]}`);_a=d}return _a},_a,ka=s=>{var c=Tt(s)+1,d=Jn(c);return St(s,V,d,c),d},kw=(s,c,d,S)=>{var k={string:he=>{var rt=0;return he!=null&&he!==0&&(rt=ka(he)),rt},array:he=>{var rt=Jn(he.length);return I.set(he,rt),rt}};s=u["_"+s];var O=[],M=0;if(S)for(var ae=0;ae(c=c==1?Jn(s.length):gl(s.length),s.subarray||s.slice||(s=new Uint8Array(s)),V.set(s,c),c),Nr,Ra=[],Dn,oo=s=>{Nr.delete(Dn.get(s)),Dn.set(s,null),Ra.push(s)},vl=(s,c)=>{if(!Nr){Nr=new WeakMap;var d=Dn.length;if(Nr)for(var S=0;S<0+d;S++){var k=Dn.get(S);k&&Nr.set(k,S)}}if(d=Nr.get(s)||0)return d;if(Ra.length)d=Ra.pop();else{try{Dn.grow(1)}catch(ae){throw ae instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":ae}d=Dn.length-1}try{Dn.set(d,s)}catch(ae){if(!(ae instanceof TypeError))throw ae;if(typeof WebAssembly.Function=="function"){S=WebAssembly.Function,k={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};for(var O={parameters:[],results:c[0]=="v"?[]:[k[c[0]]]},M=1;MM?S.push(M):S.push(M%128|128,M>>7),M=0;Mk?c.push(k):c.push(k%128|128,k>>7),c.push.apply(c,S),c.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),c=new WebAssembly.Module(new Uint8Array(c)),c=new WebAssembly.Instance(c,{e:{f:s}}).exports.f}Dn.set(d,c)}return Nr.set(s,d),d};function gd(s,c,d,S){s||(s=this),this.parent=s,this.Ra=s.Ra,this.Va=null,this.id=wn++,this.name=c,this.mode=d,this.Ga={},this.Ha={},this.rdev=S}Object.defineProperties(gd.prototype,{read:{get:function(){return(this.mode&365)===365},set:function(s){s?this.mode|=365:this.mode&=-366}},write:{get:function(){return(this.mode&146)===146},set:function(s){s?this.mode|=146:this.mode&=-147}}}),dd(),zt=Array(4096),rd(q,"/"),Sn("/tmp"),Sn("/home"),Sn("/home/web_user"),function(){Sn("/dev"),xa(259,{read:()=>0,write:(S,k,O,M)=>M}),ul("/dev/null",259),Xn(1280,ie),Xn(1536,fe),ul("/dev/tty",1280),ul("/dev/tty1",1536);var s=new Uint8Array(1024),c=0,d=()=>(c===0&&(c=Le(s).byteLength),s[--c]);ei("random",d),ei("urandom",d),Sn("/dev/shm"),Sn("/dev/shm/tmp")}(),function(){Sn("/proc");var s=Sn("/proc/self");Sn("/proc/self/fd"),rd({Ra(){var c=Zf(s,"fd",16895,73);return c.Ga={lookup(d,S){var k=bt(+S);return d={parent:null,Ra:{tb:"fake"},Ga:{readlink:()=>k.path}},d.parent=d}},c}},"/proc/self/fd")}();var Rw={a:(s,c,d,S)=>{ve(`Assertion failed: ${s?ke(V,s):""}, at: `+[c?c?ke(V,c):"":"unknown filename",d,S?S?ke(V,S):"":"unknown function"])},h:function(s,c){try{return s=s?ke(V,s):"",cl(s,c),0}catch(d){if(typeof Fe>"u"||d.name!=="ErrnoError")throw d;return-d.Ka}},H:function(s,c,d){try{if(c=c?ke(V,c):"",c=Pr(s,c),d&-8)return-28;var S=At(c,{Sa:!0}).node;return S?(s="",d&4&&(s+="r"),d&2&&(s+="w"),d&1&&(s+="x"),s&&no(S,s)?-2:0):-44}catch(k){if(typeof Fe>"u"||k.name!=="ErrnoError")throw k;return-k.Ka}},i:function(s,c){try{var d=bt(s);return cl(d.node,c),0}catch(S){if(typeof Fe>"u"||S.name!=="ErrnoError")throw S;return-S.Ka}},g:function(s){try{var c=bt(s).node,d=typeof c=="string"?At(c,{Sa:!0}).node:c;if(!d.Ga.Oa)throw new U(63);return d.Ga.Oa(d,{timestamp:Date.now()}),0}catch(S){if(typeof Fe>"u"||S.name!=="ErrnoError")throw S;return-S.Ka}},b:function(s,c,d){dl=d;try{var S=bt(s);switch(c){case 0:var k=pl();if(0>k)return-28;for(;vt[k];)k++;return nd(S,k).fd;case 1:case 2:return 0;case 3:return S.flags;case 4:return k=pl(),S.flags|=k,0;case 5:return k=pl(),H[k+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return F[yd()>>2]=28,-1;default:return-28}}catch(O){if(typeof Fe>"u"||O.name!=="ErrnoError")throw O;return-O.Ka}},f:function(s,c){try{var d=bt(s);return fl(Jo,d.path,c)}catch(S){if(typeof Fe>"u"||S.name!=="ErrnoError")throw S;return-S.Ka}},n:function(s,c,d){c=ni(c,d);try{if(isNaN(c))return 61;var S=bt(s);if(!(S.flags&2097155))throw new U(28);return ad(S.node,c),0}catch(k){if(typeof Fe>"u"||k.name!=="ErrnoError")throw k;return-k.Ka}},C:function(s,c){try{if(c===0)return-28;var d=Tt("/")+1;return c"u"||S.name!=="ErrnoError")throw S;return-S.Ka}},F:function(s,c){try{return s=s?ke(V,s):"",fl(sd,s,c)}catch(d){if(typeof Fe>"u"||d.name!=="ErrnoError")throw d;return-d.Ka}},z:function(s,c,d){try{return c=c?ke(V,c):"",c=Pr(s,c),c=Ft(c),c[c.length-1]==="/"&&(c=c.substr(0,c.length-1)),Sn(c,d),0}catch(S){if(typeof Fe>"u"||S.name!=="ErrnoError")throw S;return-S.Ka}},E:function(s,c,d,S){try{c=c?ke(V,c):"";var k=S&256;return c=Pr(s,c,S&4096),fl(k?sd:Jo,c,d)}catch(O){if(typeof Fe>"u"||O.name!=="ErrnoError")throw O;return-O.Ka}},y:function(s,c,d,S){dl=S;try{c=c?ke(V,c):"",c=Pr(s,c);var k=S?pl():0;return ro(c,d,k).fd}catch(O){if(typeof Fe>"u"||O.name!=="ErrnoError")throw O;return-O.Ka}},w:function(s,c,d,S){try{if(c=c?ke(V,c):"",c=Pr(s,c),0>=S)return-28;var k=ld(c),O=Math.min(S,Tt(k)),M=I[d+O];return St(k,V,d,S+1),I[d+O]=M,O}catch(ae){if(typeof Fe>"u"||ae.name!=="ErrnoError")throw ae;return-ae.Ka}},v:function(s){try{return s=s?ke(V,s):"",od(s),0}catch(c){if(typeof Fe>"u"||c.name!=="ErrnoError")throw c;return-c.Ka}},G:function(s,c){try{return s=s?ke(V,s):"",fl(Jo,s,c)}catch(d){if(typeof Fe>"u"||d.name!=="ErrnoError")throw d;return-d.Ka}},r:function(s,c,d){try{return c=c?ke(V,c):"",c=Pr(s,c),d===0?id(c):d===512?od(c):ve("Invalid flags passed to unlinkat"),0}catch(S){if(typeof Fe>"u"||S.name!=="ErrnoError")throw S;return-S.Ka}},q:function(s,c,d){try{if(c=c?ke(V,c):"",c=Pr(s,c,!0),d){var S=W[d>>2]+4294967296*F[d+4>>2],k=F[d+8>>2];O=1e3*S+k/1e6,d+=16,S=W[d>>2]+4294967296*F[d+4>>2],k=F[d+8>>2],M=1e3*S+k/1e6}else var O=Date.now(),M=O;s=O;var ae=At(c,{Sa:!0}).node;return ae.Ga.Oa(ae,{timestamp:Math.max(s,M)}),0}catch(Ee){if(typeof Fe>"u"||Ee.name!=="ErrnoError")throw Ee;return-Ee.Ka}},l:function(s,c,d){s=new Date(1e3*ni(s,c)),F[d>>2]=s.getSeconds(),F[d+4>>2]=s.getMinutes(),F[d+8>>2]=s.getHours(),F[d+12>>2]=s.getDate(),F[d+16>>2]=s.getMonth(),F[d+20>>2]=s.getFullYear()-1900,F[d+24>>2]=s.getDay(),c=s.getFullYear(),F[d+28>>2]=(c%4!==0||c%100===0&&c%400!==0?_w:Cw)[s.getMonth()]+s.getDate()-1|0,F[d+36>>2]=-(60*s.getTimezoneOffset()),c=new Date(s.getFullYear(),6,1).getTimezoneOffset();var S=new Date(s.getFullYear(),0,1).getTimezoneOffset();F[d+32>>2]=(c!=S&&s.getTimezoneOffset()==Math.min(S,c))|0},j:function(s,c,d,S,k,O,M,ae){k=ni(k,O);try{if(isNaN(k))return 61;var Ee=bt(S);if(c&2&&!(d&2)&&(Ee.flags&2097155)!==2)throw new U(2);if((Ee.flags&2097155)===1)throw new U(2);if(!Ee.Ha.bb)throw new U(43);var he=Ee.Ha.bb(Ee,s,k,c,d),rt=he.Db;return F[M>>2]=he.ub,W[ae>>2]=rt,0}catch(ct){if(typeof Fe>"u"||ct.name!=="ErrnoError")throw ct;return-ct.Ka}},k:function(s,c,d,S,k,O,M){O=ni(O,M);try{if(isNaN(O))return 61;var ae=bt(k);if(d&2){if((ae.node.mode&61440)!==32768)throw new U(43);if(!(S&2)){var Ee=V.slice(s,s+c);ae.Ha.cb&&ae.Ha.cb(ae,Ee,O,c,S)}}}catch(he){if(typeof Fe>"u"||he.name!=="ErrnoError")throw he;return-he.Ka}},s:(s,c,d)=>{function S(Ee){return(Ee=Ee.toTimeString().match(/\(([A-Za-z ]+)\)$/))?Ee[1]:"GMT"}var k=new Date().getFullYear(),O=new Date(k,0,1),M=new Date(k,6,1);k=O.getTimezoneOffset();var ae=M.getTimezoneOffset();W[s>>2]=60*Math.max(k,ae),F[c>>2]=+(k!=ae),s=S(O),c=S(M),s=hd(s),c=hd(c),ae>2]=s,W[d+4>>2]=c):(W[d>>2]=c,W[d+4>>2]=s)},d:()=>Date.now(),t:()=>2147483648,c:()=>performance.now(),o:s=>{var c=V.length;if(s>>>=0,2147483648=d;d*=2){var S=c*(1+.2/d);S=Math.min(S,s+100663296);var k=Math;S=Math.max(s,S);e:{k=(k.min.call(k,2147483648,S+(65536-S%65536)%65536)-A.buffer.byteLength+65535)/65536;try{A.grow(k),ne();var O=1;break e}catch{}O=void 0}if(O)return!0}return!1},A:(s,c)=>{var d=0;return vd().forEach((S,k)=>{var O=c+d;for(k=W[s+4*k>>2]=O,O=0;O>0]=S.charCodeAt(O);I[k>>0]=0,d+=S.length+1}),0},B:(s,c)=>{var d=vd();W[s>>2]=d.length;var S=0;return d.forEach(k=>S+=k.length+1),W[c>>2]=S,0},e:function(s){try{var c=bt(s);return Ea(c),0}catch(d){if(typeof Fe>"u"||d.name!=="ErrnoError")throw d;return d.Ka}},p:function(s,c){try{var d=bt(s);return I[c>>0]=d.tty?2:Qt(d.mode)?3:(d.mode&61440)===40960?7:4,H[c+2>>1]=0,me=[0,(Y=0,1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[c+8>>2]=me[0],F[c+12>>2]=me[1],me=[0,(Y=0,1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[c+16>>2]=me[0],F[c+20>>2]=me[1],0}catch(S){if(typeof Fe>"u"||S.name!=="ErrnoError")throw S;return S.Ka}},x:function(s,c,d,S){try{e:{var k=bt(s);s=c;for(var O,M=c=0;M>2],Ee=W[s+4>>2];s+=8;var he=cd(k,I,ae,Ee,O);if(0>he){var rt=-1;break e}if(c+=he,he>2]=rt,0}catch(ct){if(typeof Fe>"u"||ct.name!=="ErrnoError")throw ct;return ct.Ka}},m:function(s,c,d,S,k){c=ni(c,d);try{if(isNaN(c))return 61;var O=bt(s);return ud(O,c,S),me=[O.position>>>0,(Y=O.position,1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[k>>2]=me[0],F[k+4>>2]=me[1],O.hb&&c===0&&S===0&&(O.hb=null),0}catch(M){if(typeof Fe>"u"||M.name!=="ErrnoError")throw M;return M.Ka}},D:function(s){var d;try{var c=bt(s);return(d=c.Ha)!=null&&d.fsync?c.Ha.fsync(c):0}catch(S){if(typeof Fe>"u"||S.name!=="ErrnoError")throw S;return S.Ka}},u:function(s,c,d,S){try{e:{var k=bt(s);s=c;for(var O,M=c=0;M>2],Ee=W[s+4>>2];s+=8;var he=fd(k,I,ae,Ee,O);if(0>he){var rt=-1;break e}c+=he,typeof O<"u"&&(O+=he)}rt=c}return W[S>>2]=rt,0}catch(ct){if(typeof Fe>"u"||ct.name!=="ErrnoError")throw ct;return ct.Ka}}},re=function(){var d;function s(S){var k;return re=S.exports,A=re.I,ne(),Dn=re.Aa,B.unshift(re.J),ue--,(k=u.monitorRunDependencies)==null||k.call(u,ue),ue==0&&qe&&(S=qe,qe=null,S()),re}var c={a:Rw};if(ue++,(d=u.monitorRunDependencies)==null||d.call(u,ue),u.instantiateWasm)try{return u.instantiateWasm(c,s)}catch(S){return D(`Module.instantiateWasm callback failed with error: ${S}`),!1}return de(c,function(S){s(S.instance)}),{}}();u._sqlite3_free=s=>(u._sqlite3_free=re.K)(s),u._sqlite3_value_text=s=>(u._sqlite3_value_text=re.L)(s);var yd=()=>(yd=re.M)();u._sqlite3_prepare_v2=(s,c,d,S,k)=>(u._sqlite3_prepare_v2=re.N)(s,c,d,S,k),u._sqlite3_step=s=>(u._sqlite3_step=re.O)(s),u._sqlite3_reset=s=>(u._sqlite3_reset=re.P)(s),u._sqlite3_exec=(s,c,d,S,k)=>(u._sqlite3_exec=re.Q)(s,c,d,S,k),u._sqlite3_finalize=s=>(u._sqlite3_finalize=re.R)(s),u._sqlite3_column_name=(s,c)=>(u._sqlite3_column_name=re.S)(s,c),u._sqlite3_column_text=(s,c)=>(u._sqlite3_column_text=re.T)(s,c),u._sqlite3_column_type=(s,c)=>(u._sqlite3_column_type=re.U)(s,c),u._sqlite3_errmsg=s=>(u._sqlite3_errmsg=re.V)(s),u._sqlite3_clear_bindings=s=>(u._sqlite3_clear_bindings=re.W)(s),u._sqlite3_value_blob=s=>(u._sqlite3_value_blob=re.X)(s),u._sqlite3_value_bytes=s=>(u._sqlite3_value_bytes=re.Y)(s),u._sqlite3_value_double=s=>(u._sqlite3_value_double=re.Z)(s),u._sqlite3_value_int=s=>(u._sqlite3_value_int=re._)(s),u._sqlite3_value_type=s=>(u._sqlite3_value_type=re.$)(s),u._sqlite3_result_blob=(s,c,d,S)=>(u._sqlite3_result_blob=re.aa)(s,c,d,S),u._sqlite3_result_double=(s,c)=>(u._sqlite3_result_double=re.ba)(s,c),u._sqlite3_result_error=(s,c,d)=>(u._sqlite3_result_error=re.ca)(s,c,d),u._sqlite3_result_int=(s,c)=>(u._sqlite3_result_int=re.da)(s,c),u._sqlite3_result_int64=(s,c,d)=>(u._sqlite3_result_int64=re.ea)(s,c,d),u._sqlite3_result_null=s=>(u._sqlite3_result_null=re.fa)(s),u._sqlite3_result_text=(s,c,d,S)=>(u._sqlite3_result_text=re.ga)(s,c,d,S),u._sqlite3_aggregate_context=(s,c)=>(u._sqlite3_aggregate_context=re.ha)(s,c),u._sqlite3_column_count=s=>(u._sqlite3_column_count=re.ia)(s),u._sqlite3_data_count=s=>(u._sqlite3_data_count=re.ja)(s),u._sqlite3_column_blob=(s,c)=>(u._sqlite3_column_blob=re.ka)(s,c),u._sqlite3_column_bytes=(s,c)=>(u._sqlite3_column_bytes=re.la)(s,c),u._sqlite3_column_double=(s,c)=>(u._sqlite3_column_double=re.ma)(s,c),u._sqlite3_bind_blob=(s,c,d,S,k)=>(u._sqlite3_bind_blob=re.na)(s,c,d,S,k),u._sqlite3_bind_double=(s,c,d)=>(u._sqlite3_bind_double=re.oa)(s,c,d),u._sqlite3_bind_int=(s,c,d)=>(u._sqlite3_bind_int=re.pa)(s,c,d),u._sqlite3_bind_text=(s,c,d,S,k)=>(u._sqlite3_bind_text=re.qa)(s,c,d,S,k),u._sqlite3_bind_parameter_index=(s,c)=>(u._sqlite3_bind_parameter_index=re.ra)(s,c),u._sqlite3_sql=s=>(u._sqlite3_sql=re.sa)(s),u._sqlite3_normalized_sql=s=>(u._sqlite3_normalized_sql=re.ta)(s),u._sqlite3_changes=s=>(u._sqlite3_changes=re.ua)(s),u._sqlite3_close_v2=s=>(u._sqlite3_close_v2=re.va)(s),u._sqlite3_create_function_v2=(s,c,d,S,k,O,M,ae,Ee)=>(u._sqlite3_create_function_v2=re.wa)(s,c,d,S,k,O,M,ae,Ee),u._sqlite3_open=(s,c)=>(u._sqlite3_open=re.xa)(s,c);var gl=u._malloc=s=>(gl=u._malloc=re.ya)(s),yl=u._free=s=>(yl=u._free=re.za)(s);u._RegisterExtensionFunctions=s=>(u._RegisterExtensionFunctions=re.Ba)(s);var wd=(s,c)=>(wd=re.Ca)(s,c),ri=()=>(ri=re.Da)(),oi=s=>(oi=re.Ea)(s),Jn=s=>(Jn=re.Fa)(s);u.stackAlloc=Jn,u.stackSave=ri,u.stackRestore=oi,u.cwrap=(s,c,d,S)=>{var k=!d||d.every(O=>O==="number"||O==="boolean");return c!=="string"&&k&&!S?u["_"+s]:function(){return kw(s,c,d,arguments)}},u.addFunction=vl,u.removeFunction=oo,u.UTF8ToString=rn,u.ALLOC_NORMAL=ml,u.allocate=hl,u.allocateUTF8OnStack=ka;var wl;qe=function s(){wl||xd(),wl||(qe=s)};function xd(){function s(){if(!wl&&(wl=!0,u.calledRun=!0,!j)){if(u.noFSInit||pd||(pd=!0,dd(),u.stdin=u.stdin,u.stdout=u.stdout,u.stderr=u.stderr,u.stdin?ei("stdin",u.stdin):Sa("/dev/tty","/dev/stdin"),u.stdout?ei("stdout",null,u.stdout):Sa("/dev/tty","/dev/stdout"),u.stderr?ei("stderr",null,u.stderr):Sa("/dev/tty1","/dev/stderr"),ro("/dev/stdin",0),ro("/dev/stdout",1),ro("/dev/stderr",1)),xn=!1,ut(B),u.onRuntimeInitialized&&u.onRuntimeInitialized(),u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;){var c=u.postRun.shift();ee.unshift(c)}ut(ee)}}if(!(0"u"?p={autoBom:!1}:typeof p!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),p={autoBom:!p}),p.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function r(u,p,m){var h=new XMLHttpRequest;h.open("GET",u),h.responseType="blob",h.onload=function(){f(h.response,p,m)},h.onerror=function(){console.error("could not download file")},h.send()}function o(u){var p=new XMLHttpRequest;p.open("HEAD",u,!1);try{p.send()}catch{}return 200<=p.status&&299>=p.status}function i(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var p=document.createEvent("MouseEvents");p.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(p)}}var l=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ii=="object"&&ii.global===ii?ii:void 0,a=l.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=l.saveAs||(typeof window!="object"||window!==l?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(u,p,m){var h=l.URL||l.webkitURL,x=document.createElement("a");p=p||u.name||"download",x.download=p,x.rel="noopener",typeof u=="string"?(x.href=u,x.origin===location.origin?i(x):o(x.href)?r(u,p,m):i(x,x.target="_blank")):(x.href=h.createObjectURL(u),setTimeout(function(){h.revokeObjectURL(x.href)},4e4),setTimeout(function(){i(x)},0))}:"msSaveOrOpenBlob"in navigator?function(u,p,m){if(p=p||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(n(u,m),p);else if(o(u))r(u,p,m);else{var h=document.createElement("a");h.href=u,h.target="_blank",setTimeout(function(){i(h)})}}:function(u,p,m,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof u=="string")return r(u,p,m);var x=u.type==="application/octet-stream",C=/constructor/i.test(l.HTMLElement)||l.safari,E=/CriOS\/[\d]+/.test(navigator.userAgent);if((E||x&&C||a)&&typeof FileReader<"u"){var R=new FileReader;R.onloadend=function(){var b=R.result;b=E?b:b.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=b:location=b,h=null},R.readAsDataURL(u)}else{var y=l.URL||l.webkitURL,g=y.createObjectURL(u);h?h.location=g:location.href=g,h=null,setTimeout(function(){y.revokeObjectURL(g)},4e4)}});l.saveAs=f.saveAs=f,e.exports=f})})(qv);var Gv=qv.exports;const sE=async e=>{try{const t=await e.arrayBuffer(),n=await lE({locateFile:r=>`https://sql.js.org/dist/${r}`});return new n.Database(new Uint8Array(t))}catch(t){throw console.error("Failed to load database:",t),t}},Cf=e=>{var t;try{return((t=e.exec("SELECT name FROM sqlite_master WHERE type='table';")[0])==null?void 0:t.values.map(r=>r[0]))||[]}catch(n){return console.error("Failed to get table names:",n),[]}},aE=async(e,t)=>{try{const r=e.exec(`PRAGMA table_info("${t}")`)[0].values.reduce((i,l)=>(i[l[1]]={type:l[2],isPrimaryKey:l[5]===1,isForeignKey:!1},i),{}),o=e.exec(`PRAGMA foreign_key_list("${t}")`);return o.length>0&&o[0].values.forEach(i=>{const l=i[3];r[l]&&(r[l].isForeignKey=!0)}),r}catch(n){throw console.error(`Failed to get schema for table "${t}":`,n),n}};function js(e){if(e.length>0){const t=e[0].columns;return{data:e[0].values.map(r=>t.reduce((o,i,l)=>(o[i]=r[l],o),{})),columns:t}}return{data:[],columns:[]}}const uE=e=>{try{return e.export()}catch(t){throw console.error("Failed to export database:",t),t}},Kv=(e,t)=>{const n=e.join(","),r=t.map(o=>e.map(i=>`"${o[i]}"`).join(","));return[n,...r].join(` +`)},cE=(e,t)=>{const r=Cf(e)[t];try{const o=e.exec(`SELECT * FROM ${r}`);if(o.length===0)throw new Error(`Table ${r} is empty or does not exist.`);const{data:i,columns:l}=js(o),a=Kv(l,i),f=new Blob([a],{type:"text/csv;charset=utf-8;"});Gv.saveAs(f,`${r}.csv`)}catch(o){throw console.error(`Failed to export table "${r}" as CSV:`,o),o}},fE=e=>{Cf(e).forEach(n=>{try{const r=e.exec(`SELECT * FROM ${n}`);if(r.length===0)throw new Error(`Table ${n} is empty or does not exist.`);const{data:o,columns:i}=js(r),l=Kv(i,o),a=new Blob([l],{type:"text/csv;charset=utf-8;"});Gv.saveAs(a,`${n}.csv`)}catch(r){console.error(`Failed to export table "${n}" as CSV:`,r)}})},Jr=nE((e,t)=>({db:null,isLoading:!1,queryError:null,tables:[],selectedTable:"0",tableSchemas:{},loadDatabase:async n=>{e({isLoading:!0,queryError:null});try{const r=await sE(n);e({db:r});const i=Cf(r).map(async u=>{const p=r.exec(`SELECT COUNT(*) FROM "${u}"`),m=parseInt(p[0].values[0][0],10),h=await aE(r,u);return{name:u,count:m,schema:h}}),l=await Promise.all(i),a=l.map(({name:u,count:p})=>({name:u,count:p})),f=l.reduce((u,{name:p,schema:m})=>(u[p]=m,u),{});e({tables:a,tableSchemas:f,isLoading:!1})}catch(r){console.error("Failed to load database:",r),e({isLoading:!1,queryError:"Failed to load database"})}},query:n=>{const r=t().db;return r?r.exec(n):(console.warn("Database is not loaded."),[])},setQueryError:n=>e({queryError:n}),setTables:n=>e({tables:n}),setSelectedTable:n=>e({selectedTable:n}),setTableSchemas:n=>e({tableSchemas:n}),rowPerPageOrAuto:"auto",setRowPerPageOrAuto:n=>e({rowPerPageOrAuto:n}),downloadDatabase:()=>{const n=t().db;if(n){const r=uE(n),o=new Blob([r],{type:"application/octet-stream"}),i=URL.createObjectURL(o),l=document.createElement("a");l.href=i,l.download="database.sqlite",l.click(),URL.revokeObjectURL(i)}else console.warn("Database is not loaded.")},exportTableAsCSV:n=>{const r=t().db;r?cE(r,n):console.warn("Database is not loaded.")},exportAllTablesAsCSV:()=>{const n=t().db;return n?(fE(n),{}):(console.warn("Database is not loaded."),{})},isCustomQuery:!1,setIsCustomQuery:n=>e({isCustomQuery:n})}));function Qv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ta(i)))==null?void 0:l.classGroupId}const Hp=/^\[(.+)\]$/;function mE(e){if(Hp.test(e)){const t=Hp.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function hE(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return gE(Object.entries(e.classGroups),n).forEach(([i,l])=>{uc(l,r,i,t)}),r}function uc(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Up(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(vE(o)){uc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{uc(l,Up(t,i),n,r)})})}function Up(e,t){let n=e;return t.split(_f).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function vE(e){return e.isThemeGetter}function gE(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[t+l,a])):i);return[n,o]}):e}function yE(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const Xv="!";function wE(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const a=[];let f=0,u=0,p;for(let E=0;Eu?p-u:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:C}}}function xE(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function SE(e){return{cache:yE(e.cacheSize),splitModifiers:wE(e),...pE(e)}}const EE=/\s+/;function bE(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(EE).map(l=>{const{modifiers:a,hasImportantModifier:f,baseClassName:u,maybePostfixModifierPosition:p}=n(l);let m=r(p?u.substring(0,p):u),h=!!p;if(!m){if(!p)return{isTailwindClass:!1,originalClassName:l};if(m=r(u),!m)return{isTailwindClass:!1,originalClassName:l};h=!1}const x=xE(a).join(":");return{isTailwindClass:!0,modifierId:f?x+Xv:x,classGroupId:m,originalClassName:l,hasPostfixModifier:h}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:a,classGroupId:f,hasPostfixModifier:u}=l,p=a+f;return i.has(p)?!1:(i.add(p),o(f,u).forEach(m=>i.add(a+m)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function CE(){let e=0,t,n,r="";for(;em(p),e());return n=SE(u),r=n.cache.get,o=n.cache.set,i=a,a(f)}function a(f){const u=r(f);if(u)return u;const p=bE(f,n);return o(f,p),p}return function(){return i(CE.apply(null,arguments))}}function ze(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Jv=/^\[(?:([a-z-]+):)?(.+)\]$/i,kE=/^\d+\/\d+$/,RE=new Set(["px","full","screen"]),PE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NE=/\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$/,TE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,AE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,DE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function On(e){return Fr(e)||RE.has(e)||kE.test(e)}function tr(e){return Bo(e,"length",$E)}function Fr(e){return!!e&&!Number.isNaN(Number(e))}function Fl(e){return Bo(e,"number",Fr)}function mi(e){return!!e&&Number.isInteger(Number(e))}function OE(e){return e.endsWith("%")&&Fr(e.slice(0,-1))}function pe(e){return Jv.test(e)}function nr(e){return PE.test(e)}const jE=new Set(["length","size","percentage"]);function ME(e){return Bo(e,jE,eg)}function IE(e){return Bo(e,"position",eg)}const LE=new Set(["image","url"]);function FE(e){return Bo(e,LE,UE)}function zE(e){return Bo(e,"",HE)}function hi(){return!0}function Bo(e,t,n){const r=Jv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function $E(e){return NE.test(e)&&!TE.test(e)}function eg(){return!1}function HE(e){return AE.test(e)}function UE(e){return DE.test(e)}function WE(){const e=ze("colors"),t=ze("spacing"),n=ze("blur"),r=ze("brightness"),o=ze("borderColor"),i=ze("borderRadius"),l=ze("borderSpacing"),a=ze("borderWidth"),f=ze("contrast"),u=ze("grayscale"),p=ze("hueRotate"),m=ze("invert"),h=ze("gap"),x=ze("gradientColorStops"),C=ze("gradientColorStopPositions"),E=ze("inset"),R=ze("margin"),y=ze("opacity"),g=ze("padding"),b=ze("saturate"),_=ze("scale"),P=ze("sepia"),D=ze("skew"),N=ze("space"),A=ze("translate"),j=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",pe,t],H=()=>[pe,t],F=()=>["",On,tr],W=()=>["auto",Fr,pe],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],le=()=>["solid","dashed","dotted","double","none"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",pe],ee=()=>["auto","avoid","all","avoid-page","page","left","right","column"],se=()=>[Fr,Fl],ue=()=>[Fr,pe];return{cacheSize:500,separator:":",theme:{colors:[hi],spacing:[On,tr],blur:["none","",nr,pe],brightness:se(),borderColor:[e],borderRadius:["none","","full",nr,pe],borderSpacing:H(),borderWidth:F(),contrast:se(),grayscale:B(),hueRotate:ue(),invert:B(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[OE,tr],inset:V(),margin:V(),opacity:se(),padding:H(),saturate:se(),scale:se(),sepia:B(),skew:ue(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",pe]}],container:["container"],columns:[{columns:[nr]}],"break-after":[{"break-after":ee()}],"break-before":[{"break-before":ee()}],"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:[...Z(),pe]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",mi,pe]}],basis:[{basis:V()}],"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:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",mi,pe]}],"grid-cols":[{"grid-cols":[hi]}],"col-start-end":[{col:["auto",{span:["full",mi,pe]},pe]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[hi]}],"row-start-end":[{row:["auto",{span:[mi,pe]},pe]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"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:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[R]}],mx:[{mx:[R]}],my:[{my:[R]}],ms:[{ms:[R]}],me:[{me:[R]}],mt:[{mt:[R]}],mr:[{mr:[R]}],mb:[{mb:[R]}],ml:[{ml:[R]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",pe,t]}],"min-w":[{"min-w":[pe,t,"min","max","fit"]}],"max-w":[{"max-w":[pe,t,"none","full","min","max","fit","prose",{screen:[nr]},nr]}],h:[{h:[pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",nr,tr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Fl]}],"font-family":[{font:[hi]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",pe]}],"line-clamp":[{"line-clamp":["none",Fr,Fl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",On,pe]}],"list-image":[{"list-image":["none",pe]}],"list-style-type":[{list:["none","disc","decimal",pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",On,tr]}],"underline-offset":[{"underline-offset":["auto",On,pe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"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":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),IE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ME]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},FE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...le(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:le()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...le()]}],"outline-offset":[{"outline-offset":[On,pe]}],"outline-w":[{outline:[On,tr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[On,tr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",nr,zE]}],"shadow-color":[{shadow:[hi]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...ne(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ne()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",nr,pe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[b]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",pe]}],duration:[{duration:ue()}],ease:[{ease:["linear","in","out","in-out",pe]}],delay:[{delay:ue()}],animate:[{animate:["none","spin","ping","pulse","bounce",pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[mi,pe]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",pe]}],accent:[{accent:["auto",e]}],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:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"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:[e,"none"]}],"stroke-w":[{stroke:[On,tr,Fl]}],stroke:[{stroke:[e,"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-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"]}}}const BE=_E(WE);function Se(...e){return BE(dE(e))}const kf=v.forwardRef(({className:e,type:t,...n},r)=>w.jsx("input",{type:t,className:Se("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));kf.displayName="Input";function VE(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function tg(...e){return t=>e.forEach(n=>VE(n,t))}function Ve(...e){return v.useCallback(tg(...e),e)}var qr=v.forwardRef((e,t)=>{const{children:n,...r}=e,o=v.Children.toArray(n),i=o.find(qE);if(i){const l=i.props.children,a=o.map(f=>f===i?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:f);return w.jsx(cc,{...r,ref:t,children:v.isValidElement(l)?v.cloneElement(l,void 0,a):null})}return w.jsx(cc,{...r,ref:t,children:n})});qr.displayName="Slot";var cc=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const o=KE(n);return v.cloneElement(n,{...GE(r,n.props),ref:t?tg(t,o):o})}return v.Children.count(n)>1?v.Children.only(null):null});cc.displayName="SlotClone";var ng=({children:e})=>w.jsx(w.Fragment,{children:e});function qE(e){return v.isValidElement(e)&&e.type===ng}function GE(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function KE(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function rg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,Bp=QE,og=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Bp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,l=Object.keys(o).map(u=>{const p=n==null?void 0:n[u],m=i==null?void 0:i[u];if(p===null)return null;const h=Wp(p)||Wp(m);return o[u][h]}),a=n&&Object.entries(n).reduce((u,p)=>{let[m,h]=p;return h===void 0||(u[m]=h),u},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,p)=>{let{class:m,className:h,...x}=p;return Object.entries(x).every(C=>{let[E,R]=C;return Array.isArray(R)?R.includes({...i,...a}[E]):{...i,...a}[E]===R})?[...u,m,h]:u},[]);return Bp(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)},Rf=og("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Dt=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const l=r?qr:"button";return w.jsx(l,{className:Se(Rf({variant:t,size:n,className:e})),ref:i,...o})});Dt.displayName="Button";/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const YE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ig=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var XE={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.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZE=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:l,...a},f)=>v.createElement("svg",{ref:f,...XE,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ig("lucide",o),...a},[...l.map(([u,p])=>v.createElement(u,p)),...Array.isArray(i)?i:[i]]));/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const at=(e,t)=>{const n=v.forwardRef(({className:r,...o},i)=>v.createElement(ZE,{ref:i,iconNode:t,className:ig(`lucide-${YE(e)}`,r),...o}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JE=at("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lg=at("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eb=at("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tb=at("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nb=at("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rb=at("Clock9",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 7.5 12",key:"1k60p0"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ob=at("Cuboid",[["path",{d:"m21.12 6.4-6.05-4.06a2 2 0 0 0-2.17-.05L2.95 8.41a2 2 0 0 0-.95 1.7v5.82a2 2 0 0 0 .88 1.66l6.05 4.07a2 2 0 0 0 2.17.05l9.95-6.12a2 2 0 0 0 .95-1.7V8.06a2 2 0 0 0-.88-1.66Z",key:"1u2ovd"}],["path",{d:"M10 22v-8L2.25 9.15",key:"11pn4q"}],["path",{d:"m10 14 11.77-6.87",key:"1kt1wh"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ib=at("FileCheck",[["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:"m9 15 2 2 4-4",key:"1grp1n"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lb=at("FileWarning",[["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:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sb=at("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.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ab=at("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ub=at("KeySquare",[["path",{d:"M12.4 2.7c.9-.9 2.5-.9 3.4 0l5.5 5.5c.9.9.9 2.5 0 3.4l-3.7 3.7c-.9.9-2.5.9-3.4 0L8.7 9.8c-.9-.9-.9-2.5 0-3.4Z",key:"9li5bk"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M9.4 10.6 2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4",key:"1ym3zm"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cb=at("ListRestart",[["path",{d:"M21 6H3",key:"1jwq7v"}],["path",{d:"M7 12H3",key:"13ou7f"}],["path",{d:"M7 18H3",key:"1sijw9"}],["path",{d:"M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14",key:"qth677"}],["path",{d:"M11 10v4h4",key:"172dkj"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fb=at("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const db=at("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pb=at("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mb=at("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** + * @license lucide-react v0.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hb=at("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.396.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vb=at("Trash",[["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"}]]);function gb({page:e,setPage:t,rowsPerPage:n,rowCount:r}){const o=Math.ceil(r/n),i=Math.floor(e/n)+1,l=()=>{i{i>1&&t(e-n)};return w.jsx("section",{className:"fixed bottom-[8px] left-0 right-0 w-[270px] mx-auto z-10",children:w.jsxs("div",{className:"flex justify-between gap-2 bg-secondary p-[6px] border rounded",children:[w.jsx(Dt,{onClick:a,disabled:i===1,children:w.jsx(eb,{className:"h-4 w-4"})}),w.jsxs("span",{className:"text-sm flex items-center justify-center",children:["Page ",i," of ",o]}),w.jsx(Dt,{onClick:l,disabled:i>=o,children:w.jsx(tb,{className:"h-4 w-4"})})]})})}function Vp(e,[t,n]){return Math.min(n,Math.max(t,e))}function be(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function yb(e,t){const n=v.createContext(t);function r(i){const{children:l,...a}=i,f=v.useMemo(()=>a,Object.values(a));return w.jsx(n.Provider,{value:f,children:l})}function o(i){const l=v.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function Vo(e,t=[]){let n=[];function r(i,l){const a=v.createContext(l),f=n.length;n=[...n,l];function u(m){const{scope:h,children:x,...C}=m,E=(h==null?void 0:h[e][f])||a,R=v.useMemo(()=>C,Object.values(C));return w.jsx(E.Provider,{value:R,children:x})}function p(m,h){const x=(h==null?void 0:h[e][f])||a,C=v.useContext(x);if(C)return C;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,p]}const o=()=>{const i=n.map(l=>v.createContext(l));return function(a){const f=(a==null?void 0:a[e])||i;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:f}}),[a,f])}};return o.scopeName=e,[r,wb(o,...t)]}function wb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const l=r.reduce((a,{useScope:f,scopeName:u})=>{const m=f(i)[`__scope${u}`];return{...a,...m}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function xb(e){const t=e+"CollectionProvider",[n,r]=Vo(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=x=>{const{scope:C,children:E}=x,R=Q.useRef(null),y=Q.useRef(new Map).current;return w.jsx(o,{scope:C,itemMap:y,collectionRef:R,children:E})};l.displayName=t;const a=e+"CollectionSlot",f=Q.forwardRef((x,C)=>{const{scope:E,children:R}=x,y=i(a,E),g=Ve(C,y.collectionRef);return w.jsx(qr,{ref:g,children:R})});f.displayName=a;const u=e+"CollectionItemSlot",p="data-radix-collection-item",m=Q.forwardRef((x,C)=>{const{scope:E,children:R,...y}=x,g=Q.useRef(null),b=Ve(C,g),_=i(u,E);return Q.useEffect(()=>(_.itemMap.set(g,{ref:g,...y}),()=>void _.itemMap.delete(g))),w.jsx(qr,{[p]:"",ref:b,children:R})});m.displayName=u;function h(x){const C=i(e+"CollectionConsumer",x);return Q.useCallback(()=>{const R=C.collectionRef.current;if(!R)return[];const y=Array.from(R.querySelectorAll(`[${p}]`));return Array.from(C.itemMap.values()).sort((_,P)=>y.indexOf(_.ref.current)-y.indexOf(P.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:l,Slot:f,ItemSlot:m},h,r]}var Sb=v.createContext(void 0);function Eb(e){const t=v.useContext(Sb);return e||t||"ltr"}var bb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Me=bb.reduce((e,t)=>{const n=v.forwardRef((r,o)=>{const{asChild:i,...l}=r,a=i?qr:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Cb(e,t){e&&Zr.flushSync(()=>e.dispatchEvent(t))}function Bn(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function _b(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e);v.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var kb="DismissableLayer",fc="dismissableLayer.update",Rb="dismissableLayer.pointerDownOutside",Pb="dismissableLayer.focusOutside",qp,sg=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ca=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:l,onDismiss:a,...f}=e,u=v.useContext(sg),[p,m]=v.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=v.useState({}),C=Ve(t,N=>m(N)),E=Array.from(u.layers),[R]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=E.indexOf(R),g=p?E.indexOf(p):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,_=g>=y,P=Ab(N=>{const A=N.target,j=[...u.branches].some(I=>I.contains(A));!_||j||(o==null||o(N),l==null||l(N),N.defaultPrevented||a==null||a())},h),D=Db(N=>{const A=N.target;[...u.branches].some(I=>I.contains(A))||(i==null||i(N),l==null||l(N),N.defaultPrevented||a==null||a())},h);return _b(N=>{g===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},h),v.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(qp=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),Gp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=qp)}},[p,h,n,u]),v.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),Gp())},[p,u]),v.useEffect(()=>{const N=()=>x({});return document.addEventListener(fc,N),()=>document.removeEventListener(fc,N)},[]),w.jsx(Me.div,{...f,ref:C,style:{pointerEvents:b?_?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,D.onFocusCapture),onBlurCapture:be(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,P.onPointerDownCapture)})});ca.displayName=kb;var Nb="DismissableLayerBranch",Tb=v.forwardRef((e,t)=>{const n=v.useContext(sg),r=v.useRef(null),o=Ve(t,r);return v.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),w.jsx(Me.div,{...e,ref:o})});Tb.displayName=Nb;function Ab(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let f=function(){ag(Rb,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Db(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=v.useRef(!1);return v.useEffect(()=>{const o=i=>{i.target&&!r.current&&ag(Pb,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Gp(){const e=new CustomEvent(fc);document.dispatchEvent(e)}function ag(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Cb(o,i):o.dispatchEvent(i)}var ru=0;function ug(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Kp()),document.body.insertAdjacentElement("beforeend",e[1]??Kp()),ru++,()=>{ru===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ru--}},[])}function Kp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var ou="focusScope.autoFocusOnMount",iu="focusScope.autoFocusOnUnmount",Qp={bubbles:!1,cancelable:!0},Ob="FocusScope",Pf=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[a,f]=v.useState(null),u=Bn(o),p=Bn(i),m=v.useRef(null),h=Ve(t,E=>f(E)),x=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let E=function(b){if(x.paused||!a)return;const _=b.target;a.contains(_)?m.current=_:rr(m.current,{select:!0})},R=function(b){if(x.paused||!a)return;const _=b.relatedTarget;_!==null&&(a.contains(_)||rr(m.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const P of b)P.removedNodes.length>0&&rr(a)};document.addEventListener("focusin",E),document.addEventListener("focusout",R);const g=new MutationObserver(y);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",R),g.disconnect()}}},[r,a,x.paused]),v.useEffect(()=>{if(a){Xp.add(x);const E=document.activeElement;if(!a.contains(E)){const y=new CustomEvent(ou,Qp);a.addEventListener(ou,u),a.dispatchEvent(y),y.defaultPrevented||(jb(zb(cg(a)),{select:!0}),document.activeElement===E&&rr(a))}return()=>{a.removeEventListener(ou,u),setTimeout(()=>{const y=new CustomEvent(iu,Qp);a.addEventListener(iu,p),a.dispatchEvent(y),y.defaultPrevented||rr(E??document.body,{select:!0}),a.removeEventListener(iu,p),Xp.remove(x)},0)}}},[a,u,p,x]);const C=v.useCallback(E=>{if(!n&&!r||x.paused)return;const R=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,y=document.activeElement;if(R&&y){const g=E.currentTarget,[b,_]=Mb(g);b&&_?!E.shiftKey&&y===_?(E.preventDefault(),n&&rr(b,{select:!0})):E.shiftKey&&y===b&&(E.preventDefault(),n&&rr(_,{select:!0})):y===g&&E.preventDefault()}},[n,r,x.paused]);return w.jsx(Me.div,{tabIndex:-1,...l,ref:h,onKeyDown:C})});Pf.displayName=Ob;function jb(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(rr(r,{select:t}),document.activeElement!==n)return}function Mb(e){const t=cg(e),n=Yp(t,e),r=Yp(t.reverse(),e);return[n,r]}function cg(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yp(e,t){for(const n of e)if(!Ib(n,{upTo:t}))return n}function Ib(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Lb(e){return e instanceof HTMLInputElement&&"select"in e}function rr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Lb(e)&&t&&e.select()}}var Xp=Fb();function Fb(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Zp(e,t),e.unshift(t)},remove(t){var n;e=Zp(e,t),(n=e[0])==null||n.resume()}}}function Zp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function zb(e){return e.filter(t=>t.tagName!=="A")}var kt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},$b=y1.useId||(()=>{}),Hb=0;function Po(e){const[t,n]=v.useState($b());return kt(()=>{n(r=>r??String(Hb++))},[e]),t?`radix-${t}`:""}const Ub=["top","right","bottom","left"],Rn=Math.min,Ut=Math.max,Ms=Math.round,zl=Math.floor,xr=e=>({x:e,y:e}),Wb={left:"right",right:"left",bottom:"top",top:"bottom"},Bb={start:"end",end:"start"};function dc(e,t,n){return Ut(e,Rn(t,n))}function Vn(e,t){return typeof e=="function"?e(t):e}function qn(e){return e.split("-")[0]}function qo(e){return e.split("-")[1]}function Nf(e){return e==="x"?"y":"x"}function Tf(e){return e==="y"?"height":"width"}function Go(e){return["top","bottom"].includes(qn(e))?"y":"x"}function Af(e){return Nf(Go(e))}function Vb(e,t,n){n===void 0&&(n=!1);const r=qo(e),o=Af(e),i=Tf(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Is(l)),[l,Is(l)]}function qb(e){const t=Is(e);return[pc(e),t,pc(t)]}function pc(e){return e.replace(/start|end/g,t=>Bb[t])}function Gb(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}function Kb(e,t,n,r){const o=qo(e);let i=Gb(qn(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(pc)))),i}function Is(e){return e.replace(/left|right|bottom|top/g,t=>Wb[t])}function Qb(e){return{top:0,right:0,bottom:0,left:0,...e}}function fg(e){return typeof e!="number"?Qb(e):{top:e,right:e,bottom:e,left:e}}function Ls(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Jp(e,t,n){let{reference:r,floating:o}=e;const i=Go(t),l=Af(t),a=Tf(l),f=qn(t),u=i==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let x;switch(f){case"top":x={x:p,y:r.y-o.height};break;case"bottom":x={x:p,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:m};break;case"left":x={x:r.x-o.width,y:m};break;default:x={x:r.x,y:r.y}}switch(qo(t)){case"start":x[l]-=h*(n&&u?-1:1);break;case"end":x[l]+=h*(n&&u?-1:1);break}return x}const Yb=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=Jp(u,r,f),h=r,x={},C=0;for(let E=0;E({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:a,middlewareData:f}=t,{element:u,padding:p=0}=Vn(e,t)||{};if(u==null)return{};const m=fg(p),h={x:n,y:r},x=Af(o),C=Tf(x),E=await l.getDimensions(u),R=x==="y",y=R?"top":"left",g=R?"bottom":"right",b=R?"clientHeight":"clientWidth",_=i.reference[C]+i.reference[x]-h[x]-i.floating[C],P=h[x]-i.reference[x],D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let N=D?D[b]:0;(!N||!await(l.isElement==null?void 0:l.isElement(D)))&&(N=a.floating[b]||i.floating[C]);const A=_/2-P/2,j=N/2-E[C]/2-1,I=Rn(m[y],j),V=Rn(m[g],j),H=I,F=N-E[C]-V,W=N/2-E[C]/2+A,Z=dc(H,W,F),le=!f.arrow&&qo(o)!=null&&W!==Z&&i.reference[C]/2-(WH<=0)){var j,I;const H=(((j=i.flip)==null?void 0:j.index)||0)+1,F=P[H];if(F)return{data:{index:H,overflows:A},reset:{placement:F}};let W=(I=A.filter(Z=>Z.overflows[0]<=0).sort((Z,le)=>Z.overflows[1]-le.overflows[1])[0])==null?void 0:I.placement;if(!W)switch(x){case"bestFit":{var V;const Z=(V=A.map(le=>[le.placement,le.overflows.filter(ne=>ne>0).reduce((ne,z)=>ne+z,0)]).sort((le,ne)=>le[1]-ne[1])[0])==null?void 0:V[0];Z&&(W=Z);break}case"initialPlacement":W=a;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function em(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function tm(e){return Ub.some(t=>e[t]>=0)}const Jb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Vn(e,t);switch(r){case"referenceHidden":{const i=await Qi(t,{...o,elementContext:"reference"}),l=em(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:tm(l)}}}case"escaped":{const i=await Qi(t,{...o,altBoundary:!0}),l=em(i,n.floating);return{data:{escapedOffsets:l,escaped:tm(l)}}}default:return{}}}}};async function e2(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=qn(n),a=qo(n),f=Go(n)==="y",u=["left","top"].includes(l)?-1:1,p=i&&f?-1:1,m=Vn(t,e);let{mainAxis:h,crossAxis:x,alignmentAxis:C}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return a&&typeof C=="number"&&(x=a==="end"?C*-1:C),f?{x:x*p,y:h*u}:{x:h*u,y:x*p}}const t2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:a}=t,f=await e2(t,e);return l===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+f.x,y:i+f.y,data:{...f,placement:l}}}}},n2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:R=>{let{x:y,y:g}=R;return{x:y,y:g}}},...f}=Vn(e,t),u={x:n,y:r},p=await Qi(t,f),m=Go(qn(o)),h=Nf(m);let x=u[h],C=u[m];if(i){const R=h==="y"?"top":"left",y=h==="y"?"bottom":"right",g=x+p[R],b=x-p[y];x=dc(g,x,b)}if(l){const R=m==="y"?"top":"left",y=m==="y"?"bottom":"right",g=C+p[R],b=C-p[y];C=dc(g,C,b)}const E=a.fn({...t,[h]:x,[m]:C});return{...E,data:{x:E.x-n,y:E.y-r}}}}},r2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:a=0,mainAxis:f=!0,crossAxis:u=!0}=Vn(e,t),p={x:n,y:r},m=Go(o),h=Nf(m);let x=p[h],C=p[m];const E=Vn(a,t),R=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(f){const b=h==="y"?"height":"width",_=i.reference[h]-i.floating[b]+R.mainAxis,P=i.reference[h]+i.reference[b]-R.mainAxis;x<_?x=_:x>P&&(x=P)}if(u){var y,g;const b=h==="y"?"width":"height",_=["top","left"].includes(qn(o)),P=i.reference[m]-i.floating[b]+(_&&((y=l.offset)==null?void 0:y[m])||0)+(_?0:R.crossAxis),D=i.reference[m]+i.reference[b]+(_?0:((g=l.offset)==null?void 0:g[m])||0)-(_?R.crossAxis:0);CD&&(C=D)}return{[h]:x,[m]:C}}}},o2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:l=()=>{},...a}=Vn(e,t),f=await Qi(t,a),u=qn(n),p=qo(n),m=Go(n)==="y",{width:h,height:x}=r.floating;let C,E;u==="top"||u==="bottom"?(C=u,E=p===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(E=u,C=p==="end"?"top":"bottom");const R=x-f.top-f.bottom,y=h-f.left-f.right,g=Rn(x-f[C],R),b=Rn(h-f[E],y),_=!t.middlewareData.shift;let P=g,D=b;if(m?D=p||_?Rn(b,y):y:P=p||_?Rn(g,R):R,_&&!p){const A=Ut(f.left,0),j=Ut(f.right,0),I=Ut(f.top,0),V=Ut(f.bottom,0);m?D=h-2*(A!==0||j!==0?A+j:Ut(f.left,f.right)):P=x-2*(I!==0||V!==0?I+V:Ut(f.top,f.bottom))}await l({...t,availableWidth:D,availableHeight:P});const N=await o.getDimensions(i.floating);return h!==N.width||x!==N.height?{reset:{rects:!0}}:{}}}};function Ko(e){return dg(e)?(e.nodeName||"").toLowerCase():"#document"}function Vt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kn(e){var t;return(t=(dg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dg(e){return e instanceof Node||e instanceof Vt(e).Node}function Tn(e){return e instanceof Element||e instanceof Vt(e).Element}function An(e){return e instanceof HTMLElement||e instanceof Vt(e).HTMLElement}function nm(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vt(e).ShadowRoot}function ol(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function i2(e){return["table","td","th"].includes(Ko(e))}function Df(e){const t=Of(),n=hn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function l2(e){let t=Sr(e);for(;An(t)&&!$o(t);){if(Df(t))return t;t=Sr(t)}return null}function Of(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $o(e){return["html","body","#document"].includes(Ko(e))}function hn(e){return Vt(e).getComputedStyle(e)}function fa(e){return Tn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Sr(e){if(Ko(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nm(e)&&e.host||Kn(e);return nm(t)?t.host:t}function pg(e){const t=Sr(e);return $o(t)?e.ownerDocument?e.ownerDocument.body:e.body:An(t)&&ol(t)?t:pg(t)}function Yi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=pg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=Vt(o);return i?t.concat(l,l.visualViewport||[],ol(o)?o:[],l.frameElement&&n?Yi(l.frameElement):[]):t.concat(o,Yi(o,[],n))}function mg(e){const t=hn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=An(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=Ms(n)!==i||Ms(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function jf(e){return Tn(e)?e:e.contextElement}function No(e){const t=jf(e);if(!An(t))return xr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=mg(t);let l=(i?Ms(n.width):n.width)/r,a=(i?Ms(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const s2=xr(0);function hg(e){const t=Vt(e);return!Of()||!t.visualViewport?s2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function a2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vt(e)?!1:t}function Gr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=jf(e);let l=xr(1);t&&(r?Tn(r)&&(l=No(r)):l=No(e));const a=a2(i,n,r)?hg(i):xr(0);let f=(o.left+a.x)/l.x,u=(o.top+a.y)/l.y,p=o.width/l.x,m=o.height/l.y;if(i){const h=Vt(i),x=r&&Tn(r)?Vt(r):r;let C=h,E=C.frameElement;for(;E&&r&&x!==C;){const R=No(E),y=E.getBoundingClientRect(),g=hn(E),b=y.left+(E.clientLeft+parseFloat(g.paddingLeft))*R.x,_=y.top+(E.clientTop+parseFloat(g.paddingTop))*R.y;f*=R.x,u*=R.y,p*=R.x,m*=R.y,f+=b,u+=_,C=Vt(E),E=C.frameElement}}return Ls({width:p,height:m,x:f,y:u})}const u2=[":popover-open",":modal"];function Mf(e){return u2.some(t=>{try{return e.matches(t)}catch{return!1}})}function c2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",l=Kn(r),a=t?Mf(t.floating):!1;if(r===l||a&&i)return n;let f={scrollLeft:0,scrollTop:0},u=xr(1);const p=xr(0),m=An(r);if((m||!m&&!i)&&((Ko(r)!=="body"||ol(l))&&(f=fa(r)),An(r))){const h=Gr(r);u=No(r),p.x=h.x+r.clientLeft,p.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-f.scrollLeft*u.x+p.x,y:n.y*u.y-f.scrollTop*u.y+p.y}}function f2(e){return Array.from(e.getClientRects())}function vg(e){return Gr(Kn(e)).left+fa(e).scrollLeft}function d2(e){const t=Kn(e),n=fa(e),r=e.ownerDocument.body,o=Ut(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ut(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+vg(e);const a=-n.scrollTop;return hn(r).direction==="rtl"&&(l+=Ut(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}function p2(e,t){const n=Vt(e),r=Kn(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,f=0;if(o){i=o.width,l=o.height;const u=Of();(!u||u&&t==="fixed")&&(a=o.offsetLeft,f=o.offsetTop)}return{width:i,height:l,x:a,y:f}}function m2(e,t){const n=Gr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=An(e)?No(e):xr(1),l=e.clientWidth*i.x,a=e.clientHeight*i.y,f=o*i.x,u=r*i.y;return{width:l,height:a,x:f,y:u}}function rm(e,t,n){let r;if(t==="viewport")r=p2(e,n);else if(t==="document")r=d2(Kn(e));else if(Tn(t))r=m2(t,n);else{const o=hg(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ls(r)}function gg(e,t){const n=Sr(e);return n===t||!Tn(n)||$o(n)?!1:hn(n).position==="fixed"||gg(n,t)}function h2(e,t){const n=t.get(e);if(n)return n;let r=Yi(e,[],!1).filter(a=>Tn(a)&&Ko(a)!=="body"),o=null;const i=hn(e).position==="fixed";let l=i?Sr(e):e;for(;Tn(l)&&!$o(l);){const a=hn(l),f=Df(l);!f&&a.position==="fixed"&&(o=null),(i?!f&&!o:!f&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ol(l)&&!f&&gg(e,l))?r=r.filter(p=>p!==l):o=a,l=Sr(l)}return t.set(e,r),r}function v2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?Mf(t)?[]:h2(t,this._c):[].concat(n),r],a=l[0],f=l.reduce((u,p)=>{const m=rm(t,p,o);return u.top=Ut(m.top,u.top),u.right=Rn(m.right,u.right),u.bottom=Rn(m.bottom,u.bottom),u.left=Ut(m.left,u.left),u},rm(t,a,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function g2(e){const{width:t,height:n}=mg(e);return{width:t,height:n}}function y2(e,t,n){const r=An(t),o=Kn(t),i=n==="fixed",l=Gr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const f=xr(0);if(r||!r&&!i)if((Ko(t)!=="body"||ol(o))&&(a=fa(t)),r){const m=Gr(t,!0,i,t);f.x=m.x+t.clientLeft,f.y=m.y+t.clientTop}else o&&(f.x=vg(o));const u=l.left+a.scrollLeft-f.x,p=l.top+a.scrollTop-f.y;return{x:u,y:p,width:l.width,height:l.height}}function lu(e){return hn(e).position==="static"}function om(e,t){return!An(e)||hn(e).position==="fixed"?null:t?t(e):e.offsetParent}function yg(e,t){const n=Vt(e);if(Mf(e))return n;if(!An(e)){let o=Sr(e);for(;o&&!$o(o);){if(Tn(o)&&!lu(o))return o;o=Sr(o)}return n}let r=om(e,t);for(;r&&i2(r)&&lu(r);)r=om(r,t);return r&&$o(r)&&lu(r)&&!Df(r)?n:r||l2(e)||n}const w2=async function(e){const t=this.getOffsetParent||yg,n=this.getDimensions,r=await n(e.floating);return{reference:y2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function x2(e){return hn(e).direction==="rtl"}const S2={convertOffsetParentRelativeRectToViewportRelativeRect:c2,getDocumentElement:Kn,getClippingRect:v2,getOffsetParent:yg,getElementRects:w2,getClientRects:f2,getDimensions:g2,getScale:No,isElement:Tn,isRTL:x2};function E2(e,t){let n=null,r;const o=Kn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function l(a,f){a===void 0&&(a=!1),f===void 0&&(f=1),i();const{left:u,top:p,width:m,height:h}=e.getBoundingClientRect();if(a||t(),!m||!h)return;const x=zl(p),C=zl(o.clientWidth-(u+m)),E=zl(o.clientHeight-(p+h)),R=zl(u),g={rootMargin:-x+"px "+-C+"px "+-E+"px "+-R+"px",threshold:Ut(0,Rn(1,f))||1};let b=!0;function _(P){const D=P[0].intersectionRatio;if(D!==f){if(!b)return l();D?l(!1,D):r=setTimeout(()=>{l(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(_,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,g)}n.observe(e)}return l(!0),i}function b2(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,u=jf(e),p=o||i?[...u?Yi(u):[],...Yi(t)]:[];p.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const m=u&&a?E2(u,n):null;let h=-1,x=null;l&&(x=new ResizeObserver(y=>{let[g]=y;g&&g.target===u&&x&&(x.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=x)==null||b.observe(t)})),n()}),u&&!f&&x.observe(u),x.observe(t));let C,E=f?Gr(e):null;f&&R();function R(){const y=Gr(e);E&&(y.x!==E.x||y.y!==E.y||y.width!==E.width||y.height!==E.height)&&n(),E=y,C=requestAnimationFrame(R)}return n(),()=>{var y;p.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),m==null||m(),(y=x)==null||y.disconnect(),x=null,f&&cancelAnimationFrame(C)}}const C2=t2,_2=n2,k2=Zb,R2=o2,P2=Jb,im=Xb,N2=r2,T2=(e,t,n)=>{const r=new Map,o={platform:S2,...n},i={...o.platform,_c:r};return Yb(e,t,{...o,platform:i})};var ss=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Fs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Fs(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Fs(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function wg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lm(e,t){const n=wg(e);return Math.round(t*n)/n}function sm(e){const t=v.useRef(e);return ss(()=>{t.current=e}),t}function A2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:a=!0,whileElementsMounted:f,open:u}=e,[p,m]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,x]=v.useState(r);Fs(h,r)||x(r);const[C,E]=v.useState(null),[R,y]=v.useState(null),g=v.useCallback(ne=>{ne!==D.current&&(D.current=ne,E(ne))},[]),b=v.useCallback(ne=>{ne!==N.current&&(N.current=ne,y(ne))},[]),_=i||C,P=l||R,D=v.useRef(null),N=v.useRef(null),A=v.useRef(p),j=f!=null,I=sm(f),V=sm(o),H=v.useCallback(()=>{if(!D.current||!N.current)return;const ne={placement:t,strategy:n,middleware:h};V.current&&(ne.platform=V.current),T2(D.current,N.current,ne).then(z=>{const B={...z,isPositioned:!0};F.current&&!Fs(A.current,B)&&(A.current=B,Zr.flushSync(()=>{m(B)}))})},[h,t,n,V]);ss(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,m(ne=>({...ne,isPositioned:!1})))},[u]);const F=v.useRef(!1);ss(()=>(F.current=!0,()=>{F.current=!1}),[]),ss(()=>{if(_&&(D.current=_),P&&(N.current=P),_&&P){if(I.current)return I.current(_,P,H);H()}},[_,P,H,I,j]);const W=v.useMemo(()=>({reference:D,floating:N,setReference:g,setFloating:b}),[g,b]),Z=v.useMemo(()=>({reference:_,floating:P}),[_,P]),le=v.useMemo(()=>{const ne={position:n,left:0,top:0};if(!Z.floating)return ne;const z=lm(Z.floating,p.x),B=lm(Z.floating,p.y);return a?{...ne,transform:"translate("+z+"px, "+B+"px)",...wg(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:B}},[n,a,Z.floating,p.x,p.y]);return v.useMemo(()=>({...p,update:H,refs:W,elements:Z,floatingStyles:le}),[p,H,W,Z,le])}const D2=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?im({element:r.current,padding:o}).fn(n):{}:r?im({element:r,padding:o}).fn(n):{}}}},O2=(e,t)=>({...C2(e),options:[e,t]}),j2=(e,t)=>({..._2(e),options:[e,t]}),M2=(e,t)=>({...N2(e),options:[e,t]}),I2=(e,t)=>({...k2(e),options:[e,t]}),L2=(e,t)=>({...R2(e),options:[e,t]}),F2=(e,t)=>({...P2(e),options:[e,t]}),z2=(e,t)=>({...D2(e),options:[e,t]});var $2="Arrow",xg=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return w.jsx(Me.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});xg.displayName=$2;var H2=xg;function U2(e){const[t,n]=v.useState(void 0);return kt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let l,a;if("borderBoxSize"in i){const f=i.borderBoxSize,u=Array.isArray(f)?f[0]:f;l=u.inlineSize,a=u.blockSize}else l=e.offsetWidth,a=e.offsetHeight;n({width:l,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var If="Popper",[Sg,da]=Vo(If),[W2,Eg]=Sg(If),bg=e=>{const{__scopePopper:t,children:n}=e,[r,o]=v.useState(null);return w.jsx(W2,{scope:t,anchor:r,onAnchorChange:o,children:n})};bg.displayName=If;var Cg="PopperAnchor",_g=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Eg(Cg,n),l=v.useRef(null),a=Ve(t,l);return v.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:w.jsx(Me.div,{...o,ref:a})});_g.displayName=Cg;var Lf="PopperContent",[B2,V2]=Sg(Lf),kg=v.forwardRef((e,t)=>{var J,ye,Ie,K,ge,de;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:f=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:x="optimized",onPlaced:C,...E}=e,R=Eg(Lf,n),[y,g]=v.useState(null),b=Ve(t,Y=>g(Y)),[_,P]=v.useState(null),D=U2(_),N=(D==null?void 0:D.width)??0,A=(D==null?void 0:D.height)??0,j=r+(i!=="center"?"-"+i:""),I=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},V=Array.isArray(u)?u:[u],H=V.length>0,F={padding:I,boundary:V.filter(G2),altBoundary:H},{refs:W,floatingStyles:Z,placement:le,isPositioned:ne,middlewareData:z}=A2({strategy:"fixed",placement:j,whileElementsMounted:(...Y)=>b2(...Y,{animationFrame:x==="always"}),elements:{reference:R.anchor},middleware:[O2({mainAxis:o+A,alignmentAxis:l}),f&&j2({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?M2():void 0,...F}),f&&I2({...F}),L2({...F,apply:({elements:Y,rects:me,availableWidth:ut,availableHeight:Je})=>{const{width:tt,height:Nt}=me.reference,ke=Y.floating.style;ke.setProperty("--radix-popper-available-width",`${ut}px`),ke.setProperty("--radix-popper-available-height",`${Je}px`),ke.setProperty("--radix-popper-anchor-width",`${tt}px`),ke.setProperty("--radix-popper-anchor-height",`${Nt}px`)}}),_&&z2({element:_,padding:a}),K2({arrowWidth:N,arrowHeight:A}),h&&F2({strategy:"referenceHidden",...F})]}),[B,ee]=Ng(le),se=Bn(C);kt(()=>{ne&&(se==null||se())},[ne,se]);const ue=(J=z.arrow)==null?void 0:J.x,qe=(ye=z.arrow)==null?void 0:ye.y,ve=((Ie=z.arrow)==null?void 0:Ie.centerOffset)!==0,[Xe,_e]=v.useState();return kt(()=>{y&&_e(window.getComputedStyle(y).zIndex)},[y]),w.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:ne?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Xe,"--radix-popper-transform-origin":[(K=z.transformOrigin)==null?void 0:K.x,(ge=z.transformOrigin)==null?void 0:ge.y].join(" "),...((de=z.hide)==null?void 0:de.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:w.jsx(B2,{scope:n,placedSide:B,onArrowChange:P,arrowX:ue,arrowY:qe,shouldHideArrow:ve,children:w.jsx(Me.div,{"data-side":B,"data-align":ee,...E,ref:b,style:{...E.style,animation:ne?void 0:"none"}})})})});kg.displayName=Lf;var Rg="PopperArrow",q2={top:"bottom",right:"left",bottom:"top",left:"right"},Pg=v.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=V2(Rg,r),l=q2[i.placedSide];return w.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:w.jsx(H2,{...o,ref:n,style:{...o.style,display:"block"}})})});Pg.displayName=Rg;function G2(e){return e!==null}var K2=e=>({name:"transformOrigin",options:e,fn(t){var R,y,g;const{placement:n,rects:r,middlewareData:o}=t,l=((R=o.arrow)==null?void 0:R.centerOffset)!==0,a=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[u,p]=Ng(n),m={start:"0%",center:"50%",end:"100%"}[p],h=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,x=(((g=o.arrow)==null?void 0:g.y)??0)+f/2;let C="",E="";return u==="bottom"?(C=l?m:`${h}px`,E=`${-f}px`):u==="top"?(C=l?m:`${h}px`,E=`${r.floating.height+f}px`):u==="right"?(C=`${-f}px`,E=l?m:`${x}px`):u==="left"&&(C=`${r.floating.width+f}px`,E=l?m:`${x}px`),{data:{x:C,y:E}}}});function Ng(e){const[t,n="center"]=e.split("-");return[t,n]}var Tg=bg,Ag=_g,Dg=kg,Og=Pg,Q2="Portal",Ff=v.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=v.useState(!1);kt(()=>i(!0),[]);const l=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return l?NS.createPortal(w.jsx(Me.div,{...r,ref:t}),l):null});Ff.displayName=Q2;function zs({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Y2({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,a=Bn(n),f=v.useCallback(u=>{if(i){const m=typeof u=="function"?u(e):u;m!==e&&a(m)}else o(u)},[i,e,o,a]);return[l,f]}function Y2({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,o=v.useRef(r),i=Bn(t);return v.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function X2(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Z2="VisuallyHidden",jg=v.forwardRef((e,t)=>w.jsx(Me.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));jg.displayName=Z2;var J2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},lo=new WeakMap,$l=new WeakMap,Hl={},su=0,Mg=function(e){return e&&(e.host||Mg(e.parentNode))},eC=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Mg(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},tC=function(e,t,n,r){var o=eC(t,Array.isArray(e)?e:[e]);Hl[n]||(Hl[n]=new WeakMap);var i=Hl[n],l=[],a=new Set,f=new Set(o),u=function(m){!m||a.has(m)||(a.add(m),u(m.parentNode))};o.forEach(u);var p=function(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,function(h){if(a.has(h))p(h);else try{var x=h.getAttribute(r),C=x!==null&&x!=="false",E=(lo.get(h)||0)+1,R=(i.get(h)||0)+1;lo.set(h,E),i.set(h,R),l.push(h),E===1&&C&&$l.set(h,!0),R===1&&h.setAttribute(n,"true"),C||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return p(t),a.clear(),su++,function(){l.forEach(function(m){var h=lo.get(m)-1,x=i.get(m)-1;lo.set(m,h),i.set(m,x),h||($l.has(m)||m.removeAttribute(r),$l.delete(m)),x||m.removeAttribute(n)}),su--,su||(lo=new WeakMap,lo=new WeakMap,$l=new WeakMap,Hl={})}},Ig=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=J2(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),tC(r,o,n,"aria-hidden")):function(){return null}},kn=function(){return kn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){l={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return i}function mc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r"u")return gC;var t=yC(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xC=$g(),To="data-scroll-locked",SC=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,a=e.gap;return n===void 0&&(n="margin"),` + .`.concat(nC,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(a,"px ").concat(r,`; + } + body[`).concat(To,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(o,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(l,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(as,` { + right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(us,` { + margin-right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(as," .").concat(as,` { + right: 0 `).concat(r,`; + } + + .`).concat(us," .").concat(us,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(To,`] { + `).concat(rC,": ").concat(a,`px; + } +`)},cm=function(){var e=parseInt(document.body.getAttribute(To)||"0",10);return isFinite(e)?e:0},EC=function(){v.useEffect(function(){return document.body.setAttribute(To,(cm()+1).toString()),function(){var e=cm()-1;e<=0?document.body.removeAttribute(To):document.body.setAttribute(To,e.toString())}},[])},bC=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;EC();var i=v.useMemo(function(){return wC(o)},[o]);return v.createElement(xC,{styles:SC(i,!t,o,n?"":"!important")})},hc=!1;if(typeof window<"u")try{var Ul=Object.defineProperty({},"passive",{get:function(){return hc=!0,!0}});window.addEventListener("test",Ul,Ul),window.removeEventListener("test",Ul,Ul)}catch{hc=!1}var so=hc?{passive:!1}:!1,CC=function(e){return e.tagName==="TEXTAREA"},Hg=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!CC(e)&&n[t]==="visible")},_C=function(e){return Hg(e,"overflowY")},kC=function(e){return Hg(e,"overflowX")},fm=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ug(e,r);if(o){var i=Wg(e,r),l=i[1],a=i[2];if(l>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},RC=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},PC=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ug=function(e,t){return e==="v"?_C(t):kC(t)},Wg=function(e,t){return e==="v"?RC(t):PC(t)},NC=function(e,t){return e==="h"&&t==="rtl"?-1:1},TC=function(e,t,n,r,o){var i=NC(e,window.getComputedStyle(t).direction),l=i*r,a=n.target,f=t.contains(a),u=!1,p=l>0,m=0,h=0;do{var x=Wg(e,a),C=x[0],E=x[1],R=x[2],y=E-R-i*C;(C||y)&&Ug(e,a)&&(m+=y,h+=C),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!f&&a!==document.body||f&&(t.contains(a)||t===a));return(p&&(Math.abs(m)<1||!o)||!p&&(Math.abs(h)<1||!o))&&(u=!0),u},Wl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dm=function(e){return[e.deltaX,e.deltaY]},pm=function(e){return e&&"current"in e?e.current:e},AC=function(e,t){return e[0]===t[0]&&e[1]===t[1]},DC=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},OC=0,ao=[];function jC(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(OC++)[0],i=v.useState($g)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var E=mc([e.lockRef.current],(e.shards||[]).map(pm),!0).filter(Boolean);return E.forEach(function(R){return R.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),E.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=v.useCallback(function(E,R){if("touches"in E&&E.touches.length===2)return!l.current.allowPinchZoom;var y=Wl(E),g=n.current,b="deltaX"in E?E.deltaX:g[0]-y[0],_="deltaY"in E?E.deltaY:g[1]-y[1],P,D=E.target,N=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in E&&N==="h"&&D.type==="range")return!1;var A=fm(N,D);if(!A)return!0;if(A?P=N:(P=N==="v"?"h":"v",A=fm(N,D)),!A)return!1;if(!r.current&&"changedTouches"in E&&(b||_)&&(r.current=P),!P)return!0;var j=r.current||P;return TC(j,R,E,j==="h"?b:_,!0)},[]),f=v.useCallback(function(E){var R=E;if(!(!ao.length||ao[ao.length-1]!==i)){var y="deltaY"in R?dm(R):Wl(R),g=t.current.filter(function(P){return P.name===R.type&&(P.target===R.target||R.target===P.shadowParent)&&AC(P.delta,y)})[0];if(g&&g.should){R.cancelable&&R.preventDefault();return}if(!g){var b=(l.current.shards||[]).map(pm).filter(Boolean).filter(function(P){return P.contains(R.target)}),_=b.length>0?a(R,b[0]):!l.current.noIsolation;_&&R.cancelable&&R.preventDefault()}}},[]),u=v.useCallback(function(E,R,y,g){var b={name:E,delta:R,target:y,should:g,shadowParent:MC(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(_){return _!==b})},1)},[]),p=v.useCallback(function(E){n.current=Wl(E),r.current=void 0},[]),m=v.useCallback(function(E){u(E.type,dm(E),E.target,a(E,e.lockRef.current))},[]),h=v.useCallback(function(E){u(E.type,Wl(E),E.target,a(E,e.lockRef.current))},[]);v.useEffect(function(){return ao.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:h}),document.addEventListener("wheel",f,so),document.addEventListener("touchmove",f,so),document.addEventListener("touchstart",p,so),function(){ao=ao.filter(function(E){return E!==i}),document.removeEventListener("wheel",f,so),document.removeEventListener("touchmove",f,so),document.removeEventListener("touchstart",p,so)}},[]);var x=e.removeScrollBar,C=e.inert;return v.createElement(v.Fragment,null,C?v.createElement(i,{styles:DC(o)}):null,x?v.createElement(bC,{gapMode:e.gapMode}):null)}function MC(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const IC=cC(zg,jC);var zf=v.forwardRef(function(e,t){return v.createElement(pa,kn({},e,{ref:t,sideCar:IC}))});zf.classNames=pa.classNames;var LC=[" ","Enter","ArrowUp","ArrowDown"],FC=[" ","Enter"],il="Select",[ma,ha,zC]=xb(il),[Xo,DR]=Vo(il,[zC,da]),va=da(),[$C,_r]=Xo(il),[HC,UC]=Xo(il),Bg=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:l,defaultValue:a,onValueChange:f,dir:u,name:p,autoComplete:m,disabled:h,required:x}=e,C=va(t),[E,R]=v.useState(null),[y,g]=v.useState(null),[b,_]=v.useState(!1),P=Eb(u),[D=!1,N]=zs({prop:r,defaultProp:o,onChange:i}),[A,j]=zs({prop:l,defaultProp:a,onChange:f}),I=v.useRef(null),V=E?!!E.closest("form"):!0,[H,F]=v.useState(new Set),W=Array.from(H).map(Z=>Z.props.value).join(";");return w.jsx(Tg,{...C,children:w.jsxs($C,{required:x,scope:t,trigger:E,onTriggerChange:R,valueNode:y,onValueNodeChange:g,valueNodeHasChildren:b,onValueNodeHasChildrenChange:_,contentId:Po(),value:A,onValueChange:j,open:D,onOpenChange:N,dir:P,triggerPointerDownPosRef:I,disabled:h,children:[w.jsx(ma.Provider,{scope:t,children:w.jsx(HC,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(Z=>{F(le=>new Set(le).add(Z))},[]),onNativeOptionRemove:v.useCallback(Z=>{F(le=>{const ne=new Set(le);return ne.delete(Z),ne})},[]),children:n})}),V?w.jsxs(vy,{"aria-hidden":!0,required:x,tabIndex:-1,name:p,autoComplete:m,value:A,onChange:Z=>j(Z.target.value),disabled:h,children:[A===void 0?w.jsx("option",{value:""}):null,Array.from(H)]},W):null]})})};Bg.displayName=il;var Vg="SelectTrigger",qg=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=va(n),l=_r(Vg,n),a=l.disabled||r,f=Ve(t,l.onTriggerChange),u=ha(n),[p,m,h]=gy(C=>{const E=u().filter(g=>!g.disabled),R=E.find(g=>g.value===l.value),y=yy(E,C,R);y!==void 0&&l.onValueChange(y.value)}),x=()=>{a||(l.onOpenChange(!0),h())};return w.jsx(Ag,{asChild:!0,...i,children:w.jsx(Me.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":hy(l.value)?"":void 0,...o,ref:f,onClick:be(o.onClick,C=>{C.currentTarget.focus()}),onPointerDown:be(o.onPointerDown,C=>{const E=C.target;E.hasPointerCapture(C.pointerId)&&E.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&(x(),l.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)},C.preventDefault())}),onKeyDown:be(o.onKeyDown,C=>{const E=p.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&m(C.key),!(E&&C.key===" ")&&LC.includes(C.key)&&(x(),C.preventDefault())})})})});qg.displayName=Vg;var Gg="SelectValue",Kg=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:l="",...a}=e,f=_r(Gg,n),{onValueNodeHasChildrenChange:u}=f,p=i!==void 0,m=Ve(t,f.onValueNodeChange);return kt(()=>{u(p)},[u,p]),w.jsx(Me.span,{...a,ref:m,style:{pointerEvents:"none"},children:hy(f.value)?w.jsx(w.Fragment,{children:l}):i})});Kg.displayName=Gg;var WC="SelectIcon",Qg=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return w.jsx(Me.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Qg.displayName=WC;var BC="SelectPortal",Yg=e=>w.jsx(Ff,{asChild:!0,...e});Yg.displayName=BC;var Kr="SelectContent",Xg=v.forwardRef((e,t)=>{const n=_r(Kr,e.__scopeSelect),[r,o]=v.useState();if(kt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Zr.createPortal(w.jsx(Zg,{scope:e.__scopeSelect,children:w.jsx(ma.Slot,{scope:e.__scopeSelect,children:w.jsx("div",{children:e.children})})}),i):null}return w.jsx(Jg,{...e,ref:t})});Xg.displayName=Kr;var Mn=10,[Zg,kr]=Xo(Kr),VC="SelectContentImpl",Jg=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:l,side:a,sideOffset:f,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:x,sticky:C,hideWhenDetached:E,avoidCollisions:R,...y}=e,g=_r(Kr,n),[b,_]=v.useState(null),[P,D]=v.useState(null),N=Ve(t,J=>_(J)),[A,j]=v.useState(null),[I,V]=v.useState(null),H=ha(n),[F,W]=v.useState(!1),Z=v.useRef(!1);v.useEffect(()=>{if(b)return Ig(b)},[b]),ug();const le=v.useCallback(J=>{const[ye,...Ie]=H().map(de=>de.ref.current),[K]=Ie.slice(-1),ge=document.activeElement;for(const de of J)if(de===ge||(de==null||de.scrollIntoView({block:"nearest"}),de===ye&&P&&(P.scrollTop=0),de===K&&P&&(P.scrollTop=P.scrollHeight),de==null||de.focus(),document.activeElement!==ge))return},[H,P]),ne=v.useCallback(()=>le([A,b]),[le,A,b]);v.useEffect(()=>{F&&ne()},[F,ne]);const{onOpenChange:z,triggerPointerDownPosRef:B}=g;v.useEffect(()=>{if(b){let J={x:0,y:0};const ye=K=>{var ge,de;J={x:Math.abs(Math.round(K.pageX)-(((ge=B.current)==null?void 0:ge.x)??0)),y:Math.abs(Math.round(K.pageY)-(((de=B.current)==null?void 0:de.y)??0))}},Ie=K=>{J.x<=10&&J.y<=10?K.preventDefault():b.contains(K.target)||z(!1),document.removeEventListener("pointermove",ye),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",Ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",Ie,{capture:!0})}}},[b,z,B]),v.useEffect(()=>{const J=()=>z(!1);return window.addEventListener("blur",J),window.addEventListener("resize",J),()=>{window.removeEventListener("blur",J),window.removeEventListener("resize",J)}},[z]);const[ee,se]=gy(J=>{const ye=H().filter(ge=>!ge.disabled),Ie=ye.find(ge=>ge.ref.current===document.activeElement),K=yy(ye,J,Ie);K&&setTimeout(()=>K.ref.current.focus())}),ue=v.useCallback((J,ye,Ie)=>{const K=!Z.current&&!Ie;(g.value!==void 0&&g.value===ye||K)&&(j(J),K&&(Z.current=!0))},[g.value]),qe=v.useCallback(()=>b==null?void 0:b.focus(),[b]),ve=v.useCallback((J,ye,Ie)=>{const K=!Z.current&&!Ie;(g.value!==void 0&&g.value===ye||K)&&V(J)},[g.value]),Xe=r==="popper"?vc:ey,_e=Xe===vc?{side:a,sideOffset:f,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:x,sticky:C,hideWhenDetached:E,avoidCollisions:R}:{};return w.jsx(Zg,{scope:n,content:b,viewport:P,onViewportChange:D,itemRefCallback:ue,selectedItem:A,onItemLeave:qe,itemTextRefCallback:ve,focusSelectedItem:ne,selectedItemText:I,position:r,isPositioned:F,searchRef:ee,children:w.jsx(zf,{as:qr,allowPinchZoom:!0,children:w.jsx(Pf,{asChild:!0,trapped:g.open,onMountAutoFocus:J=>{J.preventDefault()},onUnmountAutoFocus:be(o,J=>{var ye;(ye=g.trigger)==null||ye.focus({preventScroll:!0}),J.preventDefault()}),children:w.jsx(ca,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:J=>J.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:w.jsx(Xe,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:J=>J.preventDefault(),...y,..._e,onPlaced:()=>W(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:be(y.onKeyDown,J=>{const ye=J.ctrlKey||J.altKey||J.metaKey;if(J.key==="Tab"&&J.preventDefault(),!ye&&J.key.length===1&&se(J.key),["ArrowUp","ArrowDown","Home","End"].includes(J.key)){let K=H().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);if(["ArrowUp","End"].includes(J.key)&&(K=K.slice().reverse()),["ArrowUp","ArrowDown"].includes(J.key)){const ge=J.target,de=K.indexOf(ge);K=K.slice(de+1)}setTimeout(()=>le(K)),J.preventDefault()}})})})})})})});Jg.displayName=VC;var qC="SelectItemAlignedPosition",ey=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=_r(Kr,n),l=kr(Kr,n),[a,f]=v.useState(null),[u,p]=v.useState(null),m=Ve(t,N=>p(N)),h=ha(n),x=v.useRef(!1),C=v.useRef(!0),{viewport:E,selectedItem:R,selectedItemText:y,focusSelectedItem:g}=l,b=v.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&E&&R&&y){const N=i.trigger.getBoundingClientRect(),A=u.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),I=y.getBoundingClientRect();if(i.dir!=="rtl"){const ge=I.left-A.left,de=j.left-ge,Y=N.left-de,me=N.width+Y,ut=Math.max(me,A.width),Je=window.innerWidth-Mn,tt=Vp(de,[Mn,Je-ut]);a.style.minWidth=me+"px",a.style.left=tt+"px"}else{const ge=A.right-I.right,de=window.innerWidth-j.right-ge,Y=window.innerWidth-N.right-de,me=N.width+Y,ut=Math.max(me,A.width),Je=window.innerWidth-Mn,tt=Vp(de,[Mn,Je-ut]);a.style.minWidth=me+"px",a.style.right=tt+"px"}const V=h(),H=window.innerHeight-Mn*2,F=E.scrollHeight,W=window.getComputedStyle(u),Z=parseInt(W.borderTopWidth,10),le=parseInt(W.paddingTop,10),ne=parseInt(W.borderBottomWidth,10),z=parseInt(W.paddingBottom,10),B=Z+le+F+z+ne,ee=Math.min(R.offsetHeight*5,B),se=window.getComputedStyle(E),ue=parseInt(se.paddingTop,10),qe=parseInt(se.paddingBottom,10),ve=N.top+N.height/2-Mn,Xe=H-ve,_e=R.offsetHeight/2,J=R.offsetTop+_e,ye=Z+le+J,Ie=B-ye;if(ye<=ve){const ge=R===V[V.length-1].ref.current;a.style.bottom="0px";const de=u.clientHeight-E.offsetTop-E.offsetHeight,Y=Math.max(Xe,_e+(ge?qe:0)+de+ne),me=ye+Y;a.style.height=me+"px"}else{const ge=R===V[0].ref.current;a.style.top="0px";const Y=Math.max(ve,Z+E.offsetTop+(ge?ue:0)+_e)+Ie;a.style.height=Y+"px",E.scrollTop=ye-ve+E.offsetTop}a.style.margin=`${Mn}px 0`,a.style.minHeight=ee+"px",a.style.maxHeight=H+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[h,i.trigger,i.valueNode,a,u,E,R,y,i.dir,r]);kt(()=>b(),[b]);const[_,P]=v.useState();kt(()=>{u&&P(window.getComputedStyle(u).zIndex)},[u]);const D=v.useCallback(N=>{N&&C.current===!0&&(b(),g==null||g(),C.current=!1)},[b,g]);return w.jsx(KC,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:x,onScrollButtonChange:D,children:w.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:w.jsx(Me.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ey.displayName=qC;var GC="SelectPopperPosition",vc=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Mn,...i}=e,l=va(n);return w.jsx(Dg,{...l,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});vc.displayName=GC;var[KC,$f]=Xo(Kr,{}),gc="SelectViewport",ty=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=kr(gc,n),l=$f(gc,n),a=Ve(t,i.onViewportChange),f=v.useRef(0);return w.jsxs(w.Fragment,{children:[w.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:r}),w.jsx(ma.Slot,{scope:n,children:w.jsx(Me.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:be(o.onScroll,u=>{const p=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:h}=l;if(h!=null&&h.current&&m){const x=Math.abs(f.current-p.scrollTop);if(x>0){const C=window.innerHeight-Mn*2,E=parseFloat(m.style.minHeight),R=parseFloat(m.style.height),y=Math.max(E,R);if(y0?_:0,m.style.justifyContent="flex-end")}}}f.current=p.scrollTop})})})]})});ty.displayName=gc;var ny="SelectGroup",[QC,YC]=Xo(ny),ry=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Po();return w.jsx(QC,{scope:n,id:o,children:w.jsx(Me.div,{role:"group","aria-labelledby":o,...r,ref:t})})});ry.displayName=ny;var oy="SelectLabel",iy=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=YC(oy,n);return w.jsx(Me.div,{id:o.id,...r,ref:t})});iy.displayName=oy;var $s="SelectItem",[XC,ly]=Xo($s),sy=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...l}=e,a=_r($s,n),f=kr($s,n),u=a.value===r,[p,m]=v.useState(i??""),[h,x]=v.useState(!1),C=Ve(t,y=>{var g;return(g=f.itemRefCallback)==null?void 0:g.call(f,y,r,o)}),E=Po(),R=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")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 w.jsx(XC,{scope:n,value:r,disabled:o,textId:E,isSelected:u,onItemTextChange:v.useCallback(y=>{m(g=>g||((y==null?void 0:y.textContent)??"").trim())},[]),children:w.jsx(ma.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:w.jsx(Me.div,{role:"option","aria-labelledby":E,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:C,onFocus:be(l.onFocus,()=>x(!0)),onBlur:be(l.onBlur,()=>x(!1)),onPointerUp:be(l.onPointerUp,R),onPointerMove:be(l.onPointerMove,y=>{var g;o?(g=f.onItemLeave)==null||g.call(f):y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(l.onPointerLeave,y=>{var g;y.currentTarget===document.activeElement&&((g=f.onItemLeave)==null||g.call(f))}),onKeyDown:be(l.onKeyDown,y=>{var b;((b=f.searchRef)==null?void 0:b.current)!==""&&y.key===" "||(FC.includes(y.key)&&R(),y.key===" "&&y.preventDefault())})})})})});sy.displayName=$s;var Ei="SelectItemText",ay=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,l=_r(Ei,n),a=kr(Ei,n),f=ly(Ei,n),u=UC(Ei,n),[p,m]=v.useState(null),h=Ve(t,y=>m(y),f.onItemTextChange,y=>{var g;return(g=a.itemTextRefCallback)==null?void 0:g.call(a,y,f.value,f.disabled)}),x=p==null?void 0:p.textContent,C=v.useMemo(()=>w.jsx("option",{value:f.value,disabled:f.disabled,children:x},f.value),[f.disabled,f.value,x]),{onNativeOptionAdd:E,onNativeOptionRemove:R}=u;return kt(()=>(E(C),()=>R(C)),[E,R,C]),w.jsxs(w.Fragment,{children:[w.jsx(Me.span,{id:f.textId,...i,ref:h}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Zr.createPortal(i.children,l.valueNode):null]})});ay.displayName=Ei;var uy="SelectItemIndicator",cy=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ly(uy,n).isSelected?w.jsx(Me.span,{"aria-hidden":!0,...r,ref:t}):null});cy.displayName=uy;var yc="SelectScrollUpButton",fy=v.forwardRef((e,t)=>{const n=kr(yc,e.__scopeSelect),r=$f(yc,e.__scopeSelect),[o,i]=v.useState(!1),l=Ve(t,r.onScrollButtonChange);return kt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=f.scrollTop>0;i(u)};const f=n.viewport;return a(),f.addEventListener("scroll",a),()=>f.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?w.jsx(py,{...e,ref:l,onAutoScroll:()=>{const{viewport:a,selectedItem:f}=n;a&&f&&(a.scrollTop=a.scrollTop-f.offsetHeight)}}):null});fy.displayName=yc;var wc="SelectScrollDownButton",dy=v.forwardRef((e,t)=>{const n=kr(wc,e.__scopeSelect),r=$f(wc,e.__scopeSelect),[o,i]=v.useState(!1),l=Ve(t,r.onScrollButtonChange);return kt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=f.scrollHeight-f.clientHeight,p=Math.ceil(f.scrollTop)f.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?w.jsx(py,{...e,ref:l,onAutoScroll:()=>{const{viewport:a,selectedItem:f}=n;a&&f&&(a.scrollTop=a.scrollTop+f.offsetHeight)}}):null});dy.displayName=wc;var py=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=kr("SelectScrollButton",n),l=v.useRef(null),a=ha(n),f=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>f(),[f]),kt(()=>{var p;const u=a().find(m=>m.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[a]),w.jsx(Me.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:be(o.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:be(o.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:be(o.onPointerLeave,()=>{f()})})}),ZC="SelectSeparator",my=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return w.jsx(Me.div,{"aria-hidden":!0,...r,ref:t})});my.displayName=ZC;var xc="SelectArrow",JC=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=va(n),i=_r(xc,n),l=kr(xc,n);return i.open&&l.position==="popper"?w.jsx(Og,{...o,...r,ref:t}):null});JC.displayName=xc;function hy(e){return e===""||e===void 0}var vy=v.forwardRef((e,t)=>{const{value:n,...r}=e,o=v.useRef(null),i=Ve(t,o),l=X2(n);return v.useEffect(()=>{const a=o.current,f=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==n&&p){const m=new Event("change",{bubbles:!0});p.call(a,n),a.dispatchEvent(m)}},[l,n]),w.jsx(jg,{asChild:!0,children:w.jsx("select",{...r,ref:i,defaultValue:n})})});vy.displayName="BubbleSelect";function gy(e){const t=Bn(e),n=v.useRef(""),r=v.useRef(0),o=v.useCallback(l=>{const a=n.current+l;t(a),function f(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>f(""),1e3))}(a)},[t]),i=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function yy(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=e_(e,Math.max(i,0));o.length===1&&(l=l.filter(u=>u!==n));const f=l.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function e_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var t_=Bg,wy=qg,n_=Kg,r_=Qg,o_=Yg,xy=Xg,i_=ty,l_=ry,Sy=iy,Ey=sy,s_=ay,a_=cy,by=fy,Cy=dy,_y=my;const u_=t_,c_=l_,f_=n_,ky=v.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(wy,{ref:r,className:Se("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,w.jsx(r_,{asChild:!0,children:w.jsx(lg,{className:"h-4 w-4 opacity-50"})})]}));ky.displayName=wy.displayName;const Ry=v.forwardRef(({className:e,...t},n)=>w.jsx(by,{ref:n,className:Se("flex cursor-default items-center justify-center py-1",e),...t,children:w.jsx(nb,{className:"h-4 w-4"})}));Ry.displayName=by.displayName;const Py=v.forwardRef(({className:e,...t},n)=>w.jsx(Cy,{ref:n,className:Se("flex cursor-default items-center justify-center py-1",e),...t,children:w.jsx(lg,{className:"h-4 w-4"})}));Py.displayName=Cy.displayName;const Ny=v.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>w.jsx(o_,{children:w.jsxs(xy,{ref:o,className:Se("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="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",e),position:n,...r,children:[w.jsx(Ry,{}),w.jsx(i_,{className:Se("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),w.jsx(Py,{})]})}));Ny.displayName=xy.displayName;const Ty=v.forwardRef(({className:e,...t},n)=>w.jsx(Sy,{ref:n,className:Se("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ty.displayName=Sy.displayName;const Ay=v.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(Ey,{ref:r,className:Se("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(a_,{children:w.jsx(JE,{className:"h-4 w-4"})})}),w.jsx(s_,{children:t})]}));Ay.displayName=Ey.displayName;const d_=v.forwardRef(({className:e,...t},n)=>w.jsx(_y,{ref:n,className:Se("-mx-1 my-1 h-px bg-muted",e),...t}));d_.displayName=_y.displayName;const p_=og("inline-flex items-center rounded border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Dy({className:e,variant:t,...n}){return w.jsx("div",{className:Se(p_({variant:t}),e),...n})}function m_(){const{tables:e,selectedTable:t,setSelectedTable:n}=Jr();return w.jsxs("section",{className:"flex justify-center items-center gap-2",children:[w.jsxs(u_,{value:t,onValueChange:n,children:[w.jsx(ky,{className:"w-[200px] md:w-[300px]",children:w.jsx(f_,{placeholder:"Select a table"})}),w.jsx(Ny,{children:w.jsxs(c_,{children:[w.jsx(Ty,{children:"Tables"}),e.map((r,o)=>w.jsx(Ay,{value:`${o}`,children:r.name},r.name))]})})]}),w.jsxs(Dy,{className:"text-sm",children:[e[parseInt(t)].count," rows"]})]})}function h_(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var ll=e=>{const{present:t,children:n}=e,r=v_(t),o=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),i=Ve(r.ref,g_(o));return typeof n=="function"||r.isPresent?v.cloneElement(o,{ref:i}):null};ll.displayName="Presence";function v_(e){const[t,n]=v.useState(),r=v.useRef({}),o=v.useRef(e),i=v.useRef("none"),l=e?"mounted":"unmounted",[a,f]=h_(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=Bl(r.current);i.current=a==="mounted"?u:"none"},[a]),kt(()=>{const u=r.current,p=o.current;if(p!==e){const h=i.current,x=Bl(u);e?f("MOUNT"):x==="none"||(u==null?void 0:u.display)==="none"?f("UNMOUNT"):f(p&&h!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),kt(()=>{if(t){const u=m=>{const x=Bl(r.current).includes(m.animationName);m.target===t&&x&&Zr.flushSync(()=>f("ANIMATION_END"))},p=m=>{m.target===t&&(i.current=Bl(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Bl(e){return(e==null?void 0:e.animationName)||"none"}function g_(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fu,Hf="HoverCard",[Oy,OR]=Vo(Hf,[da]),ga=da(),[y_,Uf]=Oy(Hf),jy=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:i,openDelay:l=700,closeDelay:a=300}=e,f=ga(t),u=v.useRef(0),p=v.useRef(0),m=v.useRef(!1),h=v.useRef(!1),[x=!1,C]=zs({prop:r,defaultProp:o,onChange:i}),E=v.useCallback(()=>{clearTimeout(p.current),u.current=window.setTimeout(()=>C(!0),l)},[l,C]),R=v.useCallback(()=>{clearTimeout(u.current),!m.current&&!h.current&&(p.current=window.setTimeout(()=>C(!1),a))},[a,C]),y=v.useCallback(()=>C(!1),[C]);return v.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(p.current)},[]),w.jsx(y_,{scope:t,open:x,onOpenChange:C,onOpen:E,onClose:R,onDismiss:y,hasSelectionRef:m,isPointerDownOnContentRef:h,children:w.jsx(Tg,{...f,children:n})})};jy.displayName=Hf;var My="HoverCardTrigger",Iy=v.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Uf(My,n),i=ga(n);return w.jsx(Ag,{asChild:!0,...i,children:w.jsx(Me.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:be(e.onPointerEnter,Us(o.onOpen)),onPointerLeave:be(e.onPointerLeave,Us(o.onClose)),onFocus:be(e.onFocus,o.onOpen),onBlur:be(e.onBlur,o.onClose),onTouchStart:be(e.onTouchStart,l=>l.preventDefault())})})});Iy.displayName=My;var w_="HoverCardPortal",[jR,x_]=Oy(w_,{forceMount:void 0}),Hs="HoverCardContent",Ly=v.forwardRef((e,t)=>{const n=x_(Hs,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=Uf(Hs,e.__scopeHoverCard);return w.jsx(ll,{present:r||i.open,children:w.jsx(S_,{"data-state":i.open?"open":"closed",...o,onPointerEnter:be(e.onPointerEnter,Us(i.onOpen)),onPointerLeave:be(e.onPointerLeave,Us(i.onClose)),ref:t})})});Ly.displayName=Hs;var S_=v.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:l,...a}=e,f=Uf(Hs,n),u=ga(n),p=v.useRef(null),m=Ve(t,p),[h,x]=v.useState(!1);return v.useEffect(()=>{if(h){const C=document.body;return fu=C.style.userSelect||C.style.webkitUserSelect,C.style.userSelect="none",C.style.webkitUserSelect="none",()=>{C.style.userSelect=fu,C.style.webkitUserSelect=fu}}},[h]),v.useEffect(()=>{if(p.current){const C=()=>{x(!1),f.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var R;((R=document.getSelection())==null?void 0:R.toString())!==""&&(f.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",C),()=>{document.removeEventListener("pointerup",C),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!1}}},[f.isPointerDownOnContentRef,f.hasSelectionRef]),v.useEffect(()=>{p.current&&C_(p.current).forEach(E=>E.setAttribute("tabindex","-1"))}),w.jsx(ca,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:be(i,C=>{C.preventDefault()}),onDismiss:f.onDismiss,children:w.jsx(Dg,{...u,...a,onPointerDown:be(a.onPointerDown,C=>{C.currentTarget.contains(C.target)&&x(!0),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!0}),ref:m,style:{...a.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),E_="HoverCardArrow",b_=v.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=ga(n);return w.jsx(Og,{...o,...r,ref:t})});b_.displayName=E_;function Us(e){return t=>t.pointerType==="touch"?void 0:e()}function C_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var __=jy,k_=Iy,Fy=Ly;const zy=__,$y=k_,Wf=v.forwardRef(({className:e,align:t="start",side:n="bottom",sideOffset:r=4,...o},i)=>w.jsx(Fy,{ref:i,align:t,side:n,sideOffset:r,className:Se("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 text-balance break-words",e),...o}));Wf.displayName=Fy.displayName;const Hy=v.forwardRef(({className:e,...t},n)=>w.jsx("div",{className:"relative w-full overflow-auto",children:w.jsx("table",{ref:n,className:Se("w-full caption-bottom text-sm",e),...t})}));Hy.displayName="Table";const Uy=v.forwardRef(({className:e,...t},n)=>w.jsx("thead",{ref:n,className:Se("[&_tr]:border-b",e),...t}));Uy.displayName="TableHeader";const Wy=v.forwardRef(({className:e,...t},n)=>w.jsx("tbody",{ref:n,className:Se("[&_tr:last-child]:border-0",e),...t}));Wy.displayName="TableBody";const R_=v.forwardRef(({className:e,...t},n)=>w.jsx("tfoot",{ref:n,className:Se("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));R_.displayName="TableFooter";const Sc=v.forwardRef(({className:e,...t},n)=>w.jsx("tr",{ref:n,className:Se("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Sc.displayName="TableRow";const By=v.forwardRef(({className:e,...t},n)=>w.jsx("th",{ref:n,className:Se("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));By.displayName="TableHead";const Vy=v.forwardRef(({className:e,children:t,dataType:n,...r},o)=>w.jsx("td",{ref:o,className:Se("p-4 align-middle [&:has([role=checkbox])]:pr-0 truncate max-w-[200px] overflow-hidden text-ellipsis whitespace-nowrap",e),...r,children:w.jsxs(zy,{children:[w.jsx($y,{asChild:!0,children:w.jsx("span",{className:"hover:underline cursor-pointer",children:t})}),w.jsx(Wf,{side:"bottom",align:"start",children:w.jsxs("div",{className:"flex flex-col gap-1",children:[n==="BLOB"?w.jsx("span",{className:"truncate max-w-[200px] overflow-hidden text-ellipsis whitespace-nowrap",children:t}):t,n&&w.jsx(Dy,{className:"text-xs",children:n})]})})]})}));Vy.displayName="TableCell";const P_=v.forwardRef(({className:e,...t},n)=>w.jsx("caption",{ref:n,className:Se("mt-4 text-sm text-muted-foreground",e),...t}));P_.displayName="TableCaption";function N_({data:e,columns:t,tableName:n,tableSchemas:r}){return w.jsxs(Hy,{children:[w.jsx(Uy,{children:w.jsx(Sc,{children:t.map((o,i)=>{var l,a,f,u,p,m;return w.jsx(By,{children:w.jsxs(zy,{children:[w.jsx($y,{asChild:!0,children:w.jsx("span",{className:"hover:underline cursor-pointer",children:w.jsxs("div",{className:"flex gap-1",children:[o,((l=r[n][o])==null?void 0:l.isPrimaryKey)&&w.jsx(ab,{className:"h-4 w-4"}),((a=r[n][o])==null?void 0:a.isForeignKey)&&w.jsx(ub,{className:"h-4 w-4"}),((f=r[n][o])==null?void 0:f.type)==="BLOB"&&w.jsx(ob,{className:"h-4 w-4"}),((u=r[n][o])==null?void 0:u.type)==="DATETIME"&&w.jsx(rb,{className:"h-4 w-4"})]})})}),w.jsx(Wf,{side:"bottom",align:"start",children:((p=r[n][o])==null?void 0:p.type.length)==0?"Unknown":(m=r[n][o])==null?void 0:m.type})]})},i)})})}),w.jsx(Wy,{children:e.map((o,i)=>w.jsx(Sc,{children:t.map((l,a)=>{var f;return w.jsx(Vy,{dataType:(f=r[n][l])==null?void 0:f.type,children:o[l]?o[l]:w.jsx("span",{className:"italic opacity-40",children:"NULL"})},a)})},i))})]})}function T_(){const{query:e,db:t,tables:n,selectedTable:r,tableSchemas:o,queryError:i,setQueryError:l,rowPerPageOrAuto:a,isCustomQuery:f,setIsCustomQuery:u}=Jr(),[p,m]=v.useState([]),[h,x]=v.useState([]),[C,E]=v.useState(0),[R,y]=v.useState(""),g=v.useMemo(()=>{var A;return(A=n[parseInt(r)])==null?void 0:A.name},[n,r]),b=v.useMemo(()=>{var A;return((A=n[parseInt(r)])==null?void 0:A.count)||0},[n,r]);let _=30;if(a==="auto"){let A=110;const j=window.innerHeight,I=j>1500,V=j>1e3,H=j<750;I?A=75:V?A=90:H&&(A=130),_=Math.max(1,Math.floor(j/A))}else _=a;v.useEffect(()=>{E(0),u(!1)},[g]),v.useEffect(()=>{if(t&&g&&!f)try{const A=`SELECT * FROM "${g}" LIMIT ${_} OFFSET ${C};`,j=e(A),{data:I,columns:V}=js(j);x(V),m(I),l(null),y(A)}catch(A){A instanceof Error&&l(A.message)}},[g,C,_]);const P=v.useCallback(()=>{l(null),y(""),u(!1)},[u,l]),D=v.useCallback(()=>{E(0),l(null),y(""),u(!1)},[u,l]),N=v.useCallback(()=>{if(R.trim()===""){l(null);return}if(t&&R.trim()!=="")try{const A=e(R),{data:j,columns:I}=js(A);x(I),m(j),u(!0),l(null)}catch(A){A instanceof Error&&l(A.message)}},[R,t,e,l]);return w.jsxs("div",{className:"flex flex-col gap-3 mb-2",children:[w.jsxs("section",{className:"flex flex-col gap-2 p-3 pb-1 border rounded",children:[w.jsx(m_,{}),w.jsxs("div",{className:"flex gap-1",children:[w.jsx(kf,{type:"text",value:R,onChange:A=>y(A.target.value),placeholder:"Enter your custom query",className:"w-full"}),w.jsx(Dt,{onClick:N,title:"Run custom query",children:w.jsx(pb,{className:"h-5 w-5"})}),w.jsx(Dt,{onClick:P,title:"Reset query",children:w.jsx(vb,{className:"h-5 w-5"})}),w.jsx(Dt,{onClick:D,title:"Reset to first page",disabled:C===0,children:w.jsx(cb,{className:"h-5 w-5"})})]}),w.jsx("p",{className:"text-xs text-red-500 capitalize text-center",children:i})]}),p.length>0?w.jsx("div",{className:"border rounded",children:w.jsx(N_,{data:p,columns:h,tableName:g,tableSchemas:o})}):w.jsxs("p",{className:"text-center font-semibold md:text-2xl p-10 border rounded",children:["Table ",g," is empty"]}),!f&&w.jsx(gb,{page:C,setPage:E,rowsPerPage:_,rowCount:b})]})}var qy={exports:{}},A_="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",D_=A_,O_=D_;function Gy(){}function Ky(){}Ky.resetWarningCache=Gy;var j_=function(){function e(r,o,i,l,a,f){if(f!==O_){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Ky,resetWarningCache:Gy};return n.PropTypes=n,n};qy.exports=j_();var M_=qy.exports;const Te=Zi(M_);var I_=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function sl(e,t){var n=L_(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function L_(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=I_.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var F_=[".DS_Store","Thumbs.db"];function z_(e){return Qo(this,void 0,void 0,function(){return Yo(this,function(t){return Ws(e)&&$_(e.dataTransfer)?[2,B_(e.dataTransfer,e.type)]:H_(e)?[2,U_(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,W_(e)]:[2,[]]})})}function $_(e){return Ws(e)}function H_(e){return Ws(e)&&Ws(e.target)}function Ws(e){return typeof e=="object"&&e!==null}function U_(e){return Ec(e.target.files).map(function(t){return sl(t)})}function W_(e){return Qo(this,void 0,void 0,function(){var t;return Yo(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return sl(r)})]}})})}function B_(e,t){return Qo(this,void 0,void 0,function(){var n,r;return Yo(this,function(o){switch(o.label){case 0:return e.items?(n=Ec(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(V_))]):[3,2];case 1:return r=o.sent(),[2,mm(Qy(r))];case 2:return[2,mm(Ec(e.files).map(function(i){return sl(i)}))]}})})}function mm(e){return e.filter(function(t){return F_.indexOf(t.name)===-1})}function Ec(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,wm(n)];if(e.sizen)return[!1,wm(n)]}return[!0,null]}function jr(e){return e!=null}function sk(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,l=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&l>=1&&t.length>l?!1:t.every(function(f){var u=Jy(f,n),p=Xi(u,1),m=p[0],h=e0(f,r,o),x=Xi(h,1),C=x[0],E=a?a(f):null;return m&&C&&!E})}function Bs(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Vl(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Sm(e){e.preventDefault()}function ak(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function uk(e){return e.indexOf("Edge/")!==-1}function ck(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return ak(e)||uk(e)}function bn(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),l=1;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Bf=v.forwardRef(function(e,t){var n=e.children,r=Vs(e,vk),o=i0(r),i=o.open,l=Vs(o,gk);return v.useImperativeHandle(t,function(){return{open:i}},[i]),Q.createElement(v.Fragment,null,n(Ge(Ge({},l),{},{open:i})))});Bf.displayName="Dropzone";var o0={disabled:!1,getFilesFromEvent:z_,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Bf.defaultProps=o0;Bf.propTypes={children:Te.func,accept:Te.objectOf(Te.arrayOf(Te.string)),multiple:Te.bool,preventDropOnDocument:Te.bool,noClick:Te.bool,noKeyboard:Te.bool,noDrag:Te.bool,noDragEventsBubbling:Te.bool,minSize:Te.number,maxSize:Te.number,maxFiles:Te.number,disabled:Te.bool,getFilesFromEvent:Te.func,onFileDialogCancel:Te.func,onFileDialogOpen:Te.func,useFsAccessApi:Te.bool,autoFocus:Te.bool,onDragEnter:Te.func,onDragLeave:Te.func,onDragOver:Te.func,onDrop:Te.func,onDropAccepted:Te.func,onDropRejected:Te.func,onError:Te.func,validator:Te.func};var kc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function i0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ge(Ge({},o0),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,l=t.minSize,a=t.multiple,f=t.maxFiles,u=t.onDragEnter,p=t.onDragLeave,m=t.onDragOver,h=t.onDrop,x=t.onDropAccepted,C=t.onDropRejected,E=t.onFileDialogCancel,R=t.onFileDialogOpen,y=t.useFsAccessApi,g=t.autoFocus,b=t.preventDropOnDocument,_=t.noClick,P=t.noKeyboard,D=t.noDrag,N=t.noDragEventsBubbling,A=t.onError,j=t.validator,I=v.useMemo(function(){return pk(n)},[n]),V=v.useMemo(function(){return dk(n)},[n]),H=v.useMemo(function(){return typeof R=="function"?R:bm},[R]),F=v.useMemo(function(){return typeof E=="function"?E:bm},[E]),W=v.useRef(null),Z=v.useRef(null),le=v.useReducer(Pk,kc),ne=du(le,2),z=ne[0],B=ne[1],ee=z.isFocused,se=z.isFileDialogActive,ue=v.useRef(typeof window<"u"&&window.isSecureContext&&y&&fk()),qe=function(){!ue.current&&se&&setTimeout(function(){if(Z.current){var oe=Z.current.files;oe.length||(B({type:"closeDialog"}),F())}},300)};v.useEffect(function(){return window.addEventListener("focus",qe,!1),function(){window.removeEventListener("focus",qe,!1)}},[Z,se,F,ue]);var ve=v.useRef([]),Xe=function(oe){W.current&&W.current.contains(oe.target)||(oe.preventDefault(),ve.current=[])};v.useEffect(function(){return b&&(document.addEventListener("dragover",Sm,!1),document.addEventListener("drop",Xe,!1)),function(){b&&(document.removeEventListener("dragover",Sm),document.removeEventListener("drop",Xe))}},[W,b]),v.useEffect(function(){return!r&&g&&W.current&&W.current.focus(),function(){}},[W,g,r]);var _e=v.useCallback(function(G){A?A(G):console.error(G)},[A]),J=v.useCallback(function(G){G.preventDefault(),G.persist(),rn(G),ve.current=[].concat(xk(ve.current),[G.target]),Vl(G)&&Promise.resolve(o(G)).then(function(oe){if(!(Bs(G)&&!N)){var Le=oe.length,Pe=Le>0&&sk({files:oe,accept:I,minSize:l,maxSize:i,multiple:a,maxFiles:f,validator:j}),nt=Le>0&&!Pe;B({isDragAccept:Pe,isDragReject:nt,isDragActive:!0,type:"setDraggedFiles"}),u&&u(G)}}).catch(function(oe){return _e(oe)})},[o,u,_e,N,I,l,i,a,f,j]),ye=v.useCallback(function(G){G.preventDefault(),G.persist(),rn(G);var oe=Vl(G);if(oe&&G.dataTransfer)try{G.dataTransfer.dropEffect="copy"}catch{}return oe&&m&&m(G),!1},[m,N]),Ie=v.useCallback(function(G){G.preventDefault(),G.persist(),rn(G);var oe=ve.current.filter(function(Pe){return W.current&&W.current.contains(Pe)}),Le=oe.indexOf(G.target);Le!==-1&&oe.splice(Le,1),ve.current=oe,!(oe.length>0)&&(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Vl(G)&&p&&p(G))},[W,p,N]),K=v.useCallback(function(G,oe){var Le=[],Pe=[];G.forEach(function(nt){var Tt=Jy(nt,I),St=du(Tt,2),on=St[0],Yn=St[1],Xn=e0(nt,l,i),Zn=du(Xn,2),ie=Zn[0],fe=Zn[1],Re=j?j(nt):null;if(on&&ie&&!Re)Le.push(nt);else{var q=[Yn,fe];Re&&(q=q.concat(Re)),Pe.push({file:nt,errors:q.filter(function(De){return De})})}}),(!a&&Le.length>1||a&&f>=1&&Le.length>f)&&(Le.forEach(function(nt){Pe.push({file:nt,errors:[lk]})}),Le.splice(0)),B({acceptedFiles:Le,fileRejections:Pe,type:"setFiles"}),h&&h(Le,Pe,oe),Pe.length>0&&C&&C(Pe,oe),Le.length>0&&x&&x(Le,oe)},[B,a,I,l,i,f,h,x,C,j]),ge=v.useCallback(function(G){G.preventDefault(),G.persist(),rn(G),ve.current=[],Vl(G)&&Promise.resolve(o(G)).then(function(oe){Bs(G)&&!N||K(oe,G)}).catch(function(oe){return _e(oe)}),B({type:"reset"})},[o,K,_e,N]),de=v.useCallback(function(){if(ue.current){B({type:"openDialog"}),H();var G={multiple:a,types:V};window.showOpenFilePicker(G).then(function(oe){return o(oe)}).then(function(oe){K(oe,null),B({type:"closeDialog"})}).catch(function(oe){mk(oe)?(F(oe),B({type:"closeDialog"})):hk(oe)?(ue.current=!1,Z.current?(Z.current.value=null,Z.current.click()):_e(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):_e(oe)});return}Z.current&&(B({type:"openDialog"}),H(),Z.current.value=null,Z.current.click())},[B,H,F,y,K,_e,V,a]),Y=v.useCallback(function(G){!W.current||!W.current.isEqualNode(G.target)||(G.key===" "||G.key==="Enter"||G.keyCode===32||G.keyCode===13)&&(G.preventDefault(),de())},[W,de]),me=v.useCallback(function(){B({type:"focus"})},[]),ut=v.useCallback(function(){B({type:"blur"})},[]),Je=v.useCallback(function(){_||(ck()?setTimeout(de,0):de())},[_,de]),tt=function(oe){return r?null:oe},Nt=function(oe){return P?null:tt(oe)},ke=function(oe){return D?null:tt(oe)},rn=function(oe){N&&oe.stopPropagation()},eo=v.useMemo(function(){return function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=G.refKey,Le=oe===void 0?"ref":oe,Pe=G.role,nt=G.onKeyDown,Tt=G.onFocus,St=G.onBlur,on=G.onClick,Yn=G.onDragEnter,Xn=G.onDragOver,Zn=G.onDragLeave,ie=G.onDrop,fe=Vs(G,yk);return Ge(Ge(_c({onKeyDown:Nt(bn(nt,Y)),onFocus:Nt(bn(Tt,me)),onBlur:Nt(bn(St,ut)),onClick:tt(bn(on,Je)),onDragEnter:ke(bn(Yn,J)),onDragOver:ke(bn(Xn,ye)),onDragLeave:ke(bn(Zn,Ie)),onDrop:ke(bn(ie,ge)),role:typeof Pe=="string"&&Pe!==""?Pe:"presentation"},Le,W),!r&&!P?{tabIndex:0}:{}),fe)}},[W,Y,me,ut,Je,J,ye,Ie,ge,P,D,r]),Ft=v.useCallback(function(G){G.stopPropagation()},[]),yn=v.useMemo(function(){return function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=G.refKey,Le=oe===void 0?"ref":oe,Pe=G.onChange,nt=G.onClick,Tt=Vs(G,wk),St=_c({accept:I,multiple:a,type:"file",style:{display:"none"},onChange:tt(bn(Pe,ge)),onClick:tt(bn(nt,Ft)),tabIndex:-1},Le,Z);return Ge(Ge({},St),Tt)}},[Z,n,a,ge,r]);return Ge(Ge({},z),{},{isFocused:ee&&!r,getRootProps:eo,getInputProps:yn,rootRef:W,inputRef:Z,open:tt(de)})}function Pk(e,t){switch(t.type){case"focus":return Ge(Ge({},e),{},{isFocused:!0});case"blur":return Ge(Ge({},e),{},{isFocused:!1});case"openDialog":return Ge(Ge({},kc),{},{isFileDialogActive:!0});case"closeDialog":return Ge(Ge({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ge(Ge({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ge(Ge({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Ge({},kc);default:return e}}function bm(){}const Nk=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];function Tk(e){if(e===0)return"0 Byte";const t=Math.floor(Math.log(e)/Math.log(1024)),n=Nk[t];return`${(e/Math.pow(1024,t)).toFixed(2)} ${n}`}function Ak({file:e}){return w.jsx(w.Fragment,{children:w.jsxs("li",{className:"flex w-full items-center justify-center gap-2 font-mono text-sm",title:e.name,children:[w.jsx("p",{className:"max-w-[250px] truncate",children:e.name}),w.jsx("span",{className:"text-xs font-semibold",children:Tk(e.size)})]})})}function Dk({errors:e}){return e?w.jsx(w.Fragment,{children:e.map(t=>w.jsxs("div",{className:"flex items-center justify-center text-sm text-red-600 gap-2 rounded border border-red-600 p-4 mb-2",children:[w.jsx(lb,{}),t.message]},t.code))}):w.jsxs("li",{className:"flex w-full items-center justify-center text-sm text-green-600",children:[w.jsx(ib,{className:"mr-2"}),"Uploaded successfully"]})}function Ok(){const{loadDatabase:e,setTables:t,setSelectedTable:n,db:r}=Jr(),[o,i]=v.useState(null),[l,a]=v.useState([]),f=v.useCallback(async(m,h)=>{if(a([]),t([]),n("0"),m.length>0){const x=m[0];i(x),await e(x)}if(h.length>0){const x=h.flatMap(C=>C.errors);a(x)}},[e,t,n]),{getRootProps:u,getInputProps:p}=i0({onDrop:f,multiple:!1,accept:{"application/vnd.sqlite3":[".sqlite",".sqlite3"],"application/x-sqlite3":[".sqlite",".sqlite3"],"application/octet-stream":[".db"],"application/sql":[".sql"]}});return w.jsxs("section",{children:[r?w.jsxs("div",{...u(),className:"border p-6 rounded cursor-pointer text-center",children:[w.jsx("input",{id:"file-upload",...p()}),w.jsx("label",{htmlFor:"file-upload",className:"sr-only",children:"Upload SQLite File"}),w.jsx("p",{className:"hidden sm:block",children:"Drag drop a SQLite file here, or click to select one"}),w.jsx("p",{className:"block sm:hidden",children:"Click to select a SQLite file"})]}):w.jsxs("div",{...u(),className:"border p-6 py-24 rounded cursor-pointer text-center",children:[w.jsx("input",{id:"file-upload",...p()}),w.jsx("label",{htmlFor:"file-upload",className:"sr-only",children:"Upload SQLite File"}),w.jsx("p",{className:"hidden sm:block",children:"Drag drop a SQLite file here, or click to select one"}),w.jsx("p",{className:"block sm:hidden",children:"Click to select a SQLite file"}),w.jsx("a",{href:"https://github.com/vwh/sqlite-viewer/raw/main/examples/chinook.db",className:"text-sm text-link hover:underline",title:"Download sample file",children:"Or download & try this sample file"})]}),w.jsxs("div",{className:"mt-2",children:[o&&w.jsx(Ak,{file:o}),w.jsx(Dk,{errors:l})]})]})}function jk(){const{isLoading:e}=Jr();return w.jsx(w.Fragment,{children:e&&w.jsxs("div",{className:"flex items-center justify-center mb-2 font-semibold p-4 border rounded",children:[w.jsx(fb,{className:"w-5 h-5 animate-spin"}),w.jsx("span",{className:"ml-2",children:"Reading SQLite file"})]})})}function Mk(){const e=v.useRef(null);return v.useEffect(()=>{const t=e.current;if(!t)return;const n=()=>{document.body.classList.contains("dark")?t.src="/sqlite-dark.webp":t.src="/sqlite-light.webp"};n();const r=new MutationObserver(n);return r.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),w.jsx("section",{className:"flex justify-center border rounded py-3",children:w.jsxs("div",{className:"flex flex-col items-center gap-3",children:[w.jsx("img",{ref:e,id:"logo",title:"SQLite Logo",src:"./sqlite-light.webp",alt:"SQLite Logo",width:"160",height:"80",draggable:"false"}),w.jsx("p",{className:"text-sm",children:"View SQLite file online"})]})})}var Vf="Dialog",[l0,s0]=Vo(Vf),[Ik,vn]=l0(Vf),a0=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:l=!0}=e,a=v.useRef(null),f=v.useRef(null),[u=!1,p]=zs({prop:r,defaultProp:o,onChange:i});return w.jsx(Ik,{scope:t,triggerRef:a,contentRef:f,contentId:Po(),titleId:Po(),descriptionId:Po(),open:u,onOpenChange:p,onOpenToggle:v.useCallback(()=>p(m=>!m),[p]),modal:l,children:n})};a0.displayName=Vf;var u0="DialogTrigger",c0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=vn(u0,n),i=Ve(t,o.triggerRef);return w.jsx(Me.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Kf(o.open),...r,ref:i,onClick:be(e.onClick,o.onOpenToggle)})});c0.displayName=u0;var qf="DialogPortal",[Lk,f0]=l0(qf,{forceMount:void 0}),d0=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=vn(qf,t);return w.jsx(Lk,{scope:t,forceMount:n,children:v.Children.map(r,l=>w.jsx(ll,{present:n||i.open,children:w.jsx(Ff,{asChild:!0,container:o,children:l})}))})};d0.displayName=qf;var qs="DialogOverlay",p0=v.forwardRef((e,t)=>{const n=f0(qs,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=vn(qs,e.__scopeDialog);return i.modal?w.jsx(ll,{present:r||i.open,children:w.jsx(Fk,{...o,ref:t})}):null});p0.displayName=qs;var Fk=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=vn(qs,n);return w.jsx(zf,{as:qr,allowPinchZoom:!0,shards:[o.contentRef],children:w.jsx(Me.div,{"data-state":Kf(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Qr="DialogContent",m0=v.forwardRef((e,t)=>{const n=f0(Qr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=vn(Qr,e.__scopeDialog);return w.jsx(ll,{present:r||i.open,children:i.modal?w.jsx(zk,{...o,ref:t}):w.jsx($k,{...o,ref:t})})});m0.displayName=Qr;var zk=v.forwardRef((e,t)=>{const n=vn(Qr,e.__scopeDialog),r=v.useRef(null),o=Ve(t,n.contentRef,r);return v.useEffect(()=>{const i=r.current;if(i)return Ig(i)},[]),w.jsx(h0,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0;(l.button===2||a)&&i.preventDefault()}),onFocusOutside:be(e.onFocusOutside,i=>i.preventDefault())})}),$k=v.forwardRef((e,t)=>{const n=vn(Qr,e.__scopeDialog),r=v.useRef(!1),o=v.useRef(!1);return w.jsx(h0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var l,a;(l=e.onCloseAutoFocus)==null||l.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var f,u;(f=e.onInteractOutside)==null||f.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),h0=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...l}=e,a=vn(Qr,n),f=v.useRef(null),u=Ve(t,f);return ug(),w.jsxs(w.Fragment,{children:[w.jsx(Pf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:w.jsx(ca,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Kf(a.open),...l,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),w.jsxs(w.Fragment,{children:[w.jsx(Uk,{titleId:a.titleId}),w.jsx(Bk,{contentRef:f,descriptionId:a.descriptionId})]})]})}),Gf="DialogTitle",v0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=vn(Gf,n);return w.jsx(Me.h2,{id:o.titleId,...r,ref:t})});v0.displayName=Gf;var g0="DialogDescription",y0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=vn(g0,n);return w.jsx(Me.p,{id:o.descriptionId,...r,ref:t})});y0.displayName=g0;var w0="DialogClose",x0=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=vn(w0,n);return w.jsx(Me.button,{type:"button",...r,ref:t,onClick:be(e.onClick,()=>o.onOpenChange(!1))})});x0.displayName=w0;function Kf(e){return e?"open":"closed"}var S0="DialogTitleWarning",[Hk,E0]=yb(S0,{contentName:Qr,titleName:Gf,docsSlug:"dialog"}),Uk=({titleId:e})=>{const t=E0(S0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Wk="DialogDescriptionWarning",Bk=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${E0(Wk).contentName}}.`;return v.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},b0=a0,C0=c0,_0=d0,k0=p0,R0=m0,P0=v0,N0=y0,Qf=x0,T0="AlertDialog",[Vk,MR]=Vo(T0,[s0]),Qn=s0(),A0=e=>{const{__scopeAlertDialog:t,...n}=e,r=Qn(t);return w.jsx(b0,{...r,...n,modal:!0})};A0.displayName=T0;var qk="AlertDialogTrigger",Gk=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qn(n);return w.jsx(C0,{...o,...r,ref:t})});Gk.displayName=qk;var Kk="AlertDialogPortal",D0=e=>{const{__scopeAlertDialog:t,...n}=e,r=Qn(t);return w.jsx(_0,{...r,...n})};D0.displayName=Kk;var Qk="AlertDialogOverlay",O0=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qn(n);return w.jsx(k0,{...o,...r,ref:t})});O0.displayName=Qk;var Ao="AlertDialogContent",[Yk,Xk]=Vk(Ao),j0=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=Qn(n),l=v.useRef(null),a=Ve(t,l),f=v.useRef(null);return w.jsx(Hk,{contentName:Ao,titleName:M0,docsSlug:"alert-dialog",children:w.jsx(Yk,{scope:n,cancelRef:f,children:w.jsxs(R0,{role:"alertdialog",...i,...o,ref:a,onOpenAutoFocus:be(o.onOpenAutoFocus,u=>{var p;u.preventDefault(),(p=f.current)==null||p.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[w.jsx(ng,{children:r}),w.jsx(Jk,{contentRef:l})]})})})});j0.displayName=Ao;var M0="AlertDialogTitle",I0=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qn(n);return w.jsx(P0,{...o,...r,ref:t})});I0.displayName=M0;var L0="AlertDialogDescription",F0=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qn(n);return w.jsx(N0,{...o,...r,ref:t})});F0.displayName=L0;var Zk="AlertDialogAction",z0=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Qn(n);return w.jsx(Qf,{...o,...r,ref:t})});z0.displayName=Zk;var $0="AlertDialogCancel",H0=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=Xk($0,n),i=Qn(n),l=Ve(t,o);return w.jsx(Qf,{...i,...r,ref:l})});H0.displayName=$0;var Jk=({contentRef:e})=>{const t=`\`${Ao}\` requires a description for the component to be accessible for screen reader users. + +You can add a description to the \`${Ao}\` by passing a \`${L0}\` component as a child, which also benefits sighted users by adding visible context to the dialog. + +Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ao}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. + +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},eR=A0,tR=D0,U0=O0,W0=j0,B0=z0,V0=H0,q0=I0,G0=F0;const nR=eR,rR=tR,K0=v.forwardRef(({className:e,...t},n)=>w.jsx(U0,{className:Se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));K0.displayName=U0.displayName;const Q0=v.forwardRef(({className:e,...t},n)=>w.jsxs(rR,{children:[w.jsx(K0,{}),w.jsx(W0,{ref:n,className:Se("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg 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%] sm:rounded-lg",e),...t})]}));Q0.displayName=W0.displayName;const Y0=({className:e,...t})=>w.jsx("div",{className:Se("flex flex-col space-y-2 text-center sm:text-left",e),...t});Y0.displayName="AlertDialogHeader";const X0=({className:e,...t})=>w.jsx("div",{className:Se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});X0.displayName="AlertDialogFooter";const Z0=v.forwardRef(({className:e,...t},n)=>w.jsx(q0,{ref:n,className:Se("text-lg font-semibold",e),...t}));Z0.displayName=q0.displayName;const J0=v.forwardRef(({className:e,...t},n)=>w.jsx(G0,{ref:n,className:Se("text-sm",e),...t}));J0.displayName=G0.displayName;const ew=v.forwardRef(({className:e,...t},n)=>w.jsx(B0,{ref:n,className:Se(Rf(),e),...t}));ew.displayName=B0.displayName;const tw=v.forwardRef(({className:e,...t},n)=>w.jsx(V0,{ref:n,className:Se(Rf({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));tw.displayName=V0.displayName;function oR(){const{db:e,tables:t,isLoading:n,loadDatabase:r}=Jr(),[o,i]=v.useState(null),[l,a]=v.useState(!1),[f,u]=v.useState(null),p=v.useRef(!1),m=async(x,C=!1)=>{try{const E=C?`https://corsproxy.io/?${x}`:x,R=await fetch(E);if(!R.ok)i(`URL not found or invalid: ( ${R.status} )`);else{const y=await R.blob(),g=new File([y],"database.sqlite");await r(g),i(null)}}catch(E){E instanceof Error&&(C?i(`Error fetching database from URL (with proxy): ${x} - ${E.message}`):(u(x),a(!0)))}};v.useEffect(()=>{if(p.current)return;const x=new URLSearchParams(window.location.search),C=decodeURIComponent(x.get("url")||"");C&&(m(C),p.current=!0)},[]);const h=()=>{f&&(m(f,!0),a(!1))};return w.jsxs("div",{className:"flex flex-col gap-3",children:[!e&&w.jsx(Mk,{}),w.jsx(Ok,{}),w.jsx(jk,{}),o&&!e&&w.jsx("div",{className:"text-center text-red-500 font-semibold md:text-2xl p-10 border rounded mb-2",children:o}),!n&&e&&(t.length>0?w.jsx(T_,{}):w.jsx("div",{className:"text-center font-semibold md:text-2xl p-10 border rounded mb-2",children:"Your database is empty, no tables found"})),w.jsx(nR,{open:l,onOpenChange:a,children:w.jsxs(Q0,{children:[w.jsxs(Y0,{children:[w.jsx(Z0,{children:"Retry using a proxy?"}),w.jsx(J0,{children:"Failed to load the database from the provided URL due to possible CORS restrictions. Retry using a proxy?"})]}),w.jsx("div",{className:"text-sm font-semibold",children:"Using the proxy may expose your database to the corsproxy.io service."}),w.jsxs(X0,{children:[w.jsx(tw,{onClick:()=>a(!1),children:"Cancel"}),w.jsx(ew,{onClick:h,children:"Confirm"})]})]})})]})}function iR(){const[e,t]=v.useState(!1);v.useEffect(()=>{const r=()=>{const l=window.matchMedia("(prefers-color-scheme: dark)").matches;t(l),document.body.classList.toggle("dark",l)},o=localStorage.getItem("darkMode");if(o!==null){const l=o==="true";t(l),document.body.classList.toggle("dark",l)}else r();const i=window.matchMedia("(prefers-color-scheme: dark)");return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[]);const n=()=>{const r=!e;t(r),localStorage.setItem("darkMode",r.toString()),document.body.classList.toggle("dark",r)};return w.jsx(Dt,{onClick:n,className:"relative",variant:"outline",children:e?w.jsx(hb,{className:"h-5 w-5"}):w.jsx(db,{className:"h-5 w-5"})})}function lR(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const nw=Q.createContext({drawerRef:{current:null},overlayRef:{current:null},scaleBackground:()=>{},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,handleOnly:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},visible:!1,closeDrawer:()=>{},setVisible:()=>{},direction:"bottom"}),ya=()=>{const e=Q.useContext(nw);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};lR("[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-handle]{display:block;position:relative;opacity:.8;margin-left:auto;margin-right:auto;height:5px;width:56px;border-radius:1rem;touch-action:pan-y;cursor:grab}[vaul-handle]:active,[vaul-handle]:hover{opacity:1}[vaul-handle]:active{cursor:grabbing}[vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@media (hover:hover) and (pointer:fine){[vaul-drawer]{user-select:none}}@media (pointer:fine){[vaul-handle-hitarea]:{width:100%;height:100%}}");const sR=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Rc(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}function aR(){return Yf(/^Mac/)}function uR(){return Yf(/^iPhone/)}function cR(){return Yf(/^iPad/)||aR()&&navigator.maxTouchPoints>1}function rw(){return uR()||cR()}function Yf(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const pu=typeof document<"u"&&window.visualViewport;function Cm(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function ow(e){for(Cm(e)&&(e=e.parentElement);e&&!Cm(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const fR=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let ql=0,mu;function dR(e={}){let{isDisabled:t}=e;sR(()=>{if(!t)return ql++,ql===1&&(rw()?mu=mR():mu=pR()),()=>{ql--,ql===0&&mu()}},[t])}function pR(){return Rc(iw(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`))}function mR(){let e,t=0,n=m=>{e=ow(m.target),!(e===document.documentElement&&e===document.body)&&(t=m.changedTouches[0].pageY)},r=m=>{if(!e||e===document.documentElement||e===document.body){m.preventDefault();return}let h=m.changedTouches[0].pageY,x=e.scrollTop,C=e.scrollHeight-e.clientHeight;C!==0&&((x<=0&&h>t||x>=C&&h{let h=m.target;Pc(h)&&h!==document.activeElement&&(m.preventDefault(),h.style.transform="translateY(-2000px)",h.focus(),requestAnimationFrame(()=>{h.style.transform=""}))},i=m=>{let h=m.target;Pc(h)&&(h.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{h.style.transform="",pu&&(pu.height{_m(h)}):pu.addEventListener("resize",()=>_m(h),{once:!0}))}))},l=()=>{window.scrollTo(0,0)},a=window.pageXOffset,f=window.pageYOffset,u=Rc(iw(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let p=Rc(vi(document,"touchstart",n,{passive:!1,capture:!0}),vi(document,"touchmove",r,{passive:!1,capture:!0}),vi(document,"touchend",o,{passive:!1,capture:!0}),vi(document,"focus",i,!0),vi(window,"scroll",l));return()=>{u(),p(),window.scrollTo(a,f)}}function iw(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function vi(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function _m(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=ow(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;const l=n.getBoundingClientRect().bottom;i>l&&(n.scrollTop+=o-r)}e=n.parentElement}}function Pc(e){return e instanceof HTMLInputElement&&!fR.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function hR(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function vR(...e){return t=>e.forEach(n=>hR(n,t))}function lw(...e){return v.useCallback(vR(...e),e)}let gi=null;function gR({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:i}){const[l,a]=Q.useState(()=>typeof window<"u"?window.location.href:""),f=Q.useRef(0),u=Q.useCallback(()=>{if(gi===null&&e&&!i){gi={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:m,innerHeight:h}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-f.current}px`,left:`${-m}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const x=h-window.innerHeight;x&&f.current>=h&&(document.body.style.top=`${-(f.current+x)}px`)}),300)}},[e]),p=Q.useCallback(()=>{if(gi!==null&&!i){const m=-parseInt(document.body.style.top,10),h=-parseInt(document.body.style.left,10);Object.assign(document.body.style,gi),window.requestAnimationFrame(()=>{if(o&&l!==window.location.href){a(window.location.href);return}window.scrollTo(h,m)}),gi=null}},[l]);return Q.useEffect(()=>{function m(){f.current=window.scrollY}return m(),window.addEventListener("scroll",m),()=>{window.removeEventListener("scroll",m)}},[]),Q.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{p()},500)):p())},[e,r,l,t,n,u,p]),{restorePositionSetting:p}}const sw=new WeakMap;function He(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,i])=>{if(o.startsWith("--")){e.style.setProperty(o,i);return}r[o]=e.style[o],e.style[o]=i}),!n&&sw.set(e,r)}function Gl(e,t){if(!e||!(e instanceof HTMLElement))return;let n=sw.get(e);n&&(t?e.style[t]=n[t]:Object.entries(n).forEach(([r,o])=>{e.style[r]=o}))}const ot=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Kl(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[ot(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[ot(t)?5:4]):null)}function yR(e){return 8*(Math.log(e+1)-2)}const Ae={DURATION:.5,EASE:[.32,.72,0,1]},aw=.4;function uw(e){const t=Q.useRef(e);return Q.useEffect(()=>{t.current=e}),Q.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function wR({defaultProp:e,onChange:t}){const n=Q.useState(e),[r]=n,o=Q.useRef(r),i=uw(t);return Q.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function xR({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=wR({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,a=uw(n),f=Q.useCallback(u=>{if(i){const m=typeof u=="function"?u(e):u;m!==e&&a(m)}else o(u)},[i,e,o,a]);return[l,f]}function SR({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:i,onSnapPointChange:l,direction:a="bottom"}){const[f,u]=xR({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),p=Q.useMemo(()=>f===(n==null?void 0:n[n.length-1])||null,[n,f]),m=n&&n.length>0&&(i||i===0)&&!Number.isNaN(i)&&n[i]===f||!n,h=Q.useMemo(()=>n==null?void 0:n.findIndex(b=>b===f),[n,f]),x=Q.useMemo(()=>{var b;return(b=n==null?void 0:n.map(_=>{const P=typeof window<"u",D=typeof _=="string";let N=0;if(D&&(N=parseInt(_,10)),ot(a)){const j=D?N:P?_*window.innerHeight:0;return P?a==="bottom"?window.innerHeight-j:-window.innerHeight+j:j}const A=D?N:P?_*window.innerWidth:0;return P?a==="right"?window.innerWidth-A:-window.innerWidth+A:A}))!=null?b:[]},[n]),C=Q.useMemo(()=>h!==null?x==null?void 0:x[h]:null,[x,h]),E=Q.useCallback(b=>{var _;const P=(_=x==null?void 0:x.findIndex(D=>D===b))!=null?_:null;l(P),He(r.current,{transition:`transform ${Ae.DURATION}s cubic-bezier(${Ae.EASE.join(",")})`,transform:ot(a)?`translate3d(0, ${b}px, 0)`:`translate3d(${b}px, 0, 0)`}),x&&P!==x.length-1&&P!==i?He(o.current,{transition:`opacity ${Ae.DURATION}s cubic-bezier(${Ae.EASE.join(",")})`,opacity:"0"}):He(o.current,{transition:`opacity ${Ae.DURATION}s cubic-bezier(${Ae.EASE.join(",")})`,opacity:"1"}),u(P!==null?n==null?void 0:n[P]:null)},[r.current,n,x,i,o,u]);Q.useEffect(()=>{if(f||e){var b;const _=(b=n==null?void 0:n.findIndex(P=>P===e||P===f))!=null?b:-1;x&&_!==-1&&typeof x[_]=="number"&&E(x[_])}},[f,e,n,x,E]);function R({draggedDistance:b,closeDrawer:_,velocity:P,dismissible:D}){if(i===void 0)return;const N=a==="bottom"||a==="right"?(C??0)-b:(C??0)+b,A=h===i-1,j=h===0,I=b>0;if(A&&He(o.current,{transition:`opacity ${Ae.DURATION}s cubic-bezier(${Ae.EASE.join(",")})`}),P>2&&!I){D?_():E(x[0]);return}if(P>2&&I&&x&&n){E(x[n.length-1]);return}const V=x==null?void 0:x.reduce((F,W)=>typeof F!="number"||typeof W!="number"?F:Math.abs(W-N)aw&&Math.abs(b)0&&p){E(x[n.length-1]);return}if(j&&F<0&&D&&_(),h===null)return;E(x[h+F]);return}E(V)}function y({draggedDistance:b}){if(C===null)return;const _=a==="bottom"||a==="right"?C-b:C+b;(a==="bottom"||a==="right")&&_x[x.length-1]||He(r.current,{transform:ot(a)?`translate3d(0, ${_}px, 0)`:`translate3d(${_}px, 0, 0)`})}function g(b,_){if(!n||typeof h!="number"||!x||i===void 0)return null;const P=h===i-1;if(h>=i&&_)return 0;if(P&&!_)return 1;if(!m&&!P)return null;const N=P?h+1:h-1,A=P?x[N]-x[N-1]:x[N+1]-x[N],j=b/Math.abs(A);return P?1-j:j}return{isLastSnapPoint:p,activeSnapPoint:f,shouldFade:m,getPercentageDragged:g,setActiveSnapPoint:u,activeSnapPointIndex:h,onRelease:R,onDrag:y,snapPointsOffset:x}}const ER=.25,bR=100,km=8,Ar=16,Rm=26,hu="vaul-dragging";function cw({open:e,onOpenChange:t,children:n,shouldScaleBackground:r,onDrag:o,onRelease:i,snapPoints:l,nested:a=!1,setBackgroundColorOnScale:f=!0,closeThreshold:u=ER,scrollLockTimeout:p=bR,dismissible:m=!0,handleOnly:h=!1,fadeFromIndex:x=l&&l.length-1,activeSnapPoint:C,setActiveSnapPoint:E,fixed:R,modal:y=!0,onClose:g,noBodyStyles:b,direction:_="bottom",preventScrollRestoration:P=!0,disablePreventScroll:D=!1}){var N;const[A=!1,j]=Q.useState(!1),[I,V]=Q.useState(!1),[H,F]=Q.useState(!1),[W,Z]=Q.useState(!1),[le,ne]=Q.useState(!1),[z,B]=Q.useState(!1),ee=Q.useRef(null),se=Q.useRef(null),ue=Q.useRef(null),qe=Q.useRef(null),ve=Q.useRef(null),Xe=Q.useRef(!1),_e=Q.useRef(null),J=Q.useRef(0),ye=Q.useRef(!1),Ie=Q.useRef(0),K=Q.useRef(null),ge=Q.useRef(((N=K.current)==null?void 0:N.getBoundingClientRect().height)||0),de=Q.useRef(0),Y=Q.useCallback(ie=>{l&&ie===Nt.length-1&&(se.current=new Date)},[]),{activeSnapPoint:me,activeSnapPointIndex:ut,setActiveSnapPoint:Je,onRelease:tt,snapPointsOffset:Nt,onDrag:ke,shouldFade:rn,getPercentageDragged:eo}=SR({snapPoints:l,activeSnapPointProp:C,setActiveSnapPointProp:E,drawerRef:K,fadeFromIndex:x,overlayRef:ee,onSnapPointChange:Y,direction:_});dR({isDisabled:!A||le||!y||z||!I||D});const{restorePositionSetting:Ft}=gR({isOpen:A,modal:y,nested:a,hasBeenOpened:I,preventScrollRestoration:P,noBodyStyles:b});function yn(){return(window.innerWidth-Rm)/window.innerWidth}function G(ie){var fe;!m&&!l||K.current&&!K.current.contains(ie.target)||(ge.current=((fe=K.current)==null?void 0:fe.getBoundingClientRect().height)||0,ne(!0),ue.current=new Date,rw()&&window.addEventListener("touchend",()=>Xe.current=!1,{once:!0}),ie.target.setPointerCapture(ie.pointerId),J.current=ot(_)?ie.clientY:ie.clientX)}function oe(ie,fe){var Re;let q=ie;const De=(Re=window.getSelection())==null?void 0:Re.toString(),We=K.current?Kl(K.current,_):null,Et=new Date;if(q.hasAttribute("data-vaul-no-drag")||q.closest("[data-vaul-no-drag]"))return!1;if(_==="right"||_==="left")return!0;if(se.current&&Et.getTime()-se.current.getTime()<500)return!1;if(We!==null&&(_==="bottom"?We>0:We<0))return!0;if(De&&De.length>0)return!1;if(ve.current&&Et.getTime()-ve.current.getTime()q.clientHeight){if(q.scrollTop!==0)return ve.current=new Date,!1;if(q.getAttribute("role")==="dialog")return!0}q=q.parentNode}return!0}function Le(ie){if(K.current&&le){const fe=_==="bottom"||_==="right"?1:-1,Re=(J.current-(ot(_)?ie.clientY:ie.clientX))*fe,q=Re>0,De=l&&!m&&!q;if(De&&ut===0)return;const We=Math.abs(Re),Et=document.querySelector("[vaul-drawer-wrapper]");let vt=We/ge.current;const wn=eo(We,q);if(wn!==null&&(vt=wn),De&&vt>=1||!Xe.current&&!oe(ie.target,q))return;if(K.current.classList.add(hu),Xe.current=!0,He(K.current,{transition:"none"}),He(ee.current,{transition:"none"}),l&&ke({draggedDistance:Re}),q&&!l){const xn=yR(Re),U=Math.min(xn*-1,0)*fe;He(K.current,{transform:ot(_)?`translate3d(0, ${U}px, 0)`:`translate3d(${U}px, 0, 0)`});return}const zt=1-vt;if((rn||x&&ut===x-1)&&(o==null||o(ie,vt),He(ee.current,{opacity:`${zt}`,transition:"none"},!0)),Et&&ee.current&&r){const xn=Math.min(yn()+vt*(1-yn()),1),U=8-vt*8,to=Math.max(0,14-vt*14);He(Et,{borderRadius:`${U}px`,transform:ot(_)?`scale(${xn}) translate3d(0, ${to}px, 0)`:`scale(${xn}) translate3d(${to}px, 0, 0)`,transition:"none"},!0)}if(!l){const xn=We*fe;He(K.current,{transform:ot(_)?`translate3d(0, ${xn}px, 0)`:`translate3d(${xn}px, 0, 0)`})}}}Q.useEffect(()=>()=>{on(!1),Ft()},[]),Q.useEffect(()=>{var ie;function fe(){if(!K.current)return;const Re=document.activeElement;if(Pc(Re)||ye.current){var q;const De=((q=window.visualViewport)==null?void 0:q.height)||0;let We=window.innerHeight-De;const Et=K.current.getBoundingClientRect().height||0;de.current||(de.current=Et);const vt=K.current.getBoundingClientRect().top;if(Math.abs(Ie.current-We)>60&&(ye.current=!ye.current),l&&l.length>0&&Nt&&ut){const wn=Nt[ut]||0;We+=wn}if(Ie.current=We,Et>De||ye.current){const wn=K.current.getBoundingClientRect().height;let zt=wn;wn>De&&(zt=De-Rm),R?K.current.style.height=`${wn-Math.max(We,0)}px`:K.current.style.height=`${Math.max(zt,De-vt)}px`}else K.current.style.height=`${de.current}px`;l&&l.length>0&&!ye.current?K.current.style.bottom="0px":K.current.style.bottom=`${Math.max(We,0)}px`}}return(ie=window.visualViewport)==null||ie.addEventListener("resize",fe),()=>{var Re;return(Re=window.visualViewport)==null?void 0:Re.removeEventListener("resize",fe)}},[ut,l,Nt]);function Pe(){K.current&&(Tt(),g==null||g(),He(K.current,{transform:ot(_)?`translate3d(0, ${_==="bottom"?"100%":"-100%"}, 0)`:`translate3d(${_==="right"?"100%":"-100%"}, 0, 0)`,transition:`transform ${Ae.DURATION}s cubic-bezier(${Ae.EASE.join(",")})`}),He(ee.current,{opacity:"0",transition:`opacity ${Ae.DURATION}s cubic-bezier(${Ae.EASE.join(",")})`}),on(!1),setTimeout(()=>{F(!1),j(!1)},300),setTimeout(()=>{l&&Je(l[0])},Ae.DURATION*1e3))}Q.useEffect(()=>{if(!A&&r){const ie=setTimeout(()=>{Gl(document.body)},200);return()=>clearTimeout(ie)}},[A,r]),Q.useLayoutEffect(()=>{e?(j(!0),V(!0)):Pe()},[e]),Q.useEffect(()=>{W&&(t==null||t(A))},[A]),Q.useEffect(()=>{Z(!0)},[]);function nt(){if(!K.current)return;const ie=document.querySelector("[vaul-drawer-wrapper]"),fe=Kl(K.current,_);He(K.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Ae.DURATION}s cubic-bezier(${Ae.EASE.join(",")})`}),He(ee.current,{transition:`opacity ${Ae.DURATION}s cubic-bezier(${Ae.EASE.join(",")})`,opacity:"1"}),r&&fe&&fe>0&&A&&He(ie,{borderRadius:`${km}px`,overflow:"hidden",...ot(_)?{transform:`scale(${yn()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${yn()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Ae.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ae.EASE.join(",")})`},!0)}function Tt(){!le||!K.current||(K.current.classList.remove(hu),Xe.current=!1,ne(!1),qe.current=new Date)}function St(ie){if(!le||!K.current)return;K.current.classList.remove(hu),Xe.current=!1,ne(!1),qe.current=new Date;const fe=Kl(K.current,_);if(!oe(ie.target,!1)||!fe||Number.isNaN(fe)||ue.current===null)return;const Re=qe.current.getTime()-ue.current.getTime(),q=J.current-(ot(_)?ie.clientY:ie.clientX),De=Math.abs(q)/Re;if(De>.05&&(B(!0),setTimeout(()=>{B(!1)},200)),l){tt({draggedDistance:q*(_==="bottom"||_==="right"?1:-1),closeDrawer:Pe,velocity:De,dismissible:m}),i==null||i(ie,!0);return}if(_==="bottom"||_==="right"?q>0:q<0){nt(),i==null||i(ie,!0);return}if(De>aw){Pe(),i==null||i(ie,!1);return}var We;const Et=Math.min((We=K.current.getBoundingClientRect().height)!=null?We:0,window.innerHeight);if(fe>=Et*u){Pe(),i==null||i(ie,!1);return}i==null||i(ie,!0),nt()}Q.useEffect(()=>{A&&(He(document.documentElement,{scrollBehavior:"auto"}),se.current=new Date,on(!0))},[A]),Q.useEffect(()=>{if(K.current&&H){var ie;const fe=K==null||(ie=K.current)==null?void 0:ie.querySelectorAll("*");fe==null||fe.forEach(Re=>{const q=Re;(q.scrollHeight>q.clientHeight||q.scrollWidth>q.clientWidth)&&q.classList.add("vaul-scrollable")})}},[H]);function on(ie){const fe=document.querySelector("[vaul-drawer-wrapper]");!fe||!r||(ie?(f&&(b||(He(document.body,{background:document.body.style.backgroundColor||document.body.style.background}),He(document.body,{background:"black"},!0))),He(fe,{borderRadius:`${km}px`,overflow:"hidden",...ot(_)?{transform:`scale(${yn()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${yn()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Ae.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ae.EASE.join(",")})`})):(Gl(fe,"overflow"),Gl(fe,"transform"),Gl(fe,"borderRadius"),He(fe,{transitionProperty:"transform, border-radius",transitionDuration:`${Ae.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ae.EASE.join(",")})`})))}function Yn(ie){const fe=ie?(window.innerWidth-Ar)/window.innerWidth:1,Re=ie?-Ar:0;_e.current&&window.clearTimeout(_e.current),He(K.current,{transition:`transform ${Ae.DURATION}s cubic-bezier(${Ae.EASE.join(",")})`,transform:`scale(${fe}) translate3d(0, ${Re}px, 0)`}),!ie&&K.current&&(_e.current=setTimeout(()=>{const q=Kl(K.current,_);He(K.current,{transition:"none",transform:ot(_)?`translate3d(0, ${q}px, 0)`:`translate3d(${q}px, 0, 0)`})},500))}function Xn(ie,fe){if(fe<0)return;const Re=ot(_)?window.innerHeight:window.innerWidth,q=(Re-Ar)/Re,De=q+fe*(1-q),We=-Ar+fe*Ar;He(K.current,{transform:ot(_)?`scale(${De}) translate3d(0, ${We}px, 0)`:`scale(${De}) translate3d(${We}px, 0, 0)`,transition:"none"})}function Zn(ie,fe){const Re=ot(_)?window.innerHeight:window.innerWidth,q=fe?(Re-Ar)/Re:1,De=fe?-Ar:0;fe&&He(K.current,{transition:`transform ${Ae.DURATION}s cubic-bezier(${Ae.EASE.join(",")})`,transform:ot(_)?`scale(${q}) translate3d(0, ${De}px, 0)`:`scale(${q}) translate3d(${De}px, 0, 0)`})}return Q.createElement(b0,{modal:y,onOpenChange:ie=>{if(e!==void 0){t==null||t(ie);return}ie?(V(!0),j(ie)):Pe()},open:A},Q.createElement(nw.Provider,{value:{visible:H,activeSnapPoint:me,snapPoints:l,setActiveSnapPoint:Je,drawerRef:K,overlayRef:ee,scaleBackground:on,onOpenChange:t,onPress:G,setVisible:F,onRelease:St,onDrag:Le,dismissible:m,handleOnly:h,isOpen:A,isDragging:le,shouldFade:rn,closeDrawer:Pe,onNestedDrag:Xn,onNestedOpenChange:Yn,onNestedRelease:Zn,keyboardIsOpen:ye,openProp:e,modal:y,snapPointsOffset:Nt,direction:_}},n))}const CR=250,_R=120,fw=Q.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{visible:o,closeDrawer:i,isDragging:l,snapPoints:a,activeSnapPoint:f,setActiveSnapPoint:u,dismissible:p,handleOnly:m,onPress:h,onDrag:x}=ya(),C=Q.useRef(null),E=Q.useRef(!1);function R(){if(E.current){b();return}window.setTimeout(()=>{y()},_R)}function y(){if(l||e||E.current){b();return}if(b(),(!a||a.length===0)&&p){i();return}if(f===a[a.length-1]&&p){i();return}const P=a.findIndex(N=>N===f);if(P===-1)return;const D=a[P+1];u(D)}function g(){C.current=window.setTimeout(()=>{E.current=!0},CR)}function b(){window.clearTimeout(C.current),E.current=!1}return Q.createElement("div",{onClick:R,onDoubleClick:()=>{E.current=!0,i()},onPointerCancel:b,onPointerDown:_=>{m&&h(_),g()},onPointerMove:_=>{m&&x(_)},ref:r,"vaul-drawer-visible":o?"true":"false","vaul-handle":"","aria-hidden":"true",...n},Q.createElement("span",{"vaul-handle-hitarea":"","aria-hidden":"true"},t))});fw.displayName="Drawer.Handle";const dw=Q.forwardRef(function({children:e,...t},n){const{overlayRef:r,snapPoints:o,onRelease:i,shouldFade:l,isOpen:a,visible:f}=ya(),u=lw(n,r),p=o&&o.length>0;return Q.createElement(k0,{onMouseUp:i,ref:u,"vaul-drawer-visible":f?"true":"false","vaul-overlay":"","vaul-snap-points":a&&p?"true":"false","vaul-snap-points-overlay":a&&l?"true":"false",...t})});dw.displayName="Drawer.Overlay";const pw=Q.forwardRef(function({onOpenAutoFocus:e,onPointerDownOutside:t,onAnimationEnd:n,style:r,...o},i){const{drawerRef:l,onPress:a,onRelease:f,onDrag:u,dismissible:p,keyboardIsOpen:m,snapPointsOffset:h,visible:x,closeDrawer:C,modal:E,openProp:R,onOpenChange:y,setVisible:g,handleOnly:b,direction:_}=ya(),P=lw(i,l),D=Q.useRef(null),N=Q.useRef(!1),A=(j,I,V=0)=>{if(N.current)return!0;const H=Math.abs(j.y),F=Math.abs(j.x),W=F>H,Z=["bottom","right"].includes(I)?1:-1;if(I==="left"||I==="right"){if(!(j.x*Z<0)&&F>=0&&F<=V)return W}else if(!(j.y*Z<0)&&H>=0&&H<=V)return!W;return N.current=!0,!0};return Q.useEffect(()=>{g(!0)},[]),Q.createElement(R0,{"vaul-drawer":"","vaul-drawer-direction":_,"vaul-drawer-visible":x?"true":"false",...o,ref:P,style:h&&h.length>0?{"--snap-point-height":`${h[0]}px`,...r}:r,onOpenAutoFocus:j=>{if(e)e(j);else{var I;j.preventDefault(),(I=l.current)==null||I.focus()}},onPointerDown:j=>{b||(o.onPointerDown==null||o.onPointerDown.call(o,j),D.current={x:j.clientX,y:j.clientY},a(j))},onPointerDownOutside:j=>{if(t==null||t(j),!E||j.defaultPrevented){j.preventDefault();return}m.current&&(m.current=!1),j.preventDefault(),y==null||y(!1),!(!p||R!==void 0)&&C()},onFocusOutside:j=>{if(!E){j.preventDefault();return}},onEscapeKeyDown:j=>{if(!E){j.preventDefault();return}},onPointerMove:j=>{if(b||(o.onPointerMove==null||o.onPointerMove.call(o,j),!D.current))return;const I=j.clientY-D.current.y,V=j.clientX-D.current.x,H=j.pointerType==="touch"?10:2;A({x:V,y:I},_,H)?u(j):(Math.abs(V)>H||Math.abs(I)>H)&&(D.current=null)},onPointerUp:j=>{o.onPointerUp==null||o.onPointerUp.call(o,j),D.current=null,N.current=!1,f(j)}})});pw.displayName="Drawer.Content";function kR({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:i}=ya();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return Q.createElement(cw,{nested:!0,onClose:()=>{o(!1)},onDrag:(l,a)=>{r(l,a),e==null||e(l,a)},onOpenChange:l=>{l&&o(l),t==null||t(l)},onRelease:i,...n})}const gn={Root:cw,NestedRoot:kR,Content:pw,Handle:fw,Overlay:dw,Trigger:C0,Portal:_0,Close:Qf,Title:P0,Description:N0},mw=({shouldScaleBackground:e=!0,...t})=>w.jsx(gn.Root,{shouldScaleBackground:e,...t});mw.displayName="Drawer";const RR=gn.Trigger,PR=gn.Portal,NR=gn.Close,hw=v.forwardRef(({className:e,...t},n)=>w.jsx(gn.Overlay,{ref:n,className:Se("fixed inset-0 z-50 bg-black/80",e),...t}));hw.displayName=gn.Overlay.displayName;const vw=v.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(PR,{children:[w.jsx(hw,{}),w.jsxs(gn.Content,{ref:r,className:Se("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[w.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));vw.displayName="DrawerContent";const gw=({className:e,...t})=>w.jsx("div",{className:Se("grid gap-1.5 p-4 text-center sm:text-left",e),...t});gw.displayName="DrawerHeader";const yw=({className:e,...t})=>w.jsx("div",{className:Se("mt-auto flex flex-col gap-2 p-4",e),...t});yw.displayName="DrawerFooter";const ww=v.forwardRef(({className:e,...t},n)=>w.jsx(gn.Title,{ref:n,className:Se("text-lg font-semibold leading-none tracking-tight",e),...t}));ww.displayName=gn.Title.displayName;const xw=v.forwardRef(({className:e,...t},n)=>w.jsx(gn.Description,{ref:n,className:Se("text-sm text-muted-foreground",e),...t}));xw.displayName=gn.Description.displayName;function TR(){const{setRowPerPageOrAuto:e,downloadDatabase:t,exportAllTablesAsCSV:n,exportTableAsCSV:r,selectedTable:o,setIsCustomQuery:i}=Jr(),[l,a]=v.useState(30),[f,u]=v.useState(!1);v.useEffect(()=>{f&&a(30)},[f]);const p=x=>{const C=Number(x.target.value);isNaN(C)||(a(C),u(!1))},m=()=>{u(x=>!x)},h=()=>{i(!1),e(f?"auto":l)};return w.jsxs(mw,{children:[w.jsx(RR,{asChild:!0,children:w.jsx(Dt,{variant:"outline",children:w.jsx(mb,{className:"h-5 w-5"})})}),w.jsx(vw,{children:w.jsxs("div",{className:"mx-auto w-full max-w-md",children:[w.jsxs(gw,{children:[w.jsx(ww,{children:"Settings"}),w.jsx(xw,{children:"Personalize your site experience here."})]}),w.jsxs("div",{className:"p-4 pb-0 flex flex-col gap-4",children:[w.jsxs("div",{children:[w.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Rows Per Page"}),w.jsxs("div",{className:"border rounded p-2 flex gap-1 justify-center items-center",children:[w.jsx(kf,{min:"3",max:"500",value:l,onChange:p,disabled:f,placeholder:"30",type:"number",name:"rowsPerPage"}),w.jsx("span",{className:"text-sm text-muted-foreground h-full text-center",children:"OR"}),w.jsx(Dt,{onClick:m,variant:"outline",className:f?"border border-primary":void 0,children:"Auto calculate"})]}),w.jsx(Dt,{className:"w-full mt-2",onClick:h,variant:"outline",children:w.jsx("span",{children:"Save"})})]}),w.jsxs("div",{children:[w.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Exports Settings"}),w.jsxs("div",{className:"border rounded p-2 flex flex-col gap-1",children:[w.jsx(Dt,{variant:"outline",onClick:t,children:w.jsx("span",{className:"ml-2",children:"Export as SQLite"})}),w.jsx(Dt,{variant:"outline",onClick:()=>r(parseInt(o)),children:w.jsx("span",{className:"ml-2",children:"Export selected table as CSV"})}),w.jsx(Dt,{variant:"outline",onClick:n,children:w.jsx("span",{className:"ml-2",children:"Export all tables as CSV"})})]})]})]}),w.jsx(yw,{children:w.jsx(NR,{asChild:!0,children:w.jsx(Dt,{variant:"outline",children:"Close"})})})]})})]})}function AR(){const{db:e}=Jr();return w.jsxs("footer",{className:"flex items-center justify-between my-1 p-4 border rounded",children:[w.jsxs("div",{children:[w.jsx("p",{className:"hidden sm:block text-xs",children:"No file will be uploaded to server. using JavaScript, sql.js"}),w.jsx("p",{className:"block sm:hidden text-xs",children:"No file uploads to server."}),w.jsxs("a",{href:"https://github.com/vwh/sqlite-viewer",target:"_blank",className:"text-sm text-link hover:underline flex gap-1 items-center",title:"Star on GitHub",children:[w.jsx(sb,{className:"h-4 w-4"}),w.jsx("span",{children:"Star us on GitHub"})]})]}),w.jsxs("div",{className:"flex gap-1",children:[w.jsx(iR,{}),e&&w.jsx(TR,{})]})]})}vu.createRoot(document.getElementById("root")).render(w.jsx(Q.StrictMode,{children:w.jsxs("main",{className:"container mx-auto p-4",children:[w.jsx(oR,{}),w.jsx(AR,{})]})})); diff --git a/assets/index-BfLfaB4r.css b/assets/index-BfLfaB4r.css new file mode 100644 index 0000000..3ec0e65 --- /dev/null +++ b/assets/index-BfLfaB4r.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 0 0% 87%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 80%;--input: 240 5.9% 80%;--link: 198, 100%, 16%;--ring: 240 5.9% 10%;--radius: .5rem}.dark{--background: 0 0% 5.9%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--link: 198, 56%, 40%;--ring: 0 0% 83.1%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.bottom-0{bottom:0}.bottom-\[8px\]{bottom:8px}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.w-10{width:2.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-64{width:16rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-\[270px\]{width:270px}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-\[200px\]{max-width:200px}.max-w-\[250px\]{max-width:250px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[6px\]{padding:6px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-link{color:hsl(var(--link))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline-offset-4{text-underline-offset:4px}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:underline:hover{text-decoration-line:underline}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:hidden{display:none}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:w-\[300px\]{width:300px}.md\:text-2xl{font-size:1.5rem;line-height:2rem}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/assets/index-D6NTTyiE.css b/assets/index-D6NTTyiE.css deleted file mode 100644 index 98ac1ed..0000000 --- a/assets/index-D6NTTyiE.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 0 0% 87%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 80%;--input: 240 5.9% 80%;--link: 198, 100%, 16%;--ring: 240 5.9% 10%;--radius: .5rem}.dark{--background: 0 0% 5.9%;--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--link: 198, 56%, 40%;--ring: 0 0% 83.1%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.bottom-0{bottom:0}.bottom-\[8px\]{bottom:8px}.left-0{left:0}.left-2{left:.5rem}.right-0{right:0}.z-10{z-index:10}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.w-10{width:2.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-64{width:16rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-\[270px\]{width:270px}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-\[200px\]{max-width:200px}.max-w-\[250px\]{max-width:250px}.max-w-md{max-width:28rem}.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[6px\]{padding:6px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-link{color:hsl(var(--link))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline-offset-4{text-underline-offset:4px}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:underline:hover{text-decoration-line:underline}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}@media (min-width: 640px){.sm\:block{display:block}.sm\:hidden{display:none}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:w-\[300px\]{width:300px}.md\:text-2xl{font-size:1.5rem;line-height:2rem}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/assets/index-Dwnho4lG.js b/assets/index-Dwnho4lG.js deleted file mode 100644 index b106c25..0000000 --- a/assets/index-Dwnho4lG.js +++ /dev/null @@ -1,222 +0,0 @@ -function vw(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var ni=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gw(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Cm={exports:{}},Vs={},_m={exports:{}},xe={};/** - * @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 Yi=Symbol.for("react.element"),yw=Symbol.for("react.portal"),ww=Symbol.for("react.fragment"),xw=Symbol.for("react.strict_mode"),Sw=Symbol.for("react.profiler"),Ew=Symbol.for("react.provider"),bw=Symbol.for("react.context"),Cw=Symbol.for("react.forward_ref"),_w=Symbol.for("react.suspense"),kw=Symbol.for("react.memo"),Rw=Symbol.for("react.lazy"),_d=Symbol.iterator;function Pw(e){return e===null||typeof e!="object"?null:(e=_d&&e[_d]||e["@@iterator"],typeof e=="function"?e:null)}var km={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Rm=Object.assign,Pm={};function zo(e,t,n){this.props=e,this.context=t,this.refs=Pm,this.updater=n||km}zo.prototype.isReactComponent={};zo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};zo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tm(){}Tm.prototype=zo.prototype;function Rc(e,t,n){this.props=e,this.context=t,this.refs=Pm,this.updater=n||km}var Pc=Rc.prototype=new Tm;Pc.constructor=Rc;Rm(Pc,zo.prototype);Pc.isPureReactComponent=!0;var kd=Array.isArray,Nm=Object.prototype.hasOwnProperty,Tc={current:null},Om={key:!0,ref:!0,__self:!0,__source:!0};function Am(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)Nm.call(t,r)&&!Om.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1>>1,ue=z[se];if(0>>1;seo(Ye,ee))beo(J,Ye)?(z[se]=J,z[be]=ee,se=be):(z[se]=Ye,z[ve]=ee,se=ve);else if(beo(J,ee))z[se]=J,z[be]=ee,se=be;else break e}}return B}function o(z,B){var ee=z.sortIndex-B.sortIndex;return ee!==0?ee:z.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var f=[],u=[],p=1,m=null,h=3,w=!1,C=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(z){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=z)r(u),B.sortIndex=B.expirationTime,t(f,B);else break;B=n(u)}}function _(z){if(E=!1,S(z),!C)if(n(f)!==null)C=!0,le(P);else{var B=n(u);B!==null&&ne(_,B.startTime-z)}}function P(z,B){C=!1,E&&(E=!1,y(O),O=-1),w=!0;var ee=h;try{for(S(B),m=n(f);m!==null&&(!(m.expirationTime>B)||z&&!V());){var se=m.callback;if(typeof se=="function"){m.callback=null,h=m.priorityLevel;var ue=se(m.expirationTime<=B);B=e.unstable_now(),typeof ue=="function"?m.callback=ue:m===n(f)&&r(f),S(B)}else r(f);m=n(f)}if(m!==null)var Ve=!0;else{var ve=n(u);ve!==null&&ne(_,ve.startTime-B),Ve=!1}return Ve}finally{m=null,h=ee,w=!1}}var A=!1,T=null,O=-1,j=5,I=-1;function V(){return!(e.unstable_now()-Iz||125se?(z.sortIndex=ee,t(u,z),n(f)===null&&z===n(u)&&(E?(y(O),O=-1):E=!0,ne(_,ee-se))):(z.sortIndex=ue,t(f,z),C||w||(C=!0,le(P))),z},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(z){var B=h;return function(){var ee=h;h=B;try{return z.apply(this,arguments)}finally{h=ee}}}})(Lm);Im.exports=Lm;var $w=Im.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 Hw=g,qt=$w;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hu=Object.prototype.hasOwnProperty,Uw=/^[: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]*$/,Pd={},Td={};function Ww(e){return hu.call(Td,e)?!0:hu.call(Pd,e)?!1:Uw.test(e)?Td[e]=!0:(Pd[e]=!0,!1)}function Bw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Vw(e,t,n,r){if(t===null||typeof t>"u"||Bw(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Pt(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var ht={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ht[e]=new Pt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ht[t]=new Pt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ht[e]=new Pt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ht[e]=new Pt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ht[e]=new Pt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ht[e]=new Pt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ht[e]=new Pt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ht[e]=new Pt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ht[e]=new Pt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Oc=/[\-:]([a-z])/g;function Ac(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Oc,Ac);ht[t]=new Pt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Oc,Ac);ht[t]=new Pt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Oc,Ac);ht[t]=new Pt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ht[e]=new Pt(e,1,!1,e.toLowerCase(),null,!1,!1)});ht.xlinkHref=new Pt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ht[e]=new Pt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Dc(e,t,n,r){var o=ht.hasOwnProperty(t)?ht[t]:null;(o!==null?o.type!==0:r||!(2a||o[l]!==i[a]){var f=` -`+o[l].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=l&&0<=a);break}}}finally{Ta=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?hi(e):""}function qw(e){switch(e.tag){case 5:return hi(e.type);case 16:return hi("Lazy");case 13:return hi("Suspense");case 19:return hi("SuspenseList");case 0:case 2:case 15:return e=Na(e.type,!1),e;case 11:return e=Na(e.type.render,!1),e;case 1:return e=Na(e.type,!0),e;default:return""}}function wu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case uo:return"Fragment";case ao:return"Portal";case vu:return"Profiler";case jc:return"StrictMode";case gu:return"Suspense";case yu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $m:return(e.displayName||"Context")+".Consumer";case zm:return(e._context.displayName||"Context")+".Provider";case Mc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ic:return t=e.displayName||null,t!==null?t:wu(e.type)||"Memo";case rr:t=e._payload,e=e._init;try{return wu(e(t))}catch{}}return null}function Gw(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wu(t);case 8:return t===jc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function gr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Um(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kw(e){var t=Um(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Sl(e){e._valueTracker||(e._valueTracker=Kw(e))}function Wm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Um(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function as(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function xu(e,t){var n=t.checked;return Qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Od(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Bm(e,t){t=t.checked,t!=null&&Dc(e,"checked",t,!1)}function Su(e,t){Bm(e,t);var n=gr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Eu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Eu(e,t.type,gr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ad(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Eu(e,t,n){(t!=="number"||as(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var vi=Array.isArray;function So(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=El.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ni(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var xi={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},Qw=["Webkit","ms","Moz","O"];Object.keys(xi).forEach(function(e){Qw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xi[t]=xi[e]})});function Km(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||xi.hasOwnProperty(e)&&xi[e]?(""+t).trim():t+"px"}function Qm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Km(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Yw=Qe({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 _u(e,t){if(t){if(Yw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function ku(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ru=null;function Lc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pu=null,Eo=null,bo=null;function Md(e){if(e=Ji(e)){if(typeof Pu!="function")throw Error($(280));var t=e.stateNode;t&&(t=Ys(t),Pu(e.stateNode,e.type,t))}}function Ym(e){Eo?bo?bo.push(e):bo=[e]:Eo=e}function Xm(){if(Eo){var e=Eo,t=bo;if(bo=Eo=null,Md(e),t)for(e=0;e>>=0,e===0?32:31-(s1(e)/a1|0)|0}var bl=64,Cl=4194304;function gi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ds(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var a=l&~o;a!==0?r=gi(a):(i&=l,i!==0&&(r=gi(i)))}else l=n&~o,l!==0?r=gi(l):i!==0&&(r=gi(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Xi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-dn(t),e[t]=n}function d1(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Ei),Bd=" ",Vd=!1;function gh(e,t){switch(e){case"keyup":return $1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var co=!1;function U1(e,t){switch(e){case"compositionend":return yh(t);case"keypress":return t.which!==32?null:(Vd=!0,Bd);case"textInput":return e=t.data,e===Bd&&Vd?null:e;default:return null}}function W1(e,t){if(co)return e==="compositionend"||!Vc&&gh(e,t)?(e=hh(),Yl=Uc=sr=null,co=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Qd(n)}}function Eh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Eh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bh(){for(var e=window,t=as();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=as(e.document)}return t}function qc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Z1(e){var t=bh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Eh(n.ownerDocument.documentElement,n)){if(r!==null&&qc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Yd(n,i);var l=Yd(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,fo=null,ju=null,Ci=null,Mu=!1;function Xd(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mu||fo==null||fo!==as(r)||(r=fo,"selectionStart"in r&&qc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ci&&Ii(Ci,r)||(Ci=r,r=hs(ju,"onSelect"),0ho||(e.current=Hu[ho],Hu[ho]=null,ho--)}function De(e,t){ho++,Hu[ho]=e.current,e.current=t}var yr={},xt=Er(yr),Mt=Er(!1),$r=yr;function Oo(e,t){var n=e.type.contextTypes;if(!n)return yr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function It(e){return e=e.childContextTypes,e!=null}function gs(){Ue(Mt),Ue(xt)}function op(e,t,n){if(xt.current!==yr)throw Error($(168));De(xt,t),De(Mt,n)}function Ah(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error($(108,Gw(e)||"Unknown",o));return Qe({},n,r)}function ys(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yr,$r=xt.current,De(xt,e),De(Mt,Mt.current),!0}function ip(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=Ah(e,t,$r),r.__reactInternalMemoizedMergedChildContext=e,Ue(Mt),Ue(xt),De(xt,e)):Ue(Mt),De(Mt,n)}var In=null,Xs=!1,Ba=!1;function Dh(e){In===null?In=[e]:In.push(e)}function cx(e){Xs=!0,Dh(e)}function br(){if(!Ba&&In!==null){Ba=!0;var e=0,t=Pe;try{var n=In;for(Pe=1;e>=l,o-=l,Ln=1<<32-dn(t)+o|n<O?(j=T,T=null):j=T.sibling;var I=h(y,T,S[O],_);if(I===null){T===null&&(T=j);break}e&&T&&I.alternate===null&&t(y,T),v=i(I,v,O),A===null?P=I:A.sibling=I,A=I,T=j}if(O===S.length)return n(y,T),Be&&Or(y,O),P;if(T===null){for(;OO?(j=T,T=null):j=T.sibling;var V=h(y,T,I.value,_);if(V===null){T===null&&(T=j);break}e&&T&&V.alternate===null&&t(y,T),v=i(V,v,O),A===null?P=V:A.sibling=V,A=V,T=j}if(I.done)return n(y,T),Be&&Or(y,O),P;if(T===null){for(;!I.done;O++,I=S.next())I=m(y,I.value,_),I!==null&&(v=i(I,v,O),A===null?P=I:A.sibling=I,A=I);return Be&&Or(y,O),P}for(T=r(y,T);!I.done;O++,I=S.next())I=w(T,y,O,I.value,_),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?O:I.key),v=i(I,v,O),A===null?P=I:A.sibling=I,A=I);return e&&T.forEach(function(H){return t(y,H)}),Be&&Or(y,O),P}function R(y,v,S,_){if(typeof S=="object"&&S!==null&&S.type===uo&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case xl:e:{for(var P=S.key,A=v;A!==null;){if(A.key===P){if(P=S.type,P===uo){if(A.tag===7){n(y,A.sibling),v=o(A,S.props.children),v.return=y,y=v;break e}}else if(A.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===rr&&ap(P)===A.type){n(y,A.sibling),v=o(A,S.props),v.ref=ai(y,A,S),v.return=y,y=v;break e}n(y,A);break}else t(y,A);A=A.sibling}S.type===uo?(v=zr(S.props.children,y.mode,_,S.key),v.return=y,y=v):(_=os(S.type,S.key,S.props,null,y.mode,_),_.ref=ai(y,v,S),_.return=y,y=_)}return l(y);case ao:e:{for(A=S.key;v!==null;){if(v.key===A)if(v.tag===4&&v.stateNode.containerInfo===S.containerInfo&&v.stateNode.implementation===S.implementation){n(y,v.sibling),v=o(v,S.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=Za(S,y.mode,_),v.return=y,y=v}return l(y);case rr:return A=S._init,R(y,v,A(S._payload),_)}if(vi(S))return C(y,v,S,_);if(ri(S))return E(y,v,S,_);Ol(y,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,v!==null&&v.tag===6?(n(y,v.sibling),v=o(v,S),v.return=y,y=v):(n(y,v),v=Xa(S,y.mode,_),v.return=y,y=v),l(y)):n(y,v)}return R}var Do=Lh(!0),Fh=Lh(!1),Ss=Er(null),Es=null,yo=null,Yc=null;function Xc(){Yc=yo=Es=null}function Zc(e){var t=Ss.current;Ue(Ss),e._currentValue=t}function Bu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _o(e,t){Es=e,Yc=yo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jt=!0),e.firstContext=null)}function tn(e){var t=e._currentValue;if(Yc!==e)if(e={context:e,memoizedValue:t,next:null},yo===null){if(Es===null)throw Error($(308));yo=e,Es.dependencies={lanes:0,firstContext:e}}else yo=yo.next=e;return t}var Mr=null;function Jc(e){Mr===null?Mr=[e]:Mr.push(e)}function zh(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Jc(t)):(n.next=o.next,o.next=n),t.interleaved=n,Un(e,r)}function Un(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var or=!1;function ef(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $h(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ee&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Un(e,n)}return o=r.interleaved,o===null?(t.next=t,Jc(r)):(t.next=o.next,o.next=t),r.interleaved=t,Un(e,n)}function Zl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zc(e,n)}}function up(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function bs(e,t,n,r){var o=e.updateQueue;or=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var f=a,u=f.next;f.next=null,l===null?i=u:l.next=u,l=f;var p=e.alternate;p!==null&&(p=p.updateQueue,a=p.lastBaseUpdate,a!==l&&(a===null?p.firstBaseUpdate=u:a.next=u,p.lastBaseUpdate=f))}if(i!==null){var m=o.baseState;l=0,p=u=f=null,a=i;do{var h=a.lane,w=a.eventTime;if((r&h)===h){p!==null&&(p=p.next={eventTime:w,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var C=e,E=a;switch(h=t,w=n,E.tag){case 1:if(C=E.payload,typeof C=="function"){m=C.call(w,m,h);break e}m=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=E.payload,h=typeof C=="function"?C.call(w,m,h):C,h==null)break e;m=Qe({},m,h);break e;case 2:or=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[a]:h.push(a))}else w={eventTime:w,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},p===null?(u=p=w,f=m):p=p.next=w,l|=h;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;h=a,a=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(p===null&&(f=m),o.baseState=f,o.firstBaseUpdate=u,o.lastBaseUpdate=p,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Wr|=l,e.lanes=l,e.memoizedState=m}}function cp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=qa.transition;qa.transition={};try{e(!1),t()}finally{Pe=n,qa.transition=r}}function rv(){return nn().memoizedState}function mx(e,t,n){var r=hr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ov(e))iv(t,n);else if(n=zh(e,t,n,r),n!==null){var o=_t();pn(n,e,r,o),lv(n,t,r)}}function hx(e,t,n){var r=hr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ov(e))iv(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,a=i(l,n);if(o.hasEagerState=!0,o.eagerState=a,mn(a,l)){var f=t.interleaved;f===null?(o.next=o,Jc(t)):(o.next=f.next,f.next=o),t.interleaved=o;return}}catch{}finally{}n=zh(e,t,o,r),n!==null&&(o=_t(),pn(n,e,r,o),lv(n,t,r))}}function ov(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function iv(e,t){_i=_s=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lv(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zc(e,n)}}var ks={readContext:tn,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useInsertionEffect:gt,useLayoutEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useMutableSource:gt,useSyncExternalStore:gt,useId:gt,unstable_isNewReconciler:!1},vx={readContext:tn,useCallback:function(e,t){return Cn().memoizedState=[e,t===void 0?null:t],e},useContext:tn,useEffect:dp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,es(4194308,4,Zh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){return es(4,2,e,t)},useMemo:function(e,t){var n=Cn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Cn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=mx.bind(null,Ke,e),[r.memoizedState,e]},useRef:function(e){var t=Cn();return e={current:e},t.memoizedState=e},useState:fp,useDebugValue:uf,useDeferredValue:function(e){return Cn().memoizedState=e},useTransition:function(){var e=fp(!1),t=e[0];return e=px.bind(null,e[1]),Cn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,o=Cn();if(Be){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),dt===null)throw Error($(349));Ur&30||Bh(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,dp(qh.bind(null,r,i,e),[e]),r.flags|=2048,Bi(9,Vh.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Cn(),t=dt.identifierPrefix;if(Be){var n=Fn,r=Ln;n=(r&~(1<<32-dn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ui++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[_n]=t,e[zi]=r,vv(e,t,!1,!1),t.stateNode=e;e:{switch(l=ku(n,r),n){case"dialog":$e("cancel",e),$e("close",e),o=r;break;case"iframe":case"object":case"embed":$e("load",e),o=r;break;case"video":case"audio":for(o=0;oIo&&(t.flags|=128,r=!0,ui(i,!1),t.lanes=4194304)}else{if(!r)if(e=Cs(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ui(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Be)return yt(t),null}else 2*et()-i.renderingStartTime>Io&&n!==1073741824&&(t.flags|=128,r=!0,ui(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=et(),t.sibling=null,n=Ge.current,De(Ge,r?n&1|2:n&1),t):(yt(t),null);case 22:case 23:return hf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ht&1073741824&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function Cx(e,t){switch(Kc(t),t.tag){case 1:return It(t.type)&&gs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jo(),Ue(Mt),Ue(xt),rf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return nf(t),null;case 13:if(Ue(Ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Ao()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(Ge),null;case 4:return jo(),null;case 10:return Zc(t.type._context),null;case 22:case 23:return hf(),null;case 24:return null;default:return null}}var Dl=!1,wt=!1,_x=typeof WeakSet=="function"?WeakSet:Set,X=null;function wo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Xe(e,t,r)}else n.current=null}function Ju(e,t,n){try{n()}catch(r){Xe(e,t,r)}}var bp=!1;function kx(e,t){if(Iu=ps,e=bh(),qc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,a=-1,f=-1,u=0,p=0,m=e,h=null;t:for(;;){for(var w;m!==n||o!==0&&m.nodeType!==3||(a=l+o),m!==i||r!==0&&m.nodeType!==3||(f=l+r),m.nodeType===3&&(l+=m.nodeValue.length),(w=m.firstChild)!==null;)h=m,m=w;for(;;){if(m===e)break t;if(h===n&&++u===o&&(a=l),h===i&&++p===r&&(f=l),(w=m.nextSibling)!==null)break;m=h,h=m.parentNode}m=w}n=a===-1||f===-1?null:{start:a,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lu={focusedElem:e,selectionRange:n},ps=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var C=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(C!==null){var E=C.memoizedProps,R=C.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?E:un(t.type,E),R);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(_){Xe(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return C=bp,bp=!1,C}function ki(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Ju(t,n,i)}o=o.next}while(o!==r)}}function ea(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ec(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wv(e){var t=e.alternate;t!==null&&(e.alternate=null,wv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_n],delete t[zi],delete t[$u],delete t[ax],delete t[ux])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function xv(e){return e.tag===5||e.tag===3||e.tag===4}function Cp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vs));else if(r!==4&&(e=e.child,e!==null))for(tc(e,t,n),e=e.sibling;e!==null;)tc(e,t,n),e=e.sibling}function nc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(nc(e,t,n),e=e.sibling;e!==null;)nc(e,t,n),e=e.sibling}var pt=null,cn=!1;function Jn(e,t,n){for(n=n.child;n!==null;)Sv(e,t,n),n=n.sibling}function Sv(e,t,n){if(Pn&&typeof Pn.onCommitFiberUnmount=="function")try{Pn.onCommitFiberUnmount(qs,n)}catch{}switch(n.tag){case 5:wt||wo(n,t);case 6:var r=pt,o=cn;pt=null,Jn(e,t,n),pt=r,cn=o,pt!==null&&(cn?(e=pt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pt.removeChild(n.stateNode));break;case 18:pt!==null&&(cn?(e=pt,n=n.stateNode,e.nodeType===8?Wa(e.parentNode,n):e.nodeType===1&&Wa(e,n),ji(e)):Wa(pt,n.stateNode));break;case 4:r=pt,o=cn,pt=n.stateNode.containerInfo,cn=!0,Jn(e,t,n),pt=r,cn=o;break;case 0:case 11:case 14:case 15:if(!wt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Ju(n,t,l),o=o.next}while(o!==r)}Jn(e,t,n);break;case 1:if(!wt&&(wo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Xe(n,t,a)}Jn(e,t,n);break;case 21:Jn(e,t,n);break;case 22:n.mode&1?(wt=(r=wt)||n.memoizedState!==null,Jn(e,t,n),wt=r):Jn(e,t,n);break;default:Jn(e,t,n)}}function _p(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _x),t.forEach(function(r){var o=Mx.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function an(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Px(r/1960))-r,10e?16:e,ar===null)var r=!1;else{if(e=ar,ar=null,Ts=0,Ee&6)throw Error($(331));var o=Ee;for(Ee|=4,X=e.current;X!==null;){var i=X,l=i.child;if(X.flags&16){var a=i.deletions;if(a!==null){for(var f=0;fet()-pf?Fr(e,0):df|=n),Lt(e,t)}function Tv(e,t){t===0&&(e.mode&1?(t=Cl,Cl<<=1,!(Cl&130023424)&&(Cl=4194304)):t=1);var n=_t();e=Un(e,t),e!==null&&(Xi(e,t,n),Lt(e,n))}function jx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Tv(e,n)}function Mx(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($(314))}r!==null&&r.delete(t),Tv(e,n)}var Nv;Nv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jt=!1,Ex(e,t,n);jt=!!(e.flags&131072)}else jt=!1,Be&&t.flags&1048576&&jh(t,xs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ts(e,t),e=t.pendingProps;var o=Oo(t,xt.current);_o(t,n),o=lf(null,t,r,e,o,n);var i=sf();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,It(r)?(i=!0,ys(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ef(t),o.updater=Js,t.stateNode=o,o._reactInternals=t,qu(t,r,e,n),t=Qu(null,t,r,!0,i,n)):(t.tag=0,Be&&i&&Gc(t),Ct(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ts(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Lx(r),e=un(r,e),o){case 0:t=Ku(null,t,r,e,n);break e;case 1:t=xp(null,t,r,e,n);break e;case 11:t=yp(null,t,r,e,n);break e;case 14:t=wp(null,t,r,un(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),Ku(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),xp(e,t,r,o,n);case 3:e:{if(pv(t),e===null)throw Error($(387));r=t.pendingProps,i=t.memoizedState,o=i.element,$h(e,t),bs(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Mo(Error($(423)),t),t=Sp(e,t,r,n,o);break e}else if(r!==o){o=Mo(Error($(424)),t),t=Sp(e,t,r,n,o);break e}else for(Wt=dr(t.stateNode.containerInfo.firstChild),Bt=t,Be=!0,fn=null,n=Fh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ao(),r===o){t=Wn(e,t,n);break e}Ct(e,t,r,n)}t=t.child}return t;case 5:return Hh(t),e===null&&Wu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,Fu(r,o)?l=null:i!==null&&Fu(r,i)&&(t.flags|=32),dv(e,t),Ct(e,t,l,n),t.child;case 6:return e===null&&Wu(t),null;case 13:return mv(e,t,n);case 4:return tf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Do(t,null,r,n):Ct(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),yp(e,t,r,o,n);case 7:return Ct(e,t,t.pendingProps,n),t.child;case 8:return Ct(e,t,t.pendingProps.children,n),t.child;case 12:return Ct(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,De(Ss,r._currentValue),r._currentValue=l,i!==null)if(mn(i.value,l)){if(i.children===o.children&&!Mt.current){t=Wn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){l=i.child;for(var f=a.firstContext;f!==null;){if(f.context===r){if(i.tag===1){f=zn(-1,n&-n),f.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var p=u.pending;p===null?f.next=f:(f.next=p.next,p.next=f),u.pending=f}}i.lanes|=n,f=i.alternate,f!==null&&(f.lanes|=n),Bu(i.return,n,t),a.lanes|=n;break}f=f.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error($(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),Bu(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}Ct(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,_o(t,n),o=tn(o),r=r(o),t.flags|=1,Ct(e,t,r,n),t.child;case 14:return r=t.type,o=un(r,t.pendingProps),o=un(r.type,o),wp(e,t,r,o,n);case 15:return cv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),ts(e,t),t.tag=1,It(r)?(e=!0,ys(t)):e=!1,_o(t,n),sv(t,r,o),qu(t,r,o,n),Qu(null,t,r,!0,e,n);case 19:return hv(e,t,n);case 22:return fv(e,t,n)}throw Error($(156,t.tag))};function Ov(e,t){return oh(e,t)}function Ix(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,n,r){return new Ix(e,t,n,r)}function gf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Lx(e){if(typeof e=="function")return gf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Mc)return 11;if(e===Ic)return 14}return 2}function vr(e,t){var n=e.alternate;return n===null?(n=Jt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function os(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")gf(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case uo:return zr(n.children,o,i,t);case jc:l=8,o|=8;break;case vu:return e=Jt(12,n,t,o|2),e.elementType=vu,e.lanes=i,e;case gu:return e=Jt(13,n,t,o),e.elementType=gu,e.lanes=i,e;case yu:return e=Jt(19,n,t,o),e.elementType=yu,e.lanes=i,e;case Hm:return na(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zm:l=10;break e;case $m:l=9;break e;case Mc:l=11;break e;case Ic:l=14;break e;case rr:l=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=Jt(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function zr(e,t,n,r){return e=Jt(7,e,r,t),e.lanes=n,e}function na(e,t,n,r){return e=Jt(22,e,r,t),e.elementType=Hm,e.lanes=n,e.stateNode={isHidden:!1},e}function Xa(e,t,n){return e=Jt(6,e,null,t),e.lanes=n,e}function Za(e,t,n){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fx(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Aa(0),this.expirationTimes=Aa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Aa(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function yf(e,t,n,r,o,i,l,a,f){return e=new Fx(e,t,n,a,f),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Jt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ef(i),e}function zx(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mv)}catch(e){console.error(e)}}Mv(),Mm.exports=Gt;var Xr=Mm.exports;const Bx=Qi(Xr);var Dp=Xr;mu.createRoot=Dp.createRoot,mu.hydrateRoot=Dp.hydrateRoot;var Vx={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const jp=e=>{let t;const n=new Set,r=(p,m)=>{const h=typeof p=="function"?p(t):p;if(!Object.is(h,t)){const w=t;t=m??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(C=>C(t,w))}},o=()=>t,f={setState:r,getState:o,getInitialState:()=>u,subscribe:p=>(n.add(p),()=>n.delete(p)),destroy:()=>{(Vx?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,f);return f},qx=e=>e?jp(e):jp;var Iv={exports:{}},Lv={},Fv={exports:{}},zv={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Lo=g;function Gx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Kx=typeof Object.is=="function"?Object.is:Gx,Qx=Lo.useState,Yx=Lo.useEffect,Xx=Lo.useLayoutEffect,Zx=Lo.useDebugValue;function Jx(e,t){var n=t(),r=Qx({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Xx(function(){o.value=n,o.getSnapshot=t,Ja(o)&&i({inst:o})},[e,n,t]),Yx(function(){return Ja(o)&&i({inst:o}),e(function(){Ja(o)&&i({inst:o})})},[e]),Zx(n),n}function Ja(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Kx(e,n)}catch{return!0}}function eS(e,t){return t()}var tS=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?eS:Jx;zv.useSyncExternalStore=Lo.useSyncExternalStore!==void 0?Lo.useSyncExternalStore:tS;Fv.exports=zv;var nS=Fv.exports;/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var sa=g,rS=nS;function oS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var iS=typeof Object.is=="function"?Object.is:oS,lS=rS.useSyncExternalStore,sS=sa.useRef,aS=sa.useEffect,uS=sa.useMemo,cS=sa.useDebugValue;Lv.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=sS(null);if(i.current===null){var l={hasValue:!1,value:null};i.current=l}else l=i.current;i=uS(function(){function f(w){if(!u){if(u=!0,p=w,w=r(w),o!==void 0&&l.hasValue){var C=l.value;if(o(C,w))return m=C}return m=w}if(C=m,iS(p,w))return C;var E=r(w);return o!==void 0&&o(C,E)?C:(p=w,m=E)}var u=!1,p,m,h=n===void 0?null:n;return[function(){return f(t())},h===null?void 0:function(){return f(h())}]},[t,n,r,o]);var a=lS(e,i[0],i[1]);return aS(function(){l.hasValue=!0,l.value=a},[a]),cS(a),a};Iv.exports=Lv;var fS=Iv.exports;const dS=Qi(fS);var $v={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:pS}=Q,{useSyncExternalStoreWithSelector:mS}=dS;let Mp=!1;const hS=e=>e;function vS(e,t=hS,n){($v?"production":void 0)!=="production"&&n&&!Mp&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Mp=!0);const r=mS(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return pS(r),r}const Ip=e=>{($v?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?qx(e):e,n=(r,o)=>vS(t,r,o);return Object.assign(n,t),n},gS=e=>e?Ip(e):Ip;var Hv={exports:{}};const yS={},wS=Object.freeze(Object.defineProperty({__proto__:null,default:yS},Symbol.toStringTag,{value:"Module"})),eu=gw(wS);(function(e,t){var n=void 0,r=function(o){return n||(n=new Promise(function(i,l){var a=typeof o<"u"?o:{},f=a.onAbort;a.onAbort=function(s){l(new Error(s)),f&&f(s)},a.postRun=a.postRun||[],a.postRun.push(function(){i(a)}),e=void 0;var u;u||(u=typeof a<"u"?a:{}),u.onRuntimeInitialized=function(){function s(N,L){switch(typeof L){case"boolean":mw(N,L?1:0);break;case"number":fw(N,L);break;case"string":dw(N,L,-1,-1);break;case"object":if(L===null)Ed(N);else if(L.length!=null){var te=pl(L,dl);pw(N,te,L.length,-1),vl(te)}else yl(N,"Wrong API use : tried to return a value of an unknown type ("+L+").",-1);break;default:Ed(N)}}function c(N,L){for(var te=[],ce=0;ce>>0),N!=null){var L=this.filename,te="/",ce=L;if(te&&(te=typeof te=="string"?te:Qo(te),ce=L?Ft(te+"/"+L):te),L=Oe(!0,!0),ce=ll(ce,(L!==void 0?L:438)&4095|32768,0),N){if(typeof N=="string"){te=Array(N.length);for(var we=0,Ae=N.length;we(s=be(s)?new URL(s):_.normalize(s),S.readFileSync(s,c?void 0:"utf8")),v=s=>(s=R(s,!0),s.buffer||(s=new Uint8Array(s)),s),y=(s,c,d,x=!0)=>{s=be(s)?new URL(s):_.normalize(s),S.readFile(s,x?void 0:"utf8",(k,D)=>{k?d(k):c(x?D.buffer:D)})},!u.thisProgram&&1"[Emscripten Module object]"}else(h||w)&&(w?E=self.location.href:typeof document<"u"&&document.currentScript&&(E=document.currentScript.src),E=E.indexOf("blob:")!==0?E.substr(0,E.replace(/[?#].*/,"").lastIndexOf("/")+1):"",R=s=>{var c=new XMLHttpRequest;return c.open("GET",s,!1),c.send(null),c.responseText},w&&(v=s=>{var c=new XMLHttpRequest;return c.open("GET",s,!1),c.responseType="arraybuffer",c.send(null),new Uint8Array(c.response)}),y=(s,c,d)=>{var x=new XMLHttpRequest;x.open("GET",s,!0),x.responseType="arraybuffer",x.onload=()=>{x.status==200||x.status==0&&x.response?c(x.response):d()},x.onerror=d,x.send(null)});var P=u.print||console.log.bind(console),A=u.printErr||console.error.bind(console);Object.assign(u,p),p=null,u.thisProgram&&(m=u.thisProgram);var T;u.wasmBinary&&(T=u.wasmBinary),typeof WebAssembly!="object"&&ve("no native wasm support detected");var O,j=!1,I,V,H,F,W,Z,le;function ne(){var s=O.buffer;u.HEAP8=I=new Int8Array(s),u.HEAP16=H=new Int16Array(s),u.HEAPU8=V=new Uint8Array(s),u.HEAPU16=new Uint16Array(s),u.HEAP32=F=new Int32Array(s),u.HEAPU32=W=new Uint32Array(s),u.HEAPF32=Z=new Float32Array(s),u.HEAPF64=le=new Float64Array(s)}var z=[],B=[],ee=[];function se(){var s=u.preRun.shift();z.unshift(s)}var ue=0,Ve=null;function ve(s){var c;throw(c=u.onAbort)==null||c.call(u,s),s="Aborted("+s+")",A(s),j=!0,new WebAssembly.RuntimeError(s+". Build with -sASSERTIONS for more info.")}var Ye=s=>s.startsWith("data:application/octet-stream;base64,"),be=s=>s.startsWith("file://"),J;if(J="sql-wasm.wasm",!Ye(J)){var ye=J;J=u.locateFile?u.locateFile(ye,E):E+ye}function Ie(s){if(s==J&&T)return new Uint8Array(T);if(v)return v(s);throw"both async and sync fetching of the wasm failed"}function K(s){if(!T&&(h||w)){if(typeof fetch=="function"&&!be(s))return fetch(s,{credentials:"same-origin"}).then(c=>{if(!c.ok)throw"failed to load wasm binary file at '"+s+"'";return c.arrayBuffer()}).catch(()=>Ie(s));if(y)return new Promise((c,d)=>{y(s,x=>c(new Uint8Array(x)),d)})}return Promise.resolve().then(()=>Ie(s))}function ge(s,c,d){return K(s).then(x=>WebAssembly.instantiate(x,c)).then(x=>x).then(d,x=>{A(`failed to asynchronously prepare wasm: ${x}`),ve(x)})}function de(s,c){var d=J;T||typeof WebAssembly.instantiateStreaming!="function"||Ye(d)||be(d)||C||typeof fetch!="function"?ge(d,s,c):fetch(d,{credentials:"same-origin"}).then(x=>WebAssembly.instantiateStreaming(x,s).then(c,function(k){return A(`wasm streaming compile failed: ${k}`),A("falling back to ArrayBuffer instantiation"),ge(d,s,c)}))}var Y,me,ut=s=>{for(;0>0];case"i8":return I[s>>0];case"i16":return H[s>>1];case"i32":return F[s>>2];case"i64":ve("to do getValue(i64) use WASM_BIGINT");case"float":return Z[s>>2];case"double":return le[s>>3];case"*":return W[s>>2];default:ve(`invalid type for getValue: ${c}`)}}function tt(s){var c="i32";switch(c.endsWith("*")&&(c="*"),c){case"i1":I[s>>0]=0;break;case"i8":I[s>>0]=0;break;case"i16":H[s>>1]=0;break;case"i32":F[s>>2]=0;break;case"i64":ve("to do setValue(i64) use WASM_BIGINT");case"float":Z[s>>2]=0;break;case"double":le[s>>3]=0;break;case"*":W[s>>2]=0;break;default:ve(`invalid type for setValue: ${c}`)}}var Tt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Ce=(s,c,d)=>{var x=c+d;for(d=c;s[d]&&!(d>=x);)++d;if(16k?x+=String.fromCharCode(k):(k-=65536,x+=String.fromCharCode(55296|k>>10,56320|k&1023))}}else x+=String.fromCharCode(k)}return x},rn=(s,c)=>s?Ce(V,s,c):"",Jr=(s,c)=>{for(var d=0,x=s.length-1;0<=x;x--){var k=s[x];k==="."?s.splice(x,1):k===".."?(s.splice(x,1),d++):d&&(s.splice(x,1),d--)}if(c)for(;d;d--)s.unshift("..");return s},Ft=s=>{var c=s.charAt(0)==="/",d=s.substr(-1)==="/";return(s=Jr(s.split("/").filter(x=>!!x),!c).join("/"))||c||(s="."),s&&d&&(s+="/"),(c?"/":"")+s},yn=s=>{var c=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(s).slice(1);return s=c[0],c=c[1],!s&&!c?".":(c&&(c=c.substr(0,c.length-1)),s+c)},G=s=>{if(s==="/")return"/";s=Ft(s),s=s.replace(/\/$/,"");var c=s.lastIndexOf("/");return c===-1?s:s.substr(c+1)},oe=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return d=>crypto.getRandomValues(d);if(C)try{var s=eu;if(s.randomFillSync)return d=>s.randomFillSync(d);var c=s.randomBytes;return d=>(d.set(c(d.byteLength)),d)}catch{}ve("initRandomDevice")},Le=s=>(Le=oe())(s);function Re(){for(var s="",c=!1,d=arguments.length-1;-1<=d&&!c;d--){if(c=0<=d?arguments[d]:"/",typeof c!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";s=c+"/"+s,c=c.charAt(0)==="/"}return s=Jr(s.split("/").filter(x=>!!x),!c).join("/"),(c?"/":"")+s||"."}var nt=[],Nt=s=>{for(var c=0,d=0;d=x?c++:2047>=x?c+=2:55296<=x&&57343>=x?(c+=4,++d):c+=3}return c},St=(s,c,d,x)=>{if(!(0=M){var ae=s.charCodeAt(++D);M=65536+((M&1023)<<10)|ae&1023}if(127>=M){if(d>=x)break;c[d++]=M}else{if(2047>=M){if(d+1>=x)break;c[d++]=192|M>>6}else{if(65535>=M){if(d+2>=x)break;c[d++]=224|M>>12}else{if(d+3>=x)break;c[d++]=240|M>>18,c[d++]=128|M>>12&63}c[d++]=128|M>>6&63}c[d++]=128|M&63}}return c[d]=0,d-k};function on(s,c){var d=Array(Nt(s)+1);return s=St(s,d,0,d.length),c&&(d.length=s),d}var Qn=[];function Yn(s,c){Qn[s]={input:[],output:[],Xa:c},ya(s,Xn)}var Xn={open(s){var c=Qn[s.node.rdev];if(!c)throw new U(43);s.tty=c,s.seekable=!1},close(s){s.tty.Xa.fsync(s.tty)},fsync(s){s.tty.Xa.fsync(s.tty)},read(s,c,d,x){if(!s.tty||!s.tty.Xa.sb)throw new U(60);for(var k=0,D=0;D=c||(c=Math.max(c,d*(1048576>d?2:1.125)>>>0),d!=0&&(c=Math.max(c,256)),d=s.Ia,s.Ia=new Uint8Array(c),0=s.node.Ma)return 0;if(s=Math.min(s.node.Ma-k,x),8c)throw new U(28);return c},lb(s,c,d){ke(s.node,c+d),s.node.Ma=Math.max(s.node.Ma,c+d)},bb(s,c,d,x,k){if((s.node.mode&61440)!==32768)throw new U(43);if(s=s.node.Ia,k&2||s.buffer!==I.buffer){if((0{var d=0;return s&&(d|=365),c&&(d|=146),d},We=null,Et={},vt=[],wn=1,zt=null,xn=!0,U=null,eo={};function Ot(s,c={}){if(s=Re(s),!s)return{path:"",node:null};if(c=Object.assign({qb:!0,kb:0},c),8!!M);for(var d=We,x="/",k=0;k>>0)%zt.length}function Gf(s){var c=ga(s.parent.id,s.name);if(zt[c]===s)zt[c]=s.Wa;else for(c=zt[c];c;){if(c.Wa===s){c.Wa=s.Wa;break}c=c.Wa}}function kr(s,c){var d;if(d=(d=to(s,"x"))?d:s.Ga.lookup?0:2)throw new U(d,s);for(d=zt[ga(s.id,c)];d;d=d.Wa){var x=d.name;if(d.parent.id===s.id&&x===c)return d}return s.Ga.lookup(s,c)}function Kf(s,c,d,x){return s=new pd(s,c,d,x),c=ga(s.parent.id,s.name),s.Wa=zt[c],zt[c]=s}function Qt(s){return(s&61440)===16384}function Qf(s){var c=["r","w","rw"][s&3];return s&512&&(c+="w"),c}function to(s,c){if(xn)return 0;if(!c.includes("r")||s.mode&292){if(c.includes("w")&&!(s.mode&146)||c.includes("x")&&!(s.mode&73))return 2}else return 2;return 0}function Yf(s,c){try{return kr(s,c),20}catch{}return to(s,"wx")}function Xf(s,c,d){try{var x=kr(s,c)}catch(k){return k.Ka}if(s=to(s,"wx"))return s;if(d){if(!Qt(x.mode))return 54;if(x===x.parent||Qo(x)==="/")return 10}else if(Qt(x.mode))return 31;return 0}function I0(){for(var s=0;4096>=s;s++)if(!vt[s])return s;throw new U(33)}function bt(s){if(s=vt[s],!s)throw new U(8);return s}function Zf(s,c=-1){return Zo||(Zo=function(){this.$a={}},Zo.prototype={},Object.defineProperties(Zo.prototype,{object:{get(){return this.node},set(d){this.node=d}},flags:{get(){return this.$a.flags},set(d){this.$a.flags=d}},position:{get(){return this.$a.position},set(d){this.$a.position=d}}})),s=Object.assign(new Zo,s),c==-1&&(c=I0()),s.fd=c,vt[c]=s}var L0={open(s){var c,d;s.Ha=Et[s.node.rdev].Ha,(d=(c=s.Ha).open)==null||d.call(c,s)},Ta(){throw new U(70)}};function ya(s,c){Et[s]={Ha:c}}function Jf(s,c){var d=c==="/",x=!c;if(d&&We)throw new U(10);if(!d&&!x){var k=Ot(c,{qb:!1});if(c=k.path,k=k.node,k.Va)throw new U(10);if(!Qt(k.mode))throw new U(54)}c={type:s,Pb:{},tb:c,Cb:[]},s=s.Ra(c),s.Ra=c,c.root=s,d?We=s:k&&(k.Va=c,k.Ra&&k.Ra.Cb.push(c))}function ll(s,c,d){var x=Ot(s,{parent:!0}).node;if(s=G(s),!s||s==="."||s==="..")throw new U(28);var k=Yf(x,s);if(k)throw new U(k);if(!x.Ga.ab)throw new U(63);return x.Ga.ab(x,s,c,d)}function Sn(s,c){return ll(s,(c!==void 0?c:511)&1023|16384,0)}function sl(s,c,d){typeof d>"u"&&(d=c,c=438),ll(s,c|8192,d)}function wa(s,c){if(!Re(s))throw new U(44);var d=Ot(c,{parent:!0}).node;if(!d)throw new U(44);c=G(c);var x=Yf(d,c);if(x)throw new U(x);if(!d.Ga.symlink)throw new U(63);d.Ga.symlink(d,c,s)}function ed(s){var c=Ot(s,{parent:!0}).node;s=G(s);var d=kr(c,s),x=Xf(c,s,!0);if(x)throw new U(x);if(!c.Ga.rmdir)throw new U(63);if(d.Va)throw new U(10);c.Ga.rmdir(c,s),Gf(d)}function td(s){var c=Ot(s,{parent:!0}).node;if(!c)throw new U(44);s=G(s);var d=kr(c,s),x=Xf(c,s,!1);if(x)throw new U(x);if(!c.Ga.unlink)throw new U(63);if(d.Va)throw new U(10);c.Ga.unlink(c,s),Gf(d)}function nd(s){if(s=Ot(s).node,!s)throw new U(44);if(!s.Ga.readlink)throw new U(28);return Re(Qo(s.parent),s.Ga.readlink(s))}function Yo(s,c){if(s=Ot(s,{Sa:!c}).node,!s)throw new U(44);if(!s.Ga.Pa)throw new U(63);return s.Ga.Pa(s)}function rd(s){return Yo(s,!0)}function al(s,c){if(s=typeof s=="string"?Ot(s,{Sa:!0}).node:s,!s.Ga.Oa)throw new U(63);s.Ga.Oa(s,{mode:c&4095|s.mode&-4096,timestamp:Date.now()})}function od(s,c){if(0>c)throw new U(28);if(s=typeof s=="string"?Ot(s,{Sa:!0}).node:s,!s.Ga.Oa)throw new U(63);if(Qt(s.mode))throw new U(31);if((s.mode&61440)!==32768)throw new U(28);var d=to(s,"w");if(d)throw new U(d);s.Ga.Oa(s,{size:c,timestamp:Date.now()})}function no(s,c,d){if(s==="")throw new U(44);if(typeof c=="string"){var x={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[c];if(typeof x>"u")throw Error(`Unknown file open mode: ${c}`);c=x}if(d=c&64?(typeof d>"u"?438:d)&4095|32768:0,typeof s=="object")var k=s;else{s=Ft(s);try{k=Ot(s,{Sa:!(c&131072)}).node}catch{}}if(x=!1,c&64)if(k){if(c&128)throw new U(20)}else k=ll(s,d,0),x=!0;if(!k)throw new U(44);if((k.mode&61440)===8192&&(c&=-513),c&65536&&!Qt(k.mode))throw new U(54);if(!x&&(d=k?(k.mode&61440)===40960?32:Qt(k.mode)&&(Qf(c)!=="r"||c&512)?31:to(k,Qf(c)):44))throw new U(d);return c&512&&!x&&od(k,0),c&=-131713,k=Zf({node:k,path:Qo(k),flags:c,seekable:!0,position:0,Ha:k.Ha,Fb:[],error:!1}),k.Ha.open&&k.Ha.open(k),!u.logReadFiles||c&1||(Sa||(Sa={}),s in Sa||(Sa[s]=1)),k}function xa(s){if(s.fd===null)throw new U(8);s.hb&&(s.hb=null);try{s.Ha.close&&s.Ha.close(s)}catch(c){throw c}finally{vt[s.fd]=null}s.fd=null}function id(s,c,d){if(s.fd===null)throw new U(8);if(!s.seekable||!s.Ha.Ta)throw new U(70);if(d!=0&&d!=1&&d!=2)throw new U(28);s.position=s.Ha.Ta(s,c,d),s.Fb=[]}function ld(s,c,d,x,k){if(0>x||0>k)throw new U(28);if(s.fd===null)throw new U(8);if((s.flags&2097155)===1)throw new U(8);if(Qt(s.node.mode))throw new U(31);if(!s.Ha.read)throw new U(28);var D=typeof k<"u";if(!D)k=s.position;else if(!s.seekable)throw new U(70);return c=s.Ha.read(s,c,d,x,k),D||(s.position+=c),c}function sd(s,c,d,x,k){if(0>x||0>k)throw new U(28);if(s.fd===null)throw new U(8);if(!(s.flags&2097155))throw new U(8);if(Qt(s.node.mode))throw new U(31);if(!s.Ha.write)throw new U(28);s.seekable&&s.flags&1024&&id(s,0,2);var D=typeof k<"u";if(!D)k=s.position;else if(!s.seekable)throw new U(70);return c=s.Ha.write(s,c,d,x,k,void 0),D||(s.position+=c),c}function F0(s){var c,d=no(s,d||0);s=Yo(s).size;var x=new Uint8Array(s);return ld(d,x,0,s,0),c=x,xa(d),c}function ad(){U||(U=function(s,c){this.name="ErrnoError",this.node=c,this.Eb=function(d){this.Ka=d},this.Eb(s),this.message="FS error"},U.prototype=Error(),U.prototype.constructor=U,[44].forEach(s=>{eo[s]=new U(s),eo[s].stack=""}))}var ud;function Xo(s,c,d){s=Ft("/dev/"+s);var x=Oe(!!c,!!d);cd||(cd=64);var k=cd++<<8|0;ya(k,{open(D){D.seekable=!1},close(){var D;(D=d==null?void 0:d.buffer)!=null&&D.length&&d(10)},read(D,M,ae,Se){for(var he=0,rt=0;rt>2]=x.dev,F[d+4>>2]=x.mode,W[d+8>>2]=x.nlink,F[d+12>>2]=x.uid,F[d+16>>2]=x.gid,F[d+20>>2]=x.rdev,me=[x.size>>>0,(Y=x.size,1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[d+24>>2]=me[0],F[d+28>>2]=me[1],F[d+32>>2]=4096,F[d+36>>2]=x.blocks,s=x.atime.getTime(),c=x.mtime.getTime();var k=x.ctime.getTime();return me=[Math.floor(s/1e3)>>>0,(Y=Math.floor(s/1e3),1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[d+40>>2]=me[0],F[d+44>>2]=me[1],W[d+48>>2]=s%1e3*1e3,me=[Math.floor(c/1e3)>>>0,(Y=Math.floor(c/1e3),1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[d+56>>2]=me[0],F[d+60>>2]=me[1],W[d+64>>2]=c%1e3*1e3,me=[Math.floor(k/1e3)>>>0,(Y=Math.floor(k/1e3),1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[d+72>>2]=me[0],F[d+76>>2]=me[1],W[d+80>>2]=k%1e3*1e3,me=[x.ino>>>0,(Y=x.ino,1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[d+88>>2]=me[0],F[d+92>>2]=me[1],0}var cl=void 0;function fl(){var s=F[+cl>>2];return cl+=4,s}var Jo=(s,c)=>c+2097152>>>0<4194305-!!s?(s>>>0)+4294967296*c:NaN,z0=[0,31,60,91,121,152,182,213,244,274,305,335],$0=[0,31,59,90,120,151,181,212,243,273,304,334],fd=s=>{var c=Nt(s)+1,d=hl(c);return d&&St(s,V,d,c),d},Ea={},dd=()=>{if(!ba){var s={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:m||"./this.program"},c;for(c in Ea)Ea[c]===void 0?delete s[c]:s[c]=Ea[c];var d=[];for(c in s)d.push(`${c}=${s[c]}`);ba=d}return ba},ba,Ca=s=>{var c=Nt(s)+1,d=Zn(c);return St(s,V,d,c),d},H0=(s,c,d,x)=>{var k={string:he=>{var rt=0;return he!=null&&he!==0&&(rt=Ca(he)),rt},array:he=>{var rt=Zn(he.length);return I.set(he,rt),rt}};s=u["_"+s];var D=[],M=0;if(x)for(var ae=0;ae(c=c==1?Zn(s.length):hl(s.length),s.subarray||s.slice||(s=new Uint8Array(s)),V.set(s,c),c),Pr,_a=[],An,ro=s=>{Pr.delete(An.get(s)),An.set(s,null),_a.push(s)},ml=(s,c)=>{if(!Pr){Pr=new WeakMap;var d=An.length;if(Pr)for(var x=0;x<0+d;x++){var k=An.get(x);k&&Pr.set(k,x)}}if(d=Pr.get(s)||0)return d;if(_a.length)d=_a.pop();else{try{An.grow(1)}catch(ae){throw ae instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":ae}d=An.length-1}try{An.set(d,s)}catch(ae){if(!(ae instanceof TypeError))throw ae;if(typeof WebAssembly.Function=="function"){x=WebAssembly.Function,k={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};for(var D={parameters:[],results:c[0]=="v"?[]:[k[c[0]]]},M=1;MM?x.push(M):x.push(M%128|128,M>>7),M=0;Mk?c.push(k):c.push(k%128|128,k>>7),c.push.apply(c,x),c.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),c=new WebAssembly.Module(new Uint8Array(c)),c=new WebAssembly.Instance(c,{e:{f:s}}).exports.f}An.set(d,c)}return Pr.set(s,d),d};function pd(s,c,d,x){s||(s=this),this.parent=s,this.Ra=s.Ra,this.Va=null,this.id=wn++,this.name=c,this.mode=d,this.Ga={},this.Ha={},this.rdev=x}Object.defineProperties(pd.prototype,{read:{get:function(){return(this.mode&365)===365},set:function(s){s?this.mode|=365:this.mode&=-366}},write:{get:function(){return(this.mode&146)===146},set:function(s){s?this.mode|=146:this.mode&=-147}}}),ad(),zt=Array(4096),Jf(q,"/"),Sn("/tmp"),Sn("/home"),Sn("/home/web_user"),function(){Sn("/dev"),ya(259,{read:()=>0,write:(x,k,D,M)=>M}),sl("/dev/null",259),Yn(1280,ie),Yn(1536,fe),sl("/dev/tty",1280),sl("/dev/tty1",1536);var s=new Uint8Array(1024),c=0,d=()=>(c===0&&(c=Le(s).byteLength),s[--c]);Xo("random",d),Xo("urandom",d),Sn("/dev/shm"),Sn("/dev/shm/tmp")}(),function(){Sn("/proc");var s=Sn("/proc/self");Sn("/proc/self/fd"),Jf({Ra(){var c=Kf(s,"fd",16895,73);return c.Ga={lookup(d,x){var k=bt(+x);return d={parent:null,Ra:{tb:"fake"},Ga:{readlink:()=>k.path}},d.parent=d}},c}},"/proc/self/fd")}();var U0={a:(s,c,d,x)=>{ve(`Assertion failed: ${s?Ce(V,s):""}, at: `+[c?c?Ce(V,c):"":"unknown filename",d,x?x?Ce(V,x):"":"unknown function"])},h:function(s,c){try{return s=s?Ce(V,s):"",al(s,c),0}catch(d){if(typeof Fe>"u"||d.name!=="ErrnoError")throw d;return-d.Ka}},H:function(s,c,d){try{if(c=c?Ce(V,c):"",c=Rr(s,c),d&-8)return-28;var x=Ot(c,{Sa:!0}).node;return x?(s="",d&4&&(s+="r"),d&2&&(s+="w"),d&1&&(s+="x"),s&&to(x,s)?-2:0):-44}catch(k){if(typeof Fe>"u"||k.name!=="ErrnoError")throw k;return-k.Ka}},i:function(s,c){try{var d=bt(s);return al(d.node,c),0}catch(x){if(typeof Fe>"u"||x.name!=="ErrnoError")throw x;return-x.Ka}},g:function(s){try{var c=bt(s).node,d=typeof c=="string"?Ot(c,{Sa:!0}).node:c;if(!d.Ga.Oa)throw new U(63);return d.Ga.Oa(d,{timestamp:Date.now()}),0}catch(x){if(typeof Fe>"u"||x.name!=="ErrnoError")throw x;return-x.Ka}},b:function(s,c,d){cl=d;try{var x=bt(s);switch(c){case 0:var k=fl();if(0>k)return-28;for(;vt[k];)k++;return Zf(x,k).fd;case 1:case 2:return 0;case 3:return x.flags;case 4:return k=fl(),x.flags|=k,0;case 5:return k=fl(),H[k+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return F[md()>>2]=28,-1;default:return-28}}catch(D){if(typeof Fe>"u"||D.name!=="ErrnoError")throw D;return-D.Ka}},f:function(s,c){try{var d=bt(s);return ul(Yo,d.path,c)}catch(x){if(typeof Fe>"u"||x.name!=="ErrnoError")throw x;return-x.Ka}},n:function(s,c,d){c=Jo(c,d);try{if(isNaN(c))return 61;var x=bt(s);if(!(x.flags&2097155))throw new U(28);return od(x.node,c),0}catch(k){if(typeof Fe>"u"||k.name!=="ErrnoError")throw k;return-k.Ka}},C:function(s,c){try{if(c===0)return-28;var d=Nt("/")+1;return c"u"||x.name!=="ErrnoError")throw x;return-x.Ka}},F:function(s,c){try{return s=s?Ce(V,s):"",ul(rd,s,c)}catch(d){if(typeof Fe>"u"||d.name!=="ErrnoError")throw d;return-d.Ka}},z:function(s,c,d){try{return c=c?Ce(V,c):"",c=Rr(s,c),c=Ft(c),c[c.length-1]==="/"&&(c=c.substr(0,c.length-1)),Sn(c,d),0}catch(x){if(typeof Fe>"u"||x.name!=="ErrnoError")throw x;return-x.Ka}},E:function(s,c,d,x){try{c=c?Ce(V,c):"";var k=x&256;return c=Rr(s,c,x&4096),ul(k?rd:Yo,c,d)}catch(D){if(typeof Fe>"u"||D.name!=="ErrnoError")throw D;return-D.Ka}},y:function(s,c,d,x){cl=x;try{c=c?Ce(V,c):"",c=Rr(s,c);var k=x?fl():0;return no(c,d,k).fd}catch(D){if(typeof Fe>"u"||D.name!=="ErrnoError")throw D;return-D.Ka}},w:function(s,c,d,x){try{if(c=c?Ce(V,c):"",c=Rr(s,c),0>=x)return-28;var k=nd(c),D=Math.min(x,Nt(k)),M=I[d+D];return St(k,V,d,x+1),I[d+D]=M,D}catch(ae){if(typeof Fe>"u"||ae.name!=="ErrnoError")throw ae;return-ae.Ka}},v:function(s){try{return s=s?Ce(V,s):"",ed(s),0}catch(c){if(typeof Fe>"u"||c.name!=="ErrnoError")throw c;return-c.Ka}},G:function(s,c){try{return s=s?Ce(V,s):"",ul(Yo,s,c)}catch(d){if(typeof Fe>"u"||d.name!=="ErrnoError")throw d;return-d.Ka}},r:function(s,c,d){try{return c=c?Ce(V,c):"",c=Rr(s,c),d===0?td(c):d===512?ed(c):ve("Invalid flags passed to unlinkat"),0}catch(x){if(typeof Fe>"u"||x.name!=="ErrnoError")throw x;return-x.Ka}},q:function(s,c,d){try{if(c=c?Ce(V,c):"",c=Rr(s,c,!0),d){var x=W[d>>2]+4294967296*F[d+4>>2],k=F[d+8>>2];D=1e3*x+k/1e6,d+=16,x=W[d>>2]+4294967296*F[d+4>>2],k=F[d+8>>2],M=1e3*x+k/1e6}else var D=Date.now(),M=D;s=D;var ae=Ot(c,{Sa:!0}).node;return ae.Ga.Oa(ae,{timestamp:Math.max(s,M)}),0}catch(Se){if(typeof Fe>"u"||Se.name!=="ErrnoError")throw Se;return-Se.Ka}},l:function(s,c,d){s=new Date(1e3*Jo(s,c)),F[d>>2]=s.getSeconds(),F[d+4>>2]=s.getMinutes(),F[d+8>>2]=s.getHours(),F[d+12>>2]=s.getDate(),F[d+16>>2]=s.getMonth(),F[d+20>>2]=s.getFullYear()-1900,F[d+24>>2]=s.getDay(),c=s.getFullYear(),F[d+28>>2]=(c%4!==0||c%100===0&&c%400!==0?$0:z0)[s.getMonth()]+s.getDate()-1|0,F[d+36>>2]=-(60*s.getTimezoneOffset()),c=new Date(s.getFullYear(),6,1).getTimezoneOffset();var x=new Date(s.getFullYear(),0,1).getTimezoneOffset();F[d+32>>2]=(c!=x&&s.getTimezoneOffset()==Math.min(x,c))|0},j:function(s,c,d,x,k,D,M,ae){k=Jo(k,D);try{if(isNaN(k))return 61;var Se=bt(x);if(c&2&&!(d&2)&&(Se.flags&2097155)!==2)throw new U(2);if((Se.flags&2097155)===1)throw new U(2);if(!Se.Ha.bb)throw new U(43);var he=Se.Ha.bb(Se,s,k,c,d),rt=he.Db;return F[M>>2]=he.ub,W[ae>>2]=rt,0}catch(ct){if(typeof Fe>"u"||ct.name!=="ErrnoError")throw ct;return-ct.Ka}},k:function(s,c,d,x,k,D,M){D=Jo(D,M);try{if(isNaN(D))return 61;var ae=bt(k);if(d&2){if((ae.node.mode&61440)!==32768)throw new U(43);if(!(x&2)){var Se=V.slice(s,s+c);ae.Ha.cb&&ae.Ha.cb(ae,Se,D,c,x)}}}catch(he){if(typeof Fe>"u"||he.name!=="ErrnoError")throw he;return-he.Ka}},s:(s,c,d)=>{function x(Se){return(Se=Se.toTimeString().match(/\(([A-Za-z ]+)\)$/))?Se[1]:"GMT"}var k=new Date().getFullYear(),D=new Date(k,0,1),M=new Date(k,6,1);k=D.getTimezoneOffset();var ae=M.getTimezoneOffset();W[s>>2]=60*Math.max(k,ae),F[c>>2]=+(k!=ae),s=x(D),c=x(M),s=fd(s),c=fd(c),ae>2]=s,W[d+4>>2]=c):(W[d>>2]=c,W[d+4>>2]=s)},d:()=>Date.now(),t:()=>2147483648,c:()=>performance.now(),o:s=>{var c=V.length;if(s>>>=0,2147483648=d;d*=2){var x=c*(1+.2/d);x=Math.min(x,s+100663296);var k=Math;x=Math.max(s,x);e:{k=(k.min.call(k,2147483648,x+(65536-x%65536)%65536)-O.buffer.byteLength+65535)/65536;try{O.grow(k),ne();var D=1;break e}catch{}D=void 0}if(D)return!0}return!1},A:(s,c)=>{var d=0;return dd().forEach((x,k)=>{var D=c+d;for(k=W[s+4*k>>2]=D,D=0;D>0]=x.charCodeAt(D);I[k>>0]=0,d+=x.length+1}),0},B:(s,c)=>{var d=dd();W[s>>2]=d.length;var x=0;return d.forEach(k=>x+=k.length+1),W[c>>2]=x,0},e:function(s){try{var c=bt(s);return xa(c),0}catch(d){if(typeof Fe>"u"||d.name!=="ErrnoError")throw d;return d.Ka}},p:function(s,c){try{var d=bt(s);return I[c>>0]=d.tty?2:Qt(d.mode)?3:(d.mode&61440)===40960?7:4,H[c+2>>1]=0,me=[0,(Y=0,1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[c+8>>2]=me[0],F[c+12>>2]=me[1],me=[0,(Y=0,1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[c+16>>2]=me[0],F[c+20>>2]=me[1],0}catch(x){if(typeof Fe>"u"||x.name!=="ErrnoError")throw x;return x.Ka}},x:function(s,c,d,x){try{e:{var k=bt(s);s=c;for(var D,M=c=0;M>2],Se=W[s+4>>2];s+=8;var he=ld(k,I,ae,Se,D);if(0>he){var rt=-1;break e}if(c+=he,he>2]=rt,0}catch(ct){if(typeof Fe>"u"||ct.name!=="ErrnoError")throw ct;return ct.Ka}},m:function(s,c,d,x,k){c=Jo(c,d);try{if(isNaN(c))return 61;var D=bt(s);return id(D,c,x),me=[D.position>>>0,(Y=D.position,1<=+Math.abs(Y)?0>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],F[k>>2]=me[0],F[k+4>>2]=me[1],D.hb&&c===0&&x===0&&(D.hb=null),0}catch(M){if(typeof Fe>"u"||M.name!=="ErrnoError")throw M;return M.Ka}},D:function(s){var d;try{var c=bt(s);return(d=c.Ha)!=null&&d.fsync?c.Ha.fsync(c):0}catch(x){if(typeof Fe>"u"||x.name!=="ErrnoError")throw x;return x.Ka}},u:function(s,c,d,x){try{e:{var k=bt(s);s=c;for(var D,M=c=0;M>2],Se=W[s+4>>2];s+=8;var he=sd(k,I,ae,Se,D);if(0>he){var rt=-1;break e}c+=he,typeof D<"u"&&(D+=he)}rt=c}return W[x>>2]=rt,0}catch(ct){if(typeof Fe>"u"||ct.name!=="ErrnoError")throw ct;return ct.Ka}}},re=function(){var d;function s(x){var k;return re=x.exports,O=re.I,ne(),An=re.Aa,B.unshift(re.J),ue--,(k=u.monitorRunDependencies)==null||k.call(u,ue),ue==0&&Ve&&(x=Ve,Ve=null,x()),re}var c={a:U0};if(ue++,(d=u.monitorRunDependencies)==null||d.call(u,ue),u.instantiateWasm)try{return u.instantiateWasm(c,s)}catch(x){return A(`Module.instantiateWasm callback failed with error: ${x}`),!1}return de(c,function(x){s(x.instance)}),{}}();u._sqlite3_free=s=>(u._sqlite3_free=re.K)(s),u._sqlite3_value_text=s=>(u._sqlite3_value_text=re.L)(s);var md=()=>(md=re.M)();u._sqlite3_prepare_v2=(s,c,d,x,k)=>(u._sqlite3_prepare_v2=re.N)(s,c,d,x,k),u._sqlite3_step=s=>(u._sqlite3_step=re.O)(s),u._sqlite3_reset=s=>(u._sqlite3_reset=re.P)(s),u._sqlite3_exec=(s,c,d,x,k)=>(u._sqlite3_exec=re.Q)(s,c,d,x,k),u._sqlite3_finalize=s=>(u._sqlite3_finalize=re.R)(s),u._sqlite3_column_name=(s,c)=>(u._sqlite3_column_name=re.S)(s,c),u._sqlite3_column_text=(s,c)=>(u._sqlite3_column_text=re.T)(s,c),u._sqlite3_column_type=(s,c)=>(u._sqlite3_column_type=re.U)(s,c),u._sqlite3_errmsg=s=>(u._sqlite3_errmsg=re.V)(s),u._sqlite3_clear_bindings=s=>(u._sqlite3_clear_bindings=re.W)(s),u._sqlite3_value_blob=s=>(u._sqlite3_value_blob=re.X)(s),u._sqlite3_value_bytes=s=>(u._sqlite3_value_bytes=re.Y)(s),u._sqlite3_value_double=s=>(u._sqlite3_value_double=re.Z)(s),u._sqlite3_value_int=s=>(u._sqlite3_value_int=re._)(s),u._sqlite3_value_type=s=>(u._sqlite3_value_type=re.$)(s),u._sqlite3_result_blob=(s,c,d,x)=>(u._sqlite3_result_blob=re.aa)(s,c,d,x),u._sqlite3_result_double=(s,c)=>(u._sqlite3_result_double=re.ba)(s,c),u._sqlite3_result_error=(s,c,d)=>(u._sqlite3_result_error=re.ca)(s,c,d),u._sqlite3_result_int=(s,c)=>(u._sqlite3_result_int=re.da)(s,c),u._sqlite3_result_int64=(s,c,d)=>(u._sqlite3_result_int64=re.ea)(s,c,d),u._sqlite3_result_null=s=>(u._sqlite3_result_null=re.fa)(s),u._sqlite3_result_text=(s,c,d,x)=>(u._sqlite3_result_text=re.ga)(s,c,d,x),u._sqlite3_aggregate_context=(s,c)=>(u._sqlite3_aggregate_context=re.ha)(s,c),u._sqlite3_column_count=s=>(u._sqlite3_column_count=re.ia)(s),u._sqlite3_data_count=s=>(u._sqlite3_data_count=re.ja)(s),u._sqlite3_column_blob=(s,c)=>(u._sqlite3_column_blob=re.ka)(s,c),u._sqlite3_column_bytes=(s,c)=>(u._sqlite3_column_bytes=re.la)(s,c),u._sqlite3_column_double=(s,c)=>(u._sqlite3_column_double=re.ma)(s,c),u._sqlite3_bind_blob=(s,c,d,x,k)=>(u._sqlite3_bind_blob=re.na)(s,c,d,x,k),u._sqlite3_bind_double=(s,c,d)=>(u._sqlite3_bind_double=re.oa)(s,c,d),u._sqlite3_bind_int=(s,c,d)=>(u._sqlite3_bind_int=re.pa)(s,c,d),u._sqlite3_bind_text=(s,c,d,x,k)=>(u._sqlite3_bind_text=re.qa)(s,c,d,x,k),u._sqlite3_bind_parameter_index=(s,c)=>(u._sqlite3_bind_parameter_index=re.ra)(s,c),u._sqlite3_sql=s=>(u._sqlite3_sql=re.sa)(s),u._sqlite3_normalized_sql=s=>(u._sqlite3_normalized_sql=re.ta)(s),u._sqlite3_changes=s=>(u._sqlite3_changes=re.ua)(s),u._sqlite3_close_v2=s=>(u._sqlite3_close_v2=re.va)(s),u._sqlite3_create_function_v2=(s,c,d,x,k,D,M,ae,Se)=>(u._sqlite3_create_function_v2=re.wa)(s,c,d,x,k,D,M,ae,Se),u._sqlite3_open=(s,c)=>(u._sqlite3_open=re.xa)(s,c);var hl=u._malloc=s=>(hl=u._malloc=re.ya)(s),vl=u._free=s=>(vl=u._free=re.za)(s);u._RegisterExtensionFunctions=s=>(u._RegisterExtensionFunctions=re.Ba)(s);var hd=(s,c)=>(hd=re.Ca)(s,c),ei=()=>(ei=re.Da)(),ti=s=>(ti=re.Ea)(s),Zn=s=>(Zn=re.Fa)(s);u.stackAlloc=Zn,u.stackSave=ei,u.stackRestore=ti,u.cwrap=(s,c,d,x)=>{var k=!d||d.every(D=>D==="number"||D==="boolean");return c!=="string"&&k&&!x?u["_"+s]:function(){return H0(s,c,d,arguments)}},u.addFunction=ml,u.removeFunction=ro,u.UTF8ToString=rn,u.ALLOC_NORMAL=dl,u.allocate=pl,u.allocateUTF8OnStack=Ca;var gl;Ve=function s(){gl||vd(),gl||(Ve=s)};function vd(){function s(){if(!gl&&(gl=!0,u.calledRun=!0,!j)){if(u.noFSInit||ud||(ud=!0,ad(),u.stdin=u.stdin,u.stdout=u.stdout,u.stderr=u.stderr,u.stdin?Xo("stdin",u.stdin):wa("/dev/tty","/dev/stdin"),u.stdout?Xo("stdout",null,u.stdout):wa("/dev/tty","/dev/stdout"),u.stderr?Xo("stderr",null,u.stderr):wa("/dev/tty1","/dev/stderr"),no("/dev/stdin",0),no("/dev/stdout",1),no("/dev/stderr",1)),xn=!1,ut(B),u.onRuntimeInitialized&&u.onRuntimeInitialized(),u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;){var c=u.postRun.shift();ee.unshift(c)}ut(ee)}}if(!(0"u"?p={autoBom:!1}:typeof p!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),p={autoBom:!p}),p.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function r(u,p,m){var h=new XMLHttpRequest;h.open("GET",u),h.responseType="blob",h.onload=function(){f(h.response,p,m)},h.onerror=function(){console.error("could not download file")},h.send()}function o(u){var p=new XMLHttpRequest;p.open("HEAD",u,!1);try{p.send()}catch{}return 200<=p.status&&299>=p.status}function i(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var p=document.createEvent("MouseEvents");p.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(p)}}var l=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ni=="object"&&ni.global===ni?ni:void 0,a=l.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=l.saveAs||(typeof window!="object"||window!==l?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(u,p,m){var h=l.URL||l.webkitURL,w=document.createElement("a");p=p||u.name||"download",w.download=p,w.rel="noopener",typeof u=="string"?(w.href=u,w.origin===location.origin?i(w):o(w.href)?r(u,p,m):i(w,w.target="_blank")):(w.href=h.createObjectURL(u),setTimeout(function(){h.revokeObjectURL(w.href)},4e4),setTimeout(function(){i(w)},0))}:"msSaveOrOpenBlob"in navigator?function(u,p,m){if(p=p||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(n(u,m),p);else if(o(u))r(u,p,m);else{var h=document.createElement("a");h.href=u,h.target="_blank",setTimeout(function(){i(h)})}}:function(u,p,m,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof u=="string")return r(u,p,m);var w=u.type==="application/octet-stream",C=/constructor/i.test(l.HTMLElement)||l.safari,E=/CriOS\/[\d]+/.test(navigator.userAgent);if((E||w&&C||a)&&typeof FileReader<"u"){var R=new FileReader;R.onloadend=function(){var S=R.result;S=E?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=S:location=S,h=null},R.readAsDataURL(u)}else{var y=l.URL||l.webkitURL,v=y.createObjectURL(u);h?h.location=v:location.href=v,h=null,setTimeout(function(){y.revokeObjectURL(v)},4e4)}});l.saveAs=f.saveAs=f,e.exports=f})})(Uv);var Wv=Uv.exports;const ES=async e=>{try{const t=await e.arrayBuffer(),n=await SS({locateFile:r=>`https://sql.js.org/dist/${r}`});return new n.Database(new Uint8Array(t))}catch(t){throw console.error("Failed to load database:",t),t}},Ef=e=>{var t;try{return((t=e.exec("SELECT name FROM sqlite_master WHERE type='table';")[0])==null?void 0:t.values.map(r=>r[0]))||[]}catch(n){return console.error("Failed to get table names:",n),[]}},bS=async(e,t)=>{try{const r=e.exec(`PRAGMA table_info("${t}")`)[0].values.reduce((i,l)=>(i[l[1]]={type:l[2],isPrimaryKey:l[5]===1,isForeignKey:!1},i),{}),o=e.exec(`PRAGMA foreign_key_list("${t}")`);return o.length>0&&o[0].values.forEach(i=>{const l=i[3];r[l]&&(r[l].isForeignKey=!0)}),r}catch(n){throw console.error(`Failed to get schema for table "${t}":`,n),n}};function As(e){if(e.length>0){const t=e[0].columns;return{data:e[0].values.map(r=>t.reduce((o,i,l)=>(o[i]=r[l],o),{})),columns:t}}return{data:[],columns:[]}}const CS=e=>{try{return e.export()}catch(t){throw console.error("Failed to export database:",t),t}},Bv=(e,t)=>{const n=e.join(","),r=t.map(o=>e.map(i=>`"${o[i]}"`).join(","));return[n,...r].join(` -`)},_S=(e,t)=>{const r=Ef(e)[t];try{const o=e.exec(`SELECT * FROM ${r}`);if(o.length===0)throw new Error(`Table ${r} is empty or does not exist.`);const{data:i,columns:l}=As(o),a=Bv(l,i),f=new Blob([a],{type:"text/csv;charset=utf-8;"});Wv.saveAs(f,`${r}.csv`)}catch(o){throw console.error(`Failed to export table "${r}" as CSV:`,o),o}},kS=e=>{Ef(e).forEach(n=>{try{const r=e.exec(`SELECT * FROM ${n}`);if(r.length===0)throw new Error(`Table ${n} is empty or does not exist.`);const{data:o,columns:i}=As(r),l=Bv(i,o),a=new Blob([l],{type:"text/csv;charset=utf-8;"});Wv.saveAs(a,`${n}.csv`)}catch(r){console.error(`Failed to export table "${n}" as CSV:`,r)}})},Zr=gS((e,t)=>({db:null,isLoading:!1,queryError:null,tables:[],selectedTable:"0",tableSchemas:{},loadDatabase:async n=>{e({isLoading:!0,queryError:null});try{const r=await ES(n);e({db:r});const i=Ef(r).map(async u=>{const p=r.exec(`SELECT COUNT(*) FROM "${u}"`),m=parseInt(p[0].values[0][0],10),h=await bS(r,u);return{name:u,count:m,schema:h}}),l=await Promise.all(i),a=l.map(({name:u,count:p})=>({name:u,count:p})),f=l.reduce((u,{name:p,schema:m})=>(u[p]=m,u),{});e({tables:a,tableSchemas:f,isLoading:!1})}catch(r){console.error("Failed to load database:",r),e({isLoading:!1,queryError:"Failed to load database"})}},query:n=>{const r=t().db;return r?r.exec(n):(console.warn("Database is not loaded."),[])},setQueryError:n=>e({queryError:n}),setTables:n=>e({tables:n}),setSelectedTable:n=>e({selectedTable:n}),setTableSchemas:n=>e({tableSchemas:n}),rowPerPageOrAuto:"auto",setRowPerPageOrAuto:n=>e({rowPerPageOrAuto:n}),downloadDatabase:()=>{const n=t().db;if(n){const r=CS(n),o=new Blob([r],{type:"application/octet-stream"}),i=URL.createObjectURL(o),l=document.createElement("a");l.href=i,l.download="database.sqlite",l.click(),URL.revokeObjectURL(i)}else console.warn("Database is not loaded.")},exportTableAsCSV:n=>{const r=t().db;r?_S(r,n):console.warn("Database is not loaded.")},exportAllTablesAsCSV:()=>{const n=t().db;return n?(kS(n),{}):(console.warn("Database is not loaded."),{})},isCustomQuery:!1,setIsCustomQuery:n=>e({isCustomQuery:n})}));function Vv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ta(i)))==null?void 0:l.classGroupId}const Lp=/^\[(.+)\]$/;function TS(e){if(Lp.test(e)){const t=Lp.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function NS(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return AS(Object.entries(e.classGroups),n).forEach(([i,l])=>{sc(l,r,i,t)}),r}function sc(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Fp(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(OS(o)){sc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{sc(l,Fp(t,i),n,r)})})}function Fp(e,t){let n=e;return t.split(bf).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function OS(e){return e.isThemeGetter}function AS(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[t+l,a])):i);return[n,o]}):e}function DS(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const Gv="!";function jS(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const a=[];let f=0,u=0,p;for(let E=0;Eu?p-u:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:w,maybePostfixModifierPosition:C}}}function MS(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function IS(e){return{cache:DS(e.cacheSize),splitModifiers:jS(e),...PS(e)}}const LS=/\s+/;function FS(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(LS).map(l=>{const{modifiers:a,hasImportantModifier:f,baseClassName:u,maybePostfixModifierPosition:p}=n(l);let m=r(p?u.substring(0,p):u),h=!!p;if(!m){if(!p)return{isTailwindClass:!1,originalClassName:l};if(m=r(u),!m)return{isTailwindClass:!1,originalClassName:l};h=!1}const w=MS(a).join(":");return{isTailwindClass:!0,modifierId:f?w+Gv:w,classGroupId:m,originalClassName:l,hasPostfixModifier:h}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:a,classGroupId:f,hasPostfixModifier:u}=l,p=a+f;return i.has(p)?!1:(i.add(p),o(f,u).forEach(m=>i.add(a+m)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function zS(){let e=0,t,n,r="";for(;em(p),e());return n=IS(u),r=n.cache.get,o=n.cache.set,i=a,a(f)}function a(f){const u=r(f);if(u)return u;const p=FS(f,n);return o(f,p),p}return function(){return i(zS.apply(null,arguments))}}function ze(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Qv=/^\[(?:([a-z-]+):)?(.+)\]$/i,HS=/^\d+\/\d+$/,US=new Set(["px","full","screen"]),WS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BS=/\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$/,VS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Dn(e){return Lr(e)||US.has(e)||HS.test(e)}function er(e){return Uo(e,"length",tE)}function Lr(e){return!!e&&!Number.isNaN(Number(e))}function Il(e){return Uo(e,"number",Lr)}function fi(e){return!!e&&Number.isInteger(Number(e))}function KS(e){return e.endsWith("%")&&Lr(e.slice(0,-1))}function pe(e){return Qv.test(e)}function tr(e){return WS.test(e)}const QS=new Set(["length","size","percentage"]);function YS(e){return Uo(e,QS,Yv)}function XS(e){return Uo(e,"position",Yv)}const ZS=new Set(["image","url"]);function JS(e){return Uo(e,ZS,rE)}function eE(e){return Uo(e,"",nE)}function di(){return!0}function Uo(e,t,n){const r=Qv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function tE(e){return BS.test(e)&&!VS.test(e)}function Yv(){return!1}function nE(e){return qS.test(e)}function rE(e){return GS.test(e)}function oE(){const e=ze("colors"),t=ze("spacing"),n=ze("blur"),r=ze("brightness"),o=ze("borderColor"),i=ze("borderRadius"),l=ze("borderSpacing"),a=ze("borderWidth"),f=ze("contrast"),u=ze("grayscale"),p=ze("hueRotate"),m=ze("invert"),h=ze("gap"),w=ze("gradientColorStops"),C=ze("gradientColorStopPositions"),E=ze("inset"),R=ze("margin"),y=ze("opacity"),v=ze("padding"),S=ze("saturate"),_=ze("scale"),P=ze("sepia"),A=ze("skew"),T=ze("space"),O=ze("translate"),j=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",pe,t],H=()=>[pe,t],F=()=>["",Dn,er],W=()=>["auto",Lr,pe],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],le=()=>["solid","dashed","dotted","double","none"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",pe],ee=()=>["auto","avoid","all","avoid-page","page","left","right","column"],se=()=>[Lr,Il],ue=()=>[Lr,pe];return{cacheSize:500,separator:":",theme:{colors:[di],spacing:[Dn,er],blur:["none","",tr,pe],brightness:se(),borderColor:[e],borderRadius:["none","","full",tr,pe],borderSpacing:H(),borderWidth:F(),contrast:se(),grayscale:B(),hueRotate:ue(),invert:B(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[KS,er],inset:V(),margin:V(),opacity:se(),padding:H(),saturate:se(),scale:se(),sepia:B(),skew:ue(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",pe]}],container:["container"],columns:[{columns:[tr]}],"break-after":[{"break-after":ee()}],"break-before":[{"break-before":ee()}],"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:[...Z(),pe]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",fi,pe]}],basis:[{basis:V()}],"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:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",fi,pe]}],"grid-cols":[{"grid-cols":[di]}],"col-start-end":[{col:["auto",{span:["full",fi,pe]},pe]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[di]}],"row-start-end":[{row:["auto",{span:[fi,pe]},pe]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"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:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[R]}],mx:[{mx:[R]}],my:[{my:[R]}],ms:[{ms:[R]}],me:[{me:[R]}],mt:[{mt:[R]}],mr:[{mr:[R]}],mb:[{mb:[R]}],ml:[{ml:[R]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",pe,t]}],"min-w":[{"min-w":[pe,t,"min","max","fit"]}],"max-w":[{"max-w":[pe,t,"none","full","min","max","fit","prose",{screen:[tr]},tr]}],h:[{h:[pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",tr,er]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Il]}],"font-family":[{font:[di]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",pe]}],"line-clamp":[{"line-clamp":["none",Lr,Il]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dn,pe]}],"list-image":[{"list-image":["none",pe]}],"list-style-type":[{list:["none","disc","decimal",pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dn,er]}],"underline-offset":[{"underline-offset":["auto",Dn,pe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"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":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),XS]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",YS]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},JS]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...le(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:le()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...le()]}],"outline-offset":[{"outline-offset":[Dn,pe]}],"outline-w":[{outline:[Dn,er]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Dn,er]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",tr,eE]}],"shadow-color":[{shadow:[di]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...ne(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ne()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",tr,pe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[S]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",pe]}],duration:[{duration:ue()}],ease:[{ease:["linear","in","out","in-out",pe]}],delay:[{delay:ue()}],animate:[{animate:["none","spin","ping","pulse","bounce",pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[fi,pe]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",pe]}],accent:[{accent:["auto",e]}],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:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"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:[e,"none"]}],"stroke-w":[{stroke:[Dn,er,Il]}],stroke:[{stroke:[e,"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-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"]}}}const iE=$S(oE);function je(...e){return iE(RS(e))}const Cf=g.forwardRef(({className:e,type:t,...n},r)=>b.jsx("input",{type:t,className:je("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Cf.displayName="Input";function lE(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Xv(...e){return t=>e.forEach(n=>lE(n,t))}function Ze(...e){return g.useCallback(Xv(...e),e)}var Vr=g.forwardRef((e,t)=>{const{children:n,...r}=e,o=g.Children.toArray(n),i=o.find(aE);if(i){const l=i.props.children,a=o.map(f=>f===i?g.Children.count(l)>1?g.Children.only(null):g.isValidElement(l)?l.props.children:null:f);return b.jsx(ac,{...r,ref:t,children:g.isValidElement(l)?g.cloneElement(l,void 0,a):null})}return b.jsx(ac,{...r,ref:t,children:n})});Vr.displayName="Slot";var ac=g.forwardRef((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const o=cE(n);return g.cloneElement(n,{...uE(r,n.props),ref:t?Xv(t,o):o})}return g.Children.count(n)>1?g.Children.only(null):null});ac.displayName="SlotClone";var sE=({children:e})=>b.jsx(b.Fragment,{children:e});function aE(e){return g.isValidElement(e)&&e.type===sE}function uE(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function cE(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Zv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,$p=fE,Jv=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return $p(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,l=Object.keys(o).map(u=>{const p=n==null?void 0:n[u],m=i==null?void 0:i[u];if(p===null)return null;const h=zp(p)||zp(m);return o[u][h]}),a=n&&Object.entries(n).reduce((u,p)=>{let[m,h]=p;return h===void 0||(u[m]=h),u},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,p)=>{let{class:m,className:h,...w}=p;return Object.entries(w).every(C=>{let[E,R]=C;return Array.isArray(R)?R.includes({...i,...a}[E]):{...i,...a}[E]===R})?[...u,m,h]:u},[]);return $p(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)},dE=Jv("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),At=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const l=r?Vr:"button";return b.jsx(l,{className:je(dE({variant:t,size:n,className:e})),ref:i,...o})});At.displayName="Button";/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),eg=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var mE={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.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hE=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:l,...a},f)=>g.createElement("svg",{ref:f,...mE,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:eg("lucide",o),...a},[...l.map(([u,p])=>g.createElement(u,p)),...Array.isArray(i)?i:[i]]));/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const at=(e,t)=>{const n=g.forwardRef(({className:r,...o},i)=>g.createElement(hE,{ref:i,iconNode:t,className:eg(`lucide-${pE(e)}`,r),...o}));return n.displayName=`${e}`,n};/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vE=at("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tg=at("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gE=at("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yE=at("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wE=at("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xE=at("Clock9",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 7.5 12",key:"1k60p0"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const SE=at("Cuboid",[["path",{d:"m21.12 6.4-6.05-4.06a2 2 0 0 0-2.17-.05L2.95 8.41a2 2 0 0 0-.95 1.7v5.82a2 2 0 0 0 .88 1.66l6.05 4.07a2 2 0 0 0 2.17.05l9.95-6.12a2 2 0 0 0 .95-1.7V8.06a2 2 0 0 0-.88-1.66Z",key:"1u2ovd"}],["path",{d:"M10 22v-8L2.25 9.15",key:"11pn4q"}],["path",{d:"m10 14 11.77-6.87",key:"1kt1wh"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const EE=at("FileCheck",[["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:"m9 15 2 2 4-4",key:"1grp1n"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bE=at("FileWarning",[["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:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const CE=at("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.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _E=at("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kE=at("KeySquare",[["path",{d:"M12.4 2.7c.9-.9 2.5-.9 3.4 0l5.5 5.5c.9.9.9 2.5 0 3.4l-3.7 3.7c-.9.9-2.5.9-3.4 0L8.7 9.8c-.9-.9-.9-2.5 0-3.4Z",key:"9li5bk"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M9.4 10.6 2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4",key:"1ym3zm"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const RE=at("ListRestart",[["path",{d:"M21 6H3",key:"1jwq7v"}],["path",{d:"M7 12H3",key:"13ou7f"}],["path",{d:"M7 18H3",key:"1sijw9"}],["path",{d:"M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14",key:"qth677"}],["path",{d:"M11 10v4h4",key:"172dkj"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const PE=at("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const TE=at("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const NE=at("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const OE=at("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** - * @license lucide-react v0.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const AE=at("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.396.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const DE=at("Trash",[["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"}]]);function jE({page:e,setPage:t,rowsPerPage:n,rowCount:r}){const o=Math.ceil(r/n),i=Math.floor(e/n)+1,l=()=>{i{i>1&&t(e-n)};return b.jsx("section",{className:"fixed bottom-[8px] left-0 right-0 w-[270px] mx-auto z-10",children:b.jsxs("div",{className:"flex justify-between gap-2 bg-secondary p-[6px] border rounded",children:[b.jsx(At,{onClick:a,disabled:i===1,children:b.jsx(gE,{className:"h-4 w-4"})}),b.jsxs("span",{className:"text-sm flex items-center justify-center",children:["Page ",i," of ",o]}),b.jsx(At,{onClick:l,disabled:i>=o,children:b.jsx(yE,{className:"h-4 w-4"})})]})})}function Hp(e,[t,n]){return Math.min(n,Math.max(t,e))}function _e(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ME(e,t){const n=g.createContext(t);function r(i){const{children:l,...a}=i,f=g.useMemo(()=>a,Object.values(a));return b.jsx(n.Provider,{value:f,children:l})}function o(i){const l=g.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function tl(e,t=[]){let n=[];function r(i,l){const a=g.createContext(l),f=n.length;n=[...n,l];function u(m){const{scope:h,children:w,...C}=m,E=(h==null?void 0:h[e][f])||a,R=g.useMemo(()=>C,Object.values(C));return b.jsx(E.Provider,{value:R,children:w})}function p(m,h){const w=(h==null?void 0:h[e][f])||a,C=g.useContext(w);if(C)return C;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,p]}const o=()=>{const i=n.map(l=>g.createContext(l));return function(a){const f=(a==null?void 0:a[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:f}}),[a,f])}};return o.scopeName=e,[r,IE(o,...t)]}function IE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const l=r.reduce((a,{useScope:f,scopeName:u})=>{const m=f(i)[`__scope${u}`];return{...a,...m}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function LE(e){const t=e+"CollectionProvider",[n,r]=tl(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=w=>{const{scope:C,children:E}=w,R=Q.useRef(null),y=Q.useRef(new Map).current;return b.jsx(o,{scope:C,itemMap:y,collectionRef:R,children:E})};l.displayName=t;const a=e+"CollectionSlot",f=Q.forwardRef((w,C)=>{const{scope:E,children:R}=w,y=i(a,E),v=Ze(C,y.collectionRef);return b.jsx(Vr,{ref:v,children:R})});f.displayName=a;const u=e+"CollectionItemSlot",p="data-radix-collection-item",m=Q.forwardRef((w,C)=>{const{scope:E,children:R,...y}=w,v=Q.useRef(null),S=Ze(C,v),_=i(u,E);return Q.useEffect(()=>(_.itemMap.set(v,{ref:v,...y}),()=>void _.itemMap.delete(v))),b.jsx(Vr,{[p]:"",ref:S,children:R})});m.displayName=u;function h(w){const C=i(e+"CollectionConsumer",w);return Q.useCallback(()=>{const R=C.collectionRef.current;if(!R)return[];const y=Array.from(R.querySelectorAll(`[${p}]`));return Array.from(C.itemMap.values()).sort((_,P)=>y.indexOf(_.ref.current)-y.indexOf(P.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:l,Slot:f,ItemSlot:m},h,r]}var FE=g.createContext(void 0);function zE(e){const t=g.useContext(FE);return e||t||"ltr"}var $E=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Me=$E.reduce((e,t)=>{const n=g.forwardRef((r,o)=>{const{asChild:i,...l}=r,a=i?Vr:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(a,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function HE(e,t){e&&Xr.flushSync(()=>e.dispatchEvent(t))}function Bn(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function UE(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e);g.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var WE="DismissableLayer",uc="dismissableLayer.update",BE="dismissableLayer.pointerDownOutside",VE="dismissableLayer.focusOutside",Up,ng=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),aa=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:l,onDismiss:a,...f}=e,u=g.useContext(ng),[p,m]=g.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=g.useState({}),C=Ze(t,T=>m(T)),E=Array.from(u.layers),[R]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=E.indexOf(R),v=p?E.indexOf(p):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,_=v>=y,P=KE(T=>{const O=T.target,j=[...u.branches].some(I=>I.contains(O));!_||j||(o==null||o(T),l==null||l(T),T.defaultPrevented||a==null||a())},h),A=QE(T=>{const O=T.target;[...u.branches].some(I=>I.contains(O))||(i==null||i(T),l==null||l(T),T.defaultPrevented||a==null||a())},h);return UE(T=>{v===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},h),g.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Up=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),Wp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Up)}},[p,h,n,u]),g.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),Wp())},[p,u]),g.useEffect(()=>{const T=()=>w({});return document.addEventListener(uc,T),()=>document.removeEventListener(uc,T)},[]),b.jsx(Me.div,{...f,ref:C,style:{pointerEvents:S?_?"auto":"none":void 0,...e.style},onFocusCapture:_e(e.onFocusCapture,A.onFocusCapture),onBlurCapture:_e(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:_e(e.onPointerDownCapture,P.onPointerDownCapture)})});aa.displayName=WE;var qE="DismissableLayerBranch",GE=g.forwardRef((e,t)=>{const n=g.useContext(ng),r=g.useRef(null),o=Ze(t,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),b.jsx(Me.div,{...e,ref:o})});GE.displayName=qE;function KE(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let f=function(){rg(BE,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function QE(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),r=g.useRef(!1);return g.useEffect(()=>{const o=i=>{i.target&&!r.current&&rg(VE,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Wp(){const e=new CustomEvent(uc);document.dispatchEvent(e)}function rg(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?HE(o,i):o.dispatchEvent(i)}var tu=0;function og(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Bp()),document.body.insertAdjacentElement("beforeend",e[1]??Bp()),tu++,()=>{tu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),tu--}},[])}function Bp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var nu="focusScope.autoFocusOnMount",ru="focusScope.autoFocusOnUnmount",Vp={bubbles:!1,cancelable:!0},YE="FocusScope",_f=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[a,f]=g.useState(null),u=Bn(o),p=Bn(i),m=g.useRef(null),h=Ze(t,E=>f(E)),w=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let E=function(S){if(w.paused||!a)return;const _=S.target;a.contains(_)?m.current=_:nr(m.current,{select:!0})},R=function(S){if(w.paused||!a)return;const _=S.relatedTarget;_!==null&&(a.contains(_)||nr(m.current,{select:!0}))},y=function(S){if(document.activeElement===document.body)for(const P of S)P.removedNodes.length>0&&nr(a)};document.addEventListener("focusin",E),document.addEventListener("focusout",R);const v=new MutationObserver(y);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",R),v.disconnect()}}},[r,a,w.paused]),g.useEffect(()=>{if(a){Gp.add(w);const E=document.activeElement;if(!a.contains(E)){const y=new CustomEvent(nu,Vp);a.addEventListener(nu,u),a.dispatchEvent(y),y.defaultPrevented||(XE(nb(ig(a)),{select:!0}),document.activeElement===E&&nr(a))}return()=>{a.removeEventListener(nu,u),setTimeout(()=>{const y=new CustomEvent(ru,Vp);a.addEventListener(ru,p),a.dispatchEvent(y),y.defaultPrevented||nr(E??document.body,{select:!0}),a.removeEventListener(ru,p),Gp.remove(w)},0)}}},[a,u,p,w]);const C=g.useCallback(E=>{if(!n&&!r||w.paused)return;const R=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,y=document.activeElement;if(R&&y){const v=E.currentTarget,[S,_]=ZE(v);S&&_?!E.shiftKey&&y===_?(E.preventDefault(),n&&nr(S,{select:!0})):E.shiftKey&&y===S&&(E.preventDefault(),n&&nr(_,{select:!0})):y===v&&E.preventDefault()}},[n,r,w.paused]);return b.jsx(Me.div,{tabIndex:-1,...l,ref:h,onKeyDown:C})});_f.displayName=YE;function XE(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(nr(r,{select:t}),document.activeElement!==n)return}function ZE(e){const t=ig(e),n=qp(t,e),r=qp(t.reverse(),e);return[n,r]}function ig(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qp(e,t){for(const n of e)if(!JE(n,{upTo:t}))return n}function JE(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function eb(e){return e instanceof HTMLInputElement&&"select"in e}function nr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&eb(e)&&t&&e.select()}}var Gp=tb();function tb(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Kp(e,t),e.unshift(t)},remove(t){var n;e=Kp(e,t),(n=e[0])==null||n.resume()}}}function Kp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function nb(e){return e.filter(t=>t.tagName!=="A")}var kt=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},rb=Dw.useId||(()=>{}),ob=0;function Ro(e){const[t,n]=g.useState(rb());return kt(()=>{n(r=>r??String(ob++))},[e]),t?`radix-${t}`:""}const ib=["top","right","bottom","left"],Rn=Math.min,Ut=Math.max,Ds=Math.round,Ll=Math.floor,wr=e=>({x:e,y:e}),lb={left:"right",right:"left",bottom:"top",top:"bottom"},sb={start:"end",end:"start"};function cc(e,t,n){return Ut(e,Rn(t,n))}function Vn(e,t){return typeof e=="function"?e(t):e}function qn(e){return e.split("-")[0]}function Wo(e){return e.split("-")[1]}function kf(e){return e==="x"?"y":"x"}function Rf(e){return e==="y"?"height":"width"}function Bo(e){return["top","bottom"].includes(qn(e))?"y":"x"}function Pf(e){return kf(Bo(e))}function ab(e,t,n){n===void 0&&(n=!1);const r=Wo(e),o=Pf(e),i=Rf(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=js(l)),[l,js(l)]}function ub(e){const t=js(e);return[fc(e),t,fc(t)]}function fc(e){return e.replace(/start|end/g,t=>sb[t])}function cb(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}function fb(e,t,n,r){const o=Wo(e);let i=cb(qn(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(fc)))),i}function js(e){return e.replace(/left|right|bottom|top/g,t=>lb[t])}function db(e){return{top:0,right:0,bottom:0,left:0,...e}}function lg(e){return typeof e!="number"?db(e):{top:e,right:e,bottom:e,left:e}}function Ms(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Qp(e,t,n){let{reference:r,floating:o}=e;const i=Bo(t),l=Pf(t),a=Rf(l),f=qn(t),u=i==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let w;switch(f){case"top":w={x:p,y:r.y-o.height};break;case"bottom":w={x:p,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y:m};break;case"left":w={x:r.x-o.width,y:m};break;default:w={x:r.x,y:r.y}}switch(Wo(t)){case"start":w[l]-=h*(n&&u?-1:1);break;case"end":w[l]+=h*(n&&u?-1:1);break}return w}const pb=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=Qp(u,r,f),h=r,w={},C=0;for(let E=0;E({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:a,middlewareData:f}=t,{element:u,padding:p=0}=Vn(e,t)||{};if(u==null)return{};const m=lg(p),h={x:n,y:r},w=Pf(o),C=Rf(w),E=await l.getDimensions(u),R=w==="y",y=R?"top":"left",v=R?"bottom":"right",S=R?"clientHeight":"clientWidth",_=i.reference[C]+i.reference[w]-h[w]-i.floating[C],P=h[w]-i.reference[w],A=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let T=A?A[S]:0;(!T||!await(l.isElement==null?void 0:l.isElement(A)))&&(T=a.floating[S]||i.floating[C]);const O=_/2-P/2,j=T/2-E[C]/2-1,I=Rn(m[y],j),V=Rn(m[v],j),H=I,F=T-E[C]-V,W=T/2-E[C]/2+O,Z=cc(H,W,F),le=!f.arrow&&Wo(o)!=null&&W!==Z&&i.reference[C]/2-(WH<=0)){var j,I;const H=(((j=i.flip)==null?void 0:j.index)||0)+1,F=P[H];if(F)return{data:{index:H,overflows:O},reset:{placement:F}};let W=(I=O.filter(Z=>Z.overflows[0]<=0).sort((Z,le)=>Z.overflows[1]-le.overflows[1])[0])==null?void 0:I.placement;if(!W)switch(w){case"bestFit":{var V;const Z=(V=O.map(le=>[le.placement,le.overflows.filter(ne=>ne>0).reduce((ne,z)=>ne+z,0)]).sort((le,ne)=>le[1]-ne[1])[0])==null?void 0:V[0];Z&&(W=Z);break}case"initialPlacement":W=a;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function Yp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Xp(e){return ib.some(t=>e[t]>=0)}const vb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Vn(e,t);switch(r){case"referenceHidden":{const i=await qi(t,{...o,elementContext:"reference"}),l=Yp(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Xp(l)}}}case"escaped":{const i=await qi(t,{...o,altBoundary:!0}),l=Yp(i,n.floating);return{data:{escapedOffsets:l,escaped:Xp(l)}}}default:return{}}}}};async function gb(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=qn(n),a=Wo(n),f=Bo(n)==="y",u=["left","top"].includes(l)?-1:1,p=i&&f?-1:1,m=Vn(t,e);let{mainAxis:h,crossAxis:w,alignmentAxis:C}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return a&&typeof C=="number"&&(w=a==="end"?C*-1:C),f?{x:w*p,y:h*u}:{x:h*u,y:w*p}}const yb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:a}=t,f=await gb(t,e);return l===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+f.x,y:i+f.y,data:{...f,placement:l}}}}},wb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:R=>{let{x:y,y:v}=R;return{x:y,y:v}}},...f}=Vn(e,t),u={x:n,y:r},p=await qi(t,f),m=Bo(qn(o)),h=kf(m);let w=u[h],C=u[m];if(i){const R=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=w+p[R],S=w-p[y];w=cc(v,w,S)}if(l){const R=m==="y"?"top":"left",y=m==="y"?"bottom":"right",v=C+p[R],S=C-p[y];C=cc(v,C,S)}const E=a.fn({...t,[h]:w,[m]:C});return{...E,data:{x:E.x-n,y:E.y-r}}}}},xb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:a=0,mainAxis:f=!0,crossAxis:u=!0}=Vn(e,t),p={x:n,y:r},m=Bo(o),h=kf(m);let w=p[h],C=p[m];const E=Vn(a,t),R=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(f){const S=h==="y"?"height":"width",_=i.reference[h]-i.floating[S]+R.mainAxis,P=i.reference[h]+i.reference[S]-R.mainAxis;w<_?w=_:w>P&&(w=P)}if(u){var y,v;const S=h==="y"?"width":"height",_=["top","left"].includes(qn(o)),P=i.reference[m]-i.floating[S]+(_&&((y=l.offset)==null?void 0:y[m])||0)+(_?0:R.crossAxis),A=i.reference[m]+i.reference[S]+(_?0:((v=l.offset)==null?void 0:v[m])||0)-(_?R.crossAxis:0);CA&&(C=A)}return{[h]:w,[m]:C}}}},Sb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:l=()=>{},...a}=Vn(e,t),f=await qi(t,a),u=qn(n),p=Wo(n),m=Bo(n)==="y",{width:h,height:w}=r.floating;let C,E;u==="top"||u==="bottom"?(C=u,E=p===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(E=u,C=p==="end"?"top":"bottom");const R=w-f.top-f.bottom,y=h-f.left-f.right,v=Rn(w-f[C],R),S=Rn(h-f[E],y),_=!t.middlewareData.shift;let P=v,A=S;if(m?A=p||_?Rn(S,y):y:P=p||_?Rn(v,R):R,_&&!p){const O=Ut(f.left,0),j=Ut(f.right,0),I=Ut(f.top,0),V=Ut(f.bottom,0);m?A=h-2*(O!==0||j!==0?O+j:Ut(f.left,f.right)):P=w-2*(I!==0||V!==0?I+V:Ut(f.top,f.bottom))}await l({...t,availableWidth:A,availableHeight:P});const T=await o.getDimensions(i.floating);return h!==T.width||w!==T.height?{reset:{rects:!0}}:{}}}};function Vo(e){return sg(e)?(e.nodeName||"").toLowerCase():"#document"}function Vt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kn(e){var t;return(t=(sg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sg(e){return e instanceof Node||e instanceof Vt(e).Node}function Nn(e){return e instanceof Element||e instanceof Vt(e).Element}function On(e){return e instanceof HTMLElement||e instanceof Vt(e).HTMLElement}function Zp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vt(e).ShadowRoot}function nl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Eb(e){return["table","td","th"].includes(Vo(e))}function Tf(e){const t=Nf(),n=hn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function bb(e){let t=xr(e);for(;On(t)&&!Fo(t);){if(Tf(t))return t;t=xr(t)}return null}function Nf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Fo(e){return["html","body","#document"].includes(Vo(e))}function hn(e){return Vt(e).getComputedStyle(e)}function ua(e){return Nn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function xr(e){if(Vo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zp(e)&&e.host||Kn(e);return Zp(t)?t.host:t}function ag(e){const t=xr(e);return Fo(t)?e.ownerDocument?e.ownerDocument.body:e.body:On(t)&&nl(t)?t:ag(t)}function Gi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ag(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=Vt(o);return i?t.concat(l,l.visualViewport||[],nl(o)?o:[],l.frameElement&&n?Gi(l.frameElement):[]):t.concat(o,Gi(o,[],n))}function ug(e){const t=hn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=On(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=Ds(n)!==i||Ds(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function Of(e){return Nn(e)?e:e.contextElement}function Po(e){const t=Of(e);if(!On(t))return wr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ug(t);let l=(i?Ds(n.width):n.width)/r,a=(i?Ds(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const Cb=wr(0);function cg(e){const t=Vt(e);return!Nf()||!t.visualViewport?Cb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _b(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vt(e)?!1:t}function qr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Of(e);let l=wr(1);t&&(r?Nn(r)&&(l=Po(r)):l=Po(e));const a=_b(i,n,r)?cg(i):wr(0);let f=(o.left+a.x)/l.x,u=(o.top+a.y)/l.y,p=o.width/l.x,m=o.height/l.y;if(i){const h=Vt(i),w=r&&Nn(r)?Vt(r):r;let C=h,E=C.frameElement;for(;E&&r&&w!==C;){const R=Po(E),y=E.getBoundingClientRect(),v=hn(E),S=y.left+(E.clientLeft+parseFloat(v.paddingLeft))*R.x,_=y.top+(E.clientTop+parseFloat(v.paddingTop))*R.y;f*=R.x,u*=R.y,p*=R.x,m*=R.y,f+=S,u+=_,C=Vt(E),E=C.frameElement}}return Ms({width:p,height:m,x:f,y:u})}const kb=[":popover-open",":modal"];function Af(e){return kb.some(t=>{try{return e.matches(t)}catch{return!1}})}function Rb(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",l=Kn(r),a=t?Af(t.floating):!1;if(r===l||a&&i)return n;let f={scrollLeft:0,scrollTop:0},u=wr(1);const p=wr(0),m=On(r);if((m||!m&&!i)&&((Vo(r)!=="body"||nl(l))&&(f=ua(r)),On(r))){const h=qr(r);u=Po(r),p.x=h.x+r.clientLeft,p.y=h.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-f.scrollLeft*u.x+p.x,y:n.y*u.y-f.scrollTop*u.y+p.y}}function Pb(e){return Array.from(e.getClientRects())}function fg(e){return qr(Kn(e)).left+ua(e).scrollLeft}function Tb(e){const t=Kn(e),n=ua(e),r=e.ownerDocument.body,o=Ut(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ut(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+fg(e);const a=-n.scrollTop;return hn(r).direction==="rtl"&&(l+=Ut(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}function Nb(e,t){const n=Vt(e),r=Kn(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,f=0;if(o){i=o.width,l=o.height;const u=Nf();(!u||u&&t==="fixed")&&(a=o.offsetLeft,f=o.offsetTop)}return{width:i,height:l,x:a,y:f}}function Ob(e,t){const n=qr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=On(e)?Po(e):wr(1),l=e.clientWidth*i.x,a=e.clientHeight*i.y,f=o*i.x,u=r*i.y;return{width:l,height:a,x:f,y:u}}function Jp(e,t,n){let r;if(t==="viewport")r=Nb(e,n);else if(t==="document")r=Tb(Kn(e));else if(Nn(t))r=Ob(t,n);else{const o=cg(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ms(r)}function dg(e,t){const n=xr(e);return n===t||!Nn(n)||Fo(n)?!1:hn(n).position==="fixed"||dg(n,t)}function Ab(e,t){const n=t.get(e);if(n)return n;let r=Gi(e,[],!1).filter(a=>Nn(a)&&Vo(a)!=="body"),o=null;const i=hn(e).position==="fixed";let l=i?xr(e):e;for(;Nn(l)&&!Fo(l);){const a=hn(l),f=Tf(l);!f&&a.position==="fixed"&&(o=null),(i?!f&&!o:!f&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||nl(l)&&!f&&dg(e,l))?r=r.filter(p=>p!==l):o=a,l=xr(l)}return t.set(e,r),r}function Db(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?Af(t)?[]:Ab(t,this._c):[].concat(n),r],a=l[0],f=l.reduce((u,p)=>{const m=Jp(t,p,o);return u.top=Ut(m.top,u.top),u.right=Rn(m.right,u.right),u.bottom=Rn(m.bottom,u.bottom),u.left=Ut(m.left,u.left),u},Jp(t,a,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function jb(e){const{width:t,height:n}=ug(e);return{width:t,height:n}}function Mb(e,t,n){const r=On(t),o=Kn(t),i=n==="fixed",l=qr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const f=wr(0);if(r||!r&&!i)if((Vo(t)!=="body"||nl(o))&&(a=ua(t)),r){const m=qr(t,!0,i,t);f.x=m.x+t.clientLeft,f.y=m.y+t.clientTop}else o&&(f.x=fg(o));const u=l.left+a.scrollLeft-f.x,p=l.top+a.scrollTop-f.y;return{x:u,y:p,width:l.width,height:l.height}}function ou(e){return hn(e).position==="static"}function em(e,t){return!On(e)||hn(e).position==="fixed"?null:t?t(e):e.offsetParent}function pg(e,t){const n=Vt(e);if(Af(e))return n;if(!On(e)){let o=xr(e);for(;o&&!Fo(o);){if(Nn(o)&&!ou(o))return o;o=xr(o)}return n}let r=em(e,t);for(;r&&Eb(r)&&ou(r);)r=em(r,t);return r&&Fo(r)&&ou(r)&&!Tf(r)?n:r||bb(e)||n}const Ib=async function(e){const t=this.getOffsetParent||pg,n=this.getDimensions,r=await n(e.floating);return{reference:Mb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Lb(e){return hn(e).direction==="rtl"}const Fb={convertOffsetParentRelativeRectToViewportRelativeRect:Rb,getDocumentElement:Kn,getClippingRect:Db,getOffsetParent:pg,getElementRects:Ib,getClientRects:Pb,getDimensions:jb,getScale:Po,isElement:Nn,isRTL:Lb};function zb(e,t){let n=null,r;const o=Kn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function l(a,f){a===void 0&&(a=!1),f===void 0&&(f=1),i();const{left:u,top:p,width:m,height:h}=e.getBoundingClientRect();if(a||t(),!m||!h)return;const w=Ll(p),C=Ll(o.clientWidth-(u+m)),E=Ll(o.clientHeight-(p+h)),R=Ll(u),v={rootMargin:-w+"px "+-C+"px "+-E+"px "+-R+"px",threshold:Ut(0,Rn(1,f))||1};let S=!0;function _(P){const A=P[0].intersectionRatio;if(A!==f){if(!S)return l();A?l(!1,A):r=setTimeout(()=>{l(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(_,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return l(!0),i}function $b(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,u=Of(e),p=o||i?[...u?Gi(u):[],...Gi(t)]:[];p.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const m=u&&a?zb(u,n):null;let h=-1,w=null;l&&(w=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&w&&(w.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=w)==null||S.observe(t)})),n()}),u&&!f&&w.observe(u),w.observe(t));let C,E=f?qr(e):null;f&&R();function R(){const y=qr(e);E&&(y.x!==E.x||y.y!==E.y||y.width!==E.width||y.height!==E.height)&&n(),E=y,C=requestAnimationFrame(R)}return n(),()=>{var y;p.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),m==null||m(),(y=w)==null||y.disconnect(),w=null,f&&cancelAnimationFrame(C)}}const Hb=yb,Ub=wb,Wb=hb,Bb=Sb,Vb=vb,tm=mb,qb=xb,Gb=(e,t,n)=>{const r=new Map,o={platform:Fb,...n},i={...o.platform,_c:r};return pb(e,t,{...o,platform:i})};var is=typeof document<"u"?g.useLayoutEffect:g.useEffect;function Is(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Is(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Is(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function mg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nm(e,t){const n=mg(e);return Math.round(t*n)/n}function rm(e){const t=g.useRef(e);return is(()=>{t.current=e}),t}function Kb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:a=!0,whileElementsMounted:f,open:u}=e,[p,m]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,w]=g.useState(r);Is(h,r)||w(r);const[C,E]=g.useState(null),[R,y]=g.useState(null),v=g.useCallback(ne=>{ne!==A.current&&(A.current=ne,E(ne))},[]),S=g.useCallback(ne=>{ne!==T.current&&(T.current=ne,y(ne))},[]),_=i||C,P=l||R,A=g.useRef(null),T=g.useRef(null),O=g.useRef(p),j=f!=null,I=rm(f),V=rm(o),H=g.useCallback(()=>{if(!A.current||!T.current)return;const ne={placement:t,strategy:n,middleware:h};V.current&&(ne.platform=V.current),Gb(A.current,T.current,ne).then(z=>{const B={...z,isPositioned:!0};F.current&&!Is(O.current,B)&&(O.current=B,Xr.flushSync(()=>{m(B)}))})},[h,t,n,V]);is(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,m(ne=>({...ne,isPositioned:!1})))},[u]);const F=g.useRef(!1);is(()=>(F.current=!0,()=>{F.current=!1}),[]),is(()=>{if(_&&(A.current=_),P&&(T.current=P),_&&P){if(I.current)return I.current(_,P,H);H()}},[_,P,H,I,j]);const W=g.useMemo(()=>({reference:A,floating:T,setReference:v,setFloating:S}),[v,S]),Z=g.useMemo(()=>({reference:_,floating:P}),[_,P]),le=g.useMemo(()=>{const ne={position:n,left:0,top:0};if(!Z.floating)return ne;const z=nm(Z.floating,p.x),B=nm(Z.floating,p.y);return a?{...ne,transform:"translate("+z+"px, "+B+"px)",...mg(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:B}},[n,a,Z.floating,p.x,p.y]);return g.useMemo(()=>({...p,update:H,refs:W,elements:Z,floatingStyles:le}),[p,H,W,Z,le])}const Qb=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?tm({element:r.current,padding:o}).fn(n):{}:r?tm({element:r,padding:o}).fn(n):{}}}},Yb=(e,t)=>({...Hb(e),options:[e,t]}),Xb=(e,t)=>({...Ub(e),options:[e,t]}),Zb=(e,t)=>({...qb(e),options:[e,t]}),Jb=(e,t)=>({...Wb(e),options:[e,t]}),e2=(e,t)=>({...Bb(e),options:[e,t]}),t2=(e,t)=>({...Vb(e),options:[e,t]}),n2=(e,t)=>({...Qb(e),options:[e,t]});var r2="Arrow",hg=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return b.jsx(Me.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});hg.displayName=r2;var o2=hg;function i2(e){const[t,n]=g.useState(void 0);return kt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let l,a;if("borderBoxSize"in i){const f=i.borderBoxSize,u=Array.isArray(f)?f[0]:f;l=u.inlineSize,a=u.blockSize}else l=e.offsetWidth,a=e.offsetHeight;n({width:l,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Df="Popper",[vg,ca]=tl(Df),[l2,gg]=vg(Df),yg=e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null);return b.jsx(l2,{scope:t,anchor:r,onAnchorChange:o,children:n})};yg.displayName=Df;var wg="PopperAnchor",xg=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=gg(wg,n),l=g.useRef(null),a=Ze(t,l);return g.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:b.jsx(Me.div,{...o,ref:a})});xg.displayName=wg;var jf="PopperContent",[s2,a2]=vg(jf),Sg=g.forwardRef((e,t)=>{var J,ye,Ie,K,ge,de;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:f=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:w="optimized",onPlaced:C,...E}=e,R=gg(jf,n),[y,v]=g.useState(null),S=Ze(t,Y=>v(Y)),[_,P]=g.useState(null),A=i2(_),T=(A==null?void 0:A.width)??0,O=(A==null?void 0:A.height)??0,j=r+(i!=="center"?"-"+i:""),I=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},V=Array.isArray(u)?u:[u],H=V.length>0,F={padding:I,boundary:V.filter(c2),altBoundary:H},{refs:W,floatingStyles:Z,placement:le,isPositioned:ne,middlewareData:z}=Kb({strategy:"fixed",placement:j,whileElementsMounted:(...Y)=>$b(...Y,{animationFrame:w==="always"}),elements:{reference:R.anchor},middleware:[Yb({mainAxis:o+O,alignmentAxis:l}),f&&Xb({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Zb():void 0,...F}),f&&Jb({...F}),e2({...F,apply:({elements:Y,rects:me,availableWidth:ut,availableHeight:Je})=>{const{width:tt,height:Tt}=me.reference,Ce=Y.floating.style;Ce.setProperty("--radix-popper-available-width",`${ut}px`),Ce.setProperty("--radix-popper-available-height",`${Je}px`),Ce.setProperty("--radix-popper-anchor-width",`${tt}px`),Ce.setProperty("--radix-popper-anchor-height",`${Tt}px`)}}),_&&n2({element:_,padding:a}),f2({arrowWidth:T,arrowHeight:O}),h&&t2({strategy:"referenceHidden",...F})]}),[B,ee]=Cg(le),se=Bn(C);kt(()=>{ne&&(se==null||se())},[ne,se]);const ue=(J=z.arrow)==null?void 0:J.x,Ve=(ye=z.arrow)==null?void 0:ye.y,ve=((Ie=z.arrow)==null?void 0:Ie.centerOffset)!==0,[Ye,be]=g.useState();return kt(()=>{y&&be(window.getComputedStyle(y).zIndex)},[y]),b.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:ne?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ye,"--radix-popper-transform-origin":[(K=z.transformOrigin)==null?void 0:K.x,(ge=z.transformOrigin)==null?void 0:ge.y].join(" "),...((de=z.hide)==null?void 0:de.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(s2,{scope:n,placedSide:B,onArrowChange:P,arrowX:ue,arrowY:Ve,shouldHideArrow:ve,children:b.jsx(Me.div,{"data-side":B,"data-align":ee,...E,ref:S,style:{...E.style,animation:ne?void 0:"none"}})})})});Sg.displayName=jf;var Eg="PopperArrow",u2={top:"bottom",right:"left",bottom:"top",left:"right"},bg=g.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=a2(Eg,r),l=u2[i.placedSide];return b.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:b.jsx(o2,{...o,ref:n,style:{...o.style,display:"block"}})})});bg.displayName=Eg;function c2(e){return e!==null}var f2=e=>({name:"transformOrigin",options:e,fn(t){var R,y,v;const{placement:n,rects:r,middlewareData:o}=t,l=((R=o.arrow)==null?void 0:R.centerOffset)!==0,a=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[u,p]=Cg(n),m={start:"0%",center:"50%",end:"100%"}[p],h=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,w=(((v=o.arrow)==null?void 0:v.y)??0)+f/2;let C="",E="";return u==="bottom"?(C=l?m:`${h}px`,E=`${-f}px`):u==="top"?(C=l?m:`${h}px`,E=`${r.floating.height+f}px`):u==="right"?(C=`${-f}px`,E=l?m:`${w}px`):u==="left"&&(C=`${r.floating.width+f}px`,E=l?m:`${w}px`),{data:{x:C,y:E}}}});function Cg(e){const[t,n="center"]=e.split("-");return[t,n]}var _g=yg,kg=xg,Rg=Sg,Pg=bg,d2="Portal",Mf=g.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=g.useState(!1);kt(()=>i(!0),[]);const l=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return l?Bx.createPortal(b.jsx(Me.div,{...r,ref:t}),l):null});Mf.displayName=d2;function Ls({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=p2({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,a=Bn(n),f=g.useCallback(u=>{if(i){const m=typeof u=="function"?u(e):u;m!==e&&a(m)}else o(u)},[i,e,o,a]);return[l,f]}function p2({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,o=g.useRef(r),i=Bn(t);return g.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function m2(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var h2="VisuallyHidden",Tg=g.forwardRef((e,t)=>b.jsx(Me.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Tg.displayName=h2;var v2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},io=new WeakMap,Fl=new WeakMap,zl={},iu=0,Ng=function(e){return e&&(e.host||Ng(e.parentNode))},g2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ng(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},y2=function(e,t,n,r){var o=g2(t,Array.isArray(e)?e:[e]);zl[n]||(zl[n]=new WeakMap);var i=zl[n],l=[],a=new Set,f=new Set(o),u=function(m){!m||a.has(m)||(a.add(m),u(m.parentNode))};o.forEach(u);var p=function(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,function(h){if(a.has(h))p(h);else try{var w=h.getAttribute(r),C=w!==null&&w!=="false",E=(io.get(h)||0)+1,R=(i.get(h)||0)+1;io.set(h,E),i.set(h,R),l.push(h),E===1&&C&&Fl.set(h,!0),R===1&&h.setAttribute(n,"true"),C||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return p(t),a.clear(),iu++,function(){l.forEach(function(m){var h=io.get(m)-1,w=i.get(m)-1;io.set(m,h),i.set(m,w),h||(Fl.has(m)||m.removeAttribute(r),Fl.delete(m)),w||m.removeAttribute(n)}),iu--,iu||(io=new WeakMap,io=new WeakMap,Fl=new WeakMap,zl={})}},Og=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=v2(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),y2(r,o,n,"aria-hidden")):function(){return null}},kn=function(){return kn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){l={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return i}function dc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r"u")return j2;var t=M2(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},L2=Mg(),To="data-scroll-locked",F2=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,a=e.gap;return n===void 0&&(n="margin"),` - .`.concat(w2,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(a,"px ").concat(r,`; - } - body[`).concat(To,`] { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(o,`px; - padding-top: `).concat(i,`px; - padding-right: `).concat(l,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(a,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(ls,` { - right: `).concat(a,"px ").concat(r,`; - } - - .`).concat(ss,` { - margin-right: `).concat(a,"px ").concat(r,`; - } - - .`).concat(ls," .").concat(ls,` { - right: 0 `).concat(r,`; - } - - .`).concat(ss," .").concat(ss,` { - margin-right: 0 `).concat(r,`; - } - - body[`).concat(To,`] { - `).concat(x2,": ").concat(a,`px; - } -`)},lm=function(){var e=parseInt(document.body.getAttribute(To)||"0",10);return isFinite(e)?e:0},z2=function(){g.useEffect(function(){return document.body.setAttribute(To,(lm()+1).toString()),function(){var e=lm()-1;e<=0?document.body.removeAttribute(To):document.body.setAttribute(To,e.toString())}},[])},$2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;z2();var i=g.useMemo(function(){return I2(o)},[o]);return g.createElement(L2,{styles:F2(i,!t,o,n?"":"!important")})},pc=!1;if(typeof window<"u")try{var $l=Object.defineProperty({},"passive",{get:function(){return pc=!0,!0}});window.addEventListener("test",$l,$l),window.removeEventListener("test",$l,$l)}catch{pc=!1}var lo=pc?{passive:!1}:!1,H2=function(e){return e.tagName==="TEXTAREA"},Ig=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!H2(e)&&n[t]==="visible")},U2=function(e){return Ig(e,"overflowY")},W2=function(e){return Ig(e,"overflowX")},sm=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Lg(e,r);if(o){var i=Fg(e,r),l=i[1],a=i[2];if(l>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},B2=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},V2=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Lg=function(e,t){return e==="v"?U2(t):W2(t)},Fg=function(e,t){return e==="v"?B2(t):V2(t)},q2=function(e,t){return e==="h"&&t==="rtl"?-1:1},G2=function(e,t,n,r,o){var i=q2(e,window.getComputedStyle(t).direction),l=i*r,a=n.target,f=t.contains(a),u=!1,p=l>0,m=0,h=0;do{var w=Fg(e,a),C=w[0],E=w[1],R=w[2],y=E-R-i*C;(C||y)&&Lg(e,a)&&(m+=y,h+=C),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!f&&a!==document.body||f&&(t.contains(a)||t===a));return(p&&(Math.abs(m)<1||!o)||!p&&(Math.abs(h)<1||!o))&&(u=!0),u},Hl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},am=function(e){return[e.deltaX,e.deltaY]},um=function(e){return e&&"current"in e?e.current:e},K2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Q2=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},Y2=0,so=[];function X2(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(Y2++)[0],i=g.useState(Mg)[0],l=g.useRef(e);g.useEffect(function(){l.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var E=dc([e.lockRef.current],(e.shards||[]).map(um),!0).filter(Boolean);return E.forEach(function(R){return R.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),E.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=g.useCallback(function(E,R){if("touches"in E&&E.touches.length===2)return!l.current.allowPinchZoom;var y=Hl(E),v=n.current,S="deltaX"in E?E.deltaX:v[0]-y[0],_="deltaY"in E?E.deltaY:v[1]-y[1],P,A=E.target,T=Math.abs(S)>Math.abs(_)?"h":"v";if("touches"in E&&T==="h"&&A.type==="range")return!1;var O=sm(T,A);if(!O)return!0;if(O?P=T:(P=T==="v"?"h":"v",O=sm(T,A)),!O)return!1;if(!r.current&&"changedTouches"in E&&(S||_)&&(r.current=P),!P)return!0;var j=r.current||P;return G2(j,R,E,j==="h"?S:_,!0)},[]),f=g.useCallback(function(E){var R=E;if(!(!so.length||so[so.length-1]!==i)){var y="deltaY"in R?am(R):Hl(R),v=t.current.filter(function(P){return P.name===R.type&&(P.target===R.target||R.target===P.shadowParent)&&K2(P.delta,y)})[0];if(v&&v.should){R.cancelable&&R.preventDefault();return}if(!v){var S=(l.current.shards||[]).map(um).filter(Boolean).filter(function(P){return P.contains(R.target)}),_=S.length>0?a(R,S[0]):!l.current.noIsolation;_&&R.cancelable&&R.preventDefault()}}},[]),u=g.useCallback(function(E,R,y,v){var S={name:E,delta:R,target:y,should:v,shadowParent:Z2(y)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(_){return _!==S})},1)},[]),p=g.useCallback(function(E){n.current=Hl(E),r.current=void 0},[]),m=g.useCallback(function(E){u(E.type,am(E),E.target,a(E,e.lockRef.current))},[]),h=g.useCallback(function(E){u(E.type,Hl(E),E.target,a(E,e.lockRef.current))},[]);g.useEffect(function(){return so.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:h}),document.addEventListener("wheel",f,lo),document.addEventListener("touchmove",f,lo),document.addEventListener("touchstart",p,lo),function(){so=so.filter(function(E){return E!==i}),document.removeEventListener("wheel",f,lo),document.removeEventListener("touchmove",f,lo),document.removeEventListener("touchstart",p,lo)}},[]);var w=e.removeScrollBar,C=e.inert;return g.createElement(g.Fragment,null,C?g.createElement(i,{styles:Q2(o)}):null,w?g.createElement($2,{gapMode:e.gapMode}):null)}function Z2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const J2=R2(jg,X2);var If=g.forwardRef(function(e,t){return g.createElement(fa,kn({},e,{ref:t,sideCar:J2}))});If.classNames=fa.classNames;var eC=[" ","Enter","ArrowUp","ArrowDown"],tC=[" ","Enter"],rl="Select",[da,pa,nC]=LE(rl),[Ko,Wk]=tl(rl,[nC,ca]),ma=ca(),[rC,Cr]=Ko(rl),[oC,iC]=Ko(rl),zg=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:l,defaultValue:a,onValueChange:f,dir:u,name:p,autoComplete:m,disabled:h,required:w}=e,C=ma(t),[E,R]=g.useState(null),[y,v]=g.useState(null),[S,_]=g.useState(!1),P=zE(u),[A=!1,T]=Ls({prop:r,defaultProp:o,onChange:i}),[O,j]=Ls({prop:l,defaultProp:a,onChange:f}),I=g.useRef(null),V=E?!!E.closest("form"):!0,[H,F]=g.useState(new Set),W=Array.from(H).map(Z=>Z.props.value).join(";");return b.jsx(_g,{...C,children:b.jsxs(rC,{required:w,scope:t,trigger:E,onTriggerChange:R,valueNode:y,onValueNodeChange:v,valueNodeHasChildren:S,onValueNodeHasChildrenChange:_,contentId:Ro(),value:O,onValueChange:j,open:A,onOpenChange:T,dir:P,triggerPointerDownPosRef:I,disabled:h,children:[b.jsx(da.Provider,{scope:t,children:b.jsx(oC,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(Z=>{F(le=>new Set(le).add(Z))},[]),onNativeOptionRemove:g.useCallback(Z=>{F(le=>{const ne=new Set(le);return ne.delete(Z),ne})},[]),children:n})}),V?b.jsxs(fy,{"aria-hidden":!0,required:w,tabIndex:-1,name:p,autoComplete:m,value:O,onChange:Z=>j(Z.target.value),disabled:h,children:[O===void 0?b.jsx("option",{value:""}):null,Array.from(H)]},W):null]})})};zg.displayName=rl;var $g="SelectTrigger",Hg=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=ma(n),l=Cr($g,n),a=l.disabled||r,f=Ze(t,l.onTriggerChange),u=pa(n),[p,m,h]=dy(C=>{const E=u().filter(v=>!v.disabled),R=E.find(v=>v.value===l.value),y=py(E,C,R);y!==void 0&&l.onValueChange(y.value)}),w=()=>{a||(l.onOpenChange(!0),h())};return b.jsx(kg,{asChild:!0,...i,children:b.jsx(Me.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":cy(l.value)?"":void 0,...o,ref:f,onClick:_e(o.onClick,C=>{C.currentTarget.focus()}),onPointerDown:_e(o.onPointerDown,C=>{const E=C.target;E.hasPointerCapture(C.pointerId)&&E.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&(w(),l.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)},C.preventDefault())}),onKeyDown:_e(o.onKeyDown,C=>{const E=p.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&m(C.key),!(E&&C.key===" ")&&eC.includes(C.key)&&(w(),C.preventDefault())})})})});Hg.displayName=$g;var Ug="SelectValue",Wg=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:l="",...a}=e,f=Cr(Ug,n),{onValueNodeHasChildrenChange:u}=f,p=i!==void 0,m=Ze(t,f.onValueNodeChange);return kt(()=>{u(p)},[u,p]),b.jsx(Me.span,{...a,ref:m,style:{pointerEvents:"none"},children:cy(f.value)?b.jsx(b.Fragment,{children:l}):i})});Wg.displayName=Ug;var lC="SelectIcon",Bg=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return b.jsx(Me.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Bg.displayName=lC;var sC="SelectPortal",Vg=e=>b.jsx(Mf,{asChild:!0,...e});Vg.displayName=sC;var Gr="SelectContent",qg=g.forwardRef((e,t)=>{const n=Cr(Gr,e.__scopeSelect),[r,o]=g.useState();if(kt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Xr.createPortal(b.jsx(Gg,{scope:e.__scopeSelect,children:b.jsx(da.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),i):null}return b.jsx(Kg,{...e,ref:t})});qg.displayName=Gr;var Mn=10,[Gg,_r]=Ko(Gr),aC="SelectContentImpl",Kg=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:l,side:a,sideOffset:f,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:w,sticky:C,hideWhenDetached:E,avoidCollisions:R,...y}=e,v=Cr(Gr,n),[S,_]=g.useState(null),[P,A]=g.useState(null),T=Ze(t,J=>_(J)),[O,j]=g.useState(null),[I,V]=g.useState(null),H=pa(n),[F,W]=g.useState(!1),Z=g.useRef(!1);g.useEffect(()=>{if(S)return Og(S)},[S]),og();const le=g.useCallback(J=>{const[ye,...Ie]=H().map(de=>de.ref.current),[K]=Ie.slice(-1),ge=document.activeElement;for(const de of J)if(de===ge||(de==null||de.scrollIntoView({block:"nearest"}),de===ye&&P&&(P.scrollTop=0),de===K&&P&&(P.scrollTop=P.scrollHeight),de==null||de.focus(),document.activeElement!==ge))return},[H,P]),ne=g.useCallback(()=>le([O,S]),[le,O,S]);g.useEffect(()=>{F&&ne()},[F,ne]);const{onOpenChange:z,triggerPointerDownPosRef:B}=v;g.useEffect(()=>{if(S){let J={x:0,y:0};const ye=K=>{var ge,de;J={x:Math.abs(Math.round(K.pageX)-(((ge=B.current)==null?void 0:ge.x)??0)),y:Math.abs(Math.round(K.pageY)-(((de=B.current)==null?void 0:de.y)??0))}},Ie=K=>{J.x<=10&&J.y<=10?K.preventDefault():S.contains(K.target)||z(!1),document.removeEventListener("pointermove",ye),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",Ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",Ie,{capture:!0})}}},[S,z,B]),g.useEffect(()=>{const J=()=>z(!1);return window.addEventListener("blur",J),window.addEventListener("resize",J),()=>{window.removeEventListener("blur",J),window.removeEventListener("resize",J)}},[z]);const[ee,se]=dy(J=>{const ye=H().filter(ge=>!ge.disabled),Ie=ye.find(ge=>ge.ref.current===document.activeElement),K=py(ye,J,Ie);K&&setTimeout(()=>K.ref.current.focus())}),ue=g.useCallback((J,ye,Ie)=>{const K=!Z.current&&!Ie;(v.value!==void 0&&v.value===ye||K)&&(j(J),K&&(Z.current=!0))},[v.value]),Ve=g.useCallback(()=>S==null?void 0:S.focus(),[S]),ve=g.useCallback((J,ye,Ie)=>{const K=!Z.current&&!Ie;(v.value!==void 0&&v.value===ye||K)&&V(J)},[v.value]),Ye=r==="popper"?mc:Qg,be=Ye===mc?{side:a,sideOffset:f,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:w,sticky:C,hideWhenDetached:E,avoidCollisions:R}:{};return b.jsx(Gg,{scope:n,content:S,viewport:P,onViewportChange:A,itemRefCallback:ue,selectedItem:O,onItemLeave:Ve,itemTextRefCallback:ve,focusSelectedItem:ne,selectedItemText:I,position:r,isPositioned:F,searchRef:ee,children:b.jsx(If,{as:Vr,allowPinchZoom:!0,children:b.jsx(_f,{asChild:!0,trapped:v.open,onMountAutoFocus:J=>{J.preventDefault()},onUnmountAutoFocus:_e(o,J=>{var ye;(ye=v.trigger)==null||ye.focus({preventScroll:!0}),J.preventDefault()}),children:b.jsx(aa,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:J=>J.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:b.jsx(Ye,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:J=>J.preventDefault(),...y,...be,onPlaced:()=>W(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:_e(y.onKeyDown,J=>{const ye=J.ctrlKey||J.altKey||J.metaKey;if(J.key==="Tab"&&J.preventDefault(),!ye&&J.key.length===1&&se(J.key),["ArrowUp","ArrowDown","Home","End"].includes(J.key)){let K=H().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);if(["ArrowUp","End"].includes(J.key)&&(K=K.slice().reverse()),["ArrowUp","ArrowDown"].includes(J.key)){const ge=J.target,de=K.indexOf(ge);K=K.slice(de+1)}setTimeout(()=>le(K)),J.preventDefault()}})})})})})})});Kg.displayName=aC;var uC="SelectItemAlignedPosition",Qg=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Cr(Gr,n),l=_r(Gr,n),[a,f]=g.useState(null),[u,p]=g.useState(null),m=Ze(t,T=>p(T)),h=pa(n),w=g.useRef(!1),C=g.useRef(!0),{viewport:E,selectedItem:R,selectedItemText:y,focusSelectedItem:v}=l,S=g.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&E&&R&&y){const T=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),I=y.getBoundingClientRect();if(i.dir!=="rtl"){const ge=I.left-O.left,de=j.left-ge,Y=T.left-de,me=T.width+Y,ut=Math.max(me,O.width),Je=window.innerWidth-Mn,tt=Hp(de,[Mn,Je-ut]);a.style.minWidth=me+"px",a.style.left=tt+"px"}else{const ge=O.right-I.right,de=window.innerWidth-j.right-ge,Y=window.innerWidth-T.right-de,me=T.width+Y,ut=Math.max(me,O.width),Je=window.innerWidth-Mn,tt=Hp(de,[Mn,Je-ut]);a.style.minWidth=me+"px",a.style.right=tt+"px"}const V=h(),H=window.innerHeight-Mn*2,F=E.scrollHeight,W=window.getComputedStyle(u),Z=parseInt(W.borderTopWidth,10),le=parseInt(W.paddingTop,10),ne=parseInt(W.borderBottomWidth,10),z=parseInt(W.paddingBottom,10),B=Z+le+F+z+ne,ee=Math.min(R.offsetHeight*5,B),se=window.getComputedStyle(E),ue=parseInt(se.paddingTop,10),Ve=parseInt(se.paddingBottom,10),ve=T.top+T.height/2-Mn,Ye=H-ve,be=R.offsetHeight/2,J=R.offsetTop+be,ye=Z+le+J,Ie=B-ye;if(ye<=ve){const ge=R===V[V.length-1].ref.current;a.style.bottom="0px";const de=u.clientHeight-E.offsetTop-E.offsetHeight,Y=Math.max(Ye,be+(ge?Ve:0)+de+ne),me=ye+Y;a.style.height=me+"px"}else{const ge=R===V[0].ref.current;a.style.top="0px";const Y=Math.max(ve,Z+E.offsetTop+(ge?ue:0)+be)+Ie;a.style.height=Y+"px",E.scrollTop=ye-ve+E.offsetTop}a.style.margin=`${Mn}px 0`,a.style.minHeight=ee+"px",a.style.maxHeight=H+"px",r==null||r(),requestAnimationFrame(()=>w.current=!0)}},[h,i.trigger,i.valueNode,a,u,E,R,y,i.dir,r]);kt(()=>S(),[S]);const[_,P]=g.useState();kt(()=>{u&&P(window.getComputedStyle(u).zIndex)},[u]);const A=g.useCallback(T=>{T&&C.current===!0&&(S(),v==null||v(),C.current=!1)},[S,v]);return b.jsx(fC,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:w,onScrollButtonChange:A,children:b.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:b.jsx(Me.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Qg.displayName=uC;var cC="SelectPopperPosition",mc=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Mn,...i}=e,l=ma(n);return b.jsx(Rg,{...l,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});mc.displayName=cC;var[fC,Lf]=Ko(Gr,{}),hc="SelectViewport",Yg=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=_r(hc,n),l=Lf(hc,n),a=Ze(t,i.onViewportChange),f=g.useRef(0);return b.jsxs(b.Fragment,{children:[b.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:r}),b.jsx(da.Slot,{scope:n,children:b.jsx(Me.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:_e(o.onScroll,u=>{const p=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:h}=l;if(h!=null&&h.current&&m){const w=Math.abs(f.current-p.scrollTop);if(w>0){const C=window.innerHeight-Mn*2,E=parseFloat(m.style.minHeight),R=parseFloat(m.style.height),y=Math.max(E,R);if(y0?_:0,m.style.justifyContent="flex-end")}}}f.current=p.scrollTop})})})]})});Yg.displayName=hc;var Xg="SelectGroup",[dC,pC]=Ko(Xg),Zg=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ro();return b.jsx(dC,{scope:n,id:o,children:b.jsx(Me.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Zg.displayName=Xg;var Jg="SelectLabel",ey=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=pC(Jg,n);return b.jsx(Me.div,{id:o.id,...r,ref:t})});ey.displayName=Jg;var Fs="SelectItem",[mC,ty]=Ko(Fs),ny=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...l}=e,a=Cr(Fs,n),f=_r(Fs,n),u=a.value===r,[p,m]=g.useState(i??""),[h,w]=g.useState(!1),C=Ze(t,y=>{var v;return(v=f.itemRefCallback)==null?void 0:v.call(f,y,r,o)}),E=Ro(),R=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")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 b.jsx(mC,{scope:n,value:r,disabled:o,textId:E,isSelected:u,onItemTextChange:g.useCallback(y=>{m(v=>v||((y==null?void 0:y.textContent)??"").trim())},[]),children:b.jsx(da.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:b.jsx(Me.div,{role:"option","aria-labelledby":E,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:C,onFocus:_e(l.onFocus,()=>w(!0)),onBlur:_e(l.onBlur,()=>w(!1)),onPointerUp:_e(l.onPointerUp,R),onPointerMove:_e(l.onPointerMove,y=>{var v;o?(v=f.onItemLeave)==null||v.call(f):y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_e(l.onPointerLeave,y=>{var v;y.currentTarget===document.activeElement&&((v=f.onItemLeave)==null||v.call(f))}),onKeyDown:_e(l.onKeyDown,y=>{var S;((S=f.searchRef)==null?void 0:S.current)!==""&&y.key===" "||(tC.includes(y.key)&&R(),y.key===" "&&y.preventDefault())})})})})});ny.displayName=Fs;var wi="SelectItemText",ry=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,l=Cr(wi,n),a=_r(wi,n),f=ty(wi,n),u=iC(wi,n),[p,m]=g.useState(null),h=Ze(t,y=>m(y),f.onItemTextChange,y=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,y,f.value,f.disabled)}),w=p==null?void 0:p.textContent,C=g.useMemo(()=>b.jsx("option",{value:f.value,disabled:f.disabled,children:w},f.value),[f.disabled,f.value,w]),{onNativeOptionAdd:E,onNativeOptionRemove:R}=u;return kt(()=>(E(C),()=>R(C)),[E,R,C]),b.jsxs(b.Fragment,{children:[b.jsx(Me.span,{id:f.textId,...i,ref:h}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Xr.createPortal(i.children,l.valueNode):null]})});ry.displayName=wi;var oy="SelectItemIndicator",iy=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ty(oy,n).isSelected?b.jsx(Me.span,{"aria-hidden":!0,...r,ref:t}):null});iy.displayName=oy;var vc="SelectScrollUpButton",ly=g.forwardRef((e,t)=>{const n=_r(vc,e.__scopeSelect),r=Lf(vc,e.__scopeSelect),[o,i]=g.useState(!1),l=Ze(t,r.onScrollButtonChange);return kt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=f.scrollTop>0;i(u)};const f=n.viewport;return a(),f.addEventListener("scroll",a),()=>f.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?b.jsx(ay,{...e,ref:l,onAutoScroll:()=>{const{viewport:a,selectedItem:f}=n;a&&f&&(a.scrollTop=a.scrollTop-f.offsetHeight)}}):null});ly.displayName=vc;var gc="SelectScrollDownButton",sy=g.forwardRef((e,t)=>{const n=_r(gc,e.__scopeSelect),r=Lf(gc,e.__scopeSelect),[o,i]=g.useState(!1),l=Ze(t,r.onScrollButtonChange);return kt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=f.scrollHeight-f.clientHeight,p=Math.ceil(f.scrollTop)f.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?b.jsx(ay,{...e,ref:l,onAutoScroll:()=>{const{viewport:a,selectedItem:f}=n;a&&f&&(a.scrollTop=a.scrollTop+f.offsetHeight)}}):null});sy.displayName=gc;var ay=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=_r("SelectScrollButton",n),l=g.useRef(null),a=pa(n),f=g.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return g.useEffect(()=>()=>f(),[f]),kt(()=>{var p;const u=a().find(m=>m.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[a]),b.jsx(Me.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:_e(o.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:_e(o.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:_e(o.onPointerLeave,()=>{f()})})}),hC="SelectSeparator",uy=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b.jsx(Me.div,{"aria-hidden":!0,...r,ref:t})});uy.displayName=hC;var yc="SelectArrow",vC=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ma(n),i=Cr(yc,n),l=_r(yc,n);return i.open&&l.position==="popper"?b.jsx(Pg,{...o,...r,ref:t}):null});vC.displayName=yc;function cy(e){return e===""||e===void 0}var fy=g.forwardRef((e,t)=>{const{value:n,...r}=e,o=g.useRef(null),i=Ze(t,o),l=m2(n);return g.useEffect(()=>{const a=o.current,f=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==n&&p){const m=new Event("change",{bubbles:!0});p.call(a,n),a.dispatchEvent(m)}},[l,n]),b.jsx(Tg,{asChild:!0,children:b.jsx("select",{...r,ref:i,defaultValue:n})})});fy.displayName="BubbleSelect";function dy(e){const t=Bn(e),n=g.useRef(""),r=g.useRef(0),o=g.useCallback(l=>{const a=n.current+l;t(a),function f(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>f(""),1e3))}(a)},[t]),i=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function py(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=gC(e,Math.max(i,0));o.length===1&&(l=l.filter(u=>u!==n));const f=l.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function gC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var yC=zg,my=Hg,wC=Wg,xC=Bg,SC=Vg,hy=qg,EC=Yg,bC=Zg,vy=ey,gy=ny,CC=ry,_C=iy,yy=ly,wy=sy,xy=uy;const kC=yC,RC=bC,PC=wC,Sy=g.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(my,{ref:r,className:je("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,b.jsx(xC,{asChild:!0,children:b.jsx(tg,{className:"h-4 w-4 opacity-50"})})]}));Sy.displayName=my.displayName;const Ey=g.forwardRef(({className:e,...t},n)=>b.jsx(yy,{ref:n,className:je("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(wE,{className:"h-4 w-4"})}));Ey.displayName=yy.displayName;const by=g.forwardRef(({className:e,...t},n)=>b.jsx(wy,{ref:n,className:je("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(tg,{className:"h-4 w-4"})}));by.displayName=wy.displayName;const Cy=g.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>b.jsx(SC,{children:b.jsxs(hy,{ref:o,className:je("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="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",e),position:n,...r,children:[b.jsx(Ey,{}),b.jsx(EC,{className:je("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),b.jsx(by,{})]})}));Cy.displayName=hy.displayName;const _y=g.forwardRef(({className:e,...t},n)=>b.jsx(vy,{ref:n,className:je("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));_y.displayName=vy.displayName;const ky=g.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(gy,{ref:r,className:je("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(_C,{children:b.jsx(vE,{className:"h-4 w-4"})})}),b.jsx(CC,{children:t})]}));ky.displayName=gy.displayName;const TC=g.forwardRef(({className:e,...t},n)=>b.jsx(xy,{ref:n,className:je("-mx-1 my-1 h-px bg-muted",e),...t}));TC.displayName=xy.displayName;const NC=Jv("inline-flex items-center rounded border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ry({className:e,variant:t,...n}){return b.jsx("div",{className:je(NC({variant:t}),e),...n})}function OC(){const{tables:e,selectedTable:t,setSelectedTable:n}=Zr();return b.jsxs("section",{className:"flex justify-center items-center gap-2",children:[b.jsxs(kC,{value:t,onValueChange:n,children:[b.jsx(Sy,{className:"w-[200px] md:w-[300px]",children:b.jsx(PC,{placeholder:"Select a table"})}),b.jsx(Cy,{children:b.jsxs(RC,{children:[b.jsx(_y,{children:"Tables"}),e.map((r,o)=>b.jsx(ky,{value:`${o}`,children:r.name},r.name))]})})]}),b.jsxs(Ry,{className:"text-sm",children:[e[parseInt(t)].count," rows"]})]})}function AC(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var ol=e=>{const{present:t,children:n}=e,r=DC(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),i=Ze(r.ref,jC(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:i}):null};ol.displayName="Presence";function DC(e){const[t,n]=g.useState(),r=g.useRef({}),o=g.useRef(e),i=g.useRef("none"),l=e?"mounted":"unmounted",[a,f]=AC(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=Ul(r.current);i.current=a==="mounted"?u:"none"},[a]),kt(()=>{const u=r.current,p=o.current;if(p!==e){const h=i.current,w=Ul(u);e?f("MOUNT"):w==="none"||(u==null?void 0:u.display)==="none"?f("UNMOUNT"):f(p&&h!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),kt(()=>{if(t){const u=m=>{const w=Ul(r.current).includes(m.animationName);m.target===t&&w&&Xr.flushSync(()=>f("ANIMATION_END"))},p=m=>{m.target===t&&(i.current=Ul(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Ul(e){return(e==null?void 0:e.animationName)||"none"}function jC(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uu,Ff="HoverCard",[Py,Bk]=tl(Ff,[ca]),ha=ca(),[MC,zf]=Py(Ff),Ty=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:i,openDelay:l=700,closeDelay:a=300}=e,f=ha(t),u=g.useRef(0),p=g.useRef(0),m=g.useRef(!1),h=g.useRef(!1),[w=!1,C]=Ls({prop:r,defaultProp:o,onChange:i}),E=g.useCallback(()=>{clearTimeout(p.current),u.current=window.setTimeout(()=>C(!0),l)},[l,C]),R=g.useCallback(()=>{clearTimeout(u.current),!m.current&&!h.current&&(p.current=window.setTimeout(()=>C(!1),a))},[a,C]),y=g.useCallback(()=>C(!1),[C]);return g.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(p.current)},[]),b.jsx(MC,{scope:t,open:w,onOpenChange:C,onOpen:E,onClose:R,onDismiss:y,hasSelectionRef:m,isPointerDownOnContentRef:h,children:b.jsx(_g,{...f,children:n})})};Ty.displayName=Ff;var Ny="HoverCardTrigger",Oy=g.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=zf(Ny,n),i=ha(n);return b.jsx(kg,{asChild:!0,...i,children:b.jsx(Me.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:_e(e.onPointerEnter,$s(o.onOpen)),onPointerLeave:_e(e.onPointerLeave,$s(o.onClose)),onFocus:_e(e.onFocus,o.onOpen),onBlur:_e(e.onBlur,o.onClose),onTouchStart:_e(e.onTouchStart,l=>l.preventDefault())})})});Oy.displayName=Ny;var IC="HoverCardPortal",[Vk,LC]=Py(IC,{forceMount:void 0}),zs="HoverCardContent",Ay=g.forwardRef((e,t)=>{const n=LC(zs,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=zf(zs,e.__scopeHoverCard);return b.jsx(ol,{present:r||i.open,children:b.jsx(FC,{"data-state":i.open?"open":"closed",...o,onPointerEnter:_e(e.onPointerEnter,$s(i.onOpen)),onPointerLeave:_e(e.onPointerLeave,$s(i.onClose)),ref:t})})});Ay.displayName=zs;var FC=g.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:l,...a}=e,f=zf(zs,n),u=ha(n),p=g.useRef(null),m=Ze(t,p),[h,w]=g.useState(!1);return g.useEffect(()=>{if(h){const C=document.body;return uu=C.style.userSelect||C.style.webkitUserSelect,C.style.userSelect="none",C.style.webkitUserSelect="none",()=>{C.style.userSelect=uu,C.style.webkitUserSelect=uu}}},[h]),g.useEffect(()=>{if(p.current){const C=()=>{w(!1),f.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var R;((R=document.getSelection())==null?void 0:R.toString())!==""&&(f.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",C),()=>{document.removeEventListener("pointerup",C),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!1}}},[f.isPointerDownOnContentRef,f.hasSelectionRef]),g.useEffect(()=>{p.current&&HC(p.current).forEach(E=>E.setAttribute("tabindex","-1"))}),b.jsx(aa,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:_e(i,C=>{C.preventDefault()}),onDismiss:f.onDismiss,children:b.jsx(Rg,{...u,...a,onPointerDown:_e(a.onPointerDown,C=>{C.currentTarget.contains(C.target)&&w(!0),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!0}),ref:m,style:{...a.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),zC="HoverCardArrow",$C=g.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=ha(n);return b.jsx(Pg,{...o,...r,ref:t})});$C.displayName=zC;function $s(e){return t=>t.pointerType==="touch"?void 0:e()}function HC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var UC=Ty,WC=Oy,Dy=Ay;const jy=UC,My=WC,$f=g.forwardRef(({className:e,align:t="start",side:n="bottom",sideOffset:r=4,...o},i)=>b.jsx(Dy,{ref:i,align:t,side:n,sideOffset:r,className:je("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 text-balance break-words",e),...o}));$f.displayName=Dy.displayName;const Iy=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{className:"relative w-full overflow-auto",children:b.jsx("table",{ref:n,className:je("w-full caption-bottom text-sm",e),...t})}));Iy.displayName="Table";const Ly=g.forwardRef(({className:e,...t},n)=>b.jsx("thead",{ref:n,className:je("[&_tr]:border-b",e),...t}));Ly.displayName="TableHeader";const Fy=g.forwardRef(({className:e,...t},n)=>b.jsx("tbody",{ref:n,className:je("[&_tr:last-child]:border-0",e),...t}));Fy.displayName="TableBody";const BC=g.forwardRef(({className:e,...t},n)=>b.jsx("tfoot",{ref:n,className:je("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));BC.displayName="TableFooter";const wc=g.forwardRef(({className:e,...t},n)=>b.jsx("tr",{ref:n,className:je("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));wc.displayName="TableRow";const zy=g.forwardRef(({className:e,...t},n)=>b.jsx("th",{ref:n,className:je("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));zy.displayName="TableHead";const $y=g.forwardRef(({className:e,children:t,dataType:n,...r},o)=>b.jsx("td",{ref:o,className:je("p-4 align-middle [&:has([role=checkbox])]:pr-0 truncate max-w-[200px] overflow-hidden text-ellipsis whitespace-nowrap",e),...r,children:b.jsxs(jy,{children:[b.jsx(My,{asChild:!0,children:b.jsx("span",{className:"hover:underline cursor-pointer",children:t})}),b.jsx($f,{side:"bottom",align:"start",children:b.jsxs("div",{className:"flex flex-col gap-1",children:[n==="BLOB"?b.jsx("span",{className:"truncate max-w-[200px] overflow-hidden text-ellipsis whitespace-nowrap",children:t}):t,n&&b.jsx(Ry,{className:"text-xs",children:n})]})})]})}));$y.displayName="TableCell";const VC=g.forwardRef(({className:e,...t},n)=>b.jsx("caption",{ref:n,className:je("mt-4 text-sm text-muted-foreground",e),...t}));VC.displayName="TableCaption";function qC({data:e,columns:t,tableName:n,tableSchemas:r}){return b.jsxs(Iy,{children:[b.jsx(Ly,{children:b.jsx(wc,{children:t.map((o,i)=>{var l,a,f,u,p,m;return b.jsx(zy,{children:b.jsxs(jy,{children:[b.jsx(My,{asChild:!0,children:b.jsx("span",{className:"hover:underline cursor-pointer",children:b.jsxs("div",{className:"flex gap-1",children:[o,((l=r[n][o])==null?void 0:l.isPrimaryKey)&&b.jsx(_E,{className:"h-4 w-4"}),((a=r[n][o])==null?void 0:a.isForeignKey)&&b.jsx(kE,{className:"h-4 w-4"}),((f=r[n][o])==null?void 0:f.type)==="BLOB"&&b.jsx(SE,{className:"h-4 w-4"}),((u=r[n][o])==null?void 0:u.type)==="DATETIME"&&b.jsx(xE,{className:"h-4 w-4"})]})})}),b.jsx($f,{side:"bottom",align:"start",children:((p=r[n][o])==null?void 0:p.type.length)==0?"Unknown":(m=r[n][o])==null?void 0:m.type})]})},i)})})}),b.jsx(Fy,{children:e.map((o,i)=>b.jsx(wc,{children:t.map((l,a)=>{var f;return b.jsx($y,{dataType:(f=r[n][l])==null?void 0:f.type,children:o[l]?o[l]:b.jsx("span",{className:"italic opacity-40",children:"NULL"})},a)})},i))})]})}function GC(){const{query:e,db:t,tables:n,selectedTable:r,tableSchemas:o,queryError:i,setQueryError:l,rowPerPageOrAuto:a,isCustomQuery:f,setIsCustomQuery:u}=Zr(),[p,m]=g.useState([]),[h,w]=g.useState([]),[C,E]=g.useState(0),[R,y]=g.useState(""),v=g.useMemo(()=>{var O;return(O=n[parseInt(r)])==null?void 0:O.name},[n,r]),S=g.useMemo(()=>{var O;return((O=n[parseInt(r)])==null?void 0:O.count)||0},[n,r]);let _=30;if(console.log(a,_),a==="auto"){let O=110;const j=window.innerHeight,I=j>1500,V=j>1e3,H=j<750;I?O=75:V?O=90:H&&(O=130),_=Math.max(1,Math.floor(j/O))}else _=a;g.useEffect(()=>{E(0),u(!1)},[v]),g.useEffect(()=>{if(t&&v&&!f)try{const O=`SELECT * FROM "${v}" LIMIT ${_} OFFSET ${C};`,j=e(O),{data:I,columns:V}=As(j);w(V),m(I),l(null),y(O)}catch(O){O instanceof Error&&l(O.message)}},[v,C,_]);const P=g.useCallback(()=>{l(null),y(""),u(!1)},[u,l]),A=g.useCallback(()=>{E(0),l(null),y(""),u(!1)},[u,l]),T=g.useCallback(()=>{if(R.trim()===""){l(null);return}if(t&&R.trim()!=="")try{const O=e(R),{data:j,columns:I}=As(O);w(I),m(j),u(!0),l(null)}catch(O){O instanceof Error&&l(O.message)}},[R,t,e,l]);return b.jsxs("div",{className:"flex flex-col gap-3 mb-2",children:[b.jsxs("section",{className:"flex flex-col gap-2 p-3 pb-1 border rounded",children:[b.jsx(OC,{}),b.jsxs("div",{className:"flex gap-1",children:[b.jsx(Cf,{type:"text",value:R,onChange:O=>y(O.target.value),placeholder:"Enter your custom query",className:"w-full"}),b.jsx(At,{onClick:T,title:"Run custom query",children:b.jsx(NE,{className:"h-5 w-5"})}),b.jsx(At,{onClick:P,title:"Reset query",children:b.jsx(DE,{className:"h-5 w-5"})}),b.jsx(At,{onClick:A,title:"Reset to first page",disabled:C===0,children:b.jsx(RE,{className:"h-5 w-5"})})]}),b.jsx("p",{className:"text-xs text-red-500 capitalize text-center",children:i})]}),p.length>0?b.jsx("div",{className:"border rounded",children:b.jsx(qC,{data:p,columns:h,tableName:v,tableSchemas:o})}):b.jsxs("p",{className:"text-center font-semibold md:text-2xl p-10 border rounded",children:["Table ",v," is empty"]}),!f&&b.jsx(jE,{page:C,setPage:E,rowsPerPage:_,rowCount:S})]})}var Hy={exports:{}},KC="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",QC=KC,YC=QC;function Uy(){}function Wy(){}Wy.resetWarningCache=Uy;var XC=function(){function e(r,o,i,l,a,f){if(f!==YC){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Wy,resetWarningCache:Uy};return n.PropTypes=n,n};Hy.exports=XC();var ZC=Hy.exports;const Te=Qi(ZC);var JC=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function il(e,t){var n=e_(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function e_(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=JC.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var t_=[".DS_Store","Thumbs.db"];function n_(e){return qo(this,void 0,void 0,function(){return Go(this,function(t){return Hs(e)&&r_(e.dataTransfer)?[2,s_(e.dataTransfer,e.type)]:o_(e)?[2,i_(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,l_(e)]:[2,[]]})})}function r_(e){return Hs(e)}function o_(e){return Hs(e)&&Hs(e.target)}function Hs(e){return typeof e=="object"&&e!==null}function i_(e){return xc(e.target.files).map(function(t){return il(t)})}function l_(e){return qo(this,void 0,void 0,function(){var t;return Go(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return il(r)})]}})})}function s_(e,t){return qo(this,void 0,void 0,function(){var n,r;return Go(this,function(o){switch(o.label){case 0:return e.items?(n=xc(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(a_))]):[3,2];case 1:return r=o.sent(),[2,cm(By(r))];case 2:return[2,cm(xc(e.files).map(function(i){return il(i)}))]}})})}function cm(e){return e.filter(function(t){return t_.indexOf(t.name)===-1})}function xc(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,hm(n)];if(e.sizen)return[!1,hm(n)]}return[!0,null]}function Dr(e){return e!=null}function C_(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,l=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&l>=1&&t.length>l?!1:t.every(function(f){var u=Ky(f,n),p=Ki(u,1),m=p[0],h=Qy(f,r,o),w=Ki(h,1),C=w[0],E=a?a(f):null;return m&&C&&!E})}function Us(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Wl(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function gm(e){e.preventDefault()}function __(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function k_(e){return e.indexOf("Edge/")!==-1}function R_(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return __(e)||k_(e)}function bn(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),l=1;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function B_(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Hf=g.forwardRef(function(e,t){var n=e.children,r=Ws(e,D_),o=e0(r),i=o.open,l=Ws(o,j_);return g.useImperativeHandle(t,function(){return{open:i}},[i]),Q.createElement(g.Fragment,null,n(qe(qe({},l),{},{open:i})))});Hf.displayName="Dropzone";var Jy={disabled:!1,getFilesFromEvent:n_,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Hf.defaultProps=Jy;Hf.propTypes={children:Te.func,accept:Te.objectOf(Te.arrayOf(Te.string)),multiple:Te.bool,preventDropOnDocument:Te.bool,noClick:Te.bool,noKeyboard:Te.bool,noDrag:Te.bool,noDragEventsBubbling:Te.bool,minSize:Te.number,maxSize:Te.number,maxFiles:Te.number,disabled:Te.bool,getFilesFromEvent:Te.func,onFileDialogCancel:Te.func,onFileDialogOpen:Te.func,useFsAccessApi:Te.bool,autoFocus:Te.bool,onDragEnter:Te.func,onDragLeave:Te.func,onDragOver:Te.func,onDrop:Te.func,onDropAccepted:Te.func,onDropRejected:Te.func,onError:Te.func,validator:Te.func};var Cc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function e0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=qe(qe({},Jy),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,l=t.minSize,a=t.multiple,f=t.maxFiles,u=t.onDragEnter,p=t.onDragLeave,m=t.onDragOver,h=t.onDrop,w=t.onDropAccepted,C=t.onDropRejected,E=t.onFileDialogCancel,R=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,S=t.preventDropOnDocument,_=t.noClick,P=t.noKeyboard,A=t.noDrag,T=t.noDragEventsBubbling,O=t.onError,j=t.validator,I=g.useMemo(function(){return N_(n)},[n]),V=g.useMemo(function(){return T_(n)},[n]),H=g.useMemo(function(){return typeof R=="function"?R:wm},[R]),F=g.useMemo(function(){return typeof E=="function"?E:wm},[E]),W=g.useRef(null),Z=g.useRef(null),le=g.useReducer(V_,Cc),ne=cu(le,2),z=ne[0],B=ne[1],ee=z.isFocused,se=z.isFileDialogActive,ue=g.useRef(typeof window<"u"&&window.isSecureContext&&y&&P_()),Ve=function(){!ue.current&&se&&setTimeout(function(){if(Z.current){var oe=Z.current.files;oe.length||(B({type:"closeDialog"}),F())}},300)};g.useEffect(function(){return window.addEventListener("focus",Ve,!1),function(){window.removeEventListener("focus",Ve,!1)}},[Z,se,F,ue]);var ve=g.useRef([]),Ye=function(oe){W.current&&W.current.contains(oe.target)||(oe.preventDefault(),ve.current=[])};g.useEffect(function(){return S&&(document.addEventListener("dragover",gm,!1),document.addEventListener("drop",Ye,!1)),function(){S&&(document.removeEventListener("dragover",gm),document.removeEventListener("drop",Ye))}},[W,S]),g.useEffect(function(){return!r&&v&&W.current&&W.current.focus(),function(){}},[W,v,r]);var be=g.useCallback(function(G){O?O(G):console.error(G)},[O]),J=g.useCallback(function(G){G.preventDefault(),G.persist(),rn(G),ve.current=[].concat(L_(ve.current),[G.target]),Wl(G)&&Promise.resolve(o(G)).then(function(oe){if(!(Us(G)&&!T)){var Le=oe.length,Re=Le>0&&C_({files:oe,accept:I,minSize:l,maxSize:i,multiple:a,maxFiles:f,validator:j}),nt=Le>0&&!Re;B({isDragAccept:Re,isDragReject:nt,isDragActive:!0,type:"setDraggedFiles"}),u&&u(G)}}).catch(function(oe){return be(oe)})},[o,u,be,T,I,l,i,a,f,j]),ye=g.useCallback(function(G){G.preventDefault(),G.persist(),rn(G);var oe=Wl(G);if(oe&&G.dataTransfer)try{G.dataTransfer.dropEffect="copy"}catch{}return oe&&m&&m(G),!1},[m,T]),Ie=g.useCallback(function(G){G.preventDefault(),G.persist(),rn(G);var oe=ve.current.filter(function(Re){return W.current&&W.current.contains(Re)}),Le=oe.indexOf(G.target);Le!==-1&&oe.splice(Le,1),ve.current=oe,!(oe.length>0)&&(B({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Wl(G)&&p&&p(G))},[W,p,T]),K=g.useCallback(function(G,oe){var Le=[],Re=[];G.forEach(function(nt){var Nt=Ky(nt,I),St=cu(Nt,2),on=St[0],Qn=St[1],Yn=Qy(nt,l,i),Xn=cu(Yn,2),ie=Xn[0],fe=Xn[1],ke=j?j(nt):null;if(on&&ie&&!ke)Le.push(nt);else{var q=[Qn,fe];ke&&(q=q.concat(ke)),Re.push({file:nt,errors:q.filter(function(Oe){return Oe})})}}),(!a&&Le.length>1||a&&f>=1&&Le.length>f)&&(Le.forEach(function(nt){Re.push({file:nt,errors:[b_]})}),Le.splice(0)),B({acceptedFiles:Le,fileRejections:Re,type:"setFiles"}),h&&h(Le,Re,oe),Re.length>0&&C&&C(Re,oe),Le.length>0&&w&&w(Le,oe)},[B,a,I,l,i,f,h,w,C,j]),ge=g.useCallback(function(G){G.preventDefault(),G.persist(),rn(G),ve.current=[],Wl(G)&&Promise.resolve(o(G)).then(function(oe){Us(G)&&!T||K(oe,G)}).catch(function(oe){return be(oe)}),B({type:"reset"})},[o,K,be,T]),de=g.useCallback(function(){if(ue.current){B({type:"openDialog"}),H();var G={multiple:a,types:V};window.showOpenFilePicker(G).then(function(oe){return o(oe)}).then(function(oe){K(oe,null),B({type:"closeDialog"})}).catch(function(oe){O_(oe)?(F(oe),B({type:"closeDialog"})):A_(oe)?(ue.current=!1,Z.current?(Z.current.value=null,Z.current.click()):be(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):be(oe)});return}Z.current&&(B({type:"openDialog"}),H(),Z.current.value=null,Z.current.click())},[B,H,F,y,K,be,V,a]),Y=g.useCallback(function(G){!W.current||!W.current.isEqualNode(G.target)||(G.key===" "||G.key==="Enter"||G.keyCode===32||G.keyCode===13)&&(G.preventDefault(),de())},[W,de]),me=g.useCallback(function(){B({type:"focus"})},[]),ut=g.useCallback(function(){B({type:"blur"})},[]),Je=g.useCallback(function(){_||(R_()?setTimeout(de,0):de())},[_,de]),tt=function(oe){return r?null:oe},Tt=function(oe){return P?null:tt(oe)},Ce=function(oe){return A?null:tt(oe)},rn=function(oe){T&&oe.stopPropagation()},Jr=g.useMemo(function(){return function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=G.refKey,Le=oe===void 0?"ref":oe,Re=G.role,nt=G.onKeyDown,Nt=G.onFocus,St=G.onBlur,on=G.onClick,Qn=G.onDragEnter,Yn=G.onDragOver,Xn=G.onDragLeave,ie=G.onDrop,fe=Ws(G,M_);return qe(qe(bc({onKeyDown:Tt(bn(nt,Y)),onFocus:Tt(bn(Nt,me)),onBlur:Tt(bn(St,ut)),onClick:tt(bn(on,Je)),onDragEnter:Ce(bn(Qn,J)),onDragOver:Ce(bn(Yn,ye)),onDragLeave:Ce(bn(Xn,Ie)),onDrop:Ce(bn(ie,ge)),role:typeof Re=="string"&&Re!==""?Re:"presentation"},Le,W),!r&&!P?{tabIndex:0}:{}),fe)}},[W,Y,me,ut,Je,J,ye,Ie,ge,P,A,r]),Ft=g.useCallback(function(G){G.stopPropagation()},[]),yn=g.useMemo(function(){return function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=G.refKey,Le=oe===void 0?"ref":oe,Re=G.onChange,nt=G.onClick,Nt=Ws(G,I_),St=bc({accept:I,multiple:a,type:"file",style:{display:"none"},onChange:tt(bn(Re,ge)),onClick:tt(bn(nt,Ft)),tabIndex:-1},Le,Z);return qe(qe({},St),Nt)}},[Z,n,a,ge,r]);return qe(qe({},z),{},{isFocused:ee&&!r,getRootProps:Jr,getInputProps:yn,rootRef:W,inputRef:Z,open:tt(de)})}function V_(e,t){switch(t.type){case"focus":return qe(qe({},e),{},{isFocused:!0});case"blur":return qe(qe({},e),{},{isFocused:!1});case"openDialog":return qe(qe({},Cc),{},{isFileDialogActive:!0});case"closeDialog":return qe(qe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return qe(qe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return qe(qe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return qe({},Cc);default:return e}}function wm(){}const q_=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];function G_(e){if(e===0)return"0 Byte";const t=Math.floor(Math.log(e)/Math.log(1024)),n=q_[t];return`${(e/Math.pow(1024,t)).toFixed(2)} ${n}`}function K_({file:e}){return b.jsx(b.Fragment,{children:b.jsxs("li",{className:"flex w-full items-center justify-center gap-2 font-mono text-sm",title:e.name,children:[b.jsx("p",{className:"max-w-[250px] truncate",children:e.name}),b.jsx("span",{className:"text-xs font-semibold",children:G_(e.size)})]})})}function Q_({errors:e}){return e?b.jsx(b.Fragment,{children:e.map(t=>b.jsxs("div",{className:"flex items-center justify-center text-sm text-red-600 gap-2 rounded border border-red-600 p-4 mb-2",children:[b.jsx(bE,{}),t.message]},t.code))}):b.jsxs("li",{className:"flex w-full items-center justify-center text-sm text-green-600",children:[b.jsx(EE,{className:"mr-2"}),"Uploaded successfully"]})}function Y_(){const{loadDatabase:e,setTables:t,setSelectedTable:n,db:r}=Zr(),[o,i]=g.useState(null),[l,a]=g.useState([]),f=g.useCallback(async(m,h)=>{if(a([]),t([]),n("0"),m.length>0){const w=m[0];i(w),await e(w)}if(h.length>0){const w=h.flatMap(C=>C.errors);a(w)}},[e,t,n]),{getRootProps:u,getInputProps:p}=e0({onDrop:f,multiple:!1,accept:{"application/vnd.sqlite3":[".sqlite",".sqlite3"],"application/x-sqlite3":[".sqlite",".sqlite3"],"application/octet-stream":[".db"],"application/sql":[".sql"]}});return b.jsxs("section",{children:[r?b.jsxs("div",{...u(),className:"border p-6 rounded cursor-pointer text-center",children:[b.jsx("input",{id:"file-upload",...p()}),b.jsx("label",{htmlFor:"file-upload",className:"sr-only",children:"Upload SQLite File"}),b.jsx("p",{className:"hidden sm:block",children:"Drag drop a SQLite file here, or click to select one"}),b.jsx("p",{className:"block sm:hidden",children:"Click to select a SQLite file"})]}):b.jsxs("div",{...u(),className:"border p-6 py-24 rounded cursor-pointer text-center",children:[b.jsx("input",{id:"file-upload",...p()}),b.jsx("label",{htmlFor:"file-upload",className:"sr-only",children:"Upload SQLite File"}),b.jsx("p",{className:"hidden sm:block",children:"Drag drop a SQLite file here, or click to select one"}),b.jsx("p",{className:"block sm:hidden",children:"Click to select a SQLite file"}),b.jsx("a",{href:"https://github.com/vwh/sqlite-viewer/raw/main/examples/chinook.db",className:"text-sm text-link hover:underline",title:"Download sample file",children:"Or download & try this sample file"})]}),b.jsxs("div",{className:"mt-2",children:[o&&b.jsx(K_,{file:o}),b.jsx(Q_,{errors:l})]})]})}function X_(){const{isLoading:e}=Zr();return b.jsx(b.Fragment,{children:e&&b.jsxs("div",{className:"flex items-center justify-center mb-2 font-semibold p-4 border rounded",children:[b.jsx(PE,{className:"w-5 h-5 animate-spin"}),b.jsx("span",{className:"ml-2",children:"Reading SQLite file"})]})})}function Z_(){const e=g.useRef(null);return g.useEffect(()=>{const t=e.current;if(!t)return;const n=()=>{document.body.classList.contains("dark")?t.src="/sqlite-dark.webp":t.src="/sqlite-light.webp"};n();const r=new MutationObserver(n);return r.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),b.jsx("section",{className:"flex justify-center border rounded py-3",children:b.jsxs("div",{className:"flex flex-col items-center gap-3",children:[b.jsx("img",{ref:e,id:"logo",title:"SQLite Logo",src:"./sqlite-light.webp",alt:"SQLite Logo",width:"160",height:"80",draggable:"false"}),b.jsx("p",{className:"text-sm",children:"View SQLite file online"})]})})}function J_(){const{db:e,tables:t,isLoading:n,loadDatabase:r}=Zr(),[o,i]=g.useState(null);return g.useEffect(()=>{const l=new URLSearchParams(window.location.search),a=decodeURIComponent(l.get("url")||"");(async()=>{if(a)try{const u=await fetch(`https://corsproxy.io/?${a}`);if(u.ok){const p=await u.blob(),m=new File([p],"database.sqlite");await r(m)}else i(`URL not found or invalid: ( ${u.status} )`)}catch(u){u instanceof Error&&i(`${u.message}, Error while fetching database from URL: ${a}`)}})()},[r]),b.jsxs("div",{className:"flex flex-col gap-3",children:[!e&&b.jsx(Z_,{}),b.jsx(Y_,{}),b.jsx(X_,{}),o&&b.jsx("div",{className:"text-center text-red-500 font-semibold md:text-2xl p-10 border rounded mb-2",children:o}),!n&&e&&(t.length>0?b.jsx(GC,{}):b.jsx("div",{className:"text-center font-semibold md:text-2xl p-10 border rounded mb-2",children:"Your database is empty, no tables found"}))]})}function ek(){const[e,t]=g.useState(!1);g.useEffect(()=>{const r=()=>{const l=window.matchMedia("(prefers-color-scheme: dark)").matches;t(l),document.body.classList.toggle("dark",l)},o=localStorage.getItem("darkMode");if(o!==null){const l=o==="true";t(l),document.body.classList.toggle("dark",l)}else r();const i=window.matchMedia("(prefers-color-scheme: dark)");return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[]);const n=()=>{const r=!e;t(r),localStorage.setItem("darkMode",r.toString()),document.body.classList.toggle("dark",r)};return b.jsx(At,{onClick:n,className:"relative",variant:"outline",children:e?b.jsx(AE,{className:"h-5 w-5"}):b.jsx(TE,{className:"h-5 w-5"})})}var Uf="Dialog",[t0,qk]=tl(Uf),[tk,vn]=t0(Uf),n0=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:l=!0}=e,a=g.useRef(null),f=g.useRef(null),[u=!1,p]=Ls({prop:r,defaultProp:o,onChange:i});return b.jsx(tk,{scope:t,triggerRef:a,contentRef:f,contentId:Ro(),titleId:Ro(),descriptionId:Ro(),open:u,onOpenChange:p,onOpenToggle:g.useCallback(()=>p(m=>!m),[p]),modal:l,children:n})};n0.displayName=Uf;var r0="DialogTrigger",o0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=vn(r0,n),i=Ze(t,o.triggerRef);return b.jsx(Me.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Vf(o.open),...r,ref:i,onClick:_e(e.onClick,o.onOpenToggle)})});o0.displayName=r0;var Wf="DialogPortal",[nk,i0]=t0(Wf,{forceMount:void 0}),l0=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=vn(Wf,t);return b.jsx(nk,{scope:t,forceMount:n,children:g.Children.map(r,l=>b.jsx(ol,{present:n||i.open,children:b.jsx(Mf,{asChild:!0,container:o,children:l})}))})};l0.displayName=Wf;var Bs="DialogOverlay",s0=g.forwardRef((e,t)=>{const n=i0(Bs,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=vn(Bs,e.__scopeDialog);return i.modal?b.jsx(ol,{present:r||i.open,children:b.jsx(rk,{...o,ref:t})}):null});s0.displayName=Bs;var rk=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=vn(Bs,n);return b.jsx(If,{as:Vr,allowPinchZoom:!0,shards:[o.contentRef],children:b.jsx(Me.div,{"data-state":Vf(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Kr="DialogContent",a0=g.forwardRef((e,t)=>{const n=i0(Kr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=vn(Kr,e.__scopeDialog);return b.jsx(ol,{present:r||i.open,children:i.modal?b.jsx(ok,{...o,ref:t}):b.jsx(ik,{...o,ref:t})})});a0.displayName=Kr;var ok=g.forwardRef((e,t)=>{const n=vn(Kr,e.__scopeDialog),r=g.useRef(null),o=Ze(t,n.contentRef,r);return g.useEffect(()=>{const i=r.current;if(i)return Og(i)},[]),b.jsx(u0,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_e(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:_e(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0;(l.button===2||a)&&i.preventDefault()}),onFocusOutside:_e(e.onFocusOutside,i=>i.preventDefault())})}),ik=g.forwardRef((e,t)=>{const n=vn(Kr,e.__scopeDialog),r=g.useRef(!1),o=g.useRef(!1);return b.jsx(u0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var l,a;(l=e.onCloseAutoFocus)==null||l.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var f,u;(f=e.onInteractOutside)==null||f.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),u0=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...l}=e,a=vn(Kr,n),f=g.useRef(null),u=Ze(t,f);return og(),b.jsxs(b.Fragment,{children:[b.jsx(_f,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:b.jsx(aa,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Vf(a.open),...l,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(lk,{titleId:a.titleId}),b.jsx(ak,{contentRef:f,descriptionId:a.descriptionId})]})]})}),Bf="DialogTitle",c0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=vn(Bf,n);return b.jsx(Me.h2,{id:o.titleId,...r,ref:t})});c0.displayName=Bf;var f0="DialogDescription",d0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=vn(f0,n);return b.jsx(Me.p,{id:o.descriptionId,...r,ref:t})});d0.displayName=f0;var p0="DialogClose",m0=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=vn(p0,n);return b.jsx(Me.button,{type:"button",...r,ref:t,onClick:_e(e.onClick,()=>o.onOpenChange(!1))})});m0.displayName=p0;function Vf(e){return e?"open":"closed"}var h0="DialogTitleWarning",[Gk,v0]=ME(h0,{contentName:Kr,titleName:Bf,docsSlug:"dialog"}),lk=({titleId:e})=>{const t=v0(h0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. - -If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. - -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},sk="DialogDescriptionWarning",ak=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${v0(sk).contentName}}.`;return g.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},uk=n0,ck=o0,fk=l0,dk=s0,pk=a0,mk=c0,hk=d0,vk=m0;function gk(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const g0=Q.createContext({drawerRef:{current:null},overlayRef:{current:null},scaleBackground:()=>{},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,handleOnly:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},visible:!1,closeDrawer:()=>{},setVisible:()=>{},direction:"bottom"}),va=()=>{const e=Q.useContext(g0);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};gk("[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-handle]{display:block;position:relative;opacity:.8;margin-left:auto;margin-right:auto;height:5px;width:56px;border-radius:1rem;touch-action:pan-y;cursor:grab}[vaul-handle]:active,[vaul-handle]:hover{opacity:1}[vaul-handle]:active{cursor:grabbing}[vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@media (hover:hover) and (pointer:fine){[vaul-drawer]{user-select:none}}@media (pointer:fine){[vaul-handle-hitarea]:{width:100%;height:100%}}");const yk=typeof window<"u"?g.useLayoutEffect:g.useEffect;function _c(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}function wk(){return qf(/^Mac/)}function xk(){return qf(/^iPhone/)}function Sk(){return qf(/^iPad/)||wk()&&navigator.maxTouchPoints>1}function y0(){return xk()||Sk()}function qf(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const fu=typeof document<"u"&&window.visualViewport;function xm(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function w0(e){for(xm(e)&&(e=e.parentElement);e&&!xm(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Ek=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Bl=0,du;function bk(e={}){let{isDisabled:t}=e;yk(()=>{if(!t)return Bl++,Bl===1&&(y0()?du=_k():du=Ck()),()=>{Bl--,Bl===0&&du()}},[t])}function Ck(){return _c(x0(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`))}function _k(){let e,t=0,n=m=>{e=w0(m.target),!(e===document.documentElement&&e===document.body)&&(t=m.changedTouches[0].pageY)},r=m=>{if(!e||e===document.documentElement||e===document.body){m.preventDefault();return}let h=m.changedTouches[0].pageY,w=e.scrollTop,C=e.scrollHeight-e.clientHeight;C!==0&&((w<=0&&h>t||w>=C&&h{let h=m.target;kc(h)&&h!==document.activeElement&&(m.preventDefault(),h.style.transform="translateY(-2000px)",h.focus(),requestAnimationFrame(()=>{h.style.transform=""}))},i=m=>{let h=m.target;kc(h)&&(h.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{h.style.transform="",fu&&(fu.height{Sm(h)}):fu.addEventListener("resize",()=>Sm(h),{once:!0}))}))},l=()=>{window.scrollTo(0,0)},a=window.pageXOffset,f=window.pageYOffset,u=_c(x0(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let p=_c(pi(document,"touchstart",n,{passive:!1,capture:!0}),pi(document,"touchmove",r,{passive:!1,capture:!0}),pi(document,"touchend",o,{passive:!1,capture:!0}),pi(document,"focus",i,!0),pi(window,"scroll",l));return()=>{u(),p(),window.scrollTo(a,f)}}function x0(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function pi(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Sm(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=w0(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;const l=n.getBoundingClientRect().bottom;i>l&&(n.scrollTop+=o-r)}e=n.parentElement}}function kc(e){return e instanceof HTMLInputElement&&!Ek.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function kk(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Rk(...e){return t=>e.forEach(n=>kk(n,t))}function S0(...e){return g.useCallback(Rk(...e),e)}let mi=null;function Pk({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:i}){const[l,a]=Q.useState(()=>typeof window<"u"?window.location.href:""),f=Q.useRef(0),u=Q.useCallback(()=>{if(mi===null&&e&&!i){mi={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:m,innerHeight:h}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-f.current}px`,left:`${-m}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const w=h-window.innerHeight;w&&f.current>=h&&(document.body.style.top=`${-(f.current+w)}px`)}),300)}},[e]),p=Q.useCallback(()=>{if(mi!==null&&!i){const m=-parseInt(document.body.style.top,10),h=-parseInt(document.body.style.left,10);Object.assign(document.body.style,mi),window.requestAnimationFrame(()=>{if(o&&l!==window.location.href){a(window.location.href);return}window.scrollTo(h,m)}),mi=null}},[l]);return Q.useEffect(()=>{function m(){f.current=window.scrollY}return m(),window.addEventListener("scroll",m),()=>{window.removeEventListener("scroll",m)}},[]),Q.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{p()},500)):p())},[e,r,l,t,n,u,p]),{restorePositionSetting:p}}const E0=new WeakMap;function He(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,i])=>{if(o.startsWith("--")){e.style.setProperty(o,i);return}r[o]=e.style[o],e.style[o]=i}),!n&&E0.set(e,r)}function Vl(e,t){if(!e||!(e instanceof HTMLElement))return;let n=E0.get(e);n&&(t?e.style[t]=n[t]:Object.entries(n).forEach(([r,o])=>{e.style[r]=o}))}const ot=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function ql(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[ot(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[ot(t)?5:4]):null)}function Tk(e){return 8*(Math.log(e+1)-2)}const Ne={DURATION:.5,EASE:[.32,.72,0,1]},b0=.4;function C0(e){const t=Q.useRef(e);return Q.useEffect(()=>{t.current=e}),Q.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function Nk({defaultProp:e,onChange:t}){const n=Q.useState(e),[r]=n,o=Q.useRef(r),i=C0(t);return Q.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function Ok({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Nk({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,a=C0(n),f=Q.useCallback(u=>{if(i){const m=typeof u=="function"?u(e):u;m!==e&&a(m)}else o(u)},[i,e,o,a]);return[l,f]}function Ak({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:i,onSnapPointChange:l,direction:a="bottom"}){const[f,u]=Ok({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),p=Q.useMemo(()=>f===(n==null?void 0:n[n.length-1])||null,[n,f]),m=n&&n.length>0&&(i||i===0)&&!Number.isNaN(i)&&n[i]===f||!n,h=Q.useMemo(()=>n==null?void 0:n.findIndex(S=>S===f),[n,f]),w=Q.useMemo(()=>{var S;return(S=n==null?void 0:n.map(_=>{const P=typeof window<"u",A=typeof _=="string";let T=0;if(A&&(T=parseInt(_,10)),ot(a)){const j=A?T:P?_*window.innerHeight:0;return P?a==="bottom"?window.innerHeight-j:-window.innerHeight+j:j}const O=A?T:P?_*window.innerWidth:0;return P?a==="right"?window.innerWidth-O:-window.innerWidth+O:O}))!=null?S:[]},[n]),C=Q.useMemo(()=>h!==null?w==null?void 0:w[h]:null,[w,h]),E=Q.useCallback(S=>{var _;const P=(_=w==null?void 0:w.findIndex(A=>A===S))!=null?_:null;l(P),He(r.current,{transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,transform:ot(a)?`translate3d(0, ${S}px, 0)`:`translate3d(${S}px, 0, 0)`}),w&&P!==w.length-1&&P!==i?He(o.current,{transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,opacity:"0"}):He(o.current,{transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,opacity:"1"}),u(P!==null?n==null?void 0:n[P]:null)},[r.current,n,w,i,o,u]);Q.useEffect(()=>{if(f||e){var S;const _=(S=n==null?void 0:n.findIndex(P=>P===e||P===f))!=null?S:-1;w&&_!==-1&&typeof w[_]=="number"&&E(w[_])}},[f,e,n,w,E]);function R({draggedDistance:S,closeDrawer:_,velocity:P,dismissible:A}){if(i===void 0)return;const T=a==="bottom"||a==="right"?(C??0)-S:(C??0)+S,O=h===i-1,j=h===0,I=S>0;if(O&&He(o.current,{transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`}),P>2&&!I){A?_():E(w[0]);return}if(P>2&&I&&w&&n){E(w[n.length-1]);return}const V=w==null?void 0:w.reduce((F,W)=>typeof F!="number"||typeof W!="number"?F:Math.abs(W-T)b0&&Math.abs(S)0&&p){E(w[n.length-1]);return}if(j&&F<0&&A&&_(),h===null)return;E(w[h+F]);return}E(V)}function y({draggedDistance:S}){if(C===null)return;const _=a==="bottom"||a==="right"?C-S:C+S;(a==="bottom"||a==="right")&&_w[w.length-1]||He(r.current,{transform:ot(a)?`translate3d(0, ${_}px, 0)`:`translate3d(${_}px, 0, 0)`})}function v(S,_){if(!n||typeof h!="number"||!w||i===void 0)return null;const P=h===i-1;if(h>=i&&_)return 0;if(P&&!_)return 1;if(!m&&!P)return null;const T=P?h+1:h-1,O=P?w[T]-w[T-1]:w[T+1]-w[T],j=S/Math.abs(O);return P?1-j:j}return{isLastSnapPoint:p,activeSnapPoint:f,shouldFade:m,getPercentageDragged:v,setActiveSnapPoint:u,activeSnapPointIndex:h,onRelease:R,onDrag:y,snapPointsOffset:w}}const Dk=.25,jk=100,Em=8,Nr=16,bm=26,pu="vaul-dragging";function _0({open:e,onOpenChange:t,children:n,shouldScaleBackground:r,onDrag:o,onRelease:i,snapPoints:l,nested:a=!1,setBackgroundColorOnScale:f=!0,closeThreshold:u=Dk,scrollLockTimeout:p=jk,dismissible:m=!0,handleOnly:h=!1,fadeFromIndex:w=l&&l.length-1,activeSnapPoint:C,setActiveSnapPoint:E,fixed:R,modal:y=!0,onClose:v,noBodyStyles:S,direction:_="bottom",preventScrollRestoration:P=!0,disablePreventScroll:A=!1}){var T;const[O=!1,j]=Q.useState(!1),[I,V]=Q.useState(!1),[H,F]=Q.useState(!1),[W,Z]=Q.useState(!1),[le,ne]=Q.useState(!1),[z,B]=Q.useState(!1),ee=Q.useRef(null),se=Q.useRef(null),ue=Q.useRef(null),Ve=Q.useRef(null),ve=Q.useRef(null),Ye=Q.useRef(!1),be=Q.useRef(null),J=Q.useRef(0),ye=Q.useRef(!1),Ie=Q.useRef(0),K=Q.useRef(null),ge=Q.useRef(((T=K.current)==null?void 0:T.getBoundingClientRect().height)||0),de=Q.useRef(0),Y=Q.useCallback(ie=>{l&&ie===Tt.length-1&&(se.current=new Date)},[]),{activeSnapPoint:me,activeSnapPointIndex:ut,setActiveSnapPoint:Je,onRelease:tt,snapPointsOffset:Tt,onDrag:Ce,shouldFade:rn,getPercentageDragged:Jr}=Ak({snapPoints:l,activeSnapPointProp:C,setActiveSnapPointProp:E,drawerRef:K,fadeFromIndex:w,overlayRef:ee,onSnapPointChange:Y,direction:_});bk({isDisabled:!O||le||!y||z||!I||A});const{restorePositionSetting:Ft}=Pk({isOpen:O,modal:y,nested:a,hasBeenOpened:I,preventScrollRestoration:P,noBodyStyles:S});function yn(){return(window.innerWidth-bm)/window.innerWidth}function G(ie){var fe;!m&&!l||K.current&&!K.current.contains(ie.target)||(ge.current=((fe=K.current)==null?void 0:fe.getBoundingClientRect().height)||0,ne(!0),ue.current=new Date,y0()&&window.addEventListener("touchend",()=>Ye.current=!1,{once:!0}),ie.target.setPointerCapture(ie.pointerId),J.current=ot(_)?ie.clientY:ie.clientX)}function oe(ie,fe){var ke;let q=ie;const Oe=(ke=window.getSelection())==null?void 0:ke.toString(),We=K.current?ql(K.current,_):null,Et=new Date;if(q.hasAttribute("data-vaul-no-drag")||q.closest("[data-vaul-no-drag]"))return!1;if(_==="right"||_==="left")return!0;if(se.current&&Et.getTime()-se.current.getTime()<500)return!1;if(We!==null&&(_==="bottom"?We>0:We<0))return!0;if(Oe&&Oe.length>0)return!1;if(ve.current&&Et.getTime()-ve.current.getTime()q.clientHeight){if(q.scrollTop!==0)return ve.current=new Date,!1;if(q.getAttribute("role")==="dialog")return!0}q=q.parentNode}return!0}function Le(ie){if(K.current&&le){const fe=_==="bottom"||_==="right"?1:-1,ke=(J.current-(ot(_)?ie.clientY:ie.clientX))*fe,q=ke>0,Oe=l&&!m&&!q;if(Oe&&ut===0)return;const We=Math.abs(ke),Et=document.querySelector("[vaul-drawer-wrapper]");let vt=We/ge.current;const wn=Jr(We,q);if(wn!==null&&(vt=wn),Oe&&vt>=1||!Ye.current&&!oe(ie.target,q))return;if(K.current.classList.add(pu),Ye.current=!0,He(K.current,{transition:"none"}),He(ee.current,{transition:"none"}),l&&Ce({draggedDistance:ke}),q&&!l){const xn=Tk(ke),U=Math.min(xn*-1,0)*fe;He(K.current,{transform:ot(_)?`translate3d(0, ${U}px, 0)`:`translate3d(${U}px, 0, 0)`});return}const zt=1-vt;if((rn||w&&ut===w-1)&&(o==null||o(ie,vt),He(ee.current,{opacity:`${zt}`,transition:"none"},!0)),Et&&ee.current&&r){const xn=Math.min(yn()+vt*(1-yn()),1),U=8-vt*8,eo=Math.max(0,14-vt*14);He(Et,{borderRadius:`${U}px`,transform:ot(_)?`scale(${xn}) translate3d(0, ${eo}px, 0)`:`scale(${xn}) translate3d(${eo}px, 0, 0)`,transition:"none"},!0)}if(!l){const xn=We*fe;He(K.current,{transform:ot(_)?`translate3d(0, ${xn}px, 0)`:`translate3d(${xn}px, 0, 0)`})}}}Q.useEffect(()=>()=>{on(!1),Ft()},[]),Q.useEffect(()=>{var ie;function fe(){if(!K.current)return;const ke=document.activeElement;if(kc(ke)||ye.current){var q;const Oe=((q=window.visualViewport)==null?void 0:q.height)||0;let We=window.innerHeight-Oe;const Et=K.current.getBoundingClientRect().height||0;de.current||(de.current=Et);const vt=K.current.getBoundingClientRect().top;if(Math.abs(Ie.current-We)>60&&(ye.current=!ye.current),l&&l.length>0&&Tt&&ut){const wn=Tt[ut]||0;We+=wn}if(Ie.current=We,Et>Oe||ye.current){const wn=K.current.getBoundingClientRect().height;let zt=wn;wn>Oe&&(zt=Oe-bm),R?K.current.style.height=`${wn-Math.max(We,0)}px`:K.current.style.height=`${Math.max(zt,Oe-vt)}px`}else K.current.style.height=`${de.current}px`;l&&l.length>0&&!ye.current?K.current.style.bottom="0px":K.current.style.bottom=`${Math.max(We,0)}px`}}return(ie=window.visualViewport)==null||ie.addEventListener("resize",fe),()=>{var ke;return(ke=window.visualViewport)==null?void 0:ke.removeEventListener("resize",fe)}},[ut,l,Tt]);function Re(){K.current&&(Nt(),v==null||v(),He(K.current,{transform:ot(_)?`translate3d(0, ${_==="bottom"?"100%":"-100%"}, 0)`:`translate3d(${_==="right"?"100%":"-100%"}, 0, 0)`,transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`}),He(ee.current,{opacity:"0",transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`}),on(!1),setTimeout(()=>{F(!1),j(!1)},300),setTimeout(()=>{l&&Je(l[0])},Ne.DURATION*1e3))}Q.useEffect(()=>{if(!O&&r){const ie=setTimeout(()=>{Vl(document.body)},200);return()=>clearTimeout(ie)}},[O,r]),Q.useLayoutEffect(()=>{e?(j(!0),V(!0)):Re()},[e]),Q.useEffect(()=>{W&&(t==null||t(O))},[O]),Q.useEffect(()=>{Z(!0)},[]);function nt(){if(!K.current)return;const ie=document.querySelector("[vaul-drawer-wrapper]"),fe=ql(K.current,_);He(K.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`}),He(ee.current,{transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,opacity:"1"}),r&&fe&&fe>0&&O&&He(ie,{borderRadius:`${Em}px`,overflow:"hidden",...ot(_)?{transform:`scale(${yn()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${yn()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Ne.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ne.EASE.join(",")})`},!0)}function Nt(){!le||!K.current||(K.current.classList.remove(pu),Ye.current=!1,ne(!1),Ve.current=new Date)}function St(ie){if(!le||!K.current)return;K.current.classList.remove(pu),Ye.current=!1,ne(!1),Ve.current=new Date;const fe=ql(K.current,_);if(!oe(ie.target,!1)||!fe||Number.isNaN(fe)||ue.current===null)return;const ke=Ve.current.getTime()-ue.current.getTime(),q=J.current-(ot(_)?ie.clientY:ie.clientX),Oe=Math.abs(q)/ke;if(Oe>.05&&(B(!0),setTimeout(()=>{B(!1)},200)),l){tt({draggedDistance:q*(_==="bottom"||_==="right"?1:-1),closeDrawer:Re,velocity:Oe,dismissible:m}),i==null||i(ie,!0);return}if(_==="bottom"||_==="right"?q>0:q<0){nt(),i==null||i(ie,!0);return}if(Oe>b0){Re(),i==null||i(ie,!1);return}var We;const Et=Math.min((We=K.current.getBoundingClientRect().height)!=null?We:0,window.innerHeight);if(fe>=Et*u){Re(),i==null||i(ie,!1);return}i==null||i(ie,!0),nt()}Q.useEffect(()=>{O&&(He(document.documentElement,{scrollBehavior:"auto"}),se.current=new Date,on(!0))},[O]),Q.useEffect(()=>{if(K.current&&H){var ie;const fe=K==null||(ie=K.current)==null?void 0:ie.querySelectorAll("*");fe==null||fe.forEach(ke=>{const q=ke;(q.scrollHeight>q.clientHeight||q.scrollWidth>q.clientWidth)&&q.classList.add("vaul-scrollable")})}},[H]);function on(ie){const fe=document.querySelector("[vaul-drawer-wrapper]");!fe||!r||(ie?(f&&(S||(He(document.body,{background:document.body.style.backgroundColor||document.body.style.background}),He(document.body,{background:"black"},!0))),He(fe,{borderRadius:`${Em}px`,overflow:"hidden",...ot(_)?{transform:`scale(${yn()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${yn()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Ne.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ne.EASE.join(",")})`})):(Vl(fe,"overflow"),Vl(fe,"transform"),Vl(fe,"borderRadius"),He(fe,{transitionProperty:"transform, border-radius",transitionDuration:`${Ne.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ne.EASE.join(",")})`})))}function Qn(ie){const fe=ie?(window.innerWidth-Nr)/window.innerWidth:1,ke=ie?-Nr:0;be.current&&window.clearTimeout(be.current),He(K.current,{transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,transform:`scale(${fe}) translate3d(0, ${ke}px, 0)`}),!ie&&K.current&&(be.current=setTimeout(()=>{const q=ql(K.current,_);He(K.current,{transition:"none",transform:ot(_)?`translate3d(0, ${q}px, 0)`:`translate3d(${q}px, 0, 0)`})},500))}function Yn(ie,fe){if(fe<0)return;const ke=ot(_)?window.innerHeight:window.innerWidth,q=(ke-Nr)/ke,Oe=q+fe*(1-q),We=-Nr+fe*Nr;He(K.current,{transform:ot(_)?`scale(${Oe}) translate3d(0, ${We}px, 0)`:`scale(${Oe}) translate3d(${We}px, 0, 0)`,transition:"none"})}function Xn(ie,fe){const ke=ot(_)?window.innerHeight:window.innerWidth,q=fe?(ke-Nr)/ke:1,Oe=fe?-Nr:0;fe&&He(K.current,{transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,transform:ot(_)?`scale(${q}) translate3d(0, ${Oe}px, 0)`:`scale(${q}) translate3d(${Oe}px, 0, 0)`})}return Q.createElement(uk,{modal:y,onOpenChange:ie=>{if(e!==void 0){t==null||t(ie);return}ie?(V(!0),j(ie)):Re()},open:O},Q.createElement(g0.Provider,{value:{visible:H,activeSnapPoint:me,snapPoints:l,setActiveSnapPoint:Je,drawerRef:K,overlayRef:ee,scaleBackground:on,onOpenChange:t,onPress:G,setVisible:F,onRelease:St,onDrag:Le,dismissible:m,handleOnly:h,isOpen:O,isDragging:le,shouldFade:rn,closeDrawer:Re,onNestedDrag:Yn,onNestedOpenChange:Qn,onNestedRelease:Xn,keyboardIsOpen:ye,openProp:e,modal:y,snapPointsOffset:Tt,direction:_}},n))}const Mk=250,Ik=120,k0=Q.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{visible:o,closeDrawer:i,isDragging:l,snapPoints:a,activeSnapPoint:f,setActiveSnapPoint:u,dismissible:p,handleOnly:m,onPress:h,onDrag:w}=va(),C=Q.useRef(null),E=Q.useRef(!1);function R(){if(E.current){S();return}window.setTimeout(()=>{y()},Ik)}function y(){if(l||e||E.current){S();return}if(S(),(!a||a.length===0)&&p){i();return}if(f===a[a.length-1]&&p){i();return}const P=a.findIndex(T=>T===f);if(P===-1)return;const A=a[P+1];u(A)}function v(){C.current=window.setTimeout(()=>{E.current=!0},Mk)}function S(){window.clearTimeout(C.current),E.current=!1}return Q.createElement("div",{onClick:R,onDoubleClick:()=>{E.current=!0,i()},onPointerCancel:S,onPointerDown:_=>{m&&h(_),v()},onPointerMove:_=>{m&&w(_)},ref:r,"vaul-drawer-visible":o?"true":"false","vaul-handle":"","aria-hidden":"true",...n},Q.createElement("span",{"vaul-handle-hitarea":"","aria-hidden":"true"},t))});k0.displayName="Drawer.Handle";const R0=Q.forwardRef(function({children:e,...t},n){const{overlayRef:r,snapPoints:o,onRelease:i,shouldFade:l,isOpen:a,visible:f}=va(),u=S0(n,r),p=o&&o.length>0;return Q.createElement(dk,{onMouseUp:i,ref:u,"vaul-drawer-visible":f?"true":"false","vaul-overlay":"","vaul-snap-points":a&&p?"true":"false","vaul-snap-points-overlay":a&&l?"true":"false",...t})});R0.displayName="Drawer.Overlay";const P0=Q.forwardRef(function({onOpenAutoFocus:e,onPointerDownOutside:t,onAnimationEnd:n,style:r,...o},i){const{drawerRef:l,onPress:a,onRelease:f,onDrag:u,dismissible:p,keyboardIsOpen:m,snapPointsOffset:h,visible:w,closeDrawer:C,modal:E,openProp:R,onOpenChange:y,setVisible:v,handleOnly:S,direction:_}=va(),P=S0(i,l),A=Q.useRef(null),T=Q.useRef(!1),O=(j,I,V=0)=>{if(T.current)return!0;const H=Math.abs(j.y),F=Math.abs(j.x),W=F>H,Z=["bottom","right"].includes(I)?1:-1;if(I==="left"||I==="right"){if(!(j.x*Z<0)&&F>=0&&F<=V)return W}else if(!(j.y*Z<0)&&H>=0&&H<=V)return!W;return T.current=!0,!0};return Q.useEffect(()=>{v(!0)},[]),Q.createElement(pk,{"vaul-drawer":"","vaul-drawer-direction":_,"vaul-drawer-visible":w?"true":"false",...o,ref:P,style:h&&h.length>0?{"--snap-point-height":`${h[0]}px`,...r}:r,onOpenAutoFocus:j=>{if(e)e(j);else{var I;j.preventDefault(),(I=l.current)==null||I.focus()}},onPointerDown:j=>{S||(o.onPointerDown==null||o.onPointerDown.call(o,j),A.current={x:j.clientX,y:j.clientY},a(j))},onPointerDownOutside:j=>{if(t==null||t(j),!E||j.defaultPrevented){j.preventDefault();return}m.current&&(m.current=!1),j.preventDefault(),y==null||y(!1),!(!p||R!==void 0)&&C()},onFocusOutside:j=>{if(!E){j.preventDefault();return}},onEscapeKeyDown:j=>{if(!E){j.preventDefault();return}},onPointerMove:j=>{if(S||(o.onPointerMove==null||o.onPointerMove.call(o,j),!A.current))return;const I=j.clientY-A.current.y,V=j.clientX-A.current.x,H=j.pointerType==="touch"?10:2;O({x:V,y:I},_,H)?u(j):(Math.abs(V)>H||Math.abs(I)>H)&&(A.current=null)},onPointerUp:j=>{o.onPointerUp==null||o.onPointerUp.call(o,j),A.current=null,T.current=!1,f(j)}})});P0.displayName="Drawer.Content";function Lk({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:i}=va();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return Q.createElement(_0,{nested:!0,onClose:()=>{o(!1)},onDrag:(l,a)=>{r(l,a),e==null||e(l,a)},onOpenChange:l=>{l&&o(l),t==null||t(l)},onRelease:i,...n})}const gn={Root:_0,NestedRoot:Lk,Content:P0,Handle:k0,Overlay:R0,Trigger:ck,Portal:fk,Close:vk,Title:mk,Description:hk},T0=({shouldScaleBackground:e=!0,...t})=>b.jsx(gn.Root,{shouldScaleBackground:e,...t});T0.displayName="Drawer";const Fk=gn.Trigger,zk=gn.Portal,$k=gn.Close,N0=g.forwardRef(({className:e,...t},n)=>b.jsx(gn.Overlay,{ref:n,className:je("fixed inset-0 z-50 bg-black/80",e),...t}));N0.displayName=gn.Overlay.displayName;const O0=g.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(zk,{children:[b.jsx(N0,{}),b.jsxs(gn.Content,{ref:r,className:je("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[b.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));O0.displayName="DrawerContent";const A0=({className:e,...t})=>b.jsx("div",{className:je("grid gap-1.5 p-4 text-center sm:text-left",e),...t});A0.displayName="DrawerHeader";const D0=({className:e,...t})=>b.jsx("div",{className:je("mt-auto flex flex-col gap-2 p-4",e),...t});D0.displayName="DrawerFooter";const j0=g.forwardRef(({className:e,...t},n)=>b.jsx(gn.Title,{ref:n,className:je("text-lg font-semibold leading-none tracking-tight",e),...t}));j0.displayName=gn.Title.displayName;const M0=g.forwardRef(({className:e,...t},n)=>b.jsx(gn.Description,{ref:n,className:je("text-sm text-muted-foreground",e),...t}));M0.displayName=gn.Description.displayName;function Hk(){const{setRowPerPageOrAuto:e,downloadDatabase:t,exportAllTablesAsCSV:n,exportTableAsCSV:r,selectedTable:o,setIsCustomQuery:i}=Zr(),[l,a]=g.useState(30),[f,u]=g.useState(!1);g.useEffect(()=>{f&&a(30)},[f]);const p=w=>{const C=Number(w.target.value);isNaN(C)||(a(C),u(!1))},m=()=>{u(w=>!w)},h=()=>{i(!1),e(f?"auto":l)};return b.jsxs(T0,{children:[b.jsx(Fk,{asChild:!0,children:b.jsx(At,{variant:"outline",children:b.jsx(OE,{className:"h-5 w-5"})})}),b.jsx(O0,{children:b.jsxs("div",{className:"mx-auto w-full max-w-md",children:[b.jsxs(A0,{children:[b.jsx(j0,{children:"Settings"}),b.jsx(M0,{children:"Personalize your site experience here."})]}),b.jsxs("div",{className:"p-4 pb-0 flex flex-col gap-4",children:[b.jsxs("div",{children:[b.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Rows Per Page"}),b.jsxs("div",{className:"border rounded p-2 flex gap-1 justify-center items-center",children:[b.jsx(Cf,{min:"3",max:"500",value:l,onChange:p,disabled:f,placeholder:"30",type:"number",name:"rowsPerPage"}),b.jsx("span",{className:"text-sm text-muted-foreground h-full text-center",children:"OR"}),b.jsx(At,{onClick:m,variant:"outline",className:f?"border border-primary":void 0,children:"Auto calculate"})]}),b.jsx(At,{className:"w-full mt-2",onClick:h,variant:"outline",children:b.jsx("span",{children:"Save"})})]}),b.jsxs("div",{children:[b.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Exports Settings"}),b.jsxs("div",{className:"border rounded p-2 flex flex-col gap-1",children:[b.jsx(At,{variant:"outline",onClick:t,children:b.jsx("span",{className:"ml-2",children:"Export as SQLite"})}),b.jsx(At,{variant:"outline",onClick:()=>r(parseInt(o)),children:b.jsx("span",{className:"ml-2",children:"Export selected table as CSV"})}),b.jsx(At,{variant:"outline",onClick:n,children:b.jsx("span",{className:"ml-2",children:"Export all tables as CSV"})})]})]})]}),b.jsx(D0,{children:b.jsx($k,{asChild:!0,children:b.jsx(At,{variant:"outline",children:"Close"})})})]})})]})}function Uk(){const{db:e}=Zr();return b.jsxs("footer",{className:"flex items-center justify-between my-1 p-4 border rounded",children:[b.jsxs("div",{children:[b.jsx("p",{className:"hidden sm:block text-xs",children:"No file will be uploaded to server. using JavaScript, sql.js"}),b.jsx("p",{className:"block sm:hidden text-xs",children:"No file uploads to server."}),b.jsxs("a",{href:"https://github.com/vwh/sqlite-viewer",target:"_blank",className:"text-sm text-link hover:underline flex gap-1 items-center",title:"Star on GitHub",children:[b.jsx(CE,{className:"h-4 w-4"}),b.jsx("span",{children:"Star us on GitHub"})]})]}),b.jsxs("div",{className:"flex gap-1",children:[b.jsx(ek,{}),e&&b.jsx(Hk,{})]})]})}mu.createRoot(document.getElementById("root")).render(b.jsx(Q.StrictMode,{children:b.jsxs("main",{className:"container mx-auto p-4",children:[b.jsx(J_,{}),b.jsx(Uk,{})]})})); diff --git a/index.html b/index.html index 293202b..39e433a 100644 --- a/index.html +++ b/index.html @@ -56,8 +56,8 @@ font-size: 2rem; } - - + + diff --git a/sw.js b/sw.js index 454b889..dd1582a 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,i={};const n=(n,s)=>(n=new URL(n+".js",s).href,i[n]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()})).then((()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(s,r)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(i[o])return;let t={};const d=e=>n(e,o),l={module:{uri:o},exports:t,require:d};i[o]=Promise.all(s.map((e=>l[e]||d(e)))).then((e=>(r(...e),t)))}}define(["./workbox-3e911b1d"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-D6NTTyiE.css",revision:null},{url:"assets/index-Dwnho4lG.js",revision:null},{url:"index.html",revision:"58a5994c3e2928927d5eee1fa98be845"},{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"icon512_maskable.png",revision:"3d290f6a5aaab33e10193a7ae6363fdc"},{url:"icon512_rounded.png",revision:"b106306874aab167a6e6fca03440dcfb"},{url:"manifest.webmanifest",revision:"ce6def5658bea734d75f655c3d98523f"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,i={};const n=(n,s)=>(n=new URL(n+".js",s).href,i[n]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()})).then((()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(s,r)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(i[o])return;let t={};const d=e=>n(e,o),l={module:{uri:o},exports:t,require:d};i[o]=Promise.all(s.map((e=>l[e]||d(e)))).then((e=>(r(...e),t)))}}define(["./workbox-3e911b1d"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-BfLfaB4r.css",revision:null},{url:"assets/index-BVCx4aDC.js",revision:null},{url:"index.html",revision:"4721be47bbc7073216f308f75c7b2719"},{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"icon512_maskable.png",revision:"3d290f6a5aaab33e10193a7ae6363fdc"},{url:"icon512_rounded.png",revision:"b106306874aab167a6e6fca03440dcfb"},{url:"manifest.webmanifest",revision:"ce6def5658bea734d75f655c3d98523f"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));