@bitovi/vybit 0.11.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/overlay/dist/overlay.js +67 -21
- package/package.json +1 -1
- package/panel/dist/assets/{DesignMode-CFbFFIBZ.js → DesignMode-Ch-krWhx.js} +1 -1
- package/panel/dist/assets/index-CGc6ZuTL.js +62 -0
- package/panel/dist/index.html +1 -1
- package/server/app.ts +5 -0
- package/server/tailwind-v3.ts +9 -1
- package/server/tailwind-v4.ts +5 -1
- package/shared/types.ts +2 -0
- package/panel/dist/assets/index-aBt_Tt69.js +0 -62
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
var Uh=Object.defineProperty;var Gh=(e,t,n)=>t in e?Uh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var _t=(e,t,n)=>Gh(e,typeof t!="symbol"?t+"":t,n);function Yh(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(r,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>r[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 l of o)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Qh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dd={exports:{}},Cs={},Md={exports:{}},se={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Xo=Symbol.for("react.element"),Xh=Symbol.for("react.portal"),Zh=Symbol.for("react.fragment"),Jh=Symbol.for("react.strict_mode"),qh=Symbol.for("react.profiler"),em=Symbol.for("react.provider"),tm=Symbol.for("react.context"),nm=Symbol.for("react.forward_ref"),rm=Symbol.for("react.suspense"),om=Symbol.for("react.memo"),lm=Symbol.for("react.lazy"),Fu=Symbol.iterator;function sm(e){return e===null||typeof e!="object"?null:(e=Fu&&e[Fu]||e["@@iterator"],typeof e=="function"?e:null)}var $d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zd=Object.assign,Kd={};function Xr(e,t,n){this.props=e,this.context=t,this.refs=Kd,this.updater=n||$d}Xr.prototype.isReactComponent={};Xr.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")};Xr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Fd(){}Fd.prototype=Xr.prototype;function za(e,t,n){this.props=e,this.context=t,this.refs=Kd,this.updater=n||$d}var Ka=za.prototype=new Fd;Ka.constructor=za;zd(Ka,Xr.prototype);Ka.isPureReactComponent=!0;var Wu=Array.isArray,Wd=Object.prototype.hasOwnProperty,Fa={current:null},Hd={key:!0,ref:!0,__self:!0,__source:!0};function Vd(e,t,n){var r,o={},l=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)Wd.call(t,r)&&!Hd.hasOwnProperty(r)&&(o[r]=t[r]);var i=arguments.length-2;if(i===1)o.children=n;else if(1<i){for(var a=Array(i),c=0;c<i;c++)a[c]=arguments[c+2];o.children=a}if(e&&e.defaultProps)for(r in i=e.defaultProps,i)o[r]===void 0&&(o[r]=i[r]);return{$$typeof:Xo,type:e,key:l,ref:s,props:o,_owner:Fa.current}}function im(e,t){return{$$typeof:Xo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Wa(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xo}function am(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Hu=/\/+/g;function Gs(e,t){return typeof e=="object"&&e!==null&&e.key!=null?am(""+e.key):t.toString(36)}function Cl(e,t,n,r,o){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Xo:case Xh:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Gs(s,0):r,Wu(o)?(n="",e!=null&&(n=e.replace(Hu,"$&/")+"/"),Cl(o,t,n,"",function(c){return c})):o!=null&&(Wa(o)&&(o=im(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Hu,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Wu(e))for(var i=0;i<e.length;i++){l=e[i];var a=r+Gs(l,i);s+=Cl(l,t,n,a,o)}else if(a=sm(e),typeof a=="function")for(e=a.call(e),i=0;!(l=e.next()).done;)l=l.value,a=r+Gs(l,i++),s+=Cl(l,t,n,a,o);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function ll(e,t,n){if(e==null)return e;var r=[],o=0;return Cl(e,r,"","",function(l){return t.call(n,l,o++)}),r}function um(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var qe={current:null},jl={transition:null},cm={ReactCurrentDispatcher:qe,ReactCurrentBatchConfig:jl,ReactCurrentOwner:Fa};function Bd(){throw Error("act(...) is not supported in production builds of React.")}se.Children={map:ll,forEach:function(e,t,n){ll(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ll(e,function(){t++}),t},toArray:function(e){return ll(e,function(t){return t})||[]},only:function(e){if(!Wa(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};se.Component=Xr;se.Fragment=Zh;se.Profiler=qh;se.PureComponent=za;se.StrictMode=Jh;se.Suspense=rm;se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cm;se.act=Bd;se.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=zd({},e.props),o=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=Fa.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(a in t)Wd.call(t,a)&&!Hd.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&i!==void 0?i[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){i=Array(a);for(var c=0;c<a;c++)i[c]=arguments[c+2];r.children=i}return{$$typeof:Xo,type:e.type,key:o,ref:l,props:r,_owner:s}};se.createContext=function(e){return e={$$typeof:tm,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:em,_context:e},e.Consumer=e};se.createElement=Vd;se.createFactory=function(e){var t=Vd.bind(null,e);return t.type=e,t};se.createRef=function(){return{current:null}};se.forwardRef=function(e){return{$$typeof:nm,render:e}};se.isValidElement=Wa;se.lazy=function(e){return{$$typeof:lm,_payload:{_status:-1,_result:e},_init:um}};se.memo=function(e,t){return{$$typeof:om,type:e,compare:t===void 0?null:t}};se.startTransition=function(e){var t=jl.transition;jl.transition={};try{e()}finally{jl.transition=t}};se.unstable_act=Bd;se.useCallback=function(e,t){return qe.current.useCallback(e,t)};se.useContext=function(e){return qe.current.useContext(e)};se.useDebugValue=function(){};se.useDeferredValue=function(e){return qe.current.useDeferredValue(e)};se.useEffect=function(e,t){return qe.current.useEffect(e,t)};se.useId=function(){return qe.current.useId()};se.useImperativeHandle=function(e,t,n){return qe.current.useImperativeHandle(e,t,n)};se.useInsertionEffect=function(e,t){return qe.current.useInsertionEffect(e,t)};se.useLayoutEffect=function(e,t){return qe.current.useLayoutEffect(e,t)};se.useMemo=function(e,t){return qe.current.useMemo(e,t)};se.useReducer=function(e,t,n){return qe.current.useReducer(e,t,n)};se.useRef=function(e){return qe.current.useRef(e)};se.useState=function(e){return qe.current.useState(e)};se.useSyncExternalStore=function(e,t,n){return qe.current.useSyncExternalStore(e,t,n)};se.useTransition=function(){return qe.current.useTransition()};se.version="18.3.1";Md.exports=se;var b=Md.exports;const Ud=Qh(b),Gd=Yh({__proto__:null,default:Ud},[b]);/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var dm=b,fm=Symbol.for("react.element"),pm=Symbol.for("react.fragment"),hm=Object.prototype.hasOwnProperty,mm=dm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gm={key:!0,ref:!0,__self:!0,__source:!0};function Yd(e,t,n){var r,o={},l=null,s=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)hm.call(t,r)&&!gm.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:fm,type:e,key:l,ref:s,props:o,_owner:mm.current}}Cs.Fragment=pm;Cs.jsx=Yd;Cs.jsxs=Yd;Dd.exports=Cs;var u=Dd.exports,Oi={},Qd={exports:{}},pt={},Xd={exports:{}},Zd={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(N,I){var P=N.length;N.push(I);e:for(;0<P;){var U=P-1>>>1,J=N[U];if(0<o(J,I))N[U]=I,N[P]=J,P=U;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var I=N[0],P=N.pop();if(P!==I){N[0]=P;e:for(var U=0,J=N.length,Qe=J>>>1;U<Qe;){var ze=2*(U+1)-1,je=N[ze],ae=ze+1,Re=N[ae];if(0>o(je,P))ae<J&&0>o(Re,je)?(N[U]=Re,N[ae]=P,U=ae):(N[U]=je,N[ze]=P,U=ze);else if(ae<J&&0>o(Re,P))N[U]=Re,N[ae]=P,U=ae;else break e}}return I}function o(N,I){var P=N.sortIndex-I.sortIndex;return P!==0?P:N.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,i=s.now();e.unstable_now=function(){return s.now()-i}}var a=[],c=[],d=1,p=null,f=3,g=!1,v=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(N){for(var I=n(c);I!==null;){if(I.callback===null)r(c);else if(I.startTime<=N)r(c),I.sortIndex=I.expirationTime,t(a,I);else break;I=n(c)}}function x(N){if(w=!1,y(N),!v)if(n(a)!==null)v=!0,W(j);else{var I=n(c);I!==null&&ne(x,I.startTime-N)}}function j(N,I){v=!1,w&&(w=!1,h(T),T=-1),g=!0;var P=f;try{for(y(I),p=n(a);p!==null&&(!(p.expirationTime>I)||N&&!O());){var U=p.callback;if(typeof U=="function"){p.callback=null,f=p.priorityLevel;var J=U(p.expirationTime<=I);I=e.unstable_now(),typeof J=="function"?p.callback=J:p===n(a)&&r(a),y(I)}else r(a);p=n(a)}if(p!==null)var Qe=!0;else{var ze=n(c);ze!==null&&ne(x,ze.startTime-I),Qe=!1}return Qe}finally{p=null,f=P,g=!1}}var k=!1,C=null,T=-1,z=5,_=-1;function O(){return!(e.unstable_now()-_<z)}function D(){if(C!==null){var N=e.unstable_now();_=N;var I=!0;try{I=C(!0,N)}finally{I?R():(k=!1,C=null)}}else k=!1}var R;if(typeof m=="function")R=function(){m(D)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,Y=L.port2;L.port1.onmessage=D,R=function(){Y.postMessage(null)}}else R=function(){S(D,0)};function W(N){C=N,k||(k=!0,R())}function ne(N,I){T=S(function(){N(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,W(j))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(N){switch(f){case 1:case 2:case 3:var I=3;break;default:I=f}var P=f;f=I;try{return N()}finally{f=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,I){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var P=f;f=N;try{return I()}finally{f=P}},e.unstable_scheduleCallback=function(N,I,P){var U=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?U+P:U):P=U,N){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=P+J,N={id:d++,callback:I,priorityLevel:N,startTime:P,expirationTime:J,sortIndex:-1},P>U?(N.sortIndex=P,t(c,N),n(a)===null&&N===n(c)&&(w?(h(T),T=-1):w=!0,ne(x,P-U))):(N.sortIndex=J,t(a,N),v||g||(v=!0,W(j))),N},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(N){var I=f;return function(){var P=f;f=I;try{return N.apply(this,arguments)}finally{f=P}}}})(Zd);Xd.exports=Zd;var ym=Xd.exports;/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var vm=b,ft=ym;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Jd=new Set,_o={};function cr(e,t){Fr(e,t),Fr(e+"Capture",t)}function Fr(e,t){for(_o[e]=t,e=0;e<t.length;e++)Jd.add(t[e])}var rn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Di=Object.prototype.hasOwnProperty,xm=/^[: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]*$/,Vu={},Bu={};function wm(e){return Di.call(Bu,e)?!0:Di.call(Vu,e)?!1:xm.test(e)?Bu[e]=!0:(Vu[e]=!0,!1)}function bm(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 Sm(e,t,n,r){if(t===null||typeof t>"u"||bm(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 et(e,t,n,r,o,l,s){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=l,this.removeEmptyString=s}var He={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){He[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];He[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){He[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){He[e]=new et(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){He[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){He[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){He[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){He[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){He[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ha=/[\-:]([a-z])/g;function Va(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(Ha,Va);He[t]=new et(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(Ha,Va);He[t]=new et(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(Ha,Va);He[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){He[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});He.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){He[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ba(e,t,n,r){var o=He.hasOwnProperty(t)?He[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Sm(t,n,o,r)&&(n=null),r||o===null?wm(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var mn=vm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sl=Symbol.for("react.element"),xr=Symbol.for("react.portal"),wr=Symbol.for("react.fragment"),Ua=Symbol.for("react.strict_mode"),Mi=Symbol.for("react.profiler"),qd=Symbol.for("react.provider"),ef=Symbol.for("react.context"),Ga=Symbol.for("react.forward_ref"),$i=Symbol.for("react.suspense"),zi=Symbol.for("react.suspense_list"),Ya=Symbol.for("react.memo"),yn=Symbol.for("react.lazy"),tf=Symbol.for("react.offscreen"),Uu=Symbol.iterator;function io(e){return e===null||typeof e!="object"?null:(e=Uu&&e[Uu]||e["@@iterator"],typeof e=="function"?e:null)}var Se=Object.assign,Ys;function yo(e){if(Ys===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ys=t&&t[1]||""}return`
|
|
34
|
-
`+Ys+e}var Qs=!1;function Xs(e,t){if(!e||Qs)return"";Qs=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
|
|
35
|
-
`),l=r.stack.split(`
|
|
36
|
-
`),s=o.length-1,i=l.length-1;1<=s&&0<=i&&o[s]!==l[i];)i--;for(;1<=s&&0<=i;s--,i--)if(o[s]!==l[i]){if(s!==1||i!==1)do if(s--,i--,0>i||o[s]!==l[i]){var a=`
|
|
37
|
-
`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=i);break}}}finally{Qs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yo(e):""}function km(e){switch(e.tag){case 5:return yo(e.type);case 16:return yo("Lazy");case 13:return yo("Suspense");case 19:return yo("SuspenseList");case 0:case 2:case 15:return e=Xs(e.type,!1),e;case 11:return e=Xs(e.type.render,!1),e;case 1:return e=Xs(e.type,!0),e;default:return""}}function Ki(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 wr:return"Fragment";case xr:return"Portal";case Mi:return"Profiler";case Ua:return"StrictMode";case $i:return"Suspense";case zi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ef:return(e.displayName||"Context")+".Consumer";case qd:return(e._context.displayName||"Context")+".Provider";case Ga:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ya:return t=e.displayName||null,t!==null?t:Ki(e.type)||"Memo";case yn:t=e._payload,e=e._init;try{return Ki(e(t))}catch{}}return null}function Cm(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 Ki(t);case 8:return t===Ua?"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 Ln(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jm(e){var t=nf(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,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function il(e){e._valueTracker||(e._valueTracker=jm(e))}function rf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=nf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Hl(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 Fi(e,t){var n=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ln(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 of(e,t){t=t.checked,t!=null&&Ba(e,"checked",t,!1)}function Wi(e,t){of(e,t);var n=Ln(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")?Hi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Hi(e,t.type,Ln(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yu(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 Hi(e,t,n){(t!=="number"||Hl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var vo=Array.isArray;function Lr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ln(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Vi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return Se({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Qu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error($(92));if(vo(n)){if(1<n.length)throw Error($(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ln(n)}}function lf(e,t){var n=Ln(t.value),r=Ln(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Xu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function sf(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Bi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?sf(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var al,af=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(al=al||document.createElement("div"),al.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=al.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ao(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var So={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},Em=["Webkit","ms","Moz","O"];Object.keys(So).forEach(function(e){Em.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),So[t]=So[e]})});function uf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||So.hasOwnProperty(e)&&So[e]?(""+t).trim():t+"px"}function cf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=uf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Tm=Se({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 Ui(e,t){if(t){if(Tm[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 Gi(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 Yi=null;function Qa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qi=null,Ir=null,Or=null;function Zu(e){if(e=qo(e)){if(typeof Qi!="function")throw Error($(280));var t=e.stateNode;t&&(t=Rs(t),Qi(e.stateNode,e.type,t))}}function df(e){Ir?Or?Or.push(e):Or=[e]:Ir=e}function ff(){if(Ir){var e=Ir,t=Or;if(Or=Ir=null,Zu(e),t)for(e=0;e<t.length;e++)Zu(t[e])}}function pf(e,t){return e(t)}function hf(){}var Zs=!1;function mf(e,t,n){if(Zs)return e(t,n);Zs=!0;try{return pf(e,t,n)}finally{Zs=!1,(Ir!==null||Or!==null)&&(hf(),ff())}}function Lo(e,t){var n=e.stateNode;if(n===null)return null;var r=Rs(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error($(231,t,typeof n));return n}var Xi=!1;if(rn)try{var ao={};Object.defineProperty(ao,"passive",{get:function(){Xi=!0}}),window.addEventListener("test",ao,ao),window.removeEventListener("test",ao,ao)}catch{Xi=!1}function Nm(e,t,n,r,o,l,s,i,a){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var ko=!1,Vl=null,Bl=!1,Zi=null,Rm={onError:function(e){ko=!0,Vl=e}};function Pm(e,t,n,r,o,l,s,i,a){ko=!1,Vl=null,Nm.apply(Rm,arguments)}function _m(e,t,n,r,o,l,s,i,a){if(Pm.apply(this,arguments),ko){if(ko){var c=Vl;ko=!1,Vl=null}else throw Error($(198));Bl||(Bl=!0,Zi=c)}}function dr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function gf(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ju(e){if(dr(e)!==e)throw Error($(188))}function Am(e){var t=e.alternate;if(!t){if(t=dr(e),t===null)throw Error($(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var l=o.alternate;if(l===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===l.child){for(l=o.child;l;){if(l===n)return Ju(o),e;if(l===r)return Ju(o),t;l=l.sibling}throw Error($(188))}if(n.return!==r.return)n=o,r=l;else{for(var s=!1,i=o.child;i;){if(i===n){s=!0,n=o,r=l;break}if(i===r){s=!0,r=o,n=l;break}i=i.sibling}if(!s){for(i=l.child;i;){if(i===n){s=!0,n=l,r=o;break}if(i===r){s=!0,r=l,n=o;break}i=i.sibling}if(!s)throw Error($(189))}}if(n.alternate!==r)throw Error($(190))}if(n.tag!==3)throw Error($(188));return n.stateNode.current===n?e:t}function yf(e){return e=Am(e),e!==null?vf(e):null}function vf(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=vf(e);if(t!==null)return t;e=e.sibling}return null}var xf=ft.unstable_scheduleCallback,qu=ft.unstable_cancelCallback,Lm=ft.unstable_shouldYield,Im=ft.unstable_requestPaint,Te=ft.unstable_now,Om=ft.unstable_getCurrentPriorityLevel,Xa=ft.unstable_ImmediatePriority,wf=ft.unstable_UserBlockingPriority,Ul=ft.unstable_NormalPriority,Dm=ft.unstable_LowPriority,bf=ft.unstable_IdlePriority,js=null,Ot=null;function Mm(e){if(Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(js,e,void 0,(e.current.flags&128)===128)}catch{}}var Nt=Math.clz32?Math.clz32:Km,$m=Math.log,zm=Math.LN2;function Km(e){return e>>>=0,e===0?32:31-($m(e)/zm|0)|0}var ul=64,cl=4194304;function xo(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 Gl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var i=s&~o;i!==0?r=xo(i):(l&=s,l!==0&&(r=xo(l)))}else s=n&~o,s!==0?r=xo(s):l!==0&&(r=xo(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Nt(t),o=1<<n,r|=e[n],t&=~o;return r}function Fm(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Wm(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-Nt(l),i=1<<s,a=o[s];a===-1?(!(i&n)||i&r)&&(o[s]=Fm(i,t)):a<=t&&(e.expiredLanes|=i),l&=~i}}function Ji(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Sf(){var e=ul;return ul<<=1,!(ul&4194240)&&(ul=64),e}function Js(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Zo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nt(t),e[t]=n}function Hm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Nt(n),l=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~l}}function Za(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Nt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ce=0;function kf(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Cf,Ja,jf,Ef,Tf,qi=!1,dl=[],Cn=null,jn=null,En=null,Io=new Map,Oo=new Map,wn=[],Vm="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ec(e,t){switch(e){case"focusin":case"focusout":Cn=null;break;case"dragenter":case"dragleave":jn=null;break;case"mouseover":case"mouseout":En=null;break;case"pointerover":case"pointerout":Io.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oo.delete(t.pointerId)}}function uo(e,t,n,r,o,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[o]},t!==null&&(t=qo(t),t!==null&&Ja(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Bm(e,t,n,r,o){switch(t){case"focusin":return Cn=uo(Cn,e,t,n,r,o),!0;case"dragenter":return jn=uo(jn,e,t,n,r,o),!0;case"mouseover":return En=uo(En,e,t,n,r,o),!0;case"pointerover":var l=o.pointerId;return Io.set(l,uo(Io.get(l)||null,e,t,n,r,o)),!0;case"gotpointercapture":return l=o.pointerId,Oo.set(l,uo(Oo.get(l)||null,e,t,n,r,o)),!0}return!1}function Nf(e){var t=Gn(e.target);if(t!==null){var n=dr(t);if(n!==null){if(t=n.tag,t===13){if(t=gf(n),t!==null){e.blockedOn=t,Tf(e.priority,function(){jf(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function El(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ea(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Yi=r,n.target.dispatchEvent(r),Yi=null}else return t=qo(n),t!==null&&Ja(t),e.blockedOn=n,!1;t.shift()}return!0}function tc(e,t,n){El(e)&&n.delete(t)}function Um(){qi=!1,Cn!==null&&El(Cn)&&(Cn=null),jn!==null&&El(jn)&&(jn=null),En!==null&&El(En)&&(En=null),Io.forEach(tc),Oo.forEach(tc)}function co(e,t){e.blockedOn===t&&(e.blockedOn=null,qi||(qi=!0,ft.unstable_scheduleCallback(ft.unstable_NormalPriority,Um)))}function Do(e){function t(o){return co(o,e)}if(0<dl.length){co(dl[0],e);for(var n=1;n<dl.length;n++){var r=dl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Cn!==null&&co(Cn,e),jn!==null&&co(jn,e),En!==null&&co(En,e),Io.forEach(t),Oo.forEach(t),n=0;n<wn.length;n++)r=wn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<wn.length&&(n=wn[0],n.blockedOn===null);)Nf(n),n.blockedOn===null&&wn.shift()}var Dr=mn.ReactCurrentBatchConfig,Yl=!0;function Gm(e,t,n,r){var o=ce,l=Dr.transition;Dr.transition=null;try{ce=1,qa(e,t,n,r)}finally{ce=o,Dr.transition=l}}function Ym(e,t,n,r){var o=ce,l=Dr.transition;Dr.transition=null;try{ce=4,qa(e,t,n,r)}finally{ce=o,Dr.transition=l}}function qa(e,t,n,r){if(Yl){var o=ea(e,t,n,r);if(o===null)ai(e,t,r,Ql,n),ec(e,r);else if(Bm(o,e,t,n,r))r.stopPropagation();else if(ec(e,r),t&4&&-1<Vm.indexOf(e)){for(;o!==null;){var l=qo(o);if(l!==null&&Cf(l),l=ea(e,t,n,r),l===null&&ai(e,t,r,Ql,n),l===o)break;o=l}o!==null&&r.stopPropagation()}else ai(e,t,r,null,n)}}var Ql=null;function ea(e,t,n,r){if(Ql=null,e=Qa(r),e=Gn(e),e!==null)if(t=dr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=gf(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ql=e,null}function Rf(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Om()){case Xa:return 1;case wf:return 4;case Ul:case Dm:return 16;case bf:return 536870912;default:return 16}default:return 16}}var Sn=null,eu=null,Tl=null;function Pf(){if(Tl)return Tl;var e,t=eu,n=t.length,r,o="value"in Sn?Sn.value:Sn.textContent,l=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[l-r];r++);return Tl=o.slice(e,1<r?1-r:void 0)}function Nl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function fl(){return!0}function nc(){return!1}function ht(e){function t(n,r,o,l,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(n=e[i],this[i]=n?n(l):l[i]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?fl:nc,this.isPropagationStopped=nc,this}return Se(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=fl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=fl)},persist:function(){},isPersistent:fl}),t}var Zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tu=ht(Zr),Jo=Se({},Zr,{view:0,detail:0}),Qm=ht(Jo),qs,ei,fo,Es=Se({},Jo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fo&&(fo&&e.type==="mousemove"?(qs=e.screenX-fo.screenX,ei=e.screenY-fo.screenY):ei=qs=0,fo=e),qs)},movementY:function(e){return"movementY"in e?e.movementY:ei}}),rc=ht(Es),Xm=Se({},Es,{dataTransfer:0}),Zm=ht(Xm),Jm=Se({},Jo,{relatedTarget:0}),ti=ht(Jm),qm=Se({},Zr,{animationName:0,elapsedTime:0,pseudoElement:0}),eg=ht(qm),tg=Se({},Zr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ng=ht(tg),rg=Se({},Zr,{data:0}),oc=ht(rg),og={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},sg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ig(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sg[e])?!!t[e]:!1}function nu(){return ig}var ag=Se({},Jo,{key:function(e){if(e.key){var t=og[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Nl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?lg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nu,charCode:function(e){return e.type==="keypress"?Nl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Nl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ug=ht(ag),cg=Se({},Es,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lc=ht(cg),dg=Se({},Jo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nu}),fg=ht(dg),pg=Se({},Zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),hg=ht(pg),mg=Se({},Es,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),gg=ht(mg),yg=[9,13,27,32],ru=rn&&"CompositionEvent"in window,Co=null;rn&&"documentMode"in document&&(Co=document.documentMode);var vg=rn&&"TextEvent"in window&&!Co,_f=rn&&(!ru||Co&&8<Co&&11>=Co),sc=" ",ic=!1;function Af(e,t){switch(e){case"keyup":return yg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var br=!1;function xg(e,t){switch(e){case"compositionend":return Lf(t);case"keypress":return t.which!==32?null:(ic=!0,sc);case"textInput":return e=t.data,e===sc&&ic?null:e;default:return null}}function wg(e,t){if(br)return e==="compositionend"||!ru&&Af(e,t)?(e=Pf(),Tl=eu=Sn=null,br=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return _f&&t.locale!=="ko"?null:t.data;default:return null}}var bg={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ac(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bg[e.type]:t==="textarea"}function If(e,t,n,r){df(r),t=Xl(t,"onChange"),0<t.length&&(n=new tu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var jo=null,Mo=null;function Sg(e){Bf(e,0)}function Ts(e){var t=Cr(e);if(rf(t))return e}function kg(e,t){if(e==="change")return t}var Of=!1;if(rn){var ni;if(rn){var ri="oninput"in document;if(!ri){var uc=document.createElement("div");uc.setAttribute("oninput","return;"),ri=typeof uc.oninput=="function"}ni=ri}else ni=!1;Of=ni&&(!document.documentMode||9<document.documentMode)}function cc(){jo&&(jo.detachEvent("onpropertychange",Df),Mo=jo=null)}function Df(e){if(e.propertyName==="value"&&Ts(Mo)){var t=[];If(t,Mo,e,Qa(e)),mf(Sg,t)}}function Cg(e,t,n){e==="focusin"?(cc(),jo=t,Mo=n,jo.attachEvent("onpropertychange",Df)):e==="focusout"&&cc()}function jg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ts(Mo)}function Eg(e,t){if(e==="click")return Ts(t)}function Tg(e,t){if(e==="input"||e==="change")return Ts(t)}function Ng(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pt=typeof Object.is=="function"?Object.is:Ng;function $o(e,t){if(Pt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Di.call(t,o)||!Pt(e[o],t[o]))return!1}return!0}function dc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fc(e,t){var n=dc(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=dc(n)}}function Mf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $f(){for(var e=window,t=Hl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hl(e.document)}return t}function ou(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 Rg(e){var t=$f(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Mf(n.ownerDocument.documentElement,n)){if(r!==null&&ou(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,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=fc(n,l);var s=fc(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Pg=rn&&"documentMode"in document&&11>=document.documentMode,Sr=null,ta=null,Eo=null,na=!1;function pc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;na||Sr==null||Sr!==Hl(r)||(r=Sr,"selectionStart"in r&&ou(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}),Eo&&$o(Eo,r)||(Eo=r,r=Xl(ta,"onSelect"),0<r.length&&(t=new tu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Sr)))}function pl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kr={animationend:pl("Animation","AnimationEnd"),animationiteration:pl("Animation","AnimationIteration"),animationstart:pl("Animation","AnimationStart"),transitionend:pl("Transition","TransitionEnd")},oi={},zf={};rn&&(zf=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);function Ns(e){if(oi[e])return oi[e];if(!kr[e])return e;var t=kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zf)return oi[e]=t[n];return e}var Kf=Ns("animationend"),Ff=Ns("animationiteration"),Wf=Ns("animationstart"),Hf=Ns("transitionend"),Vf=new Map,hc="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Mn(e,t){Vf.set(e,t),cr(t,[e])}for(var li=0;li<hc.length;li++){var si=hc[li],_g=si.toLowerCase(),Ag=si[0].toUpperCase()+si.slice(1);Mn(_g,"on"+Ag)}Mn(Kf,"onAnimationEnd");Mn(Ff,"onAnimationIteration");Mn(Wf,"onAnimationStart");Mn("dblclick","onDoubleClick");Mn("focusin","onFocus");Mn("focusout","onBlur");Mn(Hf,"onTransitionEnd");Fr("onMouseEnter",["mouseout","mouseover"]);Fr("onMouseLeave",["mouseout","mouseover"]);Fr("onPointerEnter",["pointerout","pointerover"]);Fr("onPointerLeave",["pointerout","pointerover"]);cr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));cr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));cr("onBeforeInput",["compositionend","keypress","textInput","paste"]);cr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));cr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));cr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Lg=new Set("cancel close invalid load scroll toggle".split(" ").concat(wo));function mc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,_m(r,t,void 0,e),e.currentTarget=null}function Bf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var s=r.length-1;0<=s;s--){var i=r[s],a=i.instance,c=i.currentTarget;if(i=i.listener,a!==l&&o.isPropagationStopped())break e;mc(o,i,c),l=a}else for(s=0;s<r.length;s++){if(i=r[s],a=i.instance,c=i.currentTarget,i=i.listener,a!==l&&o.isPropagationStopped())break e;mc(o,i,c),l=a}}}if(Bl)throw e=Zi,Bl=!1,Zi=null,e}function ye(e,t){var n=t[ia];n===void 0&&(n=t[ia]=new Set);var r=e+"__bubble";n.has(r)||(Uf(t,e,2,!1),n.add(r))}function ii(e,t,n){var r=0;t&&(r|=4),Uf(n,e,r,t)}var hl="_reactListening"+Math.random().toString(36).slice(2);function zo(e){if(!e[hl]){e[hl]=!0,Jd.forEach(function(n){n!=="selectionchange"&&(Lg.has(n)||ii(n,!1,e),ii(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hl]||(t[hl]=!0,ii("selectionchange",!1,t))}}function Uf(e,t,n,r){switch(Rf(t)){case 1:var o=Gm;break;case 4:o=Ym;break;default:o=qa}n=o.bind(null,t,n,e),o=void 0,!Xi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function ai(e,t,n,r,o){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var i=r.stateNode.containerInfo;if(i===o||i.nodeType===8&&i.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;s=s.return}for(;i!==null;){if(s=Gn(i),s===null)return;if(a=s.tag,a===5||a===6){r=l=s;continue e}i=i.parentNode}}r=r.return}mf(function(){var c=l,d=Qa(n),p=[];e:{var f=Vf.get(e);if(f!==void 0){var g=tu,v=e;switch(e){case"keypress":if(Nl(n)===0)break e;case"keydown":case"keyup":g=ug;break;case"focusin":v="focus",g=ti;break;case"focusout":v="blur",g=ti;break;case"beforeblur":case"afterblur":g=ti;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=rc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=Zm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=fg;break;case Kf:case Ff:case Wf:g=eg;break;case Hf:g=hg;break;case"scroll":g=Qm;break;case"wheel":g=gg;break;case"copy":case"cut":case"paste":g=ng;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=lc}var w=(t&4)!==0,S=!w&&e==="scroll",h=w?f!==null?f+"Capture":null:f;w=[];for(var m=c,y;m!==null;){y=m;var x=y.stateNode;if(y.tag===5&&x!==null&&(y=x,h!==null&&(x=Lo(m,h),x!=null&&w.push(Ko(m,x,y)))),S)break;m=m.return}0<w.length&&(f=new g(f,v,null,n,d),p.push({event:f,listeners:w}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",f&&n!==Yi&&(v=n.relatedTarget||n.fromElement)&&(Gn(v)||v[on]))break e;if((g||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,g?(v=n.relatedTarget||n.toElement,g=c,v=v?Gn(v):null,v!==null&&(S=dr(v),v!==S||v.tag!==5&&v.tag!==6)&&(v=null)):(g=null,v=c),g!==v)){if(w=rc,x="onMouseLeave",h="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(w=lc,x="onPointerLeave",h="onPointerEnter",m="pointer"),S=g==null?f:Cr(g),y=v==null?f:Cr(v),f=new w(x,m+"leave",g,n,d),f.target=S,f.relatedTarget=y,x=null,Gn(d)===c&&(w=new w(h,m+"enter",v,n,d),w.target=y,w.relatedTarget=S,x=w),S=x,g&&v)t:{for(w=g,h=v,m=0,y=w;y;y=hr(y))m++;for(y=0,x=h;x;x=hr(x))y++;for(;0<m-y;)w=hr(w),m--;for(;0<y-m;)h=hr(h),y--;for(;m--;){if(w===h||h!==null&&w===h.alternate)break t;w=hr(w),h=hr(h)}w=null}else w=null;g!==null&&gc(p,f,g,w,!1),v!==null&&S!==null&&gc(p,S,v,w,!0)}}e:{if(f=c?Cr(c):window,g=f.nodeName&&f.nodeName.toLowerCase(),g==="select"||g==="input"&&f.type==="file")var j=kg;else if(ac(f))if(Of)j=Tg;else{j=jg;var k=Cg}else(g=f.nodeName)&&g.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(j=Eg);if(j&&(j=j(e,c))){If(p,j,n,d);break e}k&&k(e,f,c),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&Hi(f,"number",f.value)}switch(k=c?Cr(c):window,e){case"focusin":(ac(k)||k.contentEditable==="true")&&(Sr=k,ta=c,Eo=null);break;case"focusout":Eo=ta=Sr=null;break;case"mousedown":na=!0;break;case"contextmenu":case"mouseup":case"dragend":na=!1,pc(p,n,d);break;case"selectionchange":if(Pg)break;case"keydown":case"keyup":pc(p,n,d)}var C;if(ru)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else br?Af(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(_f&&n.locale!=="ko"&&(br||T!=="onCompositionStart"?T==="onCompositionEnd"&&br&&(C=Pf()):(Sn=d,eu="value"in Sn?Sn.value:Sn.textContent,br=!0)),k=Xl(c,T),0<k.length&&(T=new oc(T,e,null,n,d),p.push({event:T,listeners:k}),C?T.data=C:(C=Lf(n),C!==null&&(T.data=C)))),(C=vg?xg(e,n):wg(e,n))&&(c=Xl(c,"onBeforeInput"),0<c.length&&(d=new oc("onBeforeInput","beforeinput",null,n,d),p.push({event:d,listeners:c}),d.data=C))}Bf(p,t)})}function Ko(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,l=o.stateNode;o.tag===5&&l!==null&&(o=l,l=Lo(e,n),l!=null&&r.unshift(Ko(e,l,o)),l=Lo(e,t),l!=null&&r.push(Ko(e,l,o))),e=e.return}return r}function hr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gc(e,t,n,r,o){for(var l=t._reactName,s=[];n!==null&&n!==r;){var i=n,a=i.alternate,c=i.stateNode;if(a!==null&&a===r)break;i.tag===5&&c!==null&&(i=c,o?(a=Lo(n,l),a!=null&&s.unshift(Ko(n,a,i))):o||(a=Lo(n,l),a!=null&&s.push(Ko(n,a,i)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Ig=/\r\n?/g,Og=/\u0000|\uFFFD/g;function yc(e){return(typeof e=="string"?e:""+e).replace(Ig,`
|
|
38
|
-
`).replace(Og,"")}function ml(e,t,n){if(t=yc(t),yc(e)!==t&&n)throw Error($(425))}function Zl(){}var ra=null,oa=null;function la(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var sa=typeof setTimeout=="function"?setTimeout:void 0,Dg=typeof clearTimeout=="function"?clearTimeout:void 0,vc=typeof Promise=="function"?Promise:void 0,Mg=typeof queueMicrotask=="function"?queueMicrotask:typeof vc<"u"?function(e){return vc.resolve(null).then(e).catch($g)}:sa;function $g(e){setTimeout(function(){throw e})}function ui(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Do(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Do(t)}function Tn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function xc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Jr=Math.random().toString(36).slice(2),It="__reactFiber$"+Jr,Fo="__reactProps$"+Jr,on="__reactContainer$"+Jr,ia="__reactEvents$"+Jr,zg="__reactListeners$"+Jr,Kg="__reactHandles$"+Jr;function Gn(e){var t=e[It];if(t)return t;for(var n=e.parentNode;n;){if(t=n[on]||n[It]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xc(e);e!==null;){if(n=e[It])return n;e=xc(e)}return t}e=n,n=e.parentNode}return null}function qo(e){return e=e[It]||e[on],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Cr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function Rs(e){return e[Fo]||null}var aa=[],jr=-1;function $n(e){return{current:e}}function ve(e){0>jr||(e.current=aa[jr],aa[jr]=null,jr--)}function he(e,t){jr++,aa[jr]=e.current,e.current=t}var In={},Ye=$n(In),ot=$n(!1),er=In;function Wr(e,t){var n=e.type.contextTypes;if(!n)return In;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function lt(e){return e=e.childContextTypes,e!=null}function Jl(){ve(ot),ve(Ye)}function wc(e,t,n){if(Ye.current!==In)throw Error($(168));he(Ye,t),he(ot,n)}function Gf(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,Cm(e)||"Unknown",o));return Se({},n,r)}function ql(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||In,er=Ye.current,he(Ye,e),he(ot,ot.current),!0}function bc(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=Gf(e,t,er),r.__reactInternalMemoizedMergedChildContext=e,ve(ot),ve(Ye),he(Ye,e)):ve(ot),he(ot,n)}var Qt=null,Ps=!1,ci=!1;function Yf(e){Qt===null?Qt=[e]:Qt.push(e)}function Fg(e){Ps=!0,Yf(e)}function zn(){if(!ci&&Qt!==null){ci=!0;var e=0,t=ce;try{var n=Qt;for(ce=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Qt=null,Ps=!1}catch(o){throw Qt!==null&&(Qt=Qt.slice(e+1)),xf(Xa,zn),o}finally{ce=t,ci=!1}}return null}var Er=[],Tr=0,es=null,ts=0,gt=[],yt=0,tr=null,Zt=1,Jt="";function Bn(e,t){Er[Tr++]=ts,Er[Tr++]=es,es=e,ts=t}function Qf(e,t,n){gt[yt++]=Zt,gt[yt++]=Jt,gt[yt++]=tr,tr=e;var r=Zt;e=Jt;var o=32-Nt(r)-1;r&=~(1<<o),n+=1;var l=32-Nt(t)+o;if(30<l){var s=o-o%5;l=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Zt=1<<32-Nt(t)+o|n<<o|r,Jt=l+e}else Zt=1<<l|n<<o|r,Jt=e}function lu(e){e.return!==null&&(Bn(e,1),Qf(e,1,0))}function su(e){for(;e===es;)es=Er[--Tr],Er[Tr]=null,ts=Er[--Tr],Er[Tr]=null;for(;e===tr;)tr=gt[--yt],gt[yt]=null,Jt=gt[--yt],gt[yt]=null,Zt=gt[--yt],gt[yt]=null}var ct=null,ut=null,xe=!1,Tt=null;function Xf(e,t){var n=vt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Sc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ct=e,ut=Tn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ct=e,ut=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=tr!==null?{id:Zt,overflow:Jt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=vt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ct=e,ut=null,!0):!1;default:return!1}}function ua(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ca(e){if(xe){var t=ut;if(t){var n=t;if(!Sc(e,t)){if(ua(e))throw Error($(418));t=Tn(n.nextSibling);var r=ct;t&&Sc(e,t)?Xf(r,n):(e.flags=e.flags&-4097|2,xe=!1,ct=e)}}else{if(ua(e))throw Error($(418));e.flags=e.flags&-4097|2,xe=!1,ct=e}}}function kc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ct=e}function gl(e){if(e!==ct)return!1;if(!xe)return kc(e),xe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!la(e.type,e.memoizedProps)),t&&(t=ut)){if(ua(e))throw Zf(),Error($(418));for(;t;)Xf(e,t),t=Tn(t.nextSibling)}if(kc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ut=Tn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ut=null}}else ut=ct?Tn(e.stateNode.nextSibling):null;return!0}function Zf(){for(var e=ut;e;)e=Tn(e.nextSibling)}function Hr(){ut=ct=null,xe=!1}function iu(e){Tt===null?Tt=[e]:Tt.push(e)}var Wg=mn.ReactCurrentBatchConfig;function po(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error($(309));var r=n.stateNode}if(!r)throw Error($(147,e));var o=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(s){var i=o.refs;s===null?delete i[l]:i[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error($(284));if(!n._owner)throw Error($(290,e))}return e}function yl(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Cc(e){var t=e._init;return t(e._payload)}function Jf(e){function t(h,m){if(e){var y=h.deletions;y===null?(h.deletions=[m],h.flags|=16):y.push(m)}}function n(h,m){if(!e)return null;for(;m!==null;)t(h,m),m=m.sibling;return null}function r(h,m){for(h=new Map;m!==null;)m.key!==null?h.set(m.key,m):h.set(m.index,m),m=m.sibling;return h}function o(h,m){return h=_n(h,m),h.index=0,h.sibling=null,h}function l(h,m,y){return h.index=y,e?(y=h.alternate,y!==null?(y=y.index,y<m?(h.flags|=2,m):y):(h.flags|=2,m)):(h.flags|=1048576,m)}function s(h){return e&&h.alternate===null&&(h.flags|=2),h}function i(h,m,y,x){return m===null||m.tag!==6?(m=yi(y,h.mode,x),m.return=h,m):(m=o(m,y),m.return=h,m)}function a(h,m,y,x){var j=y.type;return j===wr?d(h,m,y.props.children,x,y.key):m!==null&&(m.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===yn&&Cc(j)===m.type)?(x=o(m,y.props),x.ref=po(h,m,y),x.return=h,x):(x=Ol(y.type,y.key,y.props,null,h.mode,x),x.ref=po(h,m,y),x.return=h,x)}function c(h,m,y,x){return m===null||m.tag!==4||m.stateNode.containerInfo!==y.containerInfo||m.stateNode.implementation!==y.implementation?(m=vi(y,h.mode,x),m.return=h,m):(m=o(m,y.children||[]),m.return=h,m)}function d(h,m,y,x,j){return m===null||m.tag!==7?(m=Jn(y,h.mode,x,j),m.return=h,m):(m=o(m,y),m.return=h,m)}function p(h,m,y){if(typeof m=="string"&&m!==""||typeof m=="number")return m=yi(""+m,h.mode,y),m.return=h,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case sl:return y=Ol(m.type,m.key,m.props,null,h.mode,y),y.ref=po(h,null,m),y.return=h,y;case xr:return m=vi(m,h.mode,y),m.return=h,m;case yn:var x=m._init;return p(h,x(m._payload),y)}if(vo(m)||io(m))return m=Jn(m,h.mode,y,null),m.return=h,m;yl(h,m)}return null}function f(h,m,y,x){var j=m!==null?m.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return j!==null?null:i(h,m,""+y,x);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case sl:return y.key===j?a(h,m,y,x):null;case xr:return y.key===j?c(h,m,y,x):null;case yn:return j=y._init,f(h,m,j(y._payload),x)}if(vo(y)||io(y))return j!==null?null:d(h,m,y,x,null);yl(h,y)}return null}function g(h,m,y,x,j){if(typeof x=="string"&&x!==""||typeof x=="number")return h=h.get(y)||null,i(m,h,""+x,j);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case sl:return h=h.get(x.key===null?y:x.key)||null,a(m,h,x,j);case xr:return h=h.get(x.key===null?y:x.key)||null,c(m,h,x,j);case yn:var k=x._init;return g(h,m,y,k(x._payload),j)}if(vo(x)||io(x))return h=h.get(y)||null,d(m,h,x,j,null);yl(m,x)}return null}function v(h,m,y,x){for(var j=null,k=null,C=m,T=m=0,z=null;C!==null&&T<y.length;T++){C.index>T?(z=C,C=null):z=C.sibling;var _=f(h,C,y[T],x);if(_===null){C===null&&(C=z);break}e&&C&&_.alternate===null&&t(h,C),m=l(_,m,T),k===null?j=_:k.sibling=_,k=_,C=z}if(T===y.length)return n(h,C),xe&&Bn(h,T),j;if(C===null){for(;T<y.length;T++)C=p(h,y[T],x),C!==null&&(m=l(C,m,T),k===null?j=C:k.sibling=C,k=C);return xe&&Bn(h,T),j}for(C=r(h,C);T<y.length;T++)z=g(C,h,T,y[T],x),z!==null&&(e&&z.alternate!==null&&C.delete(z.key===null?T:z.key),m=l(z,m,T),k===null?j=z:k.sibling=z,k=z);return e&&C.forEach(function(O){return t(h,O)}),xe&&Bn(h,T),j}function w(h,m,y,x){var j=io(y);if(typeof j!="function")throw Error($(150));if(y=j.call(y),y==null)throw Error($(151));for(var k=j=null,C=m,T=m=0,z=null,_=y.next();C!==null&&!_.done;T++,_=y.next()){C.index>T?(z=C,C=null):z=C.sibling;var O=f(h,C,_.value,x);if(O===null){C===null&&(C=z);break}e&&C&&O.alternate===null&&t(h,C),m=l(O,m,T),k===null?j=O:k.sibling=O,k=O,C=z}if(_.done)return n(h,C),xe&&Bn(h,T),j;if(C===null){for(;!_.done;T++,_=y.next())_=p(h,_.value,x),_!==null&&(m=l(_,m,T),k===null?j=_:k.sibling=_,k=_);return xe&&Bn(h,T),j}for(C=r(h,C);!_.done;T++,_=y.next())_=g(C,h,T,_.value,x),_!==null&&(e&&_.alternate!==null&&C.delete(_.key===null?T:_.key),m=l(_,m,T),k===null?j=_:k.sibling=_,k=_);return e&&C.forEach(function(D){return t(h,D)}),xe&&Bn(h,T),j}function S(h,m,y,x){if(typeof y=="object"&&y!==null&&y.type===wr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case sl:e:{for(var j=y.key,k=m;k!==null;){if(k.key===j){if(j=y.type,j===wr){if(k.tag===7){n(h,k.sibling),m=o(k,y.props.children),m.return=h,h=m;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===yn&&Cc(j)===k.type){n(h,k.sibling),m=o(k,y.props),m.ref=po(h,k,y),m.return=h,h=m;break e}n(h,k);break}else t(h,k);k=k.sibling}y.type===wr?(m=Jn(y.props.children,h.mode,x,y.key),m.return=h,h=m):(x=Ol(y.type,y.key,y.props,null,h.mode,x),x.ref=po(h,m,y),x.return=h,h=x)}return s(h);case xr:e:{for(k=y.key;m!==null;){if(m.key===k)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(h,m.sibling),m=o(m,y.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else t(h,m);m=m.sibling}m=vi(y,h.mode,x),m.return=h,h=m}return s(h);case yn:return k=y._init,S(h,m,k(y._payload),x)}if(vo(y))return v(h,m,y,x);if(io(y))return w(h,m,y,x);yl(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(h,m.sibling),m=o(m,y),m.return=h,h=m):(n(h,m),m=yi(y,h.mode,x),m.return=h,h=m),s(h)):n(h,m)}return S}var Vr=Jf(!0),qf=Jf(!1),ns=$n(null),rs=null,Nr=null,au=null;function uu(){au=Nr=rs=null}function cu(e){var t=ns.current;ve(ns),e._currentValue=t}function da(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 Mr(e,t){rs=e,au=Nr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(rt=!0),e.firstContext=null)}function bt(e){var t=e._currentValue;if(au!==e)if(e={context:e,memoizedValue:t,next:null},Nr===null){if(rs===null)throw Error($(308));Nr=e,rs.dependencies={lanes:0,firstContext:e}}else Nr=Nr.next=e;return t}var Yn=null;function du(e){Yn===null?Yn=[e]:Yn.push(e)}function ep(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,du(t)):(n.next=o.next,o.next=n),t.interleaved=n,ln(e,r)}function ln(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 vn=!1;function fu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tp(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 en(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Nn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ie&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,ln(e,n)}return o=r.interleaved,o===null?(t.next=t,du(r)):(t.next=o.next,o.next=t),r.interleaved=t,ln(e,n)}function Rl(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,Za(e,n)}}function jc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?o=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?o=l=t:l=l.next=t}else o=l=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:l,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 os(e,t,n,r){var o=e.updateQueue;vn=!1;var l=o.firstBaseUpdate,s=o.lastBaseUpdate,i=o.shared.pending;if(i!==null){o.shared.pending=null;var a=i,c=a.next;a.next=null,s===null?l=c:s.next=c,s=a;var d=e.alternate;d!==null&&(d=d.updateQueue,i=d.lastBaseUpdate,i!==s&&(i===null?d.firstBaseUpdate=c:i.next=c,d.lastBaseUpdate=a))}if(l!==null){var p=o.baseState;s=0,d=c=a=null,i=l;do{var f=i.lane,g=i.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:g,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var v=e,w=i;switch(f=t,g=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){p=v.call(g,p,f);break e}p=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,f=typeof v=="function"?v.call(g,p,f):v,f==null)break e;p=Se({},p,f);break e;case 2:vn=!0}}i.callback!==null&&i.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[i]:f.push(i))}else g={eventTime:g,lane:f,tag:i.tag,payload:i.payload,callback:i.callback,next:null},d===null?(c=d=g,a=p):d=d.next=g,s|=f;if(i=i.next,i===null){if(i=o.shared.pending,i===null)break;f=i,i=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(d===null&&(a=p),o.baseState=a,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else l===null&&(o.shared.lanes=0);rr|=s,e.lanes=s,e.memoizedState=p}}function Ec(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error($(191,o));o.call(r)}}}var el={},Dt=$n(el),Wo=$n(el),Ho=$n(el);function Qn(e){if(e===el)throw Error($(174));return e}function pu(e,t){switch(he(Ho,t),he(Wo,e),he(Dt,el),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Bi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Bi(t,e)}ve(Dt),he(Dt,t)}function Br(){ve(Dt),ve(Wo),ve(Ho)}function np(e){Qn(Ho.current);var t=Qn(Dt.current),n=Bi(t,e.type);t!==n&&(he(Wo,e),he(Dt,n))}function hu(e){Wo.current===e&&(ve(Dt),ve(Wo))}var we=$n(0);function ls(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var di=[];function mu(){for(var e=0;e<di.length;e++)di[e]._workInProgressVersionPrimary=null;di.length=0}var Pl=mn.ReactCurrentDispatcher,fi=mn.ReactCurrentBatchConfig,nr=0,be=null,Le=null,Me=null,ss=!1,To=!1,Vo=0,Hg=0;function Be(){throw Error($(321))}function gu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pt(e[n],t[n]))return!1;return!0}function yu(e,t,n,r,o,l){if(nr=l,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pl.current=e===null||e.memoizedState===null?Gg:Yg,e=n(r,o),To){l=0;do{if(To=!1,Vo=0,25<=l)throw Error($(301));l+=1,Me=Le=null,t.updateQueue=null,Pl.current=Qg,e=n(r,o)}while(To)}if(Pl.current=is,t=Le!==null&&Le.next!==null,nr=0,Me=Le=be=null,ss=!1,t)throw Error($(300));return e}function vu(){var e=Vo!==0;return Vo=0,e}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Me===null?be.memoizedState=Me=e:Me=Me.next=e,Me}function St(){if(Le===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=Me===null?be.memoizedState:Me.next;if(t!==null)Me=t,Le=e;else{if(e===null)throw Error($(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},Me===null?be.memoizedState=Me=e:Me=Me.next=e}return Me}function Bo(e,t){return typeof t=="function"?t(e):t}function pi(e){var t=St(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=Le,o=r.baseQueue,l=n.pending;if(l!==null){if(o!==null){var s=o.next;o.next=l.next,l.next=s}r.baseQueue=o=l,n.pending=null}if(o!==null){l=o.next,r=r.baseState;var i=s=null,a=null,c=l;do{var d=c.lane;if((nr&d)===d)a!==null&&(a=a.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var p={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};a===null?(i=a=p,s=r):a=a.next=p,be.lanes|=d,rr|=d}c=c.next}while(c!==null&&c!==l);a===null?s=r:a.next=i,Pt(r,t.memoizedState)||(rt=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do l=o.lane,be.lanes|=l,rr|=l,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function hi(e){var t=St(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,l=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do l=e(l,s.action),s=s.next;while(s!==o);Pt(l,t.memoizedState)||(rt=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function rp(){}function op(e,t){var n=be,r=St(),o=t(),l=!Pt(r.memoizedState,o);if(l&&(r.memoizedState=o,rt=!0),r=r.queue,xu(ip.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||Me!==null&&Me.memoizedState.tag&1){if(n.flags|=2048,Uo(9,sp.bind(null,n,r,o,t),void 0,null),$e===null)throw Error($(349));nr&30||lp(n,t,o)}return o}function lp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function sp(e,t,n,r){t.value=n,t.getSnapshot=r,ap(t)&&up(e)}function ip(e,t,n){return n(function(){ap(t)&&up(e)})}function ap(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pt(e,n)}catch{return!0}}function up(e){var t=ln(e,1);t!==null&&Rt(t,e,1,-1)}function Tc(e){var t=Lt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t.queue=e,e=e.dispatch=Ug.bind(null,be,e),[t.memoizedState,e]}function Uo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function cp(){return St().memoizedState}function _l(e,t,n,r){var o=Lt();be.flags|=e,o.memoizedState=Uo(1|t,n,void 0,r===void 0?null:r)}function _s(e,t,n,r){var o=St();r=r===void 0?null:r;var l=void 0;if(Le!==null){var s=Le.memoizedState;if(l=s.destroy,r!==null&&gu(r,s.deps)){o.memoizedState=Uo(t,n,l,r);return}}be.flags|=e,o.memoizedState=Uo(1|t,n,l,r)}function Nc(e,t){return _l(8390656,8,e,t)}function xu(e,t){return _s(2048,8,e,t)}function dp(e,t){return _s(4,2,e,t)}function fp(e,t){return _s(4,4,e,t)}function pp(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function hp(e,t,n){return n=n!=null?n.concat([e]):null,_s(4,4,pp.bind(null,t,e),n)}function wu(){}function mp(e,t){var n=St();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gp(e,t){var n=St();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yp(e,t,n){return nr&21?(Pt(n,t)||(n=Sf(),be.lanes|=n,rr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,rt=!0),e.memoizedState=n)}function Vg(e,t){var n=ce;ce=n!==0&&4>n?n:4,e(!0);var r=fi.transition;fi.transition={};try{e(!1),t()}finally{ce=n,fi.transition=r}}function vp(){return St().memoizedState}function Bg(e,t,n){var r=Pn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xp(e))wp(t,n);else if(n=ep(e,t,n,r),n!==null){var o=Ze();Rt(n,e,r,o),bp(n,t,r)}}function Ug(e,t,n){var r=Pn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xp(e))wp(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,i=l(s,n);if(o.hasEagerState=!0,o.eagerState=i,Pt(i,s)){var a=t.interleaved;a===null?(o.next=o,du(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=ep(e,t,o,r),n!==null&&(o=Ze(),Rt(n,e,r,o),bp(n,t,r))}}function xp(e){var t=e.alternate;return e===be||t!==null&&t===be}function wp(e,t){To=ss=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Za(e,n)}}var is={readContext:bt,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useInsertionEffect:Be,useLayoutEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useMutableSource:Be,useSyncExternalStore:Be,useId:Be,unstable_isNewReconciler:!1},Gg={readContext:bt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:Nc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_l(4194308,4,pp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _l(4194308,4,e,t)},useInsertionEffect:function(e,t){return _l(4,2,e,t)},useMemo:function(e,t){var n=Lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Lt();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=Bg.bind(null,be,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:Tc,useDebugValue:wu,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=Tc(!1),t=e[0];return e=Vg.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=be,o=Lt();if(xe){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),$e===null)throw Error($(349));nr&30||lp(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,Nc(ip.bind(null,r,l,e),[e]),r.flags|=2048,Uo(9,sp.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Lt(),t=$e.identifierPrefix;if(xe){var n=Jt,r=Zt;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Vo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Hg++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Yg={readContext:bt,useCallback:mp,useContext:bt,useEffect:xu,useImperativeHandle:hp,useInsertionEffect:dp,useLayoutEffect:fp,useMemo:gp,useReducer:pi,useRef:cp,useState:function(){return pi(Bo)},useDebugValue:wu,useDeferredValue:function(e){var t=St();return yp(t,Le.memoizedState,e)},useTransition:function(){var e=pi(Bo)[0],t=St().memoizedState;return[e,t]},useMutableSource:rp,useSyncExternalStore:op,useId:vp,unstable_isNewReconciler:!1},Qg={readContext:bt,useCallback:mp,useContext:bt,useEffect:xu,useImperativeHandle:hp,useInsertionEffect:dp,useLayoutEffect:fp,useMemo:gp,useReducer:hi,useRef:cp,useState:function(){return hi(Bo)},useDebugValue:wu,useDeferredValue:function(e){var t=St();return Le===null?t.memoizedState=e:yp(t,Le.memoizedState,e)},useTransition:function(){var e=hi(Bo)[0],t=St().memoizedState;return[e,t]},useMutableSource:rp,useSyncExternalStore:op,useId:vp,unstable_isNewReconciler:!1};function jt(e,t){if(e&&e.defaultProps){t=Se({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function fa(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Se({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var As={isMounted:function(e){return(e=e._reactInternals)?dr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ze(),o=Pn(e),l=en(r,o);l.payload=t,n!=null&&(l.callback=n),t=Nn(e,l,o),t!==null&&(Rt(t,e,o,r),Rl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ze(),o=Pn(e),l=en(r,o);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Nn(e,l,o),t!==null&&(Rt(t,e,o,r),Rl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ze(),r=Pn(e),o=en(n,r);o.tag=2,t!=null&&(o.callback=t),t=Nn(e,o,r),t!==null&&(Rt(t,e,r,n),Rl(t,e,r))}};function Rc(e,t,n,r,o,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,s):t.prototype&&t.prototype.isPureReactComponent?!$o(n,r)||!$o(o,l):!0}function Sp(e,t,n){var r=!1,o=In,l=t.contextType;return typeof l=="object"&&l!==null?l=bt(l):(o=lt(t)?er:Ye.current,r=t.contextTypes,l=(r=r!=null)?Wr(e,o):In),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=As,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=l),t}function Pc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&As.enqueueReplaceState(t,t.state,null)}function pa(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},fu(e);var l=t.contextType;typeof l=="object"&&l!==null?o.context=bt(l):(l=lt(t)?er:Ye.current,o.context=Wr(e,l)),o.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(fa(e,t,l,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&As.enqueueReplaceState(o,o.state,null),os(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Ur(e,t){try{var n="",r=t;do n+=km(r),r=r.return;while(r);var o=n}catch(l){o=`
|
|
39
|
-
Error generating stack: `+l.message+`
|
|
40
|
-
`+l.stack}return{value:e,source:t,stack:o,digest:null}}function mi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ha(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Xg=typeof WeakMap=="function"?WeakMap:Map;function kp(e,t,n){n=en(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){us||(us=!0,Ca=r),ha(e,t)},n}function Cp(e,t,n){n=en(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ha(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){ha(e,t),typeof r!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function _c(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Xg;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=cy.bind(null,e,t,n),t.then(e,e))}function Ac(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Lc(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=en(-1,1),t.tag=2,Nn(n,t,1))),n.lanes|=1),e)}var Zg=mn.ReactCurrentOwner,rt=!1;function Xe(e,t,n,r){t.child=e===null?qf(t,null,n,r):Vr(t,e.child,n,r)}function Ic(e,t,n,r,o){n=n.render;var l=t.ref;return Mr(t,o),r=yu(e,t,n,r,l,o),n=vu(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,sn(e,t,o)):(xe&&n&&lu(t),t.flags|=1,Xe(e,t,r,o),t.child)}function Oc(e,t,n,r,o){if(e===null){var l=n.type;return typeof l=="function"&&!Nu(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,jp(e,t,l,r,o)):(e=Ol(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&o)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:$o,n(s,r)&&e.ref===t.ref)return sn(e,t,o)}return t.flags|=1,e=_n(l,r),e.ref=t.ref,e.return=t,t.child=e}function jp(e,t,n,r,o){if(e!==null){var l=e.memoizedProps;if($o(l,r)&&e.ref===t.ref)if(rt=!1,t.pendingProps=r=l,(e.lanes&o)!==0)e.flags&131072&&(rt=!0);else return t.lanes=e.lanes,sn(e,t,o)}return ma(e,t,n,r,o)}function Ep(e,t,n){var r=t.pendingProps,o=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},he(Pr,it),it|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,he(Pr,it),it|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,he(Pr,it),it|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,he(Pr,it),it|=r;return Xe(e,t,o,n),t.child}function Tp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ma(e,t,n,r,o){var l=lt(n)?er:Ye.current;return l=Wr(t,l),Mr(t,o),n=yu(e,t,n,r,l,o),r=vu(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,sn(e,t,o)):(xe&&r&&lu(t),t.flags|=1,Xe(e,t,n,o),t.child)}function Dc(e,t,n,r,o){if(lt(n)){var l=!0;ql(t)}else l=!1;if(Mr(t,o),t.stateNode===null)Al(e,t),Sp(t,n,r),pa(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,i=t.memoizedProps;s.props=i;var a=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=bt(c):(c=lt(n)?er:Ye.current,c=Wr(t,c));var d=n.getDerivedStateFromProps,p=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==r||a!==c)&&Pc(t,s,r,c),vn=!1;var f=t.memoizedState;s.state=f,os(t,r,s,o),a=t.memoizedState,i!==r||f!==a||ot.current||vn?(typeof d=="function"&&(fa(t,n,d,r),a=t.memoizedState),(i=vn||Rc(t,n,i,r,f,a,c))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=c,r=i):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,tp(e,t),i=t.memoizedProps,c=t.type===t.elementType?i:jt(t.type,i),s.props=c,p=t.pendingProps,f=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=bt(a):(a=lt(n)?er:Ye.current,a=Wr(t,a));var g=n.getDerivedStateFromProps;(d=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==p||f!==a)&&Pc(t,s,r,a),vn=!1,f=t.memoizedState,s.state=f,os(t,r,s,o);var v=t.memoizedState;i!==p||f!==v||ot.current||vn?(typeof g=="function"&&(fa(t,n,g,r),v=t.memoizedState),(c=vn||Rc(t,n,c,r,f,v,a)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=a,r=c):(typeof s.componentDidUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ga(e,t,n,r,l,o)}function ga(e,t,n,r,o,l){Tp(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&bc(t,n,!1),sn(e,t,l);r=t.stateNode,Zg.current=t;var i=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Vr(t,e.child,null,l),t.child=Vr(t,null,i,l)):Xe(e,t,i,l),t.memoizedState=r.state,o&&bc(t,n,!0),t.child}function Np(e){var t=e.stateNode;t.pendingContext?wc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wc(e,t.context,!1),pu(e,t.containerInfo)}function Mc(e,t,n,r,o){return Hr(),iu(o),t.flags|=256,Xe(e,t,n,r),t.child}var ya={dehydrated:null,treeContext:null,retryLane:0};function va(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rp(e,t,n){var r=t.pendingProps,o=we.current,l=!1,s=(t.flags&128)!==0,i;if((i=s)||(i=e!==null&&e.memoizedState===null?!1:(o&2)!==0),i?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),he(we,o&1),e===null)return ca(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,l?(r=t.mode,l=t.child,s={mode:"hidden",children:s},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=Os(s,r,0,null),e=Jn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=va(n),t.memoizedState=ya,e):bu(t,s));if(o=e.memoizedState,o!==null&&(i=o.dehydrated,i!==null))return Jg(e,t,s,r,i,o,n);if(l){l=r.fallback,s=t.mode,o=e.child,i=o.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=_n(o,a),r.subtreeFlags=o.subtreeFlags&14680064),i!==null?l=_n(i,l):(l=Jn(l,s,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,s=e.child.memoizedState,s=s===null?va(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=ya,r}return l=e.child,e=l.sibling,r=_n(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function bu(e,t){return t=Os({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function vl(e,t,n,r){return r!==null&&iu(r),Vr(t,e.child,null,n),e=bu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jg(e,t,n,r,o,l,s){if(n)return t.flags&256?(t.flags&=-257,r=mi(Error($(422))),vl(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,o=t.mode,r=Os({mode:"visible",children:r.children},o,0,null),l=Jn(l,o,s,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Vr(t,e.child,null,s),t.child.memoizedState=va(s),t.memoizedState=ya,l);if(!(t.mode&1))return vl(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var i=r.dgst;return r=i,l=Error($(419)),r=mi(l,r,void 0),vl(e,t,s,r)}if(i=(s&e.childLanes)!==0,rt||i){if(r=$e,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==l.retryLane&&(l.retryLane=o,ln(e,o),Rt(r,e,o,-1))}return Tu(),r=mi(Error($(421))),vl(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=dy.bind(null,e),o._reactRetry=t,null):(e=l.treeContext,ut=Tn(o.nextSibling),ct=t,xe=!0,Tt=null,e!==null&&(gt[yt++]=Zt,gt[yt++]=Jt,gt[yt++]=tr,Zt=e.id,Jt=e.overflow,tr=t),t=bu(t,r.children),t.flags|=4096,t)}function $c(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),da(e.return,t,n)}function gi(e,t,n,r,o){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=o)}function Pp(e,t,n){var r=t.pendingProps,o=r.revealOrder,l=r.tail;if(Xe(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$c(e,n,t);else if(e.tag===19)$c(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(he(we,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&ls(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),gi(t,!1,o,n,l);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ls(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}gi(t,!0,n,null,l);break;case"together":gi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Al(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function sn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),rr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,n=_n(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_n(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function qg(e,t,n){switch(t.tag){case 3:Np(t),Hr();break;case 5:np(t);break;case 1:lt(t.type)&&ql(t);break;case 4:pu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;he(ns,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(he(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Rp(e,t,n):(he(we,we.current&1),e=sn(e,t,n),e!==null?e.sibling:null);he(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Pp(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),he(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,Ep(e,t,n)}return sn(e,t,n)}var _p,xa,Ap,Lp;_p=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};xa=function(){};Ap=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Qn(Dt.current);var l=null;switch(n){case"input":o=Fi(e,o),r=Fi(e,r),l=[];break;case"select":o=Se({},o,{value:void 0}),r=Se({},r,{value:void 0}),l=[];break;case"textarea":o=Vi(e,o),r=Vi(e,r),l=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Zl)}Ui(n,r);var s;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var i=o[c];for(s in i)i.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(_o.hasOwnProperty(c)?l||(l=[]):(l=l||[]).push(c,null));for(c in r){var a=r[c];if(i=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&a!==i&&(a!=null||i!=null))if(c==="style")if(i){for(s in i)!i.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&i[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(l||(l=[]),l.push(c,n)),n=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,i=i?i.__html:void 0,a!=null&&i!==a&&(l=l||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(l=l||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(_o.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&ye("scroll",e),l||i===a||(l=[])):(l=l||[]).push(c,a))}n&&(l=l||[]).push("style",n);var c=l;(t.updateQueue=c)&&(t.flags|=4)}};Lp=function(e,t,n,r){n!==r&&(t.flags|=4)};function ho(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ey(e,t,n){var r=t.pendingProps;switch(su(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return lt(t.type)&&Jl(),Ue(t),null;case 3:return r=t.stateNode,Br(),ve(ot),ve(Ye),mu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(gl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Tt!==null&&(Ta(Tt),Tt=null))),xa(e,t),Ue(t),null;case 5:hu(t);var o=Qn(Ho.current);if(n=t.type,e!==null&&t.stateNode!=null)Ap(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error($(166));return Ue(t),null}if(e=Qn(Dt.current),gl(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[It]=t,r[Fo]=l,e=(t.mode&1)!==0,n){case"dialog":ye("cancel",r),ye("close",r);break;case"iframe":case"object":case"embed":ye("load",r);break;case"video":case"audio":for(o=0;o<wo.length;o++)ye(wo[o],r);break;case"source":ye("error",r);break;case"img":case"image":case"link":ye("error",r),ye("load",r);break;case"details":ye("toggle",r);break;case"input":Gu(r,l),ye("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},ye("invalid",r);break;case"textarea":Qu(r,l),ye("invalid",r)}Ui(n,l),o=null;for(var s in l)if(l.hasOwnProperty(s)){var i=l[s];s==="children"?typeof i=="string"?r.textContent!==i&&(l.suppressHydrationWarning!==!0&&ml(r.textContent,i,e),o=["children",i]):typeof i=="number"&&r.textContent!==""+i&&(l.suppressHydrationWarning!==!0&&ml(r.textContent,i,e),o=["children",""+i]):_o.hasOwnProperty(s)&&i!=null&&s==="onScroll"&&ye("scroll",r)}switch(n){case"input":il(r),Yu(r,l,!0);break;case"textarea":il(r),Xu(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Zl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=sf(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[It]=t,e[Fo]=r,_p(e,t,!1,!1),t.stateNode=e;e:{switch(s=Gi(n,r),n){case"dialog":ye("cancel",e),ye("close",e),o=r;break;case"iframe":case"object":case"embed":ye("load",e),o=r;break;case"video":case"audio":for(o=0;o<wo.length;o++)ye(wo[o],e);o=r;break;case"source":ye("error",e),o=r;break;case"img":case"image":case"link":ye("error",e),ye("load",e),o=r;break;case"details":ye("toggle",e),o=r;break;case"input":Gu(e,r),o=Fi(e,r),ye("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Se({},r,{value:void 0}),ye("invalid",e);break;case"textarea":Qu(e,r),o=Vi(e,r),ye("invalid",e);break;default:o=r}Ui(n,o),i=o;for(l in i)if(i.hasOwnProperty(l)){var a=i[l];l==="style"?cf(e,a):l==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&af(e,a)):l==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Ao(e,a):typeof a=="number"&&Ao(e,""+a):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(_o.hasOwnProperty(l)?a!=null&&l==="onScroll"&&ye("scroll",e):a!=null&&Ba(e,l,a,s))}switch(n){case"input":il(e),Yu(e,r,!1);break;case"textarea":il(e),Xu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ln(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?Lr(e,!!r.multiple,l,!1):r.defaultValue!=null&&Lr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Zl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ue(t),null;case 6:if(e&&t.stateNode!=null)Lp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error($(166));if(n=Qn(Ho.current),Qn(Dt.current),gl(t)){if(r=t.stateNode,n=t.memoizedProps,r[It]=t,(l=r.nodeValue!==n)&&(e=ct,e!==null))switch(e.tag){case 3:ml(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ml(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[It]=t,t.stateNode=r}return Ue(t),null;case 13:if(ve(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(xe&&ut!==null&&t.mode&1&&!(t.flags&128))Zf(),Hr(),t.flags|=98560,l=!1;else if(l=gl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error($(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error($(317));l[It]=t}else Hr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ue(t),l=!1}else Tt!==null&&(Ta(Tt),Tt=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||we.current&1?Ie===0&&(Ie=3):Tu())),t.updateQueue!==null&&(t.flags|=4),Ue(t),null);case 4:return Br(),xa(e,t),e===null&&zo(t.stateNode.containerInfo),Ue(t),null;case 10:return cu(t.type._context),Ue(t),null;case 17:return lt(t.type)&&Jl(),Ue(t),null;case 19:if(ve(we),l=t.memoizedState,l===null)return Ue(t),null;if(r=(t.flags&128)!==0,s=l.rendering,s===null)if(r)ho(l,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=ls(e),s!==null){for(t.flags|=128,ho(l,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return he(we,we.current&1|2),t.child}e=e.sibling}l.tail!==null&&Te()>Gr&&(t.flags|=128,r=!0,ho(l,!1),t.lanes=4194304)}else{if(!r)if(e=ls(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ho(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!xe)return Ue(t),null}else 2*Te()-l.renderingStartTime>Gr&&n!==1073741824&&(t.flags|=128,r=!0,ho(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Te(),t.sibling=null,n=we.current,he(we,r?n&1|2:n&1),t):(Ue(t),null);case 22:case 23:return Eu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?it&1073741824&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function ty(e,t){switch(su(t),t.tag){case 1:return lt(t.type)&&Jl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Br(),ve(ot),ve(Ye),mu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return hu(t),null;case 13:if(ve(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Hr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ve(we),null;case 4:return Br(),null;case 10:return cu(t.type._context),null;case 22:case 23:return Eu(),null;case 24:return null;default:return null}}var xl=!1,Ge=!1,ny=typeof WeakSet=="function"?WeakSet:Set,H=null;function Rr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ce(e,t,r)}else n.current=null}function wa(e,t,n){try{n()}catch(r){Ce(e,t,r)}}var zc=!1;function ry(e,t){if(ra=Yl,e=$f(),ou(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,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,i=-1,a=-1,c=0,d=0,p=e,f=null;t:for(;;){for(var g;p!==n||o!==0&&p.nodeType!==3||(i=s+o),p!==l||r!==0&&p.nodeType!==3||(a=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(g=p.firstChild)!==null;)f=p,p=g;for(;;){if(p===e)break t;if(f===n&&++c===o&&(i=s),f===l&&++d===r&&(a=s),(g=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=g}n=i===-1||a===-1?null:{start:i,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(oa={focusedElem:e,selectionRange:n},Yl=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,S=v.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?w:jt(t.type,w),S);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(x){Ce(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return v=zc,zc=!1,v}function No(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 l=o.destroy;o.destroy=void 0,l!==void 0&&wa(t,n,l)}o=o.next}while(o!==r)}}function Ls(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 ba(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 Ip(e){var t=e.alternate;t!==null&&(e.alternate=null,Ip(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[It],delete t[Fo],delete t[ia],delete t[zg],delete t[Kg])),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 Op(e){return e.tag===5||e.tag===3||e.tag===4}function Kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Op(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 Sa(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=Zl));else if(r!==4&&(e=e.child,e!==null))for(Sa(e,t,n),e=e.sibling;e!==null;)Sa(e,t,n),e=e.sibling}function ka(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(ka(e,t,n),e=e.sibling;e!==null;)ka(e,t,n),e=e.sibling}var Fe=null,Et=!1;function gn(e,t,n){for(n=n.child;n!==null;)Dp(e,t,n),n=n.sibling}function Dp(e,t,n){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(js,n)}catch{}switch(n.tag){case 5:Ge||Rr(n,t);case 6:var r=Fe,o=Et;Fe=null,gn(e,t,n),Fe=r,Et=o,Fe!==null&&(Et?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(Et?(e=Fe,n=n.stateNode,e.nodeType===8?ui(e.parentNode,n):e.nodeType===1&&ui(e,n),Do(e)):ui(Fe,n.stateNode));break;case 4:r=Fe,o=Et,Fe=n.stateNode.containerInfo,Et=!0,gn(e,t,n),Fe=r,Et=o;break;case 0:case 11:case 14:case 15:if(!Ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&wa(n,t,s),o=o.next}while(o!==r)}gn(e,t,n);break;case 1:if(!Ge&&(Rr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(i){Ce(n,t,i)}gn(e,t,n);break;case 21:gn(e,t,n);break;case 22:n.mode&1?(Ge=(r=Ge)||n.memoizedState!==null,gn(e,t,n),Ge=r):gn(e,t,n);break;default:gn(e,t,n)}}function Fc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ny),t.forEach(function(r){var o=fy.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var l=e,s=t,i=s;e:for(;i!==null;){switch(i.tag){case 5:Fe=i.stateNode,Et=!1;break e;case 3:Fe=i.stateNode.containerInfo,Et=!0;break e;case 4:Fe=i.stateNode.containerInfo,Et=!0;break e}i=i.return}if(Fe===null)throw Error($(160));Dp(l,s,o),Fe=null,Et=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(c){Ce(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Mp(t,e),t=t.sibling}function Mp(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ct(t,e),At(e),r&4){try{No(3,e,e.return),Ls(3,e)}catch(w){Ce(e,e.return,w)}try{No(5,e,e.return)}catch(w){Ce(e,e.return,w)}}break;case 1:Ct(t,e),At(e),r&512&&n!==null&&Rr(n,n.return);break;case 5:if(Ct(t,e),At(e),r&512&&n!==null&&Rr(n,n.return),e.flags&32){var o=e.stateNode;try{Ao(o,"")}catch(w){Ce(e,e.return,w)}}if(r&4&&(o=e.stateNode,o!=null)){var l=e.memoizedProps,s=n!==null?n.memoizedProps:l,i=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{i==="input"&&l.type==="radio"&&l.name!=null&&of(o,l),Gi(i,s);var c=Gi(i,l);for(s=0;s<a.length;s+=2){var d=a[s],p=a[s+1];d==="style"?cf(o,p):d==="dangerouslySetInnerHTML"?af(o,p):d==="children"?Ao(o,p):Ba(o,d,p,c)}switch(i){case"input":Wi(o,l);break;case"textarea":lf(o,l);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!l.multiple;var g=l.value;g!=null?Lr(o,!!l.multiple,g,!1):f!==!!l.multiple&&(l.defaultValue!=null?Lr(o,!!l.multiple,l.defaultValue,!0):Lr(o,!!l.multiple,l.multiple?[]:"",!1))}o[Fo]=l}catch(w){Ce(e,e.return,w)}}break;case 6:if(Ct(t,e),At(e),r&4){if(e.stateNode===null)throw Error($(162));o=e.stateNode,l=e.memoizedProps;try{o.nodeValue=l}catch(w){Ce(e,e.return,w)}}break;case 3:if(Ct(t,e),At(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Do(t.containerInfo)}catch(w){Ce(e,e.return,w)}break;case 4:Ct(t,e),At(e);break;case 13:Ct(t,e),At(e),o=e.child,o.flags&8192&&(l=o.memoizedState!==null,o.stateNode.isHidden=l,!l||o.alternate!==null&&o.alternate.memoizedState!==null||(Cu=Te())),r&4&&Fc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ge=(c=Ge)||d,Ct(t,e),Ge=c):Ct(t,e),At(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(H=e,d=e.child;d!==null;){for(p=H=d;H!==null;){switch(f=H,g=f.child,f.tag){case 0:case 11:case 14:case 15:No(4,f,f.return);break;case 1:Rr(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(w){Ce(r,n,w)}}break;case 5:Rr(f,f.return);break;case 22:if(f.memoizedState!==null){Hc(p);continue}}g!==null?(g.return=f,H=g):Hc(p)}d=d.sibling}e:for(d=null,p=e;;){if(p.tag===5){if(d===null){d=p;try{o=p.stateNode,c?(l=o.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(i=p.stateNode,a=p.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,i.style.display=uf("display",s))}catch(w){Ce(e,e.return,w)}}}else if(p.tag===6){if(d===null)try{p.stateNode.nodeValue=c?"":p.memoizedProps}catch(w){Ce(e,e.return,w)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;d===p&&(d=null),p=p.return}d===p&&(d=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:Ct(t,e),At(e),r&4&&Fc(e);break;case 21:break;default:Ct(t,e),At(e)}}function At(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Op(n)){var r=n;break e}n=n.return}throw Error($(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Ao(o,""),r.flags&=-33);var l=Kc(e);ka(e,l,o);break;case 3:case 4:var s=r.stateNode.containerInfo,i=Kc(e);Sa(e,i,s);break;default:throw Error($(161))}}catch(a){Ce(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function oy(e,t,n){H=e,$p(e)}function $p(e,t,n){for(var r=(e.mode&1)!==0;H!==null;){var o=H,l=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||xl;if(!s){var i=o.alternate,a=i!==null&&i.memoizedState!==null||Ge;i=xl;var c=Ge;if(xl=s,(Ge=a)&&!c)for(H=o;H!==null;)s=H,a=s.child,s.tag===22&&s.memoizedState!==null?Vc(o):a!==null?(a.return=s,H=a):Vc(o);for(;l!==null;)H=l,$p(l),l=l.sibling;H=o,xl=i,Ge=c}Wc(e)}else o.subtreeFlags&8772&&l!==null?(l.return=o,H=l):Wc(e)}}function Wc(e){for(;H!==null;){var t=H;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ge||Ls(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ge)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:jt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Ec(t,l,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Ec(t,s,n)}break;case 5:var i=t.stateNode;if(n===null&&t.flags&4){n=i;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var p=d.dehydrated;p!==null&&Do(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}Ge||t.flags&512&&ba(t)}catch(f){Ce(t,t.return,f)}}if(t===e){H=null;break}if(n=t.sibling,n!==null){n.return=t.return,H=n;break}H=t.return}}function Hc(e){for(;H!==null;){var t=H;if(t===e){H=null;break}var n=t.sibling;if(n!==null){n.return=t.return,H=n;break}H=t.return}}function Vc(e){for(;H!==null;){var t=H;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ls(4,t)}catch(a){Ce(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){Ce(t,o,a)}}var l=t.return;try{ba(t)}catch(a){Ce(t,l,a)}break;case 5:var s=t.return;try{ba(t)}catch(a){Ce(t,s,a)}}}catch(a){Ce(t,t.return,a)}if(t===e){H=null;break}var i=t.sibling;if(i!==null){i.return=t.return,H=i;break}H=t.return}}var ly=Math.ceil,as=mn.ReactCurrentDispatcher,Su=mn.ReactCurrentOwner,xt=mn.ReactCurrentBatchConfig,ie=0,$e=null,_e=null,We=0,it=0,Pr=$n(0),Ie=0,Go=null,rr=0,Is=0,ku=0,Ro=null,nt=null,Cu=0,Gr=1/0,Ut=null,us=!1,Ca=null,Rn=null,wl=!1,kn=null,cs=0,Po=0,ja=null,Ll=-1,Il=0;function Ze(){return ie&6?Te():Ll!==-1?Ll:Ll=Te()}function Pn(e){return e.mode&1?ie&2&&We!==0?We&-We:Wg.transition!==null?(Il===0&&(Il=Sf()),Il):(e=ce,e!==0||(e=window.event,e=e===void 0?16:Rf(e.type)),e):1}function Rt(e,t,n,r){if(50<Po)throw Po=0,ja=null,Error($(185));Zo(e,n,r),(!(ie&2)||e!==$e)&&(e===$e&&(!(ie&2)&&(Is|=n),Ie===4&&bn(e,We)),st(e,r),n===1&&ie===0&&!(t.mode&1)&&(Gr=Te()+500,Ps&&zn()))}function st(e,t){var n=e.callbackNode;Wm(e,t);var r=Gl(e,e===$e?We:0);if(r===0)n!==null&&qu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&qu(n),t===1)e.tag===0?Fg(Bc.bind(null,e)):Yf(Bc.bind(null,e)),Mg(function(){!(ie&6)&&zn()}),n=null;else{switch(kf(r)){case 1:n=Xa;break;case 4:n=wf;break;case 16:n=Ul;break;case 536870912:n=bf;break;default:n=Ul}n=Up(n,zp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function zp(e,t){if(Ll=-1,Il=0,ie&6)throw Error($(327));var n=e.callbackNode;if($r()&&e.callbackNode!==n)return null;var r=Gl(e,e===$e?We:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ds(e,r);else{t=r;var o=ie;ie|=2;var l=Fp();($e!==e||We!==t)&&(Ut=null,Gr=Te()+500,Zn(e,t));do try{ay();break}catch(i){Kp(e,i)}while(!0);uu(),as.current=l,ie=o,_e!==null?t=0:($e=null,We=0,t=Ie)}if(t!==0){if(t===2&&(o=Ji(e),o!==0&&(r=o,t=Ea(e,o))),t===1)throw n=Go,Zn(e,0),bn(e,r),st(e,Te()),n;if(t===6)bn(e,r);else{if(o=e.current.alternate,!(r&30)&&!sy(o)&&(t=ds(e,r),t===2&&(l=Ji(e),l!==0&&(r=l,t=Ea(e,l))),t===1))throw n=Go,Zn(e,0),bn(e,r),st(e,Te()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error($(345));case 2:Un(e,nt,Ut);break;case 3:if(bn(e,r),(r&130023424)===r&&(t=Cu+500-Te(),10<t)){if(Gl(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ze(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=sa(Un.bind(null,e,nt,Ut),t);break}Un(e,nt,Ut);break;case 4:if(bn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Nt(r);l=1<<s,s=t[s],s>o&&(o=s),r&=~l}if(r=o,r=Te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ly(r/1960))-r,10<r){e.timeoutHandle=sa(Un.bind(null,e,nt,Ut),r);break}Un(e,nt,Ut);break;case 5:Un(e,nt,Ut);break;default:throw Error($(329))}}}return st(e,Te()),e.callbackNode===n?zp.bind(null,e):null}function Ea(e,t){var n=Ro;return e.current.memoizedState.isDehydrated&&(Zn(e,t).flags|=256),e=ds(e,t),e!==2&&(t=nt,nt=n,t!==null&&Ta(t)),e}function Ta(e){nt===null?nt=e:nt.push.apply(nt,e)}function sy(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],l=o.getSnapshot;o=o.value;try{if(!Pt(l(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bn(e,t){for(t&=~ku,t&=~Is,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Nt(t),r=1<<n;e[n]=-1,t&=~r}}function Bc(e){if(ie&6)throw Error($(327));$r();var t=Gl(e,0);if(!(t&1))return st(e,Te()),null;var n=ds(e,t);if(e.tag!==0&&n===2){var r=Ji(e);r!==0&&(t=r,n=Ea(e,r))}if(n===1)throw n=Go,Zn(e,0),bn(e,t),st(e,Te()),n;if(n===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Un(e,nt,Ut),st(e,Te()),null}function ju(e,t){var n=ie;ie|=1;try{return e(t)}finally{ie=n,ie===0&&(Gr=Te()+500,Ps&&zn())}}function or(e){kn!==null&&kn.tag===0&&!(ie&6)&&$r();var t=ie;ie|=1;var n=xt.transition,r=ce;try{if(xt.transition=null,ce=1,e)return e()}finally{ce=r,xt.transition=n,ie=t,!(ie&6)&&zn()}}function Eu(){it=Pr.current,ve(Pr)}function Zn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Dg(n)),_e!==null)for(n=_e.return;n!==null;){var r=n;switch(su(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Jl();break;case 3:Br(),ve(ot),ve(Ye),mu();break;case 5:hu(r);break;case 4:Br();break;case 13:ve(we);break;case 19:ve(we);break;case 10:cu(r.type._context);break;case 22:case 23:Eu()}n=n.return}if($e=e,_e=e=_n(e.current,null),We=it=t,Ie=0,Go=null,ku=Is=rr=0,nt=Ro=null,Yn!==null){for(t=0;t<Yn.length;t++)if(n=Yn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,l=n.pending;if(l!==null){var s=l.next;l.next=o,r.next=s}n.pending=r}Yn=null}return e}function Kp(e,t){do{var n=_e;try{if(uu(),Pl.current=is,ss){for(var r=be.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ss=!1}if(nr=0,Me=Le=be=null,To=!1,Vo=0,Su.current=null,n===null||n.return===null){Ie=1,Go=t,_e=null;break}e:{var l=e,s=n.return,i=n,a=t;if(t=We,i.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var c=a,d=i,p=d.tag;if(!(d.mode&1)&&(p===0||p===11||p===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var g=Ac(s);if(g!==null){g.flags&=-257,Lc(g,s,i,l,t),g.mode&1&&_c(l,c,t),t=g,a=c;var v=t.updateQueue;if(v===null){var w=new Set;w.add(a),t.updateQueue=w}else v.add(a);break e}else{if(!(t&1)){_c(l,c,t),Tu();break e}a=Error($(426))}}else if(xe&&i.mode&1){var S=Ac(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Lc(S,s,i,l,t),iu(Ur(a,i));break e}}l=a=Ur(a,i),Ie!==4&&(Ie=2),Ro===null?Ro=[l]:Ro.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var h=kp(l,a,t);jc(l,h);break e;case 1:i=a;var m=l.type,y=l.stateNode;if(!(l.flags&128)&&(typeof m.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Rn===null||!Rn.has(y)))){l.flags|=65536,t&=-t,l.lanes|=t;var x=Cp(l,i,t);jc(l,x);break e}}l=l.return}while(l!==null)}Hp(n)}catch(j){t=j,_e===n&&n!==null&&(_e=n=n.return);continue}break}while(!0)}function Fp(){var e=as.current;return as.current=is,e===null?is:e}function Tu(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),$e===null||!(rr&268435455)&&!(Is&268435455)||bn($e,We)}function ds(e,t){var n=ie;ie|=2;var r=Fp();($e!==e||We!==t)&&(Ut=null,Zn(e,t));do try{iy();break}catch(o){Kp(e,o)}while(!0);if(uu(),ie=n,as.current=r,_e!==null)throw Error($(261));return $e=null,We=0,Ie}function iy(){for(;_e!==null;)Wp(_e)}function ay(){for(;_e!==null&&!Lm();)Wp(_e)}function Wp(e){var t=Bp(e.alternate,e,it);e.memoizedProps=e.pendingProps,t===null?Hp(e):_e=t,Su.current=null}function Hp(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=ty(n,t),n!==null){n.flags&=32767,_e=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,_e=null;return}}else if(n=ey(n,t,it),n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);Ie===0&&(Ie=5)}function Un(e,t,n){var r=ce,o=xt.transition;try{xt.transition=null,ce=1,uy(e,t,n,r)}finally{xt.transition=o,ce=r}return null}function uy(e,t,n,r){do $r();while(kn!==null);if(ie&6)throw Error($(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error($(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(Hm(e,l),e===$e&&(_e=$e=null,We=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||wl||(wl=!0,Up(Ul,function(){return $r(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=xt.transition,xt.transition=null;var s=ce;ce=1;var i=ie;ie|=4,Su.current=null,ry(e,n),Mp(n,e),Rg(oa),Yl=!!ra,oa=ra=null,e.current=n,oy(n),Im(),ie=i,ce=s,xt.transition=l}else e.current=n;if(wl&&(wl=!1,kn=e,cs=o),l=e.pendingLanes,l===0&&(Rn=null),Mm(n.stateNode),st(e,Te()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(us)throw us=!1,e=Ca,Ca=null,e;return cs&1&&e.tag!==0&&$r(),l=e.pendingLanes,l&1?e===ja?Po++:(Po=0,ja=e):Po=0,zn(),null}function $r(){if(kn!==null){var e=kf(cs),t=xt.transition,n=ce;try{if(xt.transition=null,ce=16>e?16:e,kn===null)var r=!1;else{if(e=kn,kn=null,cs=0,ie&6)throw Error($(331));var o=ie;for(ie|=4,H=e.current;H!==null;){var l=H,s=l.child;if(H.flags&16){var i=l.deletions;if(i!==null){for(var a=0;a<i.length;a++){var c=i[a];for(H=c;H!==null;){var d=H;switch(d.tag){case 0:case 11:case 15:No(8,d,l)}var p=d.child;if(p!==null)p.return=d,H=p;else for(;H!==null;){d=H;var f=d.sibling,g=d.return;if(Ip(d),d===c){H=null;break}if(f!==null){f.return=g,H=f;break}H=g}}}var v=l.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var S=w.sibling;w.sibling=null,w=S}while(w!==null)}}H=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,H=s;else e:for(;H!==null;){if(l=H,l.flags&2048)switch(l.tag){case 0:case 11:case 15:No(9,l,l.return)}var h=l.sibling;if(h!==null){h.return=l.return,H=h;break e}H=l.return}}var m=e.current;for(H=m;H!==null;){s=H;var y=s.child;if(s.subtreeFlags&2064&&y!==null)y.return=s,H=y;else e:for(s=m;H!==null;){if(i=H,i.flags&2048)try{switch(i.tag){case 0:case 11:case 15:Ls(9,i)}}catch(j){Ce(i,i.return,j)}if(i===s){H=null;break e}var x=i.sibling;if(x!==null){x.return=i.return,H=x;break e}H=i.return}}if(ie=o,zn(),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(js,e)}catch{}r=!0}return r}finally{ce=n,xt.transition=t}}return!1}function Uc(e,t,n){t=Ur(n,t),t=kp(e,t,1),e=Nn(e,t,1),t=Ze(),e!==null&&(Zo(e,1,t),st(e,t))}function Ce(e,t,n){if(e.tag===3)Uc(e,e,n);else for(;t!==null;){if(t.tag===3){Uc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Rn===null||!Rn.has(r))){e=Ur(n,e),e=Cp(t,e,1),t=Nn(t,e,1),e=Ze(),t!==null&&(Zo(t,1,e),st(t,e));break}}t=t.return}}function cy(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ze(),e.pingedLanes|=e.suspendedLanes&n,$e===e&&(We&n)===n&&(Ie===4||Ie===3&&(We&130023424)===We&&500>Te()-Cu?Zn(e,0):ku|=n),st(e,t)}function Vp(e,t){t===0&&(e.mode&1?(t=cl,cl<<=1,!(cl&130023424)&&(cl=4194304)):t=1);var n=Ze();e=ln(e,t),e!==null&&(Zo(e,t,n),st(e,n))}function dy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Vp(e,n)}function fy(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),Vp(e,n)}var Bp;Bp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)rt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rt=!1,qg(e,t,n);rt=!!(e.flags&131072)}else rt=!1,xe&&t.flags&1048576&&Qf(t,ts,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Al(e,t),e=t.pendingProps;var o=Wr(t,Ye.current);Mr(t,n),o=yu(null,t,r,e,o,n);var l=vu();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,lt(r)?(l=!0,ql(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,fu(t),o.updater=As,t.stateNode=o,o._reactInternals=t,pa(t,r,e,n),t=ga(null,t,r,!0,l,n)):(t.tag=0,xe&&l&&lu(t),Xe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Al(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=hy(r),e=jt(r,e),o){case 0:t=ma(null,t,r,e,n);break e;case 1:t=Dc(null,t,r,e,n);break e;case 11:t=Ic(null,t,r,e,n);break e;case 14:t=Oc(null,t,r,jt(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:jt(r,o),ma(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:jt(r,o),Dc(e,t,r,o,n);case 3:e:{if(Np(t),e===null)throw Error($(387));r=t.pendingProps,l=t.memoizedState,o=l.element,tp(e,t),os(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=Ur(Error($(423)),t),t=Mc(e,t,r,n,o);break e}else if(r!==o){o=Ur(Error($(424)),t),t=Mc(e,t,r,n,o);break e}else for(ut=Tn(t.stateNode.containerInfo.firstChild),ct=t,xe=!0,Tt=null,n=qf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Hr(),r===o){t=sn(e,t,n);break e}Xe(e,t,r,n)}t=t.child}return t;case 5:return np(t),e===null&&ca(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,s=o.children,la(r,o)?s=null:l!==null&&la(r,l)&&(t.flags|=32),Tp(e,t),Xe(e,t,s,n),t.child;case 6:return e===null&&ca(t),null;case 13:return Rp(e,t,n);case 4:return pu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vr(t,null,r,n):Xe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:jt(r,o),Ic(e,t,r,o,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,s=o.value,he(ns,r._currentValue),r._currentValue=s,l!==null)if(Pt(l.value,s)){if(l.children===o.children&&!ot.current){t=sn(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var i=l.dependencies;if(i!==null){s=l.child;for(var a=i.firstContext;a!==null;){if(a.context===r){if(l.tag===1){a=en(-1,n&-n),a.tag=2;var c=l.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?a.next=a:(a.next=d.next,d.next=a),c.pending=a}}l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),da(l.return,n,t),i.lanes|=n;break}a=a.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error($(341));s.lanes|=n,i=s.alternate,i!==null&&(i.lanes|=n),da(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}Xe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Mr(t,n),o=bt(o),r=r(o),t.flags|=1,Xe(e,t,r,n),t.child;case 14:return r=t.type,o=jt(r,t.pendingProps),o=jt(r.type,o),Oc(e,t,r,o,n);case 15:return jp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:jt(r,o),Al(e,t),t.tag=1,lt(r)?(e=!0,ql(t)):e=!1,Mr(t,n),Sp(t,r,o),pa(t,r,o,n),ga(null,t,r,!0,e,n);case 19:return Pp(e,t,n);case 22:return Ep(e,t,n)}throw Error($(156,t.tag))};function Up(e,t){return xf(e,t)}function py(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 vt(e,t,n,r){return new py(e,t,n,r)}function Nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hy(e){if(typeof e=="function")return Nu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ga)return 11;if(e===Ya)return 14}return 2}function _n(e,t){var n=e.alternate;return n===null?(n=vt(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 Ol(e,t,n,r,o,l){var s=2;if(r=e,typeof e=="function")Nu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case wr:return Jn(n.children,o,l,t);case Ua:s=8,o|=8;break;case Mi:return e=vt(12,n,t,o|2),e.elementType=Mi,e.lanes=l,e;case $i:return e=vt(13,n,t,o),e.elementType=$i,e.lanes=l,e;case zi:return e=vt(19,n,t,o),e.elementType=zi,e.lanes=l,e;case tf:return Os(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qd:s=10;break e;case ef:s=9;break e;case Ga:s=11;break e;case Ya:s=14;break e;case yn:s=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=vt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function Jn(e,t,n,r){return e=vt(7,e,r,t),e.lanes=n,e}function Os(e,t,n,r){return e=vt(22,e,r,t),e.elementType=tf,e.lanes=n,e.stateNode={isHidden:!1},e}function yi(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function vi(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function my(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=Js(0),this.expirationTimes=Js(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Js(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ru(e,t,n,r,o,l,s,i,a){return e=new my(e,t,n,i,a),t===1?(t=1,l===!0&&(t|=8)):t=0,l=vt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fu(l),e}function gy(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Gp(e){if(!e)return In;e=e._reactInternals;e:{if(dr(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var n=e.type;if(lt(n))return Gf(e,n,t)}return t}function Yp(e,t,n,r,o,l,s,i,a){return e=Ru(n,r,!0,e,o,l,s,i,a),e.context=Gp(null),n=e.current,r=Ze(),o=Pn(n),l=en(r,o),l.callback=t??null,Nn(n,l,o),e.current.lanes=o,Zo(e,o,r),st(e,r),e}function Ds(e,t,n,r){var o=t.current,l=Ze(),s=Pn(o);return n=Gp(n),t.context===null?t.context=n:t.pendingContext=n,t=en(l,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Nn(o,t,s),e!==null&&(Rt(e,o,s,l),Rl(e,o,s)),s}function fs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Gc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Pu(e,t){Gc(e,t),(e=e.alternate)&&Gc(e,t)}function yy(){return null}var Qp=typeof reportError=="function"?reportError:function(e){console.error(e)};function _u(e){this._internalRoot=e}Ms.prototype.render=_u.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));Ds(e,t,null,null)};Ms.prototype.unmount=_u.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;or(function(){Ds(null,e,null,null)}),t[on]=null}};function Ms(e){this._internalRoot=e}Ms.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ef();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wn.length&&t!==0&&t<wn[n].priority;n++);wn.splice(n,0,e),n===0&&Nf(e)}};function Au(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Yc(){}function vy(e,t,n,r,o){if(o){if(typeof r=="function"){var l=r;r=function(){var c=fs(s);l.call(c)}}var s=Yp(t,r,e,0,null,!1,!1,"",Yc);return e._reactRootContainer=s,e[on]=s.current,zo(e.nodeType===8?e.parentNode:e),or(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var i=r;r=function(){var c=fs(a);i.call(c)}}var a=Ru(e,0,!1,null,null,!1,!1,"",Yc);return e._reactRootContainer=a,e[on]=a.current,zo(e.nodeType===8?e.parentNode:e),or(function(){Ds(t,a,n,r)}),a}function zs(e,t,n,r,o){var l=n._reactRootContainer;if(l){var s=l;if(typeof o=="function"){var i=o;o=function(){var a=fs(s);i.call(a)}}Ds(t,s,e,o)}else s=vy(n,t,e,o,r);return fs(s)}Cf=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=xo(t.pendingLanes);n!==0&&(Za(t,n|1),st(t,Te()),!(ie&6)&&(Gr=Te()+500,zn()))}break;case 13:or(function(){var r=ln(e,1);if(r!==null){var o=Ze();Rt(r,e,1,o)}}),Pu(e,1)}};Ja=function(e){if(e.tag===13){var t=ln(e,134217728);if(t!==null){var n=Ze();Rt(t,e,134217728,n)}Pu(e,134217728)}};jf=function(e){if(e.tag===13){var t=Pn(e),n=ln(e,t);if(n!==null){var r=Ze();Rt(n,e,t,r)}Pu(e,t)}};Ef=function(){return ce};Tf=function(e,t){var n=ce;try{return ce=e,t()}finally{ce=n}};Qi=function(e,t,n){switch(t){case"input":if(Wi(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Rs(r);if(!o)throw Error($(90));rf(r),Wi(r,o)}}}break;case"textarea":lf(e,n);break;case"select":t=n.value,t!=null&&Lr(e,!!n.multiple,t,!1)}};pf=ju;hf=or;var xy={usingClientEntryPoint:!1,Events:[qo,Cr,Rs,df,ff,ju]},mo={findFiberByHostInstance:Gn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wy={bundleType:mo.bundleType,version:mo.version,rendererPackageName:mo.rendererPackageName,rendererConfig:mo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:mn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=yf(e),e===null?null:e.stateNode},findFiberByHostInstance:mo.findFiberByHostInstance||yy,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bl.isDisabled&&bl.supportsFiber)try{js=bl.inject(wy),Ot=bl}catch{}}pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xy;pt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Au(t))throw Error($(200));return gy(e,t,null,n)};pt.createRoot=function(e,t){if(!Au(e))throw Error($(299));var n=!1,r="",o=Qp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Ru(e,1,!1,null,null,n,!1,r,o),e[on]=t.current,zo(e.nodeType===8?e.parentNode:e),new _u(t)};pt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=yf(t),e=e===null?null:e.stateNode,e};pt.flushSync=function(e){return or(e)};pt.hydrate=function(e,t,n){if(!$s(t))throw Error($(200));return zs(null,e,t,!0,n)};pt.hydrateRoot=function(e,t,n){if(!Au(e))throw Error($(405));var r=n!=null&&n.hydratedSources||null,o=!1,l="",s=Qp;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Yp(t,null,e,1,n??null,o,!1,l,s),e[on]=t.current,zo(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Ms(t)};pt.render=function(e,t,n){if(!$s(t))throw Error($(200));return zs(null,e,t,!1,n)};pt.unmountComponentAtNode=function(e){if(!$s(e))throw Error($(40));return e._reactRootContainer?(or(function(){zs(null,null,e,!1,function(){e._reactRootContainer=null,e[on]=null})}),!0):!1};pt.unstable_batchedUpdates=ju;pt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$s(n))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return zs(e,t,n,!1,r)};pt.version="18.3.1-next-f1338f8080-20240426";function Xp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xp)}catch(e){console.error(e)}}Xp(),Qd.exports=pt;var Lu=Qd.exports,Qc=Lu;Oi.createRoot=Qc.createRoot,Oi.hydrateRoot=Qc.hydrateRoot;const by="modulepreload",Sy=function(e){return"/panel/"+e},Xc={},ky=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),i=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(a=>{if(a=Sy(a),a in Xc)return;Xc[a]=!0;const c=a.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":by,c||(p.as="script"),p.crossOrigin="",p.href=a,i&&p.setAttribute("nonce",i),document.head.appendChild(p),c)return new Promise((f,g)=>{p.addEventListener("load",f),p.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${a}`)))})}))}function l(s){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s}return o.then(s=>{for(const i of s||[])i.status==="rejected"&&l(i.reason);return t().catch(l)})},Iu=["none","2xs","xs","sm","md","lg","xl","2xl"],Zp=["none","2xs","xs","sm"],Na=["0","1","2","4","8"],Ou=["none","2xs","xs","sm","md","lg"],ps=new Set(Iu),hs=new Set(Zp),Yr=new Set(Na),ms=new Set(Ou),Cy=["text-xs","text-sm","text-base","text-lg","text-xl","text-2xl","text-3xl","text-4xl","text-5xl","text-6xl","text-7xl","text-8xl","text-9xl"],jy=["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black"],Ey=["leading-none","leading-tight","leading-snug","leading-normal","leading-relaxed","leading-loose","leading-3","leading-4","leading-5","leading-6","leading-7","leading-8","leading-9","leading-10"],Ty=["tracking-tighter","tracking-tight","tracking-normal","tracking-wide","tracking-wider","tracking-widest"],Ny=Array.from({length:21},(e,t)=>`opacity-${t*5}`),Jp=["none","sm","","md","lg","xl","2xl","3xl","full"],Ra=Jp.map(e=>e?`rounded-${e}`:"rounded");function Ry(e){return Jp.map(t=>t?`${e}-${t}`:e)}const qp=["0","","2","3","4","5","6","8","10","12","16","20","24","32","40","48","56","64"],Py=["solid","dashed","dotted","double","hidden","none"],Pa=["0","px","0.5","1","1.5","2","2.5","3","3.5","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96"],_y=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],Ay=["50","100","200","300","400","500","600","700","800","900","950"];function Z(){return e=>e===""?{props:{}}:null}function Pe(e,t){const n=new Set(t);return r=>n.has(r)?{props:{[e]:r}}:null}function mt(e="color"){return t=>t!==""?{props:{[e]:t}}:null}function G(e,t="scale"){return n=>n!==""?{props:{[t]:n,scaleName:e}}:null}const Ly=["t","r","b","l","x","y"],xi=["t","r","b","l","x","y","s","e","bs","be"];function Ee(...e){return t=>{for(const n of e){const r=n(t);if(r)return r}return null}}function F(e,t){return{prefix:e,segment:t}}function Vt(e,t){return t.map(n=>({...n,section:e}))}function wi(e,t,n=Ly){return[...n.map(o=>({prefix:e+o,segment:t,canonical:e,extraProps:{side:o}})),{prefix:e,segment:t}]}function Iy(e,t){const n=["tl","tr","br","bl"],r=["t","r","b","l"],o=n.map(s=>({prefix:e+"-"+s,segment:t,canonical:e,extraProps:{corner:s}})),l=r.map(s=>({prefix:e+"-"+s,segment:t,canonical:e,extraProps:{side:s}}));return[...o,...l,{prefix:e,segment:Ee(Z(),t)}]}function Zc(e,t){const n=new Set(t);return{prefix:e,segment:Z(),matches:r=>n.has(r)?{props:{value:r}}:null}}function Oy(e,t){for(const n of t){const{prefix:r,matches:o,segment:l,canonical:s,section:i,extraProps:a}=n;if(o){const p=o(e);if(!p)continue;const f={property:s??r,fullClass:e};if(i&&(f.section=i),a)for(const[g,v]of Object.entries(a))f[g]=v;for(const[g,v]of Object.entries(p.props))f[g]=v;return f}let c;if(e===r)c="";else if(e.startsWith(r+"-"))c=e.slice(r.length+1);else continue;const d=l(c);if(d){const p={property:s??r,fullClass:e};if(i&&(p.section=i),a)for(const[f,g]of Object.entries(a))p[f]=g;for(const[f,g]of Object.entries(d.props))p[f]=g;return p}return{property:s??r,fullClass:e,unknown:!0}}return null}function Dy(e,t){const n=e.trim().split(/\s+/).filter(Boolean),r=[];for(const o of n){const l=Oy(o,t);l&&r.push(l)}return r}const My=["solid","dashed","dotted","double","none","hidden"],$y=["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],zy=["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl","9xl"],Ky=["tighter","tight","normal","wide","wider","widest"],Fy=["left","center","right","justify","start","end"],Wy=["inline-block","inline-grid","inline-flex","inline","flow-root","block","flex","grid","contents","hidden","table-header-group","table-footer-group","table-row-group","table-column-group","table-caption","table-column","table-row","table-cell","table"],Hy=["static","relative","absolute","fixed","sticky"],Vy=["t","tr","r","br","b","bl","l","tl"],By=["start","end","end-safe","center","center-safe","between","around","evenly","stretch","baseline","normal"],Uy=["start","end","end-safe","center","center-safe","baseline","baseline-last","stretch"],Gy=["normal","start","end","center","between","around","evenly","baseline","stretch"],Yy=["start","end","center","stretch"],Qy=["auto","start","end","center","stretch","baseline"],Xy=[...Vt("spacing",[...wi("m",G("spacing"),xi),...wi("-m",G("spacing"),xi),...wi("p",G("spacing"),xi),F("gap-x",G("spacing")),F("gap-y",G("spacing")),F("gap",G("spacing")),F("space-x-reverse",Z()),F("space-y-reverse",Z()),F("space-x",G("spacing")),F("space-y",G("spacing"))]),...Vt("sizing",[F("min-w",G("spacing")),F("max-w",G("spacing")),F("min-h",G("spacing")),F("max-h",G("spacing")),F("size",G("spacing")),F("w",G("spacing")),F("h",G("spacing"))]),...Vt("typography",[F("font-sans",Z()),F("font-serif",Z()),F("font-mono",Z()),F("font",Pe("scale",$y)),F("text-shadow",Ee(Pe("size",Ou),mt())),F("text",Ee(Pe("align",Fy),e=>zy.includes(e)?{props:{size:e,scaleName:"fontSize"}}:null,mt())),F("leading",Ee(Pe("scale",["none"]),G("spacing"))),F("tracking",Pe("scale",Ky)),F("italic",Z()),F("not-italic",Z()),F("underline",Z()),F("line-through",Z()),F("overline",Z()),F("no-underline",Z()),F("uppercase",Z()),F("lowercase",Z()),F("capitalize",Z()),F("normal-case",Z()),F("truncate",Z()),F("align-text-top",Z()),F("align-text-bottom",Z()),F("align-baseline",Z()),F("align-top",Z()),F("align-middle",Z()),F("align-bottom",Z()),F("align-sub",Z()),F("align-super",Z())]),...Vt("color",[F("bg-gradient-to",Pe("direction",Vy)),F("bg",mt()),F("from",mt()),F("via",mt()),F("to",mt()),F("ring",mt()),F("outline",Ee(Pe("style",["solid","dashed","dotted","double","none"]),mt())),F("fill",mt()),F("stroke",mt()),F("decoration",mt())]),...Vt("borders",[{prefix:"border-bs",segment:Ee(Z(),G("borderWidth")),canonical:"border",extraProps:{side:"bs"}},{prefix:"border-be",segment:Ee(Z(),G("borderWidth")),canonical:"border",extraProps:{side:"be"}},{prefix:"border-x",segment:Ee(Z(),G("borderWidth")),canonical:"border",extraProps:{side:"x"}},{prefix:"border-y",segment:Ee(Z(),G("borderWidth")),canonical:"border",extraProps:{side:"y"}},{prefix:"border-s",segment:Ee(Z(),G("borderWidth")),canonical:"border",extraProps:{side:"s"}},{prefix:"border-e",segment:Ee(Z(),G("borderWidth")),canonical:"border",extraProps:{side:"e"}},{prefix:"border-t",segment:Ee(Z(),G("borderWidth")),canonical:"border",extraProps:{side:"t"}},{prefix:"border-r",segment:Ee(Z(),G("borderWidth")),canonical:"border",extraProps:{side:"r"}},{prefix:"border-b",segment:Ee(Z(),G("borderWidth")),canonical:"border",extraProps:{side:"b"}},{prefix:"border-l",segment:Ee(Z(),G("borderWidth")),canonical:"border",extraProps:{side:"l"}},F("border",Ee(Z(),Pe("style",My),e=>/^\d+$/.test(e)||e==="px"?{props:{scale:e,scaleName:"borderWidth"}}:null,mt())),...Iy("rounded",G("borderRadius"))]),...Vt("effects",[F("opacity",G("opacity")),F("shadow",Pe("size",Iu))]),...Vt("layout",[Zc("display",Wy),Zc("position",Hy),{prefix:"inset-bs",segment:G("spacing"),canonical:"inset",extraProps:{side:"bs"}},{prefix:"inset-be",segment:G("spacing"),canonical:"inset",extraProps:{side:"be"}},{prefix:"inset-x",segment:G("spacing"),canonical:"inset",extraProps:{side:"x"}},{prefix:"inset-y",segment:G("spacing"),canonical:"inset",extraProps:{side:"y"}},{prefix:"inset-s",segment:G("spacing"),canonical:"inset",extraProps:{side:"s"}},{prefix:"inset-e",segment:G("spacing"),canonical:"inset",extraProps:{side:"e"}},{prefix:"top",segment:G("spacing"),canonical:"inset",extraProps:{side:"top"}},{prefix:"right",segment:G("spacing"),canonical:"inset",extraProps:{side:"right"}},{prefix:"bottom",segment:G("spacing"),canonical:"inset",extraProps:{side:"bottom"}},{prefix:"left",segment:G("spacing"),canonical:"inset",extraProps:{side:"left"}},{prefix:"start",segment:G("spacing"),canonical:"inset",extraProps:{side:"start"}},{prefix:"end",segment:G("spacing"),canonical:"inset",extraProps:{side:"end"}},F("inset",G("spacing")),F("z",G("zIndex"))]),...Vt("flexbox",[F("flex-row-reverse",Z()),F("flex-col-reverse",Z()),F("flex-wrap-reverse",Z()),F("flex-row",Z()),F("flex-col",Z()),F("flex-wrap",Z()),F("flex-nowrap",Z()),F("flex",Ee(Z(),Pe("value",["auto","initial","none"]),G("number"))),F("grow",Ee(Z(),G("number"))),F("shrink",Ee(Z(),G("number"))),F("justify-items",Pe("value",Yy)),F("justify",Pe("value",By)),F("items",Pe("value",Uy)),F("content",Pe("value",Gy)),F("self",Pe("value",Qy)),F("basis",G("spacing")),F("grid-cols",Ee(Pe("value",["none","subgrid"]),G("gridCols"))),F("grid-rows",Ee(Pe("value",["none","subgrid"]),G("gridRows"))),F("col-span",G("colSpan")),F("row-span",G("rowSpan")),F("order",G("order"))]),...Vt("overflow",[F("overflow-x",Pe("value",["auto","hidden","clip","visible","scroll"])),F("overflow-y",Pe("value",["auto","hidden","clip","visible","scroll"])),F("overflow",Pe("value",["auto","hidden","clip","visible","scroll"]))])];let Gt=null,gs=!1;const Dl=[],Ml=[],$l=[];function Zy(){return window.location.origin.replace(/^http/,"ws")}function eh(){if(Gt)return;const e=Zy();Gt=new WebSocket(e),Gt.addEventListener("open",()=>{gs=!0,_r({type:"REGISTER",role:"panel"});for(const t of Ml)t()}),Gt.addEventListener("close",()=>{gs=!1,Gt=null;for(const t of $l)t();setTimeout(()=>eh(),3e3)}),Gt.addEventListener("message",t=>{try{const n=JSON.parse(t.data);for(const r of Dl)r(n)}catch(n){console.error("[tw-panel] Failed to parse message:",n)}}),Gt.addEventListener("error",t=>{console.error("[tw-panel] WebSocket error:",t)})}function _r(e){gs&&Gt&&Gt.send(JSON.stringify(e))}function pe(e,t){_r({...t,to:e})}function th(e){return Dl.push(e),()=>{const t=Dl.indexOf(e);t!==-1&&Dl.splice(t,1)}}function Jy(e){return Ml.push(e),()=>{const t=Ml.indexOf(e);t!==-1&&Ml.splice(t,1)}}function qy(e){return $l.push(e),()=>{const t=$l.indexOf(e);t!==-1&&$l.splice(t,1)}}function ev(){return gs}const nh=[{name:"popover",label:"Popover",icon:u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[u.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),u.jsx("rect",{x:"4",y:"4",width:"8",height:"6",rx:"1",fill:"currentColor"})]})},{name:"sidebar",label:"Sidebar",icon:u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[u.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),u.jsx("rect",{x:"9",y:"1",width:"6",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.85"})]})},{name:"modal",label:"Modal",icon:u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[u.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.12"}),u.jsx("rect",{x:"3",y:"4",width:"10",height:"8",rx:"1",fill:"currentColor",opacity:"0.9"})]})},{name:"popup",label:"Popup",icon:u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[u.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),u.jsx("rect",{x:"8",y:"8",width:"7",height:"7",rx:"1",fill:"currentColor",opacity:"0.85"})]})}],rh="tw-panel-container";function tv(){try{const e=localStorage.getItem(rh);if(e&&nh.some(t=>t.name===e))return e}catch{}return"popover"}function Jc(){const[e,t]=b.useState(tv),[n,r]=b.useState(!1),o=b.useRef(null);b.useEffect(()=>{function s(i){o.current&&!o.current.contains(i.target)&&r(!1)}return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);function l(s){if(s!==e){try{localStorage.setItem(rh,s)}catch{}t(s),pe("overlay",{type:"SWITCH_CONTAINER",container:s})}r(!1)}return u.jsxs("div",{ref:o,className:"relative",children:[u.jsx("button",{title:"Change container",onClick:()=>r(s=>!s),className:"w-7 h-7 flex items-center justify-center rounded border border-transparent text-bv-text-mid bg-transparent cursor-pointer transition-colors hover:bg-bv-surface hover:border-bv-border hover:text-bv-text",children:u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[u.jsx("rect",{x:".5",y:"1.5",width:"15",height:"13",rx:"1.5",ry:"1.5"}),u.jsx("line",{x1:"8.5",y1:"1.5",x2:"8.5",y2:"14.5"}),u.jsx("line",{x1:"11",y1:"5",x2:"13",y2:"5"}),u.jsx("line",{x1:"11",y1:"8",x2:"13",y2:"8"}),u.jsx("line",{x1:"11",y1:"11",x2:"13",y2:"11"})]})}),n&&u.jsxs("div",{className:"absolute top-[calc(100%+4px)] right-0 bg-bv-surface border border-[#4f4f4f] rounded-lg shadow-[0_4px_16px_rgba(0,0,0,0.25)] p-1.5 flex flex-col gap-px min-w-[148px] z-50",children:[u.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-[0.8px] text-bv-muted px-2 pt-1 pb-1.5",children:"Container"}),nh.map(s=>u.jsxs("button",{onClick:()=>l(s.name),className:`flex items-center gap-2 px-2 py-1.5 rounded text-[12px] cursor-pointer border-none w-full text-left transition-colors ${s.name===e?"bg-bv-teal/9 text-bv-teal":"bg-transparent text-bv-text-mid hover:bg-bv-surface hover:text-bv-text"}`,children:[s.icon,s.label]},s.name)),u.jsx("div",{className:"h-px bg-[#4f4f4f] mx-1 my-1"}),u.jsxs("button",{onClick:()=>{r(!1),pe("overlay",{type:"CLOSE_PANEL"})},className:"flex items-center gap-2 px-2 py-1.5 rounded text-[12px] cursor-pointer border-none w-full text-left transition-colors bg-transparent text-red-400 hover:bg-red-500/10 hover:text-red-300",children:[u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[u.jsx("line",{x1:"4",y1:"4",x2:"12",y2:"12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("line",{x1:"12",y1:"4",x2:"4",y2:"12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),"Close panel"]})]})]})}function nv(e){const t={};for(const[n,r]of Object.entries(e)){if(!r||typeof r!="object")continue;const o=r,l=typeof o.control=="string"?o.control:typeof o.control=="object"&&o.control!==null?o.control.type??"text":"text";t[n]={control:l,options:Array.isArray(o.options)?o.options:void 0,description:typeof o.description=="string"?o.description:void 0,defaultValue:o.defaultValue}}return t}function rv(e,t=!0){const[n,r]=b.useState(null),[o,l]=b.useState(!0),[s,i]=b.useState({}),[a,c]=b.useState({}),d=b.useRef(0),p=b.useRef(null),f=b.useRef(!1);return b.useEffect(()=>{var m;if(!t)return;if(e.length===0){l(!1);return}f.current=!1,d.current=0;const g=document.createElement("iframe");Object.assign(g.style,{position:"fixed",left:"-99999px",top:"-99999px",width:"800px",height:"600px",visibility:"hidden",pointerEvents:"none",border:"none"}),p.current=g,document.body.appendChild(g);function v(y){if(y>=e.length){f.current||(f.current=!0,r(e[0]),i({}),c({}),l(!1));return}d.current=y,console.log(`[useStoryProbe] loading iframe: /storybook/iframe.html?id=${e[y].id}`),g.src=`/storybook/iframe.html?id=${e[y].id}&viewMode=story`}let w=null;function S(y){var k,C,T,z;if(f.current)return;let x=y.data;if(typeof x=="string")try{x=JSON.parse(x)}catch{return}const j=e[d.current];if((x==null?void 0:x.key)==="storybook-channel"&&((k=x==null?void 0:x.event)==null?void 0:k.type)==="storyPrepared"&&((z=(T=(C=x==null?void 0:x.event)==null?void 0:C.args)==null?void 0:T[0])==null?void 0:z.id)===(j==null?void 0:j.id)){const _=x.event.args[0].argTypes??{},O=x.event.args[0].initialArgs??x.event.args[0].args??{};if(Object.keys(_).length>0)f.current=!0,r(j),i(nv(_)),c(O),l(!1);else{w&&clearTimeout(w);const D=d.current+1;w=setTimeout(()=>v(D),50)}}}window.addEventListener("message",S);function h(){w&&clearTimeout(w),w=setTimeout(()=>{!f.current&&d.current<e.length&&(v(d.current+1),h())},5e3)}return g.addEventListener("load",()=>{h()}),console.log(`[useStoryProbe] starting probe for ${(m=e[0])==null?void 0:m.id} (${e.length} stories)`),v(0),()=>{f.current=!0,window.removeEventListener("message",S),w&&clearTimeout(w),g.remove(),p.current=null}},[e,t]),{bestStory:n,probing:o,argTypes:s,defaultArgs:a}}let ov=2,ys=0;const oh=[];function lv(){return new Promise(e=>{const t=()=>{ys<ov?(ys++,e(sv)):oh.push(t)};t()})}function sv(){ys=Math.max(0,ys-1);const e=oh.shift();e==null||e()}function iv(e){const[t,n]=b.useState(!1),r=b.useRef(null),o=b.useRef(!1);b.useEffect(()=>{if(!e||o.current)return;o.current=!0;let s=!1;return lv().then(i=>{if(s){i();return}r.current=i,n(!0)}),()=>{s=!0,r.current&&(r.current(),r.current=null)}},[e]);const l=b.useCallback(()=>{r.current&&(r.current(),r.current=null)},[]);return{canLoad:t,releaseSlot:l}}function av(e,t={},n="/storybook"){const r=`${n}/iframe.html?id=${encodeURIComponent(e)}&viewMode=story`,o=Object.entries(t).filter(([,s])=>s!=null);if(o.length===0)return r;const l=o.map(([s,i])=>`${encodeURIComponent(s)}:${encodeURIComponent(String(i))}`).join(";");return`${r}&args=${l}`}function uv({argTypes:e,args:t,onArgsChange:n}){const r=Object.entries(e);if(r.length===0)return null;function o(l,s){n({...t,[l]:s})}return u.jsx("div",{className:"flex flex-col gap-1.5 px-1",children:r.map(([l,s])=>u.jsx(cv,{name:l,argType:s,value:t[l],onChange:i=>o(l,i)},l))})}function cv({name:e,argType:t,value:n,onChange:r}){const o=typeof t.control=="string"?t.control:typeof t.control=="object"&&t.control!==null?t.control.type??"text":"text";return u.jsxs("label",{className:"flex items-center gap-2 text-[10px]",children:[u.jsx("span",{className:"text-bv-text-mid font-mono min-w-[60px] shrink-0",children:e}),o==="select"&&t.options?u.jsx("select",{className:"flex-1 bg-bv-surface border border-bv-border rounded px-1.5 py-0.5 text-[10px] text-bv-text",value:String(n??""),onChange:l=>r(l.target.value),children:t.options.map(l=>u.jsx("option",{value:l,children:l},l))}):o==="boolean"?u.jsx("input",{type:"checkbox",checked:!!n,onChange:l=>r(l.target.checked),className:"accent-bv-teal"}):o==="number"?u.jsx("input",{type:"number",className:"flex-1 bg-bv-surface border border-bv-border rounded px-1.5 py-0.5 text-[10px] text-bv-text",value:n!=null?String(n):"",onChange:l=>r(l.target.value===""?void 0:Number(l.target.value))}):u.jsx("input",{type:"text",className:"flex-1 bg-bv-surface border border-bv-border rounded px-1.5 py-0.5 text-[10px] text-bv-text",value:String(n??""),onChange:l=>r(l.target.value)})]})}const dv=["display","position","float","clear","width","height","min-width","min-height","max-width","max-height","padding-top","padding-right","padding-bottom","padding-left","margin-top","margin-right","margin-bottom","margin-left","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color","box-sizing","background-color","background-image","background-size","background-position","background-repeat","color","font-family","font-size","font-weight","font-style","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","box-shadow","opacity","text-decoration","text-transform","line-height","letter-spacing","word-spacing","text-align"],lh=["color","font-family","font-size","font-weight","font-style","line-height","background-color","background-image","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","padding-top","padding-right","padding-bottom","padding-left","margin-top","margin-right","margin-bottom","margin-left","display","box-shadow","text-decoration","text-transform","letter-spacing","text-align","opacity","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color"];function fv(e){const t=(e.ownerDocument.defaultView??window).getComputedStyle(e),n={};for(const r of dv)n[r]=t.getPropertyValue(r);return n}function pv(e,t,n){for(const[r,o]of Object.entries(t))if(r!=="height"){if(r==="width"&&n!=null){const l=parseFloat(o);if(!isNaN(l)&&Math.abs(l-n)<1)continue}e.style.setProperty(r,o)}}function sh(e,t){if(!e||!t)return;const n=(e.ownerDocument.defaultView??window).getComputedStyle(e),r=t;if(r.style)for(const i of lh)r.style.setProperty(i,n.getPropertyValue(i));const o=e.children,l=t.children,s=Math.min(o.length,l.length);for(let i=0;i<s;i++)sh(o[i],l[i])}const ih=lh;function ah(e,t){const n=e.children,r=t.children,o=Math.min(n.length,r.length);for(let l=0;l<o;l++){const s=n[l],i=r[l],a=(s.ownerDocument.defaultView??window).getComputedStyle(s);if(i.style)for(const c of ih)i.style.setProperty(c,a.getPropertyValue(c));ah(s,i)}}class uh extends HTMLElement{constructor(){super();_t(this,"shadow");_t(this,"ghostEl");_t(this,"hiddenIframe");_t(this,"loadTimeoutId",null);_t(this,"hasLoaded",!1);_t(this,"_loadedDispatched",!1);_t(this,"observer",null);_t(this,"_error",null);this.shadow=this.attachShadow({mode:"open"}),this.ghostEl=document.createElement("div"),this.ghostEl.setAttribute("part","ghost"),this.ghostEl.style.display="contents";const n=document.createElement("style");n.textContent=`
|
|
41
|
-
iframe {
|
|
42
|
-
position: absolute; inset: 0;
|
|
43
|
-
width: 100%; height: 100%;
|
|
44
|
-
border: none;
|
|
45
|
-
opacity: 0;
|
|
46
|
-
transition: opacity 0.2s ease-in;
|
|
47
|
-
pointer-events: none;
|
|
48
|
-
}
|
|
49
|
-
iframe.visible {
|
|
50
|
-
opacity: 1;
|
|
51
|
-
pointer-events: auto;
|
|
52
|
-
}
|
|
53
|
-
`,this.shadow.append(n,this.ghostEl),this.hiddenIframe=document.createElement("iframe"),Object.assign(this.hiddenIframe.style,{position:"fixed",left:"0",top:"0",width:"800px",height:"600px",opacity:"0",pointerEvents:"none",border:"none",zIndex:"-999999"}),this.hiddenIframe.addEventListener("load",()=>this.onIframeLoad()),this.hiddenIframe.addEventListener("error",()=>this.reportError("Failed to load iframe"))}connectedCallback(){document.body.appendChild(this.hiddenIframe),this.triggerLoad()}disconnectedCallback(){var n;(n=this.observer)==null||n.disconnect(),this.observer=null,this.hiddenIframe.remove()}attributeChangedCallback(){this.isConnected&&this.triggerLoad()}triggerLoad(){var o;(o=this.observer)==null||o.disconnect(),this.observer=null,this.loadTimeoutId&&clearTimeout(this.loadTimeoutId),this.hasLoaded=!1,this._loadedDispatched=!1;const n=this.getAttribute("src"),r=this.getAttribute("srcdoc");r!=null?this.hiddenIframe.srcdoc=r:n&&(this.hiddenIframe.src=n),this.loadTimeoutId=setTimeout(()=>{if(!this.hasLoaded){const l=this.getAttribute("src");this.reportError(`Story failed to load (${l||"unknown"}) — check that Storybook is running on port 6006+`)}},2e4)}onIframeLoad(){this.loadTimeoutId&&(clearTimeout(this.loadTimeoutId),this.loadTimeoutId=null),this.hasLoaded=!0;const n=this.hiddenIframe.contentDocument;if(!n)return;const r=n.createElement("style");if(r.textContent="body,html{margin:0!important;padding:0!important}",n.head.appendChild(r),this.getAttribute("srcdoc")!=null){this.extractAndApply(n);return}this.waitForStoryContent(n)}updateArgs(n,r){const o=this.hiddenIframe.contentWindow;o&&o.postMessage(JSON.stringify({key:"storybook-channel",event:{type:"updateStoryArgs",args:[{storyId:n,updatedArgs:r}]}}),"*")}waitForStoryContent(n){var a;(a=this.observer)==null||a.disconnect();let r=!1,o=null;const l=()=>this.findStoryRoot(n)?(r=!0,this.extractAndApply(n),!0):!1;l();const s=n.querySelector("#storybook-root")??n.body;if(!s)return;const i=new MutationObserver(()=>{const c=this.findStoryRoot(n);if(!r)l();else{o&&clearTimeout(o);const d=c?parseFloat((c.ownerDocument.defaultView??window).getComputedStyle(c).transitionDuration)*1e3:0,p=Math.ceil(d)+50;o=setTimeout(()=>l(),p)}});this.observer=i,i.observe(s,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),setTimeout(()=>{!r&&this.observer===i&&(this.observer.disconnect(),this.observer=null,this.reportError("Story did not render — component may not exist or Storybook story file has an error"))},2e4)}findStoryRoot(n){const r=n.querySelector("#storybook-root");if(r){for(const o of r.children)if(!o.classList.contains("sb-loader"))return o;return null}return n.body.firstElementChild}getComponentHtml(){const n=this.hiddenIframe.contentDocument;if(!n)return"";const r=this.findStoryRoot(n);if(!r)return this.ghostEl.innerHTML;const o=r.cloneNode(!0),l=getComputedStyle(r);for(const s of ih)o.style.setProperty(s,l.getPropertyValue(s));return ah(r,o),o.outerHTML}extractAndApply(n){const r=this.findStoryRoot(n);if(r&&r.ownerDocument.defaultView,!r)return;const o=this.clientWidth||800;this.hiddenIframe.style.width=o+"px";const l=fv(r);pv(this,l,o),this.ghostEl.innerHTML=r.innerHTML;const s=r.children,i=this.ghostEl.children,a=Math.min(s.length,i.length);for(let p=0;p<a;p++)sh(s[p],i[p]);this._loadedDispatched||(this._loadedDispatched=!0,this.dispatchEvent(new CustomEvent("iframe-loaded")));const c=this.getComponentHtml(),d=getComputedStyle(n.body).backgroundColor;this.dispatchEvent(new CustomEvent("ghost-extracted",{detail:{ghostHtml:c,hostStyles:l,storyBackground:d}}))}reportError(n){this._error=n,console.error(`[AdaptiveIframe] ${n}`),this.dispatchEvent(new CustomEvent("iframe-error",{detail:{message:n}}))}getError(){return this._error}clearError(){this._error=null}}_t(uh,"observedAttributes",["src","srcdoc"]);customElements.get("adaptive-iframe")||customElements.define("adaptive-iframe",uh);function hv({phase:e,isArmed:t,error:n,cachedGhostHtml:r,liveReady:o,probing:l,bestStory:s,storyBackground:i,ghostRef:a}){const c=e!=="idle",d=c&&!n&&r&&!o,p=c&&!n&&!r&&!o&&(l||!!s),f=c&&!n&&!l&&s,g=c&&!n&&!l&&!s&&!r;return u.jsxs("div",{className:`flex items-center justify-center min-h-14 overflow-hidden ${t?"bg-[rgba(0,132,139,0.06)]":""}`,style:!t&&i?{backgroundColor:i}:void 0,children:[!c&&u.jsx("span",{className:"text-[10px] text-bv-muted",children:" "}),c&&n&&u.jsx("span",{className:"text-[10px] text-bv-orange px-2 py-1 text-center leading-tight",children:n}),p&&u.jsx("span",{className:"text-[10px] text-bv-muted",children:"Loading preview…"}),d&&u.jsx("div",{className:"pointer-events-none",dangerouslySetInnerHTML:{__html:r}}),f&&u.jsx("adaptive-iframe",{ref:a,style:{pointerEvents:"none"}}),g&&u.jsx("span",{className:"text-[10px] text-bv-muted",children:"No stories found."})]})}function mv({isArmed:e,group:t,hasArgs:n,showProps:r,onToggleProps:o}){return u.jsxs("div",{className:"flex items-center justify-between px-2.5 py-1.5 border-t border-bv-border bg-bv-bg",children:[e?u.jsx("span",{className:"text-[11px] font-medium text-bv-teal",children:"Click the page to place"}):t.stories[0]?u.jsx("a",{href:`/storybook/?path=/story/${t.stories[0].id}`,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] text-bv-text hover:text-bv-orange hover:underline transition-colors",onClick:l=>{l.stopPropagation()},children:u.jsx(qc,{fullTitle:t.fullTitle})}):u.jsx("span",{className:"text-[11px] text-bv-text",children:u.jsx(qc,{fullTitle:t.fullTitle})}),n&&u.jsx("button",{className:`w-5.5 h-5.5 rounded flex items-center justify-center transition-colors opacity-0 group-hover:opacity-100 ${r?"opacity-100 bg-bv-surface-hi text-bv-text":"text-bv-muted hover:bg-bv-surface-hi hover:text-bv-text"}`,title:"Customize props",onClick:l=>{l.stopPropagation(),o()},children:u.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[u.jsx("circle",{cx:"12",cy:"12",r:"3"}),u.jsx("path",{d:"M12 1v2m0 18v2M4.22 4.22l1.42 1.42m12.72 12.72 1.42 1.42M1 12h2m18 0h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]})})]})}function qc({fullTitle:e}){const t=e.split("/");if(t.length===1)return u.jsx("span",{className:"font-semibold",children:t[0]});const n=t.slice(0,-1),r=t.at(-1);return u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"text-bv-muted font-normal",children:n.join(" / ")}),u.jsx("span",{className:"text-bv-muted font-normal",children:" / "}),u.jsx("span",{className:"font-semibold",children:r})]})}const gv={phase:"idle",bestStory:null,argTypes:{},defaultArgs:{},args:{},liveReady:!1,storyBackground:void 0,error:null,pendingArgs:null,loadLiveRequested:!1};function yv(e,t){switch(t.type){case"BECOME_VISIBLE":return e.phase!=="idle"?e:{...e,phase:t.hasCachedGhost?"cached":"probing"};case"PROBE_COMPLETE":return e.phase!=="probing"?e:{...e,phase:"probe-done",bestStory:t.bestStory,argTypes:t.argTypes,defaultArgs:t.defaultArgs,args:t.defaultArgs};case"PROBE_FALLBACK":return e.phase!=="probing"?e:{...e,phase:"probe-done",bestStory:t.bestStory};case"SLOT_ACQUIRED":return e.phase!=="probe-done"?e:{...e,phase:"loading"};case"IFRAME_LOADED":return e.phase!=="loading"?e:{...e,phase:"ready",liveReady:!0};case"IFRAME_ERROR":return e.phase!=="loading"?e:{...e,phase:"error",error:t.message};case"GHOST_EXTRACTED":return e.phase!=="ready"&&e.phase!=="loading"?e:{...e,storyBackground:t.storyBackground??e.storyBackground};case"ARGS_CHANGED":return e.liveReady?{...e,args:t.args}:{...e,args:t.args,pendingArgs:t.args};case"CLEAR_PENDING_ARGS":return{...e,pendingArgs:null};case"REQUEST_LIVE_REFRESH":return e.phase==="cached"?{...e,phase:"probing",loadLiveRequested:!0}:e.phase==="error"?{...e,phase:"probing",error:null,loadLiveRequested:!0}:{...e,loadLiveRequested:!0}}return e}function vv({group:e,isArmed:t,onArm:n,onDisarm:r,cachedGhostHtml:o,cachedHostStyles:l,cachedStoryBackground:s,onGhostExtracted:i}){const[a,c]=b.useReducer(yv,{...gv,storyBackground:s}),d=b.useRef(null),p=b.useRef(null),f=b.useRef(!1),[g,v]=b.useState(!1);b.useEffect(()=>{const O=d.current;if(!O)return;const D=new IntersectionObserver(([R])=>{R.isIntersecting&&(c({type:"BECOME_VISIBLE",hasCachedGhost:!!o}),D.disconnect())},{rootMargin:"200px"});return D.observe(O),()=>D.disconnect()},[o]);const w=a.phase!=="idle"&&(a.phase==="probing"||!o||g||a.loadLiveRequested),{bestStory:S,probing:h,argTypes:m,defaultArgs:y}=rv(e.stories,w);b.useEffect(()=>{!h&&S&&a.phase==="probing"&&(Object.keys(m).length>0?c({type:"PROBE_COMPLETE",bestStory:S,argTypes:m,defaultArgs:y}):c({type:"PROBE_FALLBACK",bestStory:S}))},[h,S,m,y,a.phase]);const x=a.phase==="probe-done"&&!!a.bestStory&&(!o||a.loadLiveRequested),{canLoad:j,releaseSlot:k}=iv(x);b.useEffect(()=>{j&&a.phase==="probe-done"&&c({type:"SLOT_ACQUIRED"})},[j,a.phase]),b.useEffect(()=>{a.phase!=="loading"||!a.bestStory||!p.current||f.current||(f.current=!0,p.current.setAttribute("src",av(a.bestStory.id,{})))},[a.phase,a.bestStory]),b.useEffect(()=>{const O=p.current;if(!(O!=null&&O.addEventListener))return;const D=()=>{c({type:"IFRAME_LOADED"}),k(),a.pendingArgs&&a.bestStory&&(typeof O.updateArgs=="function"&&O.updateArgs(a.bestStory.id,a.pendingArgs),c({type:"CLEAR_PENDING_ARGS"}))},R=Y=>{const W=Y.detail.message;c({type:"IFRAME_ERROR",message:W}),k()},L=Y=>{const{ghostHtml:W,hostStyles:ne,storyBackground:N}=Y.detail;N&&c({type:"GHOST_EXTRACTED",storyBackground:N}),a.bestStory&&(i==null||i({storyId:a.bestStory.id,args:{},ghostHtml:W,hostStyles:ne,storyBackground:N,componentName:e.name,componentPath:e.componentPath}))};return O.addEventListener("iframe-loaded",D),O.addEventListener("iframe-error",R),O.addEventListener("ghost-extracted",L),()=>{O.removeEventListener("iframe-loaded",D),O.removeEventListener("iframe-error",R),O.removeEventListener("ghost-extracted",L)}},[a.bestStory,a.pendingArgs,k,e.name,e.componentPath,i]);const C=b.useCallback(O=>{if(c({type:"ARGS_CHANGED",args:O}),!a.liveReady||!p.current||!a.bestStory){c({type:"REQUEST_LIVE_REFRESH"});return}const D=p.current;typeof D.updateArgs=="function"&&D.updateArgs(a.bestStory.id,O)},[a.bestStory,a.liveReady]),T=b.useCallback(O=>{var L;if(O.stopPropagation(),t){r();return}const D=p.current,R=((L=D==null?void 0:D.getComponentHtml)==null?void 0:L.call(D))??o??"";n(R,a.args),c({type:"REQUEST_LIVE_REFRESH"}),i&&R&&a.bestStory&&i({storyId:a.bestStory.id,args:a.args,ghostHtml:R,hostStyles:l??{},storyBackground:a.storyBackground,componentName:e.name,componentPath:e.componentPath})},[t,n,r,a.args,a.bestStory,a.storyBackground,o,l,e.name,e.componentPath,i]),z=Object.keys(a.argTypes).length>0?a.argTypes:e.argTypes??{},_=Object.keys(z).length>0||!!o;return u.jsxs("li",{ref:d,className:`group rounded border overflow-hidden cursor-pointer transition-[border-color,box-shadow] ${t?"border-bv-teal shadow-[0_0_0_2px_var(--color-bv-teal),0_0_12px_rgba(0,132,139,0.2)]":"border-bv-border hover:border-[#555]"}`,onClick:T,children:[u.jsx(hv,{phase:a.phase,isArmed:t,error:a.error,cachedGhostHtml:o,liveReady:a.liveReady,probing:h&&w,bestStory:a.bestStory??S,storyBackground:a.storyBackground,ghostRef:p}),u.jsx(mv,{isArmed:t,group:e,hasArgs:_,showProps:g,onToggleProps:()=>v(O=>!O)}),g&&_&&u.jsxs("div",{className:"px-2.5 py-2 border-t border-bv-border bg-bv-surface",onClick:O=>O.stopPropagation(),children:[u.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-bv-muted mb-1.5",children:"Props"}),u.jsx(uv,{argTypes:z,args:a.args,onArgsChange:C})]})]})}function ch(e){return!e||Object.keys(e).length===0?"":JSON.stringify(e,Object.keys(e).sort())}function ed(e,t){const n=ch(t);return n?`${e}::${n}`:e}function xv(){const[e,t]=b.useState(!1),n=b.useRef(new Map);b.useEffect(()=>{let l=!1;return fetch("/api/ghost-cache").then(s=>s.json()).then(s=>{if(l)return;const i=new Map;for(const a of s){const c=a.argsHash?`${a.storyId}::${a.argsHash}`:a.storyId;i.set(c,a)}n.current=i,t(!0)}).catch(()=>{l||t(!0)}),()=>{l=!0}},[]);const r=b.useCallback((l,s)=>{const i=ed(l,s),a=n.current.get(i);return a?{ghostHtml:a.ghostHtml,hostStyles:a.hostStyles,storyBackground:a.storyBackground}:null},[]),o=b.useCallback(l=>{const s=ed(l.storyId,l.args),i=n.current.has(s);n.current.set(s,{storyId:l.storyId,argsHash:ch(l.args),ghostHtml:l.ghostHtml,hostStyles:l.hostStyles,storyBackground:l.storyBackground,componentName:l.componentName,componentPath:l.componentPath,extractedAt:Date.now()}),!i&&fetch("/api/ghost-cache",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({storyId:l.storyId,args:l.args,ghostHtml:l.ghostHtml,hostStyles:l.hostStyles,storyBackground:l.storyBackground,componentName:l.componentName,componentPath:l.componentPath})}).catch(()=>{})},[]);return{getCachedGhost:r,submitToCache:o,loaded:e}}function td(){const{groups:e,loading:t,error:n}=wv(),[r,o]=b.useState(null),{getCachedGhost:l,submitToCache:s}=xv(),i=b.useCallback((c,d,p)=>{var f;o(c.name),pe("overlay",{type:"COMPONENT_ARM",componentName:c.name,storyId:((f=c.stories[0])==null?void 0:f.id)??"",ghostHtml:d,componentPath:c.componentPath,args:p})},[]),a=b.useCallback(()=>{o(null),pe("overlay",{type:"COMPONENT_DISARM"})},[]);return b.useEffect(()=>th(c=>{c.type==="COMPONENT_DISARMED"&&o(null)}),[]),b.useEffect(()=>{if(!r)return;const c=()=>{o(null),pe("overlay",{type:"COMPONENT_DISARM"})};return document.addEventListener("click",c),()=>document.removeEventListener("click",c)},[r]),u.jsx("div",{className:"p-3 flex flex-col gap-3",children:u.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&u.jsx("div",{className:"text-[11px] text-bv-muted",children:"Loading components…"}),!t&&n&&u.jsxs("div",{className:"text-[11px] text-bv-text-mid leading-relaxed",children:[u.jsx("span",{className:"block mb-0.5",children:"Storybook not detected."}),u.jsx("span",{className:"text-bv-muted",children:"Start Storybook on port 6006–6010 to browse components."})]}),!t&&!n&&e.length===0&&u.jsx("div",{className:"text-[11px] text-bv-muted",children:"No stories found."}),!t&&!n&&e.length>0&&u.jsx("ul",{className:"flex flex-col gap-2",children:e.map(c=>{var f;const d=(f=c.stories[0])==null?void 0:f.id,p=d?l(d):null;return u.jsx(vv,{group:c,isArmed:r===c.name,onArm:(g,v)=>i(c,g,v),onDisarm:a,cachedGhostHtml:p==null?void 0:p.ghostHtml,cachedHostStyles:p==null?void 0:p.hostStyles,cachedStoryBackground:p==null?void 0:p.storyBackground,onGhostExtracted:s},c.name)})})]})})}function wv(){const[e,t]=b.useState([]),[n,r]=b.useState(!0),[o,l]=b.useState(!1);return b.useEffect(()=>{let s=!1;return(async()=>{var i,a;try{const c=await fetch("/api/storybook-data").then(p=>p.json());if(!c.available){s||(l(!0),r(!1));return}const d=Object.values(((i=c.index)==null?void 0:i.entries)??((a=c.index)==null?void 0:a.stories)??{});s||t(bv(d,c.argTypes??{}))}catch{s||l(!0)}finally{s||r(!1)}})(),()=>{s=!0}},[]),{groups:e,loading:n,error:o}}function bv(e,t={}){const n=new Map;for(const o of e){if(o.type==="docs"||o.id.endsWith("--docs"))continue;const l=o.title.split("/").at(-1)??o.title;n.has(l)||n.set(l,[]),n.get(l).push(o)}const r=Array.from(n.entries()).map(([o,l])=>{var i,a;const s=new Set;for(const c of l)for(const d of c.tags??[])s.add(d);return{name:o,fullTitle:((i=l[0])==null?void 0:i.title)??o,tags:Array.from(s),stories:l,argTypes:t[o]??Sv(l),componentPath:(a=l[0])==null?void 0:a.componentPath}});return r.sort((o,l)=>{const s=o.tags.includes("design-system")?0:1,i=l.tags.includes("design-system")?0:1;return s!==i?s-i:o.name.localeCompare(l.name)}),r}function Sv(e){const t={};for(const n of e)for(const[r,o]of Object.entries(n.argTypes??{}))r in t||(t[r]=o);return t}const bi=typeof window<"u"?window.SpeechRecognition??window.webkitSpeechRecognition??null:null;function nd({draft:e,currentElementKey:t,onAddMessage:n,onDiscard:r}){const[o,l]=b.useState(""),[s,i]=b.useState(!1),[a,c]=b.useState(null),d=b.useRef(null),p=b.useRef(null),f=b.useRef("");b.useEffect(()=>{var m;(m=d.current)==null||m.focus()},[]);const g=e.filter(m=>m.kind==="message"),v=!!o.trim()&&!!t;function w(){var y;const m=o.trim();!m||!t||(n(m,t),l(""),(y=d.current)==null||y.focus())}function S(){var y;if(s){(y=p.current)==null||y.stop();return}if(!bi)return;f.current=o;const m=new bi;m.continuous=!1,m.interimResults=!0,m.lang="en-US",m.onresult=x=>{let j="";for(let C=0;C<x.results.length;C++)j+=x.results[C][0].transcript;const k=f.current.trimEnd();l(k?`${k} ${j}`:j)},m.onend=()=>i(!1),m.onerror=x=>{console.error("[mic] SpeechRecognition error:",x.error,x.message),i(!1),x.error==="not-allowed"&&c("Microphone blocked — allow access in your browser's address bar, then reload.")},p.current=m;try{m.start(),i(!0),console.log("[mic] recognition started")}catch(x){console.error("[mic] recognition.start() threw:",x)}}function h(m){(m.metaKey||m.ctrlKey)&&m.key==="Enter"&&(m.preventDefault(),w())}return u.jsxs("div",{className:"p-3 flex flex-col gap-3",children:[u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsx("textarea",{ref:d,className:"w-full min-h-[80px] p-2 bg-bv-bg border border-bv-border rounded text-[13px] font-[family-name:var(--font-ui)] text-bv-text placeholder:text-bv-muted resize-y focus:outline-none focus:border-bv-teal",placeholder:t?"Add context for the AI agent…":"Select an element to add contextual message…",value:o,onChange:m=>l(m.target.value),onKeyDown:h,disabled:!t}),u.jsxs("div",{className:"flex items-center justify-between",children:[bi?u.jsx("button",{type:"button",title:s?"Stop recording":"Record voice message",onClick:S,className:`flex items-center justify-center w-7 h-7 rounded-full border-none cursor-pointer transition-colors ${s?"bg-bv-orange text-white":a?"bg-bv-surface text-bv-orange hover:bg-bv-surface-hi":"bg-bv-surface text-bv-text-mid hover:text-bv-teal hover:bg-bv-surface-hi"}`,children:s?u.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-white animate-pulse"}):u.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:u.jsx("path",{d:"M12 1a4 4 0 0 1 4 4v7a4 4 0 0 1-8 0V5a4 4 0 0 1 4-4zm-1.5 4v7a1.5 1.5 0 0 0 3 0V5a1.5 1.5 0 0 0-3 0zM6 11a1 1 0 0 1 1 1 5 5 0 0 0 10 0 1 1 0 1 1 2 0 7 7 0 0 1-6 6.93V21h2a1 1 0 1 1 0 2H9a1 1 0 1 1 0-2h2v-2.07A7 7 0 0 1 5 12a1 1 0 0 1 1-1z"})})}):u.jsx("span",{}),u.jsx("button",{type:"button",className:"px-3 py-1 text-[11px] font-semibold rounded bg-bv-teal text-white border-none cursor-pointer hover:opacity-90 transition-opacity disabled:opacity-50 disabled:cursor-not-allowed",disabled:!v,onClick:w,children:"Add Message"})]}),a&&u.jsx("p",{className:"text-[11px] text-bv-orange mt-1",children:a})]}),g.length>0&&u.jsxs("div",{className:"flex flex-col gap-1",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:"w-[5px] h-[5px] rounded-full bg-bv-teal opacity-50 shrink-0"}),u.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[1px] text-bv-text-mid",children:"Staged Messages"})]}),g.map(m=>{var y;return u.jsxs("div",{className:"flex items-start gap-2 p-2 bg-bv-surface rounded border border-bv-border group",children:[u.jsx("span",{className:"text-[12px] shrink-0 mt-0.5",children:"💬"}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsxs("div",{className:"text-[12px] font-[family-name:var(--font-ui)] text-bv-text break-words",children:['"',m.message,'"']}),m.elementKey&&u.jsx("div",{className:"text-[11px] text-bv-text-mid mt-0.5",children:((y=m.component)==null?void 0:y.name)||m.elementKey})]}),u.jsx("button",{type:"button",className:"shrink-0 text-[10px] px-1 py-0.5 rounded border-none cursor-pointer bg-transparent text-bv-muted hover:text-bv-orange transition-colors opacity-0 group-hover:opacity-100",onClick:()=>r(m.id),title:"Discard",children:"✕"})]},m.id)})]})]})}function kv(e){var c,d;const n=`<${((c=e.component)==null?void 0:c.name)??"component"}>`,r="insertMode"in e?e.insertMode:void 0,o="targetComponentName"in e&&e.targetComponentName||"parentComponent"in e&&((d=e.parentComponent)==null?void 0:d.name)||null,l=o||e.elementKey||null,s=o?`<${l}>`:l,i="targetPatchId"in e&&!!e.targetPatchId,a=s&&i?`new ${s}`:s;switch(r){case"after":return a?`Appended ${n} after ${a}`:`Appended ${n}`;case"before":return a?`Prepended ${n} before ${a}`:`Prepended ${n}`;case"last-child":return a?`Inserted ${n} bottom of ${a}`:`Inserted ${n}`;case"first-child":return a?`Inserted ${n} top of ${a}`:`Inserted ${n}`;default:return a?`Inserted ${n} in ${a}`:`Inserted ${n}`}}function Sl({label:e,count:t,items:n,activeColor:r,dotColor:o,onCommit:l,onDiscard:s,onCommitAll:i,onDiscardAll:a}){const[c,d]=b.useState(!1),p=b.useRef(null),f=b.useRef(null),[g,v]=b.useState(void 0);b.useEffect(()=>{if(!c||!f.current)return;const m=f.current.getBoundingClientRect(),y=220,x=window.innerWidth,j=4;let k=m.left+m.width/2-y/2;k=Math.max(j,Math.min(k,x-y-j)),v(k-m.left)},[c]),b.useEffect(()=>{if(!c)return;function h(m){p.current&&!p.current.contains(m.target)&&d(!1)}return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[c]),b.useEffect(()=>{if(!c)return;function h(m){m.key==="Escape"&&d(!1)}return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[c]);const w=t>0,S=l||s||i||a;return u.jsxs("div",{ref:p,className:"relative",children:[u.jsxs("button",{ref:f,className:`flex items-center gap-1 text-[11px] tabular-nums border-none bg-transparent cursor-pointer px-0 py-0 ${w?`${r} font-medium`:"text-bv-muted"} ${w?"hover:underline":""}`,onClick:()=>w&&d(!c),disabled:!w,type:"button",children:[o&&u.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${o}`}),t," ",e]}),c&&u.jsxs("div",{className:"absolute bottom-full mb-1 min-w-[220px] bg-bv-surface border border-bv-border rounded-lg shadow-lg overflow-hidden flex flex-col z-[9999]",style:g!==void 0?{left:`${g}px`}:void 0,children:[u.jsxs("div",{className:"px-3 py-1.5 border-b border-bv-border text-[11px] font-semibold text-bv-text-mid uppercase tracking-wide",children:[e," (",t,")"]}),u.jsx("div",{className:"flex-1 overflow-auto",children:n.length===0?u.jsx("div",{className:"px-3 py-2 text-[11px] text-bv-muted italic",children:"No patches"}):n.map(h=>{var j,k;const m="kind"in h&&h.kind==="message",y="kind"in h&&h.kind==="design",x="kind"in h&&h.kind==="component-drop";return u.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 border-b border-bv-border last:border-b-0 group",children:[u.jsxs("div",{className:"flex-1 min-w-0",children:[!m&&!y&&!x&&((j=h.component)==null?void 0:j.name)&&u.jsx("div",{className:"text-[10px] text-bv-muted truncate",children:h.component.name}),x?u.jsx("div",{className:"text-[11px] text-bv-text truncate",children:kv(h)}):y?u.jsxs("div",{className:"text-[11px] text-bv-text",children:[u.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[u.jsx("span",{children:"✏️"}),u.jsxs("span",{className:"truncate",children:["Drawing",(k=h.component)!=null&&k.name?` in ${h.component.name}`:""]})]}),"image"in h&&h.image&&u.jsx("img",{src:h.image,alt:"Design drawing",className:"w-full max-h-16 object-contain rounded border border-bv-border bg-white"})]}):m?u.jsxs("div",{className:"text-[11px] text-bv-text truncate",children:[u.jsx("span",{className:"mr-1",children:"💬"}),'"',"message"in h&&h.message||"",'"']}):u.jsx("div",{className:"text-[11px] font-mono text-bv-text truncate",children:h.originalClass?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"line-through text-bv-muted",children:h.originalClass})," → ",u.jsx("span",{className:"text-bv-teal",children:h.newClass})]}):u.jsxs("span",{className:"text-bv-teal",children:["+",h.newClass]})})]}),(l||s)&&u.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[l&&u.jsx("button",{className:"text-[10px] px-1.5 py-0.5 rounded border-none cursor-pointer bg-bv-teal text-white hover:bg-bv-teal-dark transition-colors",onClick:C=>{C.stopPropagation(),l(h.id)},title:"Commit to Agent",type:"button",children:"✓"}),s&&u.jsx("button",{className:"text-[10px] px-1.5 py-0.5 rounded border-none cursor-pointer bg-transparent text-bv-muted hover:text-bv-orange hover:bg-bv-surface-hi transition-colors",onClick:C=>{C.stopPropagation(),s(h.id)},title:"Discard",type:"button",children:"✕"})]})]},h.id)})}),S&&n.length>0&&(i||a)&&u.jsxs("div",{className:"flex gap-2 px-3 py-1.5 border-t border-bv-border",children:[i&&u.jsx("button",{className:"text-[10px] px-2 py-1 rounded border-none cursor-pointer font-semibold bg-bv-teal text-white hover:bg-bv-teal-dark transition-colors",onClick:()=>{i(),d(!1)},type:"button",children:"Commit All"}),a&&u.jsx("button",{className:"text-[10px] px-2 py-1 rounded cursor-pointer font-semibold bg-transparent border border-bv-border text-bv-text-mid hover:text-bv-orange hover:border-bv-orange transition-colors",onClick:()=>{a(),d(!1)},type:"button",children:"Discard All"})]})]})]})}function rd({tabs:e,activeTab:t,onTabChange:n}){const[r,o]=b.useState(null);return u.jsx("div",{className:"relative flex border-b border-bv-border px-3",children:e.map(l=>{const s=l.id===t,i=l.disabled===!0;return u.jsxs("div",{className:"relative",onMouseEnter:()=>i&&l.tooltip&&o(l.id),onMouseLeave:()=>o(null),children:[u.jsxs("button",{type:"button",className:`relative px-3 py-2 text-[11px] font-medium font-[family-name:var(--font-ui)] border-none bg-transparent cursor-pointer transition-colors ${i?"text-bv-muted cursor-not-allowed":s?"text-bv-text":"text-bv-text-mid hover:text-bv-text"}`,disabled:i,onClick:()=>!i&&n(l.id),"aria-selected":s,role:"tab",children:[l.label,s&&u.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-bv-teal"})]}),r===l.id&&l.tooltip&&u.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 mt-1 px-2 py-1 text-[10px] text-white bg-bv-text rounded whitespace-nowrap z-[9999]",children:l.tooltip})]},l.id)})})}function Cv(){const[e,t]=b.useState([]),[n,r]=b.useState({draft:0,committed:0,implementing:0,implemented:0,partial:0,error:0}),[o,l]=b.useState({draft:[],commits:[]}),[s,i]=b.useState(!1),a=b.useRef(e);a.current=e;const c=b.useRef(o);c.current=o;const d=b.useCallback((C,T)=>{pe("overlay",{type:"PATCH_PREVIEW",oldClass:C,newClass:T})},[]),p=b.useCallback(C=>{pe("overlay",{type:"PATCH_PREVIEW_BATCH",pairs:C})},[]),f=b.useCallback(()=>{pe("overlay",{type:"PATCH_REVERT"})},[]),g=b.useCallback((C,T,z,_)=>{if(_===z){t(D=>{const R=D.find(L=>L.kind==="class-change"&&L.elementKey===C&&L.property===T);return R&&R.kind==="class-change"&&R.newClass!==z?pe("overlay",{type:"PATCH_REVERT_STAGED",oldClass:R.newClass,newClass:z}):pe("overlay",{type:"PATCH_REVERT"}),D.filter(L=>!(L.kind==="class-change"&&L.elementKey===C&&L.property===T))});return}const O=crypto.randomUUID();t(D=>{const R=D.filter(Y=>!(Y.kind==="class-change"&&Y.elementKey===C&&Y.property===T)),L={id:O,kind:"class-change",elementKey:C,status:"staged",originalClass:z,newClass:_,property:T,timestamp:new Date().toISOString()};return[...R,L]}),pe("overlay",{type:"PATCH_STAGE",id:O,oldClass:z,newClass:_,property:T})},[]),v=b.useCallback((C,T,z)=>{const _=crypto.randomUUID(),O=z?{name:z}:void 0;t(D=>{const R={id:_,kind:"message",elementKey:T,status:"staged",originalClass:"",newClass:"",property:"",timestamp:new Date().toISOString(),message:C,component:O};return[...D,R]}),_r(O?{type:"MESSAGE_STAGE",id:_,message:C,elementKey:T,component:O}:{type:"MESSAGE_STAGE",id:_,message:C,elementKey:T})},[]),w=b.useCallback(()=>{const C=c.current.draft.map(_=>_.id),T=a.current.filter(_=>_.status==="staged").map(_=>_.id),z=Array.from(new Set([...C,...T]));z.length!==0&&(_r({type:"PATCH_COMMIT",ids:z}),t([]))},[]),S=b.useCallback(C=>{t(T=>T.filter(z=>z.id!==C)),_r({type:"DISCARD_DRAFTS",ids:[C]}),pe("overlay",{type:"PATCH_REVERT"})},[]),h=b.useCallback(()=>{const C=c.current.draft.map(_=>_.id),T=a.current.filter(_=>_.status==="staged").map(_=>_.id),z=Array.from(new Set([...C,...T]));t([]),z.length>0&&_r({type:"DISCARD_DRAFTS",ids:z}),pe("overlay",{type:"PATCH_REVERT"})},[]),m=b.useCallback(()=>{},[]),y=b.useCallback(C=>{r({draft:C.draftCount,committed:C.committedCount,implementing:C.implementingCount,implemented:C.implementedCount,partial:C.partialCount,error:C.errorCount}),l({draft:C.draft,commits:C.commits}),i(!!C.agentWaiting)},[]),x=b.useCallback(C=>{r({draft:C.staged,committed:C.committed,implementing:C.implementing,implemented:C.implemented,partial:0,error:0})},[]),j=e.filter(C=>C.status==="staged").length,k={draft:Math.max(j,n.draft),committed:n.committed,implementing:n.implementing,implemented:n.implemented,partial:n.partial,error:n.error};return{patches:e,counts:k,queueState:o,agentWaiting:s,preview:d,previewBatch:p,revertPreview:f,stage:g,stageMessage:v,commitAll:w,discard:S,discardAll:h,reset:m,handleQueueUpdate:y,handlePatchUpdate:x}}function Ks(){return typeof window<"u"}function qr(e){return Du(e)?(e.nodeName||"").toLowerCase():"#document"}function dt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zt(e){var t;return(t=(Du(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Du(e){return Ks()?e instanceof Node||e instanceof dt(e).Node:!1}function Ne(e){return Ks()?e instanceof Element||e instanceof dt(e).Element:!1}function Kt(e){return Ks()?e instanceof HTMLElement||e instanceof dt(e).HTMLElement:!1}function _a(e){return!Ks()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dt(e).ShadowRoot}function tl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function jv(e){return/^(table|td|th)$/.test(qr(e))}function Fs(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ev=/transform|translate|scale|rotate|perspective|filter/,Tv=/paint|layout|strict|content/,Fn=e=>!!e&&e!=="none";let Si;function Mu(e){const t=Ne(e)?kt(e):e;return Fn(t.transform)||Fn(t.translate)||Fn(t.scale)||Fn(t.rotate)||Fn(t.perspective)||!Ws()&&(Fn(t.backdropFilter)||Fn(t.filter))||Ev.test(t.willChange||"")||Tv.test(t.contain||"")}function Nv(e){let t=an(e);for(;Kt(t)&&!tn(t);){if(Mu(t))return t;if(Fs(t))return null;t=an(t)}return null}function Ws(){return Si==null&&(Si=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Si}function tn(e){return/^(html|body|#document)$/.test(qr(e))}function kt(e){return dt(e).getComputedStyle(e)}function Hs(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function an(e){if(qr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_a(e)&&e.host||zt(e);return _a(t)?t.host:t}function dh(e){const t=an(e);return tn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kt(t)&&tl(t)?t:dh(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=dh(e),l=o===((r=e.ownerDocument)==null?void 0:r.body),s=dt(o);if(l){const i=Aa(s);return t.concat(s,s.visualViewport||[],tl(o)?o:[],i&&n?An(i):[])}else return t.concat(o,An(o,[],n))}function Aa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Qr=Math.min,at=Math.max,vs=Math.round,kl=Math.floor,Mt=e=>({x:e,y:e}),Rv={left:"right",right:"left",bottom:"top",top:"bottom"};function od(e,t,n){return at(e,Qr(t,n))}function nl(e,t){return typeof e=="function"?e(t):e}function On(e){return e.split("-")[0]}function rl(e){return e.split("-")[1]}function fh(e){return e==="x"?"y":"x"}function ph(e){return e==="y"?"height":"width"}function qt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function hh(e){return fh(qt(e))}function Pv(e,t,n){n===void 0&&(n=!1);const r=rl(e),o=hh(e),l=ph(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(s=xs(s)),[s,xs(s)]}function _v(e){const t=xs(e);return[La(e),t,La(t)]}function La(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ld=["left","right"],sd=["right","left"],Av=["top","bottom"],Lv=["bottom","top"];function Iv(e,t,n){switch(e){case"top":case"bottom":return n?t?sd:ld:t?ld:sd;case"left":case"right":return t?Av:Lv;default:return[]}}function Ov(e,t,n,r){const o=rl(e);let l=Iv(On(e),n==="start",r);return o&&(l=l.map(s=>s+"-"+o),t&&(l=l.concat(l.map(La)))),l}function xs(e){const t=On(e);return Rv[t]+e.slice(t.length)}function Dv(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mv(e){return typeof e!="number"?Dv(e):{top:e,right:e,bottom:e,left:e}}function ws(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}}/*!
|
|
54
|
-
* tabbable 6.4.0
|
|
55
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
56
|
-
*/var $v=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Ia=$v.join(","),mh=typeof Element>"u",Yo=mh?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,bs=!mh&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ss=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),l=o===""||o==="true",s=l||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ss(t.parentNode));return s},zv=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Kv=function(t,n,r){if(Ss(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ia));return n&&Yo.call(t,Ia)&&o.unshift(t),o=o.filter(r),o},Oa=function(t,n,r){for(var o=[],l=Array.from(t);l.length;){var s=l.shift();if(!Ss(s,!1))if(s.tagName==="SLOT"){var i=s.assignedElements(),a=i.length?i:s.children,c=Oa(a,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var d=Yo.call(s,Ia);d&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var p=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!Ss(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(p&&f){var g=Oa(p===!0?s.children:p.children,!0,r);r.flatten?o.push.apply(o,g):o.push({scopeParent:s,candidates:g})}else l.unshift.apply(l,s.children)}}return o},gh=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},yh=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zv(t))&&!gh(t)?0:t.tabIndex},Fv=function(t,n){var r=yh(t);return r<0&&n&&!gh(t)?0:r},Wv=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},vh=function(t){return t.tagName==="INPUT"},Hv=function(t){return vh(t)&&t.type==="hidden"},Vv=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Bv=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Uv=function(t){if(!t.name)return!0;var n=t.form||bs(t),r=function(i){return n.querySelectorAll('input[type="radio"][name="'+i+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var l=Bv(o,t.form);return!l||l===t},Gv=function(t){return vh(t)&&t.type==="radio"},Yv=function(t){return Gv(t)&&!Uv(t)},Qv=function(t){var n,r=t&&bs(t),o=(n=r)===null||n===void 0?void 0:n.host,l=!1;if(r&&r!==t){var s,i,a;for(l=!!((s=o)!==null&&s!==void 0&&(i=s.ownerDocument)!==null&&i!==void 0&&i.contains(o)||t!=null&&(a=t.ownerDocument)!==null&&a!==void 0&&a.contains(t));!l&&o;){var c,d,p;r=bs(o),o=(c=r)===null||c===void 0?void 0:c.host,l=!!((d=o)!==null&&d!==void 0&&(p=d.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return l},id=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Xv=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var l=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!l}if(getComputedStyle(t).visibility==="hidden")return!0;var s=Yo.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Yo.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var c=t.parentElement,d=bs(t);if(c&&!c.shadowRoot&&o(c)===!0)return id(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=a}if(Qv(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return id(t);return!1},Zv=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Yo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Jv=function(t,n){return!(n.disabled||Hv(n)||Xv(n,t)||Vv(n)||Zv(n))},ad=function(t,n){return!(Yv(n)||yh(n)<0||!Jv(t,n))},qv=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},xh=function(t){var n=[],r=[];return t.forEach(function(o,l){var s=!!o.scopeParent,i=s?o.scopeParent:o,a=Fv(i,s),c=s?xh(o.candidates):i;a===0?s?n.push.apply(n,c):n.push(i):r.push({documentOrder:l,tabIndex:a,item:o,isScope:s,content:c})}),r.sort(Wv).reduce(function(o,l){return l.isScope?o.push.apply(o,l.content):o.push(l.content),o},[]).concat(n)},wh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Oa([t],n.includeContainer,{filter:ad.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:qv}):r=Kv(t,n.includeContainer,ad.bind(null,n)),xh(r)};function ex(){return/apple/i.test(navigator.vendor)}function tx(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Da(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&_a(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function go(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ki(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function nx(e){return e.matches("html,body")}function Qo(e){return(e==null?void 0:e.ownerDocument)||document}function zl(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var l;return o.parentId===t&&(!n||((l=o.context)==null?void 0:l.open))}).flatMap(o=>[o,...zl(e,o.id,n)])}function rx(e){return"nativeEvent"in e}var ox=typeof document<"u",lx=function(){},qn=ox?b.useLayoutEffect:lx;const sx={...Gd},ix=sx.useInsertionEffect,ax=ix||(e=>e());function vr(e){const t=b.useRef(()=>{});return ax(()=>{t.current=e}),b.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const bh=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Sh(e,t){const n=wh(e,bh()),r=n.length;if(r===0)return;const o=tx(Qo(e)),l=n.indexOf(o),s=l===-1?t===1?0:r-1:l+t;return n[s]}function ux(e){return Sh(Qo(e).body,1)||e}function cx(e){return Sh(Qo(e).body,-1)||e}function Ci(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Da(n,r)}function dx(e){wh(e,bh()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ud(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function cd(e,t,n){let{reference:r,floating:o}=e;const l=qt(t),s=hh(t),i=ph(s),a=On(t),c=l==="y",d=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,f=r[i]/2-o[i]/2;let g;switch(a){case"top":g={x:d,y:r.y-o.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-o.width,y:p};break;default:g={x:r.x,y:r.y}}switch(rl(t)){case"start":g[s]-=f*(n&&c?-1:1);break;case"end":g[s]+=f*(n&&c?-1:1);break}return g}async function fx(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:l,rects:s,elements:i,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:f=!1,padding:g=0}=nl(t,e),v=Mv(g),S=i[f?p==="floating"?"reference":"floating":p],h=ws(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(S)))==null||n?S:S.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:a})),m=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(l.getOffsetParent==null?void 0:l.getOffsetParent(i.floating)),x=await(l.isElement==null?void 0:l.isElement(y))?await(l.getScale==null?void 0:l.getScale(y))||{x:1,y:1}:{x:1,y:1},j=ws(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:m,offsetParent:y,strategy:a}):m);return{top:(h.top-j.top+v.top)/x.y,bottom:(j.bottom-h.bottom+v.bottom)/x.y,left:(h.left-j.left+v.left)/x.x,right:(j.right-h.right+v.right)/x.x}}const px=50,hx=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:fx},a=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=cd(c,r,a),f=r,g=0;const v={};for(let w=0;w<l.length;w++){const S=l[w];if(!S)continue;const{name:h,fn:m}=S,{x:y,y:x,data:j,reset:k}=await m({x:d,y:p,initialPlacement:r,placement:f,strategy:o,middlewareData:v,rects:c,platform:i,elements:{reference:e,floating:t}});d=y??d,p=x??p,v[h]={...v[h],...j},k&&g<px&&(g++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(c=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:d,y:p}=cd(c,f,a)),w=-1)}return{x:d,y:p,placement:f,strategy:o,middlewareData:v}},mx=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:l,rects:s,initialPlacement:i,platform:a,elements:c}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:w=!0,...S}=nl(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const h=On(o),m=qt(i),y=On(i)===i,x=await(a.isRTL==null?void 0:a.isRTL(c.floating)),j=f||(y||!w?[xs(i)]:_v(i)),k=v!=="none";!f&&k&&j.push(...Ov(i,w,v,x));const C=[i,...j],T=await a.detectOverflow(t,S),z=[];let _=((r=l.flip)==null?void 0:r.overflows)||[];if(d&&z.push(T[h]),p){const L=Pv(o,s,x);z.push(T[L[0]],T[L[1]])}if(_=[..._,{placement:o,overflows:z}],!z.every(L=>L<=0)){var O,D;const L=(((O=l.flip)==null?void 0:O.index)||0)+1,Y=C[L];if(Y&&(!(p==="alignment"?m!==qt(Y):!1)||_.every(N=>qt(N.placement)===m?N.overflows[0]>0:!0)))return{data:{index:L,overflows:_},reset:{placement:Y}};let W=(D=_.filter(ne=>ne.overflows[0]<=0).sort((ne,N)=>ne.overflows[1]-N.overflows[1])[0])==null?void 0:D.placement;if(!W)switch(g){case"bestFit":{var R;const ne=(R=_.filter(N=>{if(k){const I=qt(N.placement);return I===m||I==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(I=>I>0).reduce((I,P)=>I+P,0)]).sort((N,I)=>N[1]-I[1])[0])==null?void 0:R[0];ne&&(W=ne);break}case"initialPlacement":W=i;break}if(o!==W)return{reset:{placement:W}}}return{}}}},gx=new Set(["left","top"]);async function yx(e,t){const{placement:n,platform:r,elements:o}=e,l=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=On(n),i=rl(n),a=qt(n)==="y",c=gx.has(s)?-1:1,d=l&&a?-1:1,p=nl(t,e);let{mainAxis:f,crossAxis:g,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof v=="number"&&(g=i==="end"?v*-1:v),a?{x:g*d,y:f*c}:{x:f*c,y:g*d}}const vx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:l,placement:s,middlewareData:i}=t,a=await yx(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:l+a.y,data:{...a,placement:s}}}}},xx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:l}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:h=>{let{x:m,y}=h;return{x:m,y}}},...c}=nl(e,t),d={x:n,y:r},p=await l.detectOverflow(t,c),f=qt(On(o)),g=fh(f);let v=d[g],w=d[f];if(s){const h=g==="y"?"top":"left",m=g==="y"?"bottom":"right",y=v+p[h],x=v-p[m];v=od(y,v,x)}if(i){const h=f==="y"?"top":"left",m=f==="y"?"bottom":"right",y=w+p[h],x=w-p[m];w=od(y,w,x)}const S=a.fn({...t,[g]:v,[f]:w});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[g]:s,[f]:i}}}}}},wx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:l,platform:s,elements:i}=t,{apply:a=()=>{},...c}=nl(e,t),d=await s.detectOverflow(t,c),p=On(o),f=rl(o),g=qt(o)==="y",{width:v,height:w}=l.floating;let S,h;p==="top"||p==="bottom"?(S=p,h=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(h=p,S=f==="end"?"top":"bottom");const m=w-d.top-d.bottom,y=v-d.left-d.right,x=Qr(w-d[S],m),j=Qr(v-d[h],y),k=!t.middlewareData.shift;let C=x,T=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=m),k&&!f){const _=at(d.left,0),O=at(d.right,0),D=at(d.top,0),R=at(d.bottom,0);g?T=v-2*(_!==0||O!==0?_+O:at(d.left,d.right)):C=w-2*(D!==0||R!==0?D+R:at(d.top,d.bottom))}await a({...t,availableWidth:T,availableHeight:C});const z=await s.getDimensions(i.floating);return v!==z.width||w!==z.height?{reset:{rects:!0}}:{}}}};function kh(e){const t=kt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Kt(e),l=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=vs(n)!==l||vs(r)!==s;return i&&(n=l,r=s),{width:n,height:r,$:i}}function $u(e){return Ne(e)?e:e.contextElement}function zr(e){const t=$u(e);if(!Kt(t))return Mt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:l}=kh(t);let s=(l?vs(n.width):n.width)/r,i=(l?vs(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const bx=Mt(0);function Ch(e){const t=dt(e);return!Ws()||!t.visualViewport?bx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sx(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==dt(e)?!1:t}function lr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=$u(e);let s=Mt(1);t&&(r?Ne(r)&&(s=zr(r)):s=zr(e));const i=Sx(l,n,r)?Ch(l):Mt(0);let a=(o.left+i.x)/s.x,c=(o.top+i.y)/s.y,d=o.width/s.x,p=o.height/s.y;if(l){const f=dt(l),g=r&&Ne(r)?dt(r):r;let v=f,w=Aa(v);for(;w&&r&&g!==v;){const S=zr(w),h=w.getBoundingClientRect(),m=kt(w),y=h.left+(w.clientLeft+parseFloat(m.paddingLeft))*S.x,x=h.top+(w.clientTop+parseFloat(m.paddingTop))*S.y;a*=S.x,c*=S.y,d*=S.x,p*=S.y,a+=y,c+=x,v=dt(w),w=Aa(v)}}return ws({width:d,height:p,x:a,y:c})}function Vs(e,t){const n=Hs(e).scrollLeft;return t?t.left+n:lr(zt(e)).left+n}function jh(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Vs(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function kx(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const l=o==="fixed",s=zt(r),i=t?Fs(t.floating):!1;if(r===s||i&&l)return n;let a={scrollLeft:0,scrollTop:0},c=Mt(1);const d=Mt(0),p=Kt(r);if((p||!p&&!l)&&((qr(r)!=="body"||tl(s))&&(a=Hs(r)),p)){const g=lr(r);c=zr(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const f=s&&!p&&!l?jh(s,a):Mt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-a.scrollTop*c.y+d.y+f.y}}function Cx(e){return Array.from(e.getClientRects())}function jx(e){const t=zt(e),n=Hs(e),r=e.ownerDocument.body,o=at(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=at(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Vs(e);const i=-n.scrollTop;return kt(r).direction==="rtl"&&(s+=at(t.clientWidth,r.clientWidth)-o),{width:o,height:l,x:s,y:i}}const dd=25;function Ex(e,t){const n=dt(e),r=zt(e),o=n.visualViewport;let l=r.clientWidth,s=r.clientHeight,i=0,a=0;if(o){l=o.width,s=o.height;const d=Ws();(!d||d&&t==="fixed")&&(i=o.offsetLeft,a=o.offsetTop)}const c=Vs(r);if(c<=0){const d=r.ownerDocument,p=d.body,f=getComputedStyle(p),g=d.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(r.clientWidth-p.clientWidth-g);v<=dd&&(l-=v)}else c<=dd&&(l+=c);return{width:l,height:s,x:i,y:a}}function Tx(e,t){const n=lr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,l=Kt(e)?zr(e):Mt(1),s=e.clientWidth*l.x,i=e.clientHeight*l.y,a=o*l.x,c=r*l.y;return{width:s,height:i,x:a,y:c}}function fd(e,t,n){let r;if(t==="viewport")r=Ex(e,n);else if(t==="document")r=jx(zt(e));else if(Ne(t))r=Tx(t,n);else{const o=Ch(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ws(r)}function Eh(e,t){const n=an(e);return n===t||!Ne(n)||tn(n)?!1:kt(n).position==="fixed"||Eh(n,t)}function Nx(e,t){const n=t.get(e);if(n)return n;let r=An(e,[],!1).filter(i=>Ne(i)&&qr(i)!=="body"),o=null;const l=kt(e).position==="fixed";let s=l?an(e):e;for(;Ne(s)&&!tn(s);){const i=kt(s),a=Mu(s);!a&&i.position==="fixed"&&(o=null),(l?!a&&!o:!a&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||tl(s)&&!a&&Eh(e,s))?r=r.filter(d=>d!==s):o=i,s=an(s)}return t.set(e,r),r}function Rx(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Fs(t)?[]:Nx(t,this._c):[].concat(n),r],i=fd(t,s[0],o);let a=i.top,c=i.right,d=i.bottom,p=i.left;for(let f=1;f<s.length;f++){const g=fd(t,s[f],o);a=at(g.top,a),c=Qr(g.right,c),d=Qr(g.bottom,d),p=at(g.left,p)}return{width:c-p,height:d-a,x:p,y:a}}function Px(e){const{width:t,height:n}=kh(e);return{width:t,height:n}}function _x(e,t,n){const r=Kt(t),o=zt(t),l=n==="fixed",s=lr(e,!0,l,t);let i={scrollLeft:0,scrollTop:0};const a=Mt(0);function c(){a.x=Vs(o)}if(r||!r&&!l)if((qr(t)!=="body"||tl(o))&&(i=Hs(t)),r){const g=lr(t,!0,l,t);a.x=g.x+t.clientLeft,a.y=g.y+t.clientTop}else o&&c();l&&!r&&o&&c();const d=o&&!r&&!l?jh(o,i):Mt(0),p=s.left+i.scrollLeft-a.x-d.x,f=s.top+i.scrollTop-a.y-d.y;return{x:p,y:f,width:s.width,height:s.height}}function ji(e){return kt(e).position==="static"}function pd(e,t){if(!Kt(e)||kt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zt(e)===n&&(n=n.ownerDocument.body),n}function Th(e,t){const n=dt(e);if(Fs(e))return n;if(!Kt(e)){let o=an(e);for(;o&&!tn(o);){if(Ne(o)&&!ji(o))return o;o=an(o)}return n}let r=pd(e,t);for(;r&&jv(r)&&ji(r);)r=pd(r,t);return r&&tn(r)&&ji(r)&&!Mu(r)?n:r||Nv(e)||n}const Ax=async function(e){const t=this.getOffsetParent||Th,n=this.getDimensions,r=await n(e.floating);return{reference:_x(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Lx(e){return kt(e).direction==="rtl"}const Ix={convertOffsetParentRelativeRectToViewportRelativeRect:kx,getDocumentElement:zt,getClippingRect:Rx,getOffsetParent:Th,getElementRects:Ax,getClientRects:Cx,getDimensions:Px,getScale:zr,isElement:Ne,isRTL:Lx};function Nh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ox(e,t){let n=null,r;const o=zt(e);function l(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,a){i===void 0&&(i=!1),a===void 0&&(a=1),l();const c=e.getBoundingClientRect(),{left:d,top:p,width:f,height:g}=c;if(i||t(),!f||!g)return;const v=kl(p),w=kl(o.clientWidth-(d+f)),S=kl(o.clientHeight-(p+g)),h=kl(d),y={rootMargin:-v+"px "+-w+"px "+-S+"px "+-h+"px",threshold:at(0,Qr(1,a))||1};let x=!0;function j(k){const C=k[0].intersectionRatio;if(C!==a){if(!x)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!Nh(c,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(j,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(j,y)}n.observe(e)}return s(!0),l}function un(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,c=$u(e),d=o||l?[...c?An(c):[],...t?An(t):[]]:[];d.forEach(h=>{o&&h.addEventListener("scroll",n,{passive:!0}),l&&h.addEventListener("resize",n)});const p=c&&i?Ox(c,n):null;let f=-1,g=null;s&&(g=new ResizeObserver(h=>{let[m]=h;m&&m.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=g)==null||y.observe(t)})),n()}),c&&!a&&g.observe(c),t&&g.observe(t));let v,w=a?lr(e):null;a&&S();function S(){const h=lr(e);w&&!Nh(w,h)&&n(),w=h,v=requestAnimationFrame(S)}return n(),()=>{var h;d.forEach(m=>{o&&m.removeEventListener("scroll",n),l&&m.removeEventListener("resize",n)}),p==null||p(),(h=g)==null||h.disconnect(),g=null,a&&cancelAnimationFrame(v)}}const Dx=vx,Mx=xx,$x=mx,zx=wx,Kx=(e,t,n)=>{const r=new Map,o={platform:Ix,...n},l={...o.platform,_c:r};return hx(e,t,{...o,platform:l})};var Fx=typeof document<"u",Wx=function(){},Kl=Fx?b.useLayoutEffect:Wx;function ks(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(!ks(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 l=o[r];if(!(l==="_owner"&&e.$$typeof)&&!ks(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function Rh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hd(e,t){const n=Rh(e);return Math.round(t*n)/n}function Ei(e){const t=b.useRef(e);return Kl(()=>{t.current=e}),t}function Hx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:s}={},transform:i=!0,whileElementsMounted:a,open:c}=e,[d,p]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,g]=b.useState(r);ks(f,r)||g(r);const[v,w]=b.useState(null),[S,h]=b.useState(null),m=b.useCallback(N=>{N!==k.current&&(k.current=N,w(N))},[]),y=b.useCallback(N=>{N!==C.current&&(C.current=N,h(N))},[]),x=l||v,j=s||S,k=b.useRef(null),C=b.useRef(null),T=b.useRef(d),z=a!=null,_=Ei(a),O=Ei(o),D=Ei(c),R=b.useCallback(()=>{if(!k.current||!C.current)return;const N={placement:t,strategy:n,middleware:f};O.current&&(N.platform=O.current),Kx(k.current,C.current,N).then(I=>{const P={...I,isPositioned:D.current!==!1};L.current&&!ks(T.current,P)&&(T.current=P,Lu.flushSync(()=>{p(P)}))})},[f,t,n,O,D]);Kl(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,p(N=>({...N,isPositioned:!1})))},[c]);const L=b.useRef(!1);Kl(()=>(L.current=!0,()=>{L.current=!1}),[]),Kl(()=>{if(x&&(k.current=x),j&&(C.current=j),x&&j){if(_.current)return _.current(x,j,R);R()}},[x,j,R,_,z]);const Y=b.useMemo(()=>({reference:k,floating:C,setReference:m,setFloating:y}),[m,y]),W=b.useMemo(()=>({reference:x,floating:j}),[x,j]),ne=b.useMemo(()=>{const N={position:n,left:0,top:0};if(!W.floating)return N;const I=hd(W.floating,d.x),P=hd(W.floating,d.y);return i?{...N,transform:"translate("+I+"px, "+P+"px)",...Rh(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:P}},[n,i,W.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:R,refs:Y,elements:W,floatingStyles:ne}),[d,R,Y,W,ne])}const cn=(e,t)=>{const n=Dx(e);return{name:n.name,fn:n.fn,options:[e,t]}},dn=(e,t)=>{const n=Mx(e);return{name:n.name,fn:n.fn,options:[e,t]}},fn=(e,t)=>{const n=$x(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ma=(e,t)=>{const n=zx(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vx="data-floating-ui-focusable",md="active",gd="selected",Bx={...Gd};let yd=!1,Ux=0;const vd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ux++;function Gx(){const[e,t]=b.useState(()=>yd?vd():void 0);return qn(()=>{e==null&&t(vd())},[]),b.useEffect(()=>{yd=!0},[]),e}const Yx=Bx.useId,Ph=Yx||Gx;function Qx(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Xx=b.createContext(null),Zx=b.createContext(null),Jx=()=>{var e;return((e=b.useContext(Xx))==null?void 0:e.id)||null},_h=()=>b.useContext(Zx);function zu(e){return"data-floating-ui-"+e}const qx={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},xd=b.forwardRef(function(t,n){const[r,o]=b.useState();qn(()=>{ex()&&o("button")},[]);const l={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[zu("focus-guard")]:"",style:qx};return u.jsx("span",{...t,...l})}),e0={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ah=b.createContext(null),wd=zu("portal");function t0(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Ph(),o=n0(),[l,s]=b.useState(null),i=b.useRef(null);return qn(()=>()=>{l==null||l.remove(),queueMicrotask(()=>{i.current=null})},[l]),qn(()=>{if(!r||i.current)return;const a=t?document.getElementById(t):null;if(!a)return;const c=document.createElement("div");c.id=r,c.setAttribute(wd,""),a.appendChild(c),i.current=c,s(c)},[t,r]),qn(()=>{if(n===null||!r||i.current)return;let a=n||(o==null?void 0:o.portalNode);a&&!Du(a)&&(a=a.current),a=a||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,a.appendChild(c));const d=document.createElement("div");d.id=r,d.setAttribute(wd,""),a=c||a,a.appendChild(d),i.current=d,s(d)},[t,n,r,o]),l}function pn(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,l=t0({id:n,root:r}),[s,i]=b.useState(null),a=b.useRef(null),c=b.useRef(null),d=b.useRef(null),p=b.useRef(null),f=s==null?void 0:s.modal,g=s==null?void 0:s.open,v=!!s&&!s.modal&&s.open&&o&&!!(r||l);return b.useEffect(()=>{if(!l||!o||f)return;function w(S){l&&Ci(S)&&(S.type==="focusin"?ud:dx)(l)}return l.addEventListener("focusin",w,!0),l.addEventListener("focusout",w,!0),()=>{l.removeEventListener("focusin",w,!0),l.removeEventListener("focusout",w,!0)}},[l,o,f]),b.useEffect(()=>{l&&(g||ud(l))},[g,l]),u.jsxs(Ah.Provider,{value:b.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:a,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:p,portalNode:l,setFocusManagerState:i}),[o,l]),children:[v&&l&&u.jsx(xd,{"data-type":"outside",ref:a,onFocus:w=>{if(Ci(w,l)){var S;(S=d.current)==null||S.focus()}else{const h=s?s.domReference:null,m=cx(h);m==null||m.focus()}}}),v&&l&&u.jsx("span",{"aria-owns":l.id,style:e0}),l&&Lu.createPortal(t,l),v&&l&&u.jsx(xd,{"data-type":"outside",ref:c,onFocus:w=>{if(Ci(w,l)){var S;(S=p.current)==null||S.focus()}else{const h=s?s.domReference:null,m=ux(h);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,w.nativeEvent,"focus-out"))}}})]})}const n0=()=>b.useContext(Ah),r0={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},o0={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},bd=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function sr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:l}=e,{enabled:s=!0,escapeKey:i=!0,outsidePress:a=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:f=!1,bubbles:g,capture:v}=t,w=_h(),S=vr(typeof a=="function"?a:()=>!1),h=typeof a=="function"?S:a,m=b.useRef(!1),{escapeKey:y,outsidePress:x}=bd(g),{escapeKey:j,outsidePress:k}=bd(v),C=b.useRef(!1),T=vr(L=>{var Y;if(!n||!s||!i||L.key!=="Escape"||C.current)return;const W=(Y=l.current.floatingContext)==null?void 0:Y.nodeId,ne=w?zl(w.nodesRef.current,W):[];if(!y&&(L.stopPropagation(),ne.length>0)){let N=!0;if(ne.forEach(I=>{var P;if((P=I.context)!=null&&P.open&&!I.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}r(!1,rx(L)?L.nativeEvent:L,"escape-key")}),z=vr(L=>{var Y;const W=()=>{var ne;T(L),(ne=go(L))==null||ne.removeEventListener("keydown",W)};(Y=go(L))==null||Y.addEventListener("keydown",W)}),_=vr(L=>{var Y;const W=l.current.insideReactTree;l.current.insideReactTree=!1;const ne=m.current;if(m.current=!1,c==="click"&&ne||W||typeof h=="function"&&!h(L))return;const N=go(L),I="["+zu("inert")+"]",P=Qo(o.floating).querySelectorAll(I);let U=Ne(N)?N:null;for(;U&&!tn(U);){const je=an(U);if(tn(je)||!Ne(je))break;U=je}if(P.length&&Ne(N)&&!nx(N)&&!Da(N,o.floating)&&Array.from(P).every(je=>!Da(U,je)))return;if(Kt(N)&&R){const je=tn(N),ae=kt(N),Re=/auto|scroll/,me=je||Re.test(ae.overflowX),eo=je||Re.test(ae.overflowY),to=me&&N.clientWidth>0&&N.scrollWidth>N.clientWidth,pr=eo&&N.clientHeight>0&&N.scrollHeight>N.clientHeight,no=ae.direction==="rtl",ro=pr&&(no?L.offsetX<=N.offsetWidth-N.clientWidth:L.offsetX>N.clientWidth),Ft=to&&L.offsetY>N.clientHeight;if(ro||Ft)return}const J=(Y=l.current.floatingContext)==null?void 0:Y.nodeId,Qe=w&&zl(w.nodesRef.current,J).some(je=>{var ae;return ki(L,(ae=je.context)==null?void 0:ae.elements.floating)});if(ki(L,o.floating)||ki(L,o.domReference)||Qe)return;const ze=w?zl(w.nodesRef.current,J):[];if(ze.length>0){let je=!0;if(ze.forEach(ae=>{var Re;if((Re=ae.context)!=null&&Re.open&&!ae.context.dataRef.current.__outsidePressBubbles){je=!1;return}}),!je)return}r(!1,L,"outside-press")}),O=vr(L=>{var Y;const W=()=>{var ne;_(L),(ne=go(L))==null||ne.removeEventListener(c,W)};(Y=go(L))==null||Y.addEventListener(c,W)});b.useEffect(()=>{if(!n||!s)return;l.current.__escapeKeyBubbles=y,l.current.__outsidePressBubbles=x;let L=-1;function Y(P){r(!1,P,"ancestor-scroll")}function W(){window.clearTimeout(L),C.current=!0}function ne(){L=window.setTimeout(()=>{C.current=!1},Ws()?5:0)}const N=Qo(o.floating);i&&(N.addEventListener("keydown",j?z:T,j),N.addEventListener("compositionstart",W),N.addEventListener("compositionend",ne)),h&&N.addEventListener(c,k?O:_,k);let I=[];return f&&(Ne(o.domReference)&&(I=An(o.domReference)),Ne(o.floating)&&(I=I.concat(An(o.floating))),!Ne(o.reference)&&o.reference&&o.reference.contextElement&&(I=I.concat(An(o.reference.contextElement)))),I=I.filter(P=>{var U;return P!==((U=N.defaultView)==null?void 0:U.visualViewport)}),I.forEach(P=>{P.addEventListener("scroll",Y,{passive:!0})}),()=>{i&&(N.removeEventListener("keydown",j?z:T,j),N.removeEventListener("compositionstart",W),N.removeEventListener("compositionend",ne)),h&&N.removeEventListener(c,k?O:_,k),I.forEach(P=>{P.removeEventListener("scroll",Y)}),window.clearTimeout(L)}},[l,o,i,h,c,n,r,f,s,y,x,T,j,z,_,k,O]),b.useEffect(()=>{l.current.insideReactTree=!1},[l,h,c]);const D=b.useMemo(()=>({onKeyDown:T,...d&&{[r0[p]]:L=>{r(!1,L.nativeEvent,"reference-press")},...p!=="click"&&{onClick(L){r(!1,L.nativeEvent,"reference-press")}}}}),[T,r,d,p]),R=b.useMemo(()=>{function L(Y){Y.button===0&&(m.current=!0)}return{onKeyDown:T,onMouseDown:L,onMouseUp:L,[o0[c]]:()=>{l.current.insideReactTree=!0}}},[T,c,l]);return b.useMemo(()=>s?{reference:D,floating:R}:{},[s,D,R])}function l0(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Ph(),l=b.useRef({}),[s]=b.useState(()=>Qx()),i=Jx()!=null,[a,c]=b.useState(r.reference),d=vr((g,v,w)=>{l.current.openEvent=g?v:void 0,s.emit("openchange",{open:g,event:v,reason:w,nested:i}),n==null||n(g,v,w)}),p=b.useMemo(()=>({setPositionReference:c}),[]),f=b.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return b.useMemo(()=>({dataRef:l,open:t,onOpenChange:d,elements:f,events:s,floatingId:o,refs:p}),[t,d,f,s,o,p])}function hn(e){e===void 0&&(e={});const{nodeId:t}=e,n=l0({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[l,s]=b.useState(null),[i,a]=b.useState(null),d=(o==null?void 0:o.domReference)||l,p=b.useRef(null),f=_h();qn(()=>{d&&(p.current=d)},[d]);const g=Hx({...e,elements:{...o,...i&&{reference:i}}}),v=b.useCallback(y=>{const x=Ne(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),getClientRects:()=>y.getClientRects(),contextElement:y}:y;a(x),g.refs.setReference(x)},[g.refs]),w=b.useCallback(y=>{(Ne(y)||y===null)&&(p.current=y,s(y)),(Ne(g.refs.reference.current)||g.refs.reference.current===null||y!==null&&!Ne(y))&&g.refs.setReference(y)},[g.refs]),S=b.useMemo(()=>({...g.refs,setReference:w,setPositionReference:v,domReference:p}),[g.refs,w,v]),h=b.useMemo(()=>({...g.elements,domReference:d}),[g.elements,d]),m=b.useMemo(()=>({...g,...r,refs:S,elements:h,nodeId:t}),[g,S,h,t,r]);return qn(()=>{r.dataRef.current.floatingContext=m;const y=f==null?void 0:f.nodesRef.current.find(x=>x.id===t);y&&(y.context=m)}),b.useMemo(()=>({...g,context:m,refs:S,elements:h}),[g,S,h,m])}function Ti(e,t,n){const r=new Map,o=n==="item";let l=e;if(o&&e){const{[md]:s,[gd]:i,...a}=e;l=a}return{...n==="floating"&&{tabIndex:-1,[Vx]:""},...l,...t.map(s=>{const i=s?s[n]:null;return typeof i=="function"?e?i(e):null:i}).concat(e).reduce((s,i)=>(i&&Object.entries(i).forEach(a=>{let[c,d]=a;if(!(o&&[md,gd].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var p;(p=r.get(c))==null||p.push(d),s[c]=function(){for(var f,g=arguments.length,v=new Array(g),w=0;w<g;w++)v[w]=arguments[w];return(f=r.get(c))==null?void 0:f.map(S=>S(...v)).find(S=>S!==void 0)}}}else s[c]=d}),s),{})}}function ir(e){e===void 0&&(e=[]);const t=e.map(i=>i==null?void 0:i.reference),n=e.map(i=>i==null?void 0:i.floating),r=e.map(i=>i==null?void 0:i.item),o=b.useCallback(i=>Ti(i,e,"reference"),t),l=b.useCallback(i=>Ti(i,e,"floating"),n),s=b.useCallback(i=>Ti(i,e,"item"),r);return b.useMemo(()=>({getReferenceProps:o,getFloatingProps:l,getItemProps:s}),[o,l,s])}const ar={"m-":{category:"spacing",themeKey:"spacing",valueType:"scalar",renderMode:"boxmodel",isComposite:!0,compositeRelatedPrefixes:["m-","mx-","my-","mt-","mr-","mb-","ml-","ms-","me-","p-","px-","py-","pt-","pr-","pb-","pl-","ps-","pe-","space-x-","space-y-","border-","border-t-","border-r-","border-b-","border-l-","rounded-","rounded-t-","rounded-r-","rounded-b-","rounded-l-","rounded-tl-","rounded-tr-","rounded-br-","rounded-bl-"],compositeExactMatches:["border","rounded"]},"mx-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"my-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"mt-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"mr-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"mb-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"ml-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"ms-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"me-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"p-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"px-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"py-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pt-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pr-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pb-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pl-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"ps-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pe-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"gap-":{category:"flexbox",themeKey:"spacing",valueType:"scalar",addable:!0,controlGroup:"flex-container",propertyKey:"gap"},"gap-x-":{category:"flexbox",themeKey:"spacing",valueType:"scalar",controlGroup:"flex-container",propertyKey:"gap-x"},"gap-y-":{category:"flexbox",themeKey:"spacing",valueType:"scalar",controlGroup:"flex-container",propertyKey:"gap-y"},"space-x-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"space-y-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"w-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"width"},"h-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"height"},"min-w-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"min-width"},"max-w-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"max-width"},"min-h-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"min-height"},"max-h-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"max-height"},"size-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"size"},"font-":{category:"typography",themeKey:"fontWeight",valueType:"scalar",addable:!0},"text-":{category:"typography",themeKey:null,valueType:"enum"},"leading-":{category:"typography",themeKey:"lineHeight",valueType:"scalar",addable:!0},"tracking-":{category:"typography",themeKey:"letterSpacing",valueType:"scalar",addable:!0},"text-left":{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-center":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-right":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-justify":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-start":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-end":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},italic:{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"font-style",enumAlts:["italic","not-italic"]},"not-italic":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"font-style",enumAlts:["italic","not-italic"]},underline:{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},"line-through":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},overline:{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},"no-underline":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},uppercase:{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},lowercase:{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},capitalize:{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},"normal-case":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},truncate:{category:"typography",themeKey:null,valueType:"enum"},"font-sans":{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"font-family",enumAlts:["font-sans","font-serif","font-mono"]},"font-serif":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"font-family",enumAlts:["font-sans","font-serif","font-mono"]},"font-mono":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"font-family",enumAlts:["font-sans","font-serif","font-mono"]},"align-baseline":{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-top":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-middle":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-bottom":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-text-top":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-text-bottom":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-sub":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-super":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"bg-":{category:"color",themeKey:"colors",valueType:"color",renderMode:"gradient-editor",isComposite:!0,compositeRelatedPrefixes:["bg-","bg-gradient-to-","from-","via-","to-"]},"bg-gradient-to-":{category:"gradient",themeKey:null,valueType:"enum"},"from-":{category:"gradient",themeKey:"colors",valueType:"color"},"via-":{category:"gradient",themeKey:"colors",valueType:"color"},"to-":{category:"gradient",themeKey:"colors",valueType:"color"},"ring-":{category:"color",themeKey:"colors",valueType:"color"},"outline-":{category:"color",themeKey:"colors",valueType:"color"},"fill-":{category:"color",themeKey:"colors",valueType:"color"},"stroke-":{category:"color",themeKey:"colors",valueType:"color"},"decoration-":{category:"color",themeKey:"colors",valueType:"color"},border:{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-t-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-r-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-b-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-l-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},rounded:{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-t-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-r-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-b-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-l-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-tl-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-tr-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-br-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-bl-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"opacity-":{category:"effects",themeKey:"opacity",valueType:"scalar",addable:!0},"shadow-":{category:"effects",themeKey:null,valueType:"enum"},block:{category:"layout",themeKey:null,valueType:"enum",addable:!0,propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},"inline-block":{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},inline:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},grid:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},"inline-grid":{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},hidden:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},table:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},contents:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},static:{category:"layout",themeKey:null,valueType:"enum"},fixed:{category:"layout",themeKey:null,valueType:"enum"},absolute:{category:"layout",themeKey:null,valueType:"enum"},relative:{category:"layout",themeKey:null,valueType:"enum"},sticky:{category:"layout",themeKey:null,valueType:"enum"},"inset-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"top-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"right-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"bottom-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"left-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"z-":{category:"layout",themeKey:null,valueType:"enum"},flex:{category:"layout",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},"inline-flex":{category:"layout",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},"flex-row":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,controlGroup:"flex-container",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-col":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-row-reverse":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-col-reverse":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-wrap":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,controlGroup:"flex-container",propertyKey:"flex-wrap",enumAlts:["flex-wrap","flex-nowrap","flex-wrap-reverse"]},"flex-nowrap":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-wrap",enumAlts:["flex-wrap","flex-nowrap","flex-wrap-reverse"]},"flex-wrap-reverse":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-wrap",enumAlts:["flex-wrap","flex-nowrap","flex-wrap-reverse"]},"flex-1":{category:"flexbox",themeKey:null,valueType:"enum"},"flex-auto":{category:"flexbox",themeKey:null,valueType:"enum"},"flex-initial":{category:"flexbox",themeKey:null,valueType:"enum"},"flex-none":{category:"flexbox",themeKey:null,valueType:"enum"},grow:{category:"flexbox",themeKey:null,valueType:"enum"},"grow-0":{category:"flexbox",themeKey:null,valueType:"enum"},shrink:{category:"flexbox",themeKey:null,valueType:"enum"},"shrink-0":{category:"flexbox",themeKey:null,valueType:"enum"},"justify-start":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-end":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-center":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-between":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-around":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-evenly":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-stretch":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"items-start":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-end":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-center":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-baseline":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-stretch":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"content-normal":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-start":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-end":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-center":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-between":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-around":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-evenly":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-baseline":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-stretch":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"justify-items-start":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"justify-items-end":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"justify-items-center":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"justify-items-stretch":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"self-auto":{category:"flexbox",themeKey:null,valueType:"enum"},"self-start":{category:"flexbox",themeKey:null,valueType:"enum"},"self-end":{category:"flexbox",themeKey:null,valueType:"enum"},"self-center":{category:"flexbox",themeKey:null,valueType:"enum"},"self-stretch":{category:"flexbox",themeKey:null,valueType:"enum"},"self-baseline":{category:"flexbox",themeKey:null,valueType:"enum"},"basis-":{category:"flexbox",themeKey:"spacing",valueType:"scalar"},"grid-cols-":{category:"flexbox",themeKey:null,valueType:"enum"},"grid-rows-":{category:"flexbox",themeKey:null,valueType:"enum"},"col-span-":{category:"flexbox",themeKey:null,valueType:"enum"},"row-span-":{category:"flexbox",themeKey:null,valueType:"enum"},"order-":{category:"flexbox",themeKey:null,valueType:"enum"}},s0=(()=>{const e=new Map;for(const[t,n]of Object.entries(ar)){if(!n.controlGroup)continue;const r=n.propertyKey??t.replace(/-$/g,"");e.has(n.controlGroup)||e.set(n.controlGroup,new Set),e.get(n.controlGroup).add(r)}return e})(),i0=(()=>{const e=new Map;for(const[t,n]of Object.entries(ar))n.controlGroup&&(e.has(n.controlGroup)||e.set(n.controlGroup,new Set),e.get(n.controlGroup).add(t));return e})();function a0(){const e={};for(const[t,n]of Object.entries(ar))if(n.valueType==="enum"&&n.enumAlts){const r=n.propertyKey??t.replace(/-$/g,"");for(const o of n.enumAlts)e[o]||(e[o]={alternatives:n.enumAlts,propertyKey:r})}return e}function u0(){const e={spacing:[],sizing:[],typography:[],color:[],borders:[],effects:[],layout:[],flexbox:[],gradient:[]},t=new Set;for(const[n,r]of Object.entries(ar)){if(!r.addable)continue;const o=r.propertyKey??n.replace(/-$/g,"");if(t.has(o))continue;t.add(o);const l=o.replace(/-/g," ").replace(/\b\w/g,i=>i.toUpperCase()),s=r.enumAlts?r.enumAlts.slice(0,2).join("/")+(r.enumAlts.length>2?"/…":""):`${n}*`;e[r.category].push({name:l,prefixHint:s,prefix:n})}return e}function Fl({prefix:e,currentValue:t,colors:n,locked:r,lockedValue:o,onHover:l,onLeave:s,onClick:i,onRemove:a,onRemoveHover:c}){return u.jsxs("div",{className:"p-2 bg-bv-surface border border-bv-border rounded-md my-2",onMouseLeave:()=>{r||s()},children:[u.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[u.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0"}),a&&u.jsx("div",{title:"Remove class",className:`w-5 h-5 rounded cursor-pointer border-2 shrink-0 transition-[border-color,transform] flex items-center justify-center ${t===""?"outline outline-2 outline-offset-2 outline-bv-orange border-transparent":"border-transparent hover:border-bv-orange hover:scale-110"}`,onMouseEnter:()=>{!r&&c&&c()},onClick:a,children:u.jsxs("svg",{viewBox:"0 0 10 10",width:"14",height:"14",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),u.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]})}),["black","white","transparent"].map(d=>n[d]!==void 0?u.jsx(Sd,{prefix:e,colorName:d,colorValue:n[d],isCurrent:d===t,isLocked:o===`${e}${d}`,locked:r,onHover:l,onClick:i},d):null)]}),_y.map(d=>{const p=n[d];return!p||typeof p!="object"?null:u.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[u.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0",children:d}),Ay.map(f=>p[f]!==void 0?u.jsx(Sd,{prefix:e,colorName:`${d}-${f}`,colorValue:p[f],isCurrent:`${d}-${f}`===t,isLocked:o===`${e}${d}-${f}`,locked:r,onHover:l,onClick:i},`${d}-${f}`):null)]},d)})]})}function Sd({prefix:e,colorName:t,colorValue:n,isCurrent:r,isLocked:o,locked:l,onHover:s,onClick:i}){const a=`${e}${t}`,c=o?"outline outline-2 outline-offset-2 outline-bv-teal border-transparent":r?"outline outline-2 outline-offset-2 outline-bv-orange border-transparent":l?"border-transparent":"border-transparent hover:border-bv-text hover:scale-110 hover:z-10",d=t==="transparent"?{background:"repeating-conic-gradient(#808080 0% 25%, transparent 0% 50%) 50% / 8px 8px"}:{backgroundColor:n};return u.jsx("div",{title:a,className:`w-5 h-5 rounded cursor-pointer border-2 shrink-0 transition-[border-color,transform] ${c}`,style:d,onMouseEnter:()=>{l||s(a)},onClick:p=>{p.stopPropagation(),i(a)}})}const fr=b.forwardRef(function({onClose:t,children:n,...r},o){const l=b.useRef(null);return b.useEffect(()=>{var s;(s=l.current)==null||s.focus({preventScroll:!0})},[]),u.jsx("div",{ref:s=>{l.current=s,typeof o=="function"?o(s):o&&(o.current=s)},tabIndex:-1,onBlur:s=>{var i;(i=l.current)!=null&&i.contains(s.relatedTarget)||t()},onKeyDown:s=>{s.code==="Escape"&&t()},...r,children:n})}),c0=4,d0=10;function xn({values:e,currentValue:t,lockedValue:n,locked:r,ghost:o,onStart:l,onHover:s,onLeave:i,onClick:a,onRemove:c,onRemoveHover:d}){const[p,f]=b.useState(!1),[g,v]=b.useState(null),w=b.useRef(null),S=b.useRef(null),h=b.useRef(null),{refs:m,floatingStyles:y}=hn({open:p,strategy:"fixed",placement:"bottom-start",middleware:[cn(2),fn(),dn({padding:4})],whileElementsMounted:un}),x=n!==null&&e.includes(n),j=g!==null?e[g]:x?n:t;b.useEffect(()=>{var D,R;p&&h.current&&((R=(D=h.current).scrollIntoView)==null||R.call(D,{block:"nearest"}))},[p]);const k=r&&!x;function C(D){if(k)return;l==null||l();const R=x?n:t,L=e.indexOf(R);w.current={startX:D.clientX,startIndex:L>=0?L:0,didScrub:!1},D.currentTarget.setPointerCapture(D.pointerId),D.preventDefault()}function T(D){const R=w.current;if(!R)return;const L=D.clientX-R.startX;if(!R.didScrub&&Math.abs(L)>c0&&(R.didScrub=!0,f(!1)),R.didScrub){const Y=Math.round(L/d0),W=Math.max(0,Math.min(e.length-1,R.startIndex+Y));v(W),s(e[W])}}function z(){const D=w.current;D&&(D.didScrub&&g!==null?a(e[g]):D.didScrub||f(R=>(R&&i(),!R)),v(null),w.current=null)}const _=g!==null,O=_?"bg-bv-teal/9 text-bv-teal ring-1 ring-bv-teal":x?"bg-bv-surface-hi text-bv-text ring-1 ring-bv-border hover:bg-bv-teal/9 hover:text-bv-teal hover:ring-bv-teal":p?"bg-bv-surface-hi text-bv-text ring-1 ring-bv-border":k?"bg-bv-surface text-bv-text-mid":o?"border border-dashed border-bv-border text-bv-muted bg-transparent hover:border-bv-teal hover:text-bv-teal":"bg-bv-surface text-bv-text-mid hover:bg-bv-surface-hi hover:text-bv-text";return u.jsxs("div",{ref:S,className:"relative inline-block",children:[u.jsxs("div",{ref:m.setReference,className:`group select-none px-2 py-0.5 rounded-md text-[11px] font-mono transition-colors ${k?"cursor-default":"cursor-ew-resize"} ${O}`,onPointerDown:C,onPointerMove:T,onPointerUp:z,children:[!k&&u.jsx("span",{className:`inline-block mr-0.5 text-[9px] transition-opacity ${_?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"‹"}),j,!k&&u.jsx("span",{className:`inline-block ml-0.5 text-[9px] transition-opacity ${_?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"›"})]}),p&&u.jsx(pn,{children:u.jsxs(fr,{ref:m.setFloating,style:y,className:"z-50 max-h-52 overflow-y-auto bg-bv-bg border border-bv-border rounded-md shadow-md min-w-[5rem]",onPointerDown:D=>D.stopPropagation(),onMouseLeave:i,onClose:()=>{f(!1),i()},children:[c&&u.jsxs("div",{className:`flex items-center gap-1.5 px-2.5 py-[3px] text-[11px] font-mono cursor-pointer border-b border-bv-border text-bv-muted hover:text-red-400 ${t===""||n===""?"text-bv-orange":""}`,onMouseEnter:d,onClick:D=>{D.stopPropagation(),c(),f(!1)},children:[u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0 opacity-70",children:[u.jsx("circle",{cx:"6",cy:"6",r:"5.5"}),u.jsx("line",{x1:"4",y1:"4",x2:"8",y2:"8"}),u.jsx("line",{x1:"8",y1:"4",x2:"4",y2:"8"})]}),"remove"]}),e.map(D=>{const R=D===(n??t),L=R?"bg-bv-teal/9 text-bv-teal":"text-bv-text-mid hover:bg-bv-surface hover:text-bv-text";return u.jsx("div",{ref:R?h:void 0,className:`px-2.5 py-[3px] text-[11px] font-mono cursor-pointer ${L}`,onMouseEnter:()=>s(D),onClick:Y=>{Y.stopPropagation(),a(D),f(!1)},children:D},D)})]})})]})}const f0={px:.0625};function Ar(e){return isNaN(Number(e))?f0[e]??1/0:Number(e)}function mr(e,t,n){return t==="spacing"&&(n!=null&&n.spacing)?Object.keys(n.spacing).sort((o,l)=>Ar(o)-Ar(l)).map(o=>`${e}${o}`):t==="fontSize"?[...Cy]:t==="fontWeight"?[...jy]:t==="borderRadius"?Ra:t==="lineHeight"?[...Ey]:t==="letterSpacing"?[...Ty]:t==="opacity"?Ny:[]}const p0=4,h0=10;function Kr({placeholder:e,values:t,currentValue:n,displayValue:r,formatValue:o,axis:l="x",disabled:s,onHover:i,onLeave:a,onClick:c,onScrubStart:d,onScrubEnd:p,onOpen:f,onClose:g,onRemove:v,onRemoveHover:w}){const[S,h]=b.useState(!1),[m,y]=b.useState(null),x=b.useRef(null),j=b.useRef(null),k=b.useRef(null),{refs:C,floatingStyles:T}=hn({open:S,strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:4})],whileElementsMounted:un}),z=n!=null,_=n?t.indexOf(n):-1,O=m!==null?t[m]:null,D=O?o?o(O):O:r??e;b.useEffect(()=>{var P,U;S&&k.current&&((U=(P=k.current).scrollIntoView)==null||U.call(P,{block:"nearest"}))},[S]);function R(P){var J,Qe;if(s)return;P.preventDefault(),P.stopPropagation();const U=_>=0?_:0;x.current={startX:P.clientX,startY:P.clientY,startIndex:U,didScrub:!1},(Qe=(J=P.target).setPointerCapture)==null||Qe.call(J,P.pointerId)}function L(P){const U=x.current;if(!U)return;const J=l==="y"?-(P.clientY-U.startY):P.clientX-U.startX;if(!U.didScrub&&Math.abs(J)>p0&&(U.didScrub=!0,h(!1),d==null||d()),U.didScrub){const Qe=Math.round(J/h0),ze=Math.max(0,Math.min(t.length-1,U.startIndex+Qe));y(ze),i==null||i(t[ze])}}function Y(){const P=x.current;P&&(P.didScrub&&m!==null?(c==null||c(t[m]),y(null),x.current=null,p==null||p()):P.didScrub||(y(null),x.current=null,h(U=>U?(g==null||g(),a==null||a(),!1):(f==null||f(),!0))))}const W=m!==null,N=["bm-slot",z||W?"bm-has-val":"",W?"bm-scrubbing":""].filter(Boolean).join(" "),I=s?"default":l==="y"?"ns-resize":"ew-resize";return u.jsxs("span",{ref:P=>{j.current=P,C.setReference(P)},className:N,style:{position:"relative",cursor:I},onPointerDown:R,onPointerMove:L,onPointerUp:Y,role:"button",tabIndex:s?-1:0,children:[D,S&&u.jsx(pn,{children:u.jsxs(fr,{ref:C.setFloating,style:T,className:"bm-mini-dropdown",onClick:P=>P.stopPropagation(),onMouseLeave:()=>a==null?void 0:a(),onPointerDown:P=>P.stopPropagation(),onMouseDown:P=>{P.stopPropagation(),P.preventDefault()},onClose:()=>{h(!1),g==null||g(),a==null||a()},children:[v&&u.jsxs("div",{className:"bm-mini-dropdown-item bm-mini-dropdown-remove",tabIndex:-1,onMouseEnter:w,onMouseDown:P=>{P.preventDefault(),v(),h(!1),g==null||g()},children:[u.jsxs("svg",{viewBox:"0 0 10 10",width:"8",height:"8",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline-block",flexShrink:0},children:[u.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),u.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),t.map(P=>{const U=P===n;return u.jsx("div",{ref:U?k:void 0,tabIndex:-1,className:`bm-mini-dropdown-item${U?" bm-active":""}`,onMouseEnter:()=>i==null?void 0:i(P),onMouseDown:J=>{J.preventDefault(),c==null||c(P),h(!1),g==null||g()},onClick:J=>{J.detail===0&&(J.stopPropagation(),c==null||c(P),h(!1),g==null||g())},onKeyDown:J=>{(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),c==null||c(P),h(!1),g==null||g())},children:P},P)})]})})]})}function kd(e,t){const r={padding:"p",margin:"m",border:"border-",outline:"outline-"}[t];return e.startsWith(r)?e.slice(r.length):e}function m0({value:e,placeholder:t,layer:n,frozen:r,scaleValues:o,axis:l,onClick:s,onValueChange:i,onValueHover:a,onValueLeave:c,onScrubStart:d,onScrubEnd:p,onOpen:f,onClose:g,onValueRemove:v,onValueRemoveHover:w}){const S=e!=null,h=S?kd(e,n):null;if(o&&o.length>0)return u.jsx(Kr,{placeholder:t,values:o,currentValue:e,displayValue:h,formatValue:y=>kd(y,n),axis:l,disabled:r,onHover:a,onLeave:c,onClick:i,onScrubStart:d,onScrubEnd:p,onOpen:f,onClose:g,onRemove:v,onRemoveHover:w});const m=`bm-slot${S?" bm-has-val":""}`;return u.jsx("span",{className:m,onClick:r?void 0:y=>s==null?void 0:s(y.currentTarget),role:"button",tabIndex:r?-1:0,children:h??t})}const g0={top:["y","t"],right:["r"],bottom:["b"],left:["x","l"],tr:["color"],bl:["style"],br:["offset"]},y0={margin:["top","right","bottom","left"],outline:["top","right","bottom","left","tr","bl","br"],border:["top","right","bottom","left","tr","bl"],padding:["top","right","bottom","left"]},v0={top:"y",bottom:"y",left:"x",right:"x",tr:"x",bl:"x",br:"x"};function x0({layer:e,classState:t,shorthandValue:n,shorthandScaleValues:r,slots:o,isHovered:l,frozen:s,onHoverChange:i,onSlotClick:a,onSlotChange:c,onSlotHover:d,onScrubStart:p,onScrubEnd:f,onSlotOpen:g,onSlotClose:v,onSlotRemove:w,onSlotRemoveHover:S,children:h}){const m=`bm-layer bm-${e}${l?" bm-hovered":""}`,[y,x]=b.useState(null),j=new Map(o.map(D=>[D.key,D])),k=(t==="shorthand"||t==="mixed")&&n,C=r&&r.length>0?u.jsx("span",{className:"bm-name bm-name-scrubber",children:u.jsx(Kr,{placeholder:e,values:r,currentValue:k?n:null,displayValue:k?n:null,formatValue:D=>D,axis:"x",disabled:s,onHover:D=>d==null?void 0:d("shorthand",D),onLeave:()=>d==null?void 0:d("shorthand",null),onClick:D=>c==null?void 0:c("shorthand",D),onScrubStart:()=>{p==null||p()},onScrubEnd:f,onOpen:()=>{x("__shorthand__"),g==null||g()},onClose:()=>{x(null),v==null||v()},onRemove:w?()=>w("shorthand"):void 0,onRemoveHover:S?()=>S("shorthand"):void 0})}):k?u.jsx("span",{className:"bm-name",children:u.jsx("span",{className:"bm-val",onClick:D=>a==null?void 0:a("shorthand",D.currentTarget),children:n})}):u.jsx("span",{className:"bm-name",children:e}),z=(y0[e]??[]).map(D=>{const L=(g0[D]??[]).map(I=>j.get(I)).filter(I=>I!=null);if(L.length===0)return null;const Y=L.some(I=>I.value!=null),ne=`bm-slot-group bm-sg-${D}${Y?" bm-has-values":""}${y===D?" bm-sg-active":""}`,N=v0[D];return u.jsx("div",{className:ne,children:L.map(I=>u.jsx(m0,{slotKey:I.key,value:I.value,placeholder:I.placeholder,layer:e,isExpanded:l,frozen:s,scaleValues:I.scaleValues,axis:N,onClick:P=>a==null?void 0:a(I.key,P),onValueChange:c?P=>c(I.key,P):void 0,onValueHover:d?P=>d(I.key,P):void 0,onValueLeave:d?()=>d(I.key,null):void 0,onScrubStart:p,onScrubEnd:f,onOpen:()=>{x(D),g==null||g()},onClose:()=>{x(null),v==null||v()},onValueRemove:w?()=>w(I.key):void 0,onValueRemoveHover:S?()=>S(I.key):void 0},I.key))},D)}),_=D=>{D.stopPropagation(),s||i(!0)},O=D=>{const R=D.relatedTarget,L=D.currentTarget;R&&L.contains(R)||s||i(!1)};return u.jsxs("div",{className:m,onMouseOver:_,onMouseOut:O,"data-layer":e,children:[C,z,h]})}const Cd=["margin","outline","border","padding"];function w0({layers:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:o,onSlotRemove:l,onSlotRemoveHover:s,onEditStart:i}){const[a,c]=b.useState(null),[d,p]=b.useState(null),f=t||d!==null,g=new Map(e.map(y=>[y.layer,y])),v=(y,x)=>{f||c(x?y:null)},w=(y,x,j)=>{f||n==null||n(y,x,j)};let h=u.jsx("div",{className:"bm-content"});for(let y=Cd.length-1;y>=0;y--){const x=Cd[y],j=g.get(x);j&&(h=u.jsx(x0,{layer:j.layer,classState:j.classState,shorthandValue:j.shorthandValue,shorthandScaleValues:j.shorthandScaleValues,slots:j.slots,isHovered:a===x||d===x,frozen:f,onHoverChange:k=>v(x,k),onSlotClick:(k,C)=>w(x,k,C),onSlotChange:r?(k,C)=>r(x,k,C):void 0,onSlotHover:o?(k,C)=>o(x,k,C):void 0,onSlotRemove:l?k=>l(x,k):void 0,onSlotRemoveHover:s?k=>s(x,k):void 0,onScrubStart:()=>{p(x),i==null||i()},onScrubEnd:()=>p(null),onSlotOpen:()=>{p(x),i==null||i()},onSlotClose:()=>p(null),children:h}))}const m=`bm-root${f?" bm-frozen":""}`;return u.jsx("div",{className:m,children:h})}const b0={margin:{shorthand:"m",x:"mx",y:"my",t:"mt",r:"mr",b:"mb",l:"ml"},outline:{shorthand:"outline",x:"outline-x",y:"outline-y",t:"outline-t",r:"outline-r",b:"outline-b",l:"outline-l"},border:{shorthand:"border",x:"border-x",y:"border-y",t:"border-t",r:"border-r",b:"border-b",l:"border-l"},padding:{shorthand:"p",x:"px",y:"py",t:"pt",r:"pr",b:"pb",l:"pl"}},S0=["y","t","r","b","x","l"];function k0(e){const t=S0.map(n=>({key:n,placeholder:n}));return(e==="border"||e==="outline")&&t.push({key:"color",placeholder:"color"},{key:"style",placeholder:"style"}),e==="outline"&&t.push({key:"offset",placeholder:"offset"}),t}function C0(e,t){const n=b0[e],r=k0(e),o=t[n.shorthand]??null,l=o!=null?o===""?n.shorthand:`${n.shorthand}-${o}`:null,s=r.map(({key:f,placeholder:g})=>{let v;if(f==="color"){const h=e==="outline"?"outline-color":"border-color";v=h in t?h:void 0}else if(f==="style"){const h=e==="outline"?"outline-style":"border-style";v=h in t?h:void 0}else f==="offset"?v="outline-offset"in t?"outline-offset":void 0:v=n[f];const w=v?t[v]??null:null;let S;return(f==="color"||f==="style")&&w!=null?S=`${e==="outline"?"outline":"border"}-${w}`:S=w!=null&&v?`${v}-${w}`:null,{key:f,value:S,placeholder:g}}),i=l!=null,a=s.some(f=>(f.key==="x"||f.key==="y")&&f.value!=null),c=s.some(f=>(f.key==="t"||f.key==="r"||f.key==="b"||f.key==="l")&&f.value!=null),d=a||c;let p;return!i&&!d?p="none":i&&!d?p="shorthand":!i&&a&&!c?p="axis":i?p="mixed":p="individual",{layer:e,classState:p,shorthandValue:l,slots:s}}function j0(e,t,n){var s,i,a;if(t==="color")return[];if(t==="style"){const c=e==="outline"?"outline":"border";return Py.map(d=>`${c}-${d}`)}let r;e==="border"||e==="outline"?t==="offset"?r=(s=n==null?void 0:n.theme)!=null&&s.spacing?Object.keys(n.theme.spacing).sort((c,d)=>Ar(c)-Ar(d)):Pa:r=(i=n==null?void 0:n.theme)!=null&&i.borderWidth?Object.keys(n.theme.borderWidth):qp:r=(a=n==null?void 0:n.theme)!=null&&a.spacing?Object.keys(n.theme.spacing).sort((c,d)=>Ar(c)-Ar(d)):Pa;const l={margin:{shorthand:"m",t:"mt",r:"mr",b:"mb",l:"ml",x:"mx",y:"my"},padding:{shorthand:"p",t:"pt",r:"pr",b:"pb",l:"pl",x:"px",y:"py"},border:{t:"border-t",r:"border-r",b:"border-b",l:"border-l",x:"border-x",y:"border-y",offset:"outline-offset"},outline:{t:"outline-t",r:"outline-r",b:"outline-b",l:"outline-l",x:"outline-x",y:"outline-y",offset:"outline-offset"}}[e][t];return l?r.map(c=>c===""?l:`${l}-${c}`):[]}function gr(e,t){const n={};for(const s of e){let i;s.color!==void 0?i=`${s.property}-color`:s.style!==void 0?i=`${s.property}-style`:s.side!==void 0?i=s.property.length<=2?s.property+s.side:`${s.property}-${s.side}`:i=s.property;const a=s.scale??s.color??s.style??s.align??s.size??s.value??"";n[i]=a}const r={margin:"m",padding:"p",border:"border",outline:"outline"},o={margin:!1,padding:!1,border:!0,outline:!1};return["margin","outline","border","padding"].map(s=>{var p,f;const i=C0(s,n),a=i.slots.map(g=>{const v=j0(s,g.key,t);return v.length>0?{...g,scaleValues:v}:g}),d=(o[s]?(p=t==null?void 0:t.theme)!=null&&p.borderWidth?Object.keys(t.theme.borderWidth):qp:(f=t==null?void 0:t.theme)!=null&&f.spacing?Object.keys(t.theme.spacing):Pa).map(g=>g===""?r[s]:`${r[s]}-${g}`);return{...i,slots:a,shorthandScaleValues:d}})}const E0={tl:[1,1],t:[1,2],tr:[1,3],l:[2,1],all:[2,2],r:[2,3],bl:[3,1],b:[3,2],br:[3,3]},T0={tl:"x",t:"x",tr:"x",l:"y",all:"x",r:"y",bl:"x",b:"x",br:"x"};function Ni(e){return e==="rounded"?"—":e.replace(/^rounded-/,"").replace(/^(?:tl|tr|br|bl|[trbl])-/,"")}function N0({slot:e,frozen:t,isActive:n,onSlotClick:r,onSlotChange:o,onSlotHover:l,onSlotRemove:s,onSlotRemoveHover:i,onScrubStart:a,onScrubEnd:c,onOpen:d,onClose:p}){const[f,g]=E0[e.key],v=e.value!=null,w=`cm-slot${v?" cm-has-val":""}`,S=e.key==="all"?"cm-cell cm-cell-all cm-content":`cm-cell cm-cell-${e.key}`,h={gridRow:f,gridColumn:g},m=T0[e.key];return e.scaleValues&&e.scaleValues.length>0?u.jsx("div",{className:S,style:h,children:u.jsx(Kr,{placeholder:e.placeholder,values:e.scaleValues,currentValue:e.value,displayValue:v?Ni(e.value):null,formatValue:Ni,axis:m,disabled:t,onHover:y=>l(e.key,y),onLeave:()=>l(e.key,null),onClick:y=>o(e.key,y),onScrubStart:()=>a(e.key),onScrubEnd:c,onOpen:()=>d(e.key),onClose:p,onRemove:s?()=>s(e.key):void 0,onRemoveHover:i?()=>i(e.key):void 0})}):u.jsx("div",{className:S,style:h,children:u.jsx("span",{className:w,role:"button",tabIndex:t?-1:0,onClick:t?void 0:y=>r(e.key,y.currentTarget),children:v?Ni(e.value):e.placeholder})})}function R0({state:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:o,onSlotRemove:l,onSlotRemoveHover:s,onEditStart:i}){const[a,c]=b.useState(null),d=t||a!==null,p=new Map(e.slots.map(w=>[w.key,w])),f=p.get("all")??{key:"all",value:e.shorthandValue,placeholder:"all",scaleValues:e.shorthandScaleValues},g=["tl","t","tr","l","all","r","bl","b","br"],v=`cm-root${d?" cm-frozen":""}${a?" cm-active":""}`;return u.jsx("div",{className:v,children:u.jsx("div",{className:"cm-grid",children:g.map(w=>{const S=w==="all"?f:p.get(w)??{key:w,value:null,placeholder:w,scaleValues:void 0};return u.jsx(N0,{slot:S,frozen:d,isActive:a===w,onSlotClick:(h,m)=>n==null?void 0:n(h,m),onSlotChange:(h,m)=>r==null?void 0:r(h,m),onSlotHover:(h,m)=>o==null?void 0:o(h,m),onSlotRemove:l,onSlotRemoveHover:s,onScrubStart:h=>{c(h),i==null||i()},onScrubEnd:()=>c(null),onOpen:h=>{c(h),i==null||i()},onClose:()=>c(null)},w)})})})}function jd({label:e,availableProperties:t=[],onAddProperty:n,isEmpty:r=!1,classCount:o=0,children:l}){const[s,i]=b.useState(!1),[a,c]=b.useState(r),d=b.useRef(r),p=b.useRef(null);b.useEffect(()=>{d.current&&!r&&c(!1),d.current=r},[r]),b.useEffect(()=>{if(!s)return;function g(v){p.current&&!p.current.contains(v.target)&&i(!1)}return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[s]);function f(g){n==null||n(g),i(!1)}return u.jsxs("div",{className:"px-4 py-3",children:[u.jsxs("div",{className:"group/sec flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>c(g=>!g),children:[u.jsx("svg",{className:`w-3 h-3 text-bv-muted transition-transform ${a?"":"rotate-90"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),u.jsx("span",{className:"text-[10px] font-semibold text-bv-text",children:e}),a&&o>0&&u.jsx("span",{className:"ml-1 px-1.5 py-0.5 rounded-full text-[9px] font-semibold leading-none bg-bv-teal/20 text-bv-teal tabular-nums",children:o}),t.length>0&&u.jsxs("div",{ref:p,className:"relative ml-auto",children:[u.jsx("button",{type:"button","aria-label":`Add ${e} property`,className:`w-5 h-5 flex items-center justify-center rounded transition-all cursor-pointer border-none ${s?"text-bv-text bg-bv-surface-hi":"text-bv-muted bg-transparent opacity-75 group-hover/sec:opacity-100 hover:text-bv-text hover:bg-bv-surface-hi"}`,onClick:g=>{g.stopPropagation(),i(v=>!v)},children:u.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M12 5v14m-7-7h14"})})}),s&&u.jsx(fr,{className:"absolute z-50 top-[calc(100%+2px)] right-0 bg-bv-bg border border-bv-border rounded-md shadow-[0_4px_16px_rgba(0,0,0,0.10)] min-w-[180px] max-w-[calc(100vw-16px)] py-1",onClose:()=>i(!1),children:t.map(g=>u.jsxs("button",{type:"button",className:"w-full px-2.5 py-[5px] text-[11px] font-[family-name:var(--font-ui)] text-bv-text-mid flex items-center gap-1.5 transition-colors hover:bg-bv-teal/10 hover:text-bv-teal cursor-pointer border-none bg-transparent text-left whitespace-nowrap",onClick:()=>f(g.prefix),children:[g.name,u.jsx("span",{className:"font-mono text-[10px] text-bv-muted group-hover:text-bv-teal/60",children:g.prefixHint})]},g.prefix))})]})]}),u.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-200 ease-in-out ${a?"max-h-0 opacity-0":"max-h-[600px] opacity-100"}`,children:r?u.jsxs("div",{className:"text-[10px] text-bv-muted italic mt-2",children:["No ",e.toLowerCase()," classes — click + to add"]}):u.jsx("div",{className:"flex flex-wrap gap-1 mt-2.5",children:l})})]})}const P0=[{dir:"tl",arrow:"↖"},{dir:"t",arrow:"↑"},{dir:"tr",arrow:"↗"},{dir:"l",arrow:"←"},"center",{dir:"r",arrow:"→"},{dir:"bl",arrow:"↙"},{dir:"b",arrow:"↓"},{dir:"br",arrow:"↘"}];function _0({direction:e,mode:t,onHover:n,onLeave:r,onDirectionClick:o,onSolidClick:l,solidColorName:s}){const i=t==="solid";return u.jsxs("div",{className:"flex flex-col items-center shrink-0",children:[u.jsx("div",{className:"grid grid-cols-3 gap-0.5",onMouseLeave:r,children:P0.map((a,c)=>{if(a==="center"){const p=i;return u.jsx("button",{type:"button",className:`w-5 h-5 rounded-[3px] flex items-center justify-center text-xs cursor-pointer transition-all duration-150
|
|
57
|
-
${p?"border-[1.5px] border-bv-teal bg-bv-teal text-white":"border-[1.5px] border-bv-border bg-bv-bg text-bv-muted hover:border-bv-teal hover:bg-bv-teal/9 hover:text-bv-teal"}`,title:"Solid color",onClick:l,children:"●"},"center")}const d=!i&&e===a.dir;return u.jsx("button",{type:"button",className:`w-5 h-5 rounded-[3px] flex items-center justify-center text-[10px] cursor-pointer transition-all duration-150
|
|
58
|
-
${i?"opacity-35 hover:opacity-100":""}
|
|
59
|
-
${d?"border-[1.5px] border-bv-teal bg-bv-teal text-white":"border-[1.5px] border-bv-border bg-bv-bg text-bv-muted hover:border-bv-teal hover:bg-bv-teal/9 hover:text-bv-teal"}`,onMouseEnter:()=>n(a.dir),onClick:()=>o(a.dir),children:a.arrow},a.dir)})}),u.jsx("div",{className:"text-[10px] font-mono text-bv-text-mid mt-0.75 max-w-[68px] truncate text-center",children:i?s?u.jsx("span",{className:"text-bv-text font-bold",children:s}):u.jsx("span",{className:"text-bv-muted italic",children:"none"}):u.jsxs("span",{children:["to-",u.jsx("span",{className:"text-bv-teal font-bold",children:e})]})})]})}function A0(e,t){const r=[...e].sort((o,l)=>(o.position??0)-(l.position??0)).map(o=>o.position!=null?`${o.hex} ${o.position}%`:o.hex);return`linear-gradient(${t}, ${r.join(", ")})`}function Ri(e){return Math.round(Math.max(0,Math.min(100,e))/5)*5}function L0({stop:e,isEndpoint:t,isSelected:n,onDragStart:r,onClick:o,onRemove:l}){const s=b.useRef(!1),i=b.useCallback(p=>{p.preventDefault(),p.stopPropagation(),s.current=!1,r(e.id,p.clientX);const f=()=>{s.current=!0},g=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",g)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",g)},[e.id,r]),a=b.useCallback(p=>{p.stopPropagation(),s.current||o(e.id,p.currentTarget)},[e.id,o]),c=b.useCallback(p=>{p.stopPropagation(),l(e.id)},[e.id,l]),d=e.position??0;return u.jsxs("div",{className:`absolute top-0 cursor-grab select-none z-10
|
|
60
|
-
hover:z-20
|
|
61
|
-
${n?"z-25":""}`,style:{left:`${d}%`,transform:"translateX(-50%)",width:22,height:26,filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.2))"},onMouseDown:i,onClick:a,title:`${e.role}-${e.colorName}${e.position!=null?` ${e.position}%`:""}`,children:[u.jsx("svg",{viewBox:"0 0 22 26",width:22,height:26,xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M2 1 L20 1 L20 16 L11 25 L2 16 Z",fill:e.hex,stroke:n?"#00848B":"white",strokeWidth:n?2:1.5,strokeLinejoin:"round"})}),!t&&u.jsx("div",{className:"absolute -top-1.5 -right-1.5 w-3.5 h-3.5 rounded-full bg-bv-orange text-white text-[9px] leading-3.5 text-center cursor-pointer z-40 hidden group-hover/handle:block hover:block!",style:{display:void 0},onClick:c,onMouseDown:p=>p.stopPropagation(),children:"×"})]})}function I0({stops:e,direction:t,onStopDrag:n,onStopDragEnd:r,onStopClick:o,onBarClick:l,onStopRemove:s,selectedStopId:i}){const a=b.useRef(null),c=b.useRef(null),d=[...e].sort((v,w)=>(v.position??0)-(w.position??0)),p=b.useCallback((v,w)=>{const S=e.find(y=>y.id===v);if(!S)return;c.current={stopId:v,startX:w,startPos:S.position??0};const h=y=>{const x=c.current;if(!x||!a.current)return;const j=a.current.getBoundingClientRect(),C=(y.clientX-x.startX)/j.width*100,T=Ri(x.startPos+C);n(x.stopId,T)},m=y=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",m);const x=c.current;if(x&&a.current){const j=a.current.getBoundingClientRect(),C=(y.clientX-x.startX)/j.width*100,T=Ri(x.startPos+C);r(x.stopId,T)}c.current=null};document.addEventListener("mousemove",h),document.addEventListener("mouseup",m)},[e,n,r]),f=b.useCallback(v=>{if(!a.current)return;const w=a.current.getBoundingClientRect(),S=(v.clientX-w.left)/w.width*100;l(Ri(S))},[l]),g=A0(d,t);return u.jsxs("div",{className:"relative flex-1 min-w-0",style:{paddingTop:28},children:[d.map((v,w)=>u.jsx(L0,{stop:v,isEndpoint:w===0||w===d.length-1,isSelected:v.id===i,onDragStart:p,onClick:o,onRemove:s},v.id)),u.jsx("div",{ref:a,className:"h-9 rounded-md cursor-pointer relative",style:{background:g,border:"1px solid rgba(0,0,0,0.08)",boxShadow:"inset 0 1px 2px rgba(0,0,0,0.06)"},onClick:f,children:u.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-lg font-bold text-white/0 hover:text-white/60 transition-colors pointer-events-none",children:"+"})})]})}const O0={t:"to top",tr:"to top right",r:"to right",br:"to bottom right",b:"to bottom",bl:"to bottom left",l:"to left",tl:"to top left"};function D0(e){var Ft,Kn;const{direction:t,stops:n,mode:r,solidColorName:o,solidColorHex:l,onPreview:s,onPreviewBatch:i,onRevert:a,onStage:c}=e,[d,p]=b.useState(t),[f,g]=b.useState(n),[v,w]=b.useState(r),[S,h]=b.useState(o),[m,y]=b.useState(l),[x,j]=b.useState(null),[k,C]=b.useState(!1),[T,z]=b.useState(null),[_,O]=b.useState(null),D=b.useRef(n.length+1),R=b.useCallback(q=>{if(v==="gradient")s(`bg-gradient-to-${d}`,`bg-gradient-to-${q}`);else{const re=S??"slate-500",le=S?`bg-${S}`:"";i([{oldClass:le,newClass:`bg-gradient-to-${q}`},{oldClass:"",newClass:`from-${re}`},{oldClass:"",newClass:`to-${re}`}])}},[d,v,S,s,i]),L=b.useCallback(()=>{a()},[a]),Y=b.useCallback(q=>{if(p(q),w("gradient"),v==="gradient"&&f.length>=2){const re=`bg-gradient-to-${d}`,le=`bg-gradient-to-${q}`;c(re,le)}else{const re=S??"slate-500",le=m??Xn(re,e.colors),E={id:"1",role:"from",colorName:re,hex:le,position:0},M={id:"2",role:"to",colorName:re,hex:le,position:100};D.current=3,g([E,M]);const K=S?`bg-${S}`:"";c(K,`bg-gradient-to-${q}`),c("",`from-${re}`),c("",`to-${re}`)}},[d,v,f,S,m,e.colors,c]),W=b.useCallback(()=>{w("solid"),C(!1),j(null),z(null),f.length>0&&!S&&(h(f[0].colorName),y(f[0].hex))},[f,S]),ne=b.useCallback((q,re)=>{g(E=>E.map(M=>M.id===q?{...M,position:re}:M));const le=f.find(E=>E.id===q);if(le){const E=le.position!=null?`${le.role}-${le.position}%`:"",M=`${le.role}-${re}%`;s(E,M)}},[f,s]),N=b.useCallback((q,re)=>{g(E=>E.map(M=>M.id===q?{...M,position:re}:M));const le=f.find(E=>E.id===q);if(le){const E=le.position!=null?`${le.role}-${le.position}%`:"",M=`${le.role}-${re}%`;c(E,M)}},[f,c]),I=b.useCallback((q,re)=>{x===q&&k?(j(null),C(!1),z(null),O(null)):(j(q),C(!0),z("stop"),O(re))},[x,k]),P=b.useCallback(q=>{const re=String(D.current++),le=[...f].sort((K,X)=>(K.position??0)-(X.position??0));let E=le[0];for(const K of le)(K.position??0)<=q&&(E=K);const M={id:re,role:"via",colorName:(E==null?void 0:E.colorName)??"gray-500",hex:(E==null?void 0:E.hex)??"#6B7280",position:q};g(K=>[...K,M]),j(re),C(!0),z("stop")},[f]),U=b.useCallback(q=>{const re=f.find(E=>E.id===q);if(!re)return;const le=f.filter(E=>E.id!==q);if(j(null),C(!1),z(null),O(null),le.length>=2)g(le),c(`${re.role}-${re.colorName}`,"");else if(le.length===1){const E=le[0];g([]),w("solid"),h(E.colorName),y(E.hex),c(`bg-gradient-to-${d}`,""),f.forEach(M=>c(`${M.role}-${M.colorName}`,"")),c("",`bg-${E.colorName}`)}else g([]),w("none"),h(null),y(null),c(`bg-gradient-to-${d}`,""),f.forEach(E=>c(`${E.role}-${E.colorName}`,""))},[f,d,c]),J=b.useCallback(q=>{C(!0),z("solid"),j(null),O(q)},[]),Qe=b.useCallback(()=>{s(S?`bg-${S}`:"","")},[S,s]),ze=b.useCallback(()=>{S&&c(`bg-${S}`,""),h(null),y(null),C(!1),z(null),O(null)},[S,c]),je=b.useCallback(q=>{if(T==="stop"&&x){const re=f.find(le=>le.id===x);re&&s(`${re.role}-${re.colorName}`,q)}else T==="solid"&&s(`bg-${S}`,q)},[T,x,f,S,s]),ae=b.useCallback(()=>{a()},[a]),Re=b.useCallback(q=>{if(T==="stop"&&x){const re=f.find(le=>le.id===x);if(re){const le=re.role+"-",E=q.startsWith(le)?q.slice(le.length):q;g(M=>M.map(K=>K.id===x?{...K,colorName:E,hex:Xn(E,e.colors)}:K)),c(`${re.role}-${re.colorName}`,`${re.role}-${E}`),C(!1),j(null),z(null),O(null)}}else if(T==="solid"){const re="bg-",le=q.startsWith(re)?q.slice(re.length):q,E=S?`bg-${S}`:"";h(le),y(Xn(le,e.colors)),c(E,`bg-${le}`),C(!1),z(null),O(null)}},[T,x,f,S,c,e.colors]),me=b.useCallback(()=>{C(!1),j(null),z(null),O(null),a()},[a]),eo=T==="stop"&&x?(((Ft=f.find(q=>q.id===x))==null?void 0:Ft.role)??"from")+"-":"bg-",to=T==="stop"&&x?((Kn=f.find(q=>q.id===x))==null?void 0:Kn.colorName)??"":S??"",pr=O0[d],ro=!!(x?f.find(q=>q.id===x):null);return{direction:d,stops:f,mode:v,solidColorName:S,solidColorHex:m,selectedStopId:x,colorPickerOpen:k,editingTarget:T,anchorEl:_,colorPrefix:eo,colorPickerCurrentValue:to,directionCSS:pr,selectedStopIsRemovable:ro,handleDirectionHover:R,handleDirectionLeave:L,handleDirectionClick:Y,handleSolidToggle:W,handleStopDrag:ne,handleStopDragEnd:N,handleStopClick:I,handleBarClick:P,handleStopRemove:U,handleSwatchClick:J,handleHoverRemoveSolid:Qe,handleRemoveSolid:ze,handleColorHover:je,handleColorLeave:ae,handleColorClick:Re,handleCloseColorPicker:me}}function Xn(e,t){if(typeof t[e]=="string")return t[e];const n=e.lastIndexOf("-");if(n>0){const r=e.slice(0,n),o=e.slice(n+1);if(t[r]&&typeof t[r][o]=="string")return t[r][o]}return"#888888"}function M0(e){const t=D0(e),n=t.mode==="solid",{refs:r,floatingStyles:o,context:l}=hn({open:t.colorPickerOpen,onOpenChange:a=>{a||t.handleCloseColorPicker()},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8}),Ma({apply({availableHeight:a,elements:c}){Object.assign(c.floating.style,{maxHeight:`${a}px`})},padding:8})],whileElementsMounted:un}),s=sr(l),{getFloatingProps:i}=ir([s]);return b.useEffect(()=>{t.anchorEl&&r.setReference(t.anchorEl)},[t.anchorEl]),u.jsxs("div",{className:"group",children:[u.jsxs("div",{className:"flex items-start gap-2.5 mb-2",children:[u.jsx(_0,{direction:t.direction,mode:t.mode,onHover:t.handleDirectionHover,onLeave:t.handleDirectionLeave,onDirectionClick:t.handleDirectionClick,onSolidClick:t.handleSolidToggle,solidColorName:t.solidColorName}),n?u.jsx("div",{className:"flex-1 min-w-0 self-stretch rounded-md cursor-pointer relative overflow-hidden",style:{background:t.solidColorHex??"transparent",border:"1px solid rgba(255,255,255,0.12)",boxShadow:"inset 0 1px 2px rgba(0,0,0,0.06)",minHeight:36},onClick:a=>t.handleSwatchClick(a.currentTarget),title:t.solidColorName?`bg-${t.solidColorName}`:"Click to pick color",children:!t.solidColorHex&&u.jsxs("svg",{className:"absolute inset-0 w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("line",{x1:"4",y1:"4",x2:"96",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"}),u.jsx("line",{x1:"96",y1:"4",x2:"4",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"})]})}):u.jsx(I0,{stops:t.stops,direction:t.directionCSS,onStopDrag:t.handleStopDrag,onStopDragEnd:t.handleStopDragEnd,onStopClick:t.handleStopClick,onBarClick:t.handleBarClick,onStopRemove:t.handleStopRemove,selectedStopId:t.selectedStopId})]}),t.colorPickerOpen&&u.jsx(pn,{children:u.jsxs("div",{ref:r.setFloating,style:{...o,zIndex:9999,overflowY:"auto"},...i(),children:[u.jsx(Fl,{prefix:t.colorPrefix,currentValue:t.colorPickerCurrentValue,colors:e.colors,locked:!1,lockedValue:null,onHover:t.handleColorHover,onLeave:t.handleColorLeave,onClick:t.handleColorClick,onRemove:t.editingTarget==="solid"?t.handleRemoveSolid:void 0,onRemoveHover:t.editingTarget==="solid"?t.handleHoverRemoveSolid:void 0}),t.selectedStopIsRemovable&&u.jsx("button",{type:"button",className:"mt-1.5 w-full text-[10px] text-bv-orange border border-bv-orange/40 rounded px-2 py-0.5 cursor-pointer hover:bg-bv-orange hover:text-white transition-colors",onClick:()=>{t.selectedStopId&&t.handleStopRemove(t.selectedStopId)},children:"Remove stop"})]})}),u.jsx("div",{className:"min-h-[1rem] text-[10px] text-bv-muted italic opacity-0 invisible transition-opacity duration-150 group-hover:opacity-100 group-hover:visible group-focus-within:opacity-100 group-focus-within:visible",children:n?"Click the swatch to change color · Click a direction arrow for gradient":"Click handles to change color · Drag to reposition · Click bar to add stop"})]})}function $0(e,t,n){var y;const r=new Map;for(const x of e)r.set(x.fullClass,!0);if(n)for(const x of n)x.kind==="class-change"&&x.status==="staged"&&(x.originalClass&&r.delete(x.originalClass),x.newClass&&r.set(x.newClass,!0));const o=e.find(x=>x.property==="bg-gradient-to"),l=Array.from(r.keys()).find(x=>x.startsWith("bg-gradient-to-")),i=(l==null?void 0:l.replace("bg-gradient-to-",""))||(o==null?void 0:o.fullClass.slice(15))||"r",c=((y=Array.from(r.keys()).filter(x=>x.startsWith("bg-")&&!x.startsWith("bg-gradient-to-"))[0])==null?void 0:y.replace("bg-",""))??null,d=(c==null?void 0:c.split("/")[0])??null,p=d?Xn(d,t):null,f=Array.from(r.keys()),g=f.filter(x=>x.startsWith("from-")),v=f.filter(x=>x.startsWith("via-")),w=f.filter(x=>x.startsWith("to-")),S=!!(l||g.length>0&&w.length>0),h=S?"gradient":"solid",m=[];if(S){let x=1;for(const j of g){const k=j.replace("from-",""),C=k.split("/")[0];m.push({id:String(x++),role:"from",colorName:k,hex:Xn(C,t),position:null})}for(const j of v){const k=j.replace("via-",""),C=k.split("/")[0];m.push({id:String(x++),role:"via",colorName:k,hex:Xn(C,t),position:null})}for(const j of w){const k=j.replace("to-",""),C=k.split("/")[0];m.push({id:String(x++),role:"to",colorName:k,hex:Xn(C,t),position:null})}}return{direction:i,stops:m,mode:h,solidColorName:c,solidColorHex:p,colors:t}}const Oe="#00848B",ur="rgba(0,132,139,0.18)",z0="#F5532D",wt="#4a4a4a",Dn="#333333",Ae="#999999",Je="'Roboto Mono', 'Menlo', ui-monospace, monospace",$t={width:60,height:60,borderRadius:5,borderWidth:"1.5px",borderStyle:"solid",borderColor:wt,background:Dn,display:"flex",padding:4,overflow:"hidden",transition:"border-color 150ms ease-in-out, background-color 150ms ease-in-out, box-shadow 150ms ease-in-out",boxSizing:"border-box"},$a={background:Oe,opacity:.65,borderRadius:2,flexShrink:0,transition:"opacity 150ms ease-in-out"},Ed={...$a,opacity:.9},Lh={flexShrink:0,background:z0,opacity:.18,borderRadius:1,transition:"opacity 150ms ease-in-out"},K0={...Lh,opacity:.38};function Yt({label:e,isActive:t,containerStyle:n,onClick:r,onHover:o,children:l}){const[s,i]=b.useState(!1),a=t||s,c={...$t,borderColor:a?Oe:wt,background:a?ur:Dn,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",...n};return u.jsxs("div",{className:"cursor-pointer",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onMouseEnter:()=>{i(!0),o==null||o()},onMouseLeave:()=>i(!1),onClick:r,children:[u.jsx("div",{style:c,children:l(a)}),u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:a?Oe:Ae,fontWeight:a?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e})]})}const Pi=[{value:"flex-row",label:"row",arrow:"→"},{value:"flex-col",label:"col",arrow:"↓"},{value:"flex-row-reverse",label:"row-reverse",arrow:"←"},{value:"flex-col-reverse",label:"col-reverse",arrow:"↑"}];function Ih({direction:e,color:t}){const n={stroke:t,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"};switch(e){case"flex-row":return u.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[u.jsx("line",{x1:"5",y1:"15",x2:"25",y2:"15",...n}),u.jsx("polyline",{points:"19,9 25,15 19,21",...n})]});case"flex-col":return u.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[u.jsx("line",{x1:"15",y1:"5",x2:"15",y2:"25",...n}),u.jsx("polyline",{points:"9,19 15,25 21,19",...n})]});case"flex-row-reverse":return u.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[u.jsx("line",{x1:"25",y1:"15",x2:"5",y2:"15",...n}),u.jsx("polyline",{points:"11,9 5,15 11,21",...n})]});case"flex-col-reverse":return u.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[u.jsx("line",{x1:"15",y1:"25",x2:"15",y2:"5",...n}),u.jsx("polyline",{points:"9,11 15,5 21,11",...n})]})}}function F0({currentValue:e,lockedValue:t,locked:n,onHover:r,onLeave:o,onClick:l}){const[s,i]=b.useState(!1),{refs:a,floatingStyles:c,context:d}=hn({open:s,onOpenChange:k=>{k||(i(!1),o())},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8})],whileElementsMounted:un}),p=sr(d),{getReferenceProps:f,getFloatingProps:g}=ir([p]),v=t!==null&&Pi.some(k=>k.value===t),w=n&&!v,S=v?t:e??"",h=Pi.find(k=>k.value===S),m=!h;function y(){i(!1),o()}function x(){w||i(k=>(k&&o(),!k))}const j=m?{...$t,borderStyle:"dashed",borderColor:s?Oe:wt,background:s?ur:"transparent",alignItems:"center",justifyContent:"center",cursor:w?"default":"pointer"}:{...$t,borderColor:s?Oe:wt,background:s?ur:Dn,boxShadow:s?"0 0 0 2px rgba(0,132,139,0.18)":"none",alignItems:"center",justifyContent:"center",cursor:w?"default":"pointer"};return u.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:2},children:[u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Direction"}),u.jsxs("div",{ref:a.setReference,role:"button",tabIndex:w?-1:0,"aria-label":"Direction",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&x()},onClick:x,...f(),children:[u.jsx("div",{style:j,children:h?u.jsx(Ih,{direction:h.value,color:s?Oe:Ae}):u.jsx("span",{style:{fontSize:10,fontFamily:Je,color:Ae},children:"—"})}),u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?Oe:Ae,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:(h==null?void 0:h.label)??"—"})]}),s&&u.jsx(pn,{children:u.jsx("div",{ref:a.setFloating,style:c,className:"z-[9999]",...g(),children:u.jsx(fr,{style:{background:"#1e1e1e",border:`1px solid ${wt}`,borderRadius:8,boxShadow:"0 4px 16px rgba(0,0,0,0.35)",padding:8},onMouseLeave:o,onClose:y,children:u.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 60px)",gap:4},children:Pi.map(k=>{const C=k.value===S;return u.jsx(W0,{option:k,isActive:C,onHover:()=>r(k.value),onClick:()=>{l(k.value),y()}},k.value)})})})})})]})}function W0({option:e,isActive:t,onHover:n,onClick:r}){const[o,l]=b.useState(!1),s=t||o,i={...$t,borderColor:s?Oe:wt,background:s?ur:Dn,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",alignItems:"center",justifyContent:"center"};return u.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,cursor:"pointer"},onMouseEnter:()=>{l(!0),n()},onMouseLeave:()=>l(!1),onClick:r,children:[u.jsx("div",{style:i,children:u.jsx(Ih,{direction:e.value,color:s?Oe:Ae})}),u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?Oe:Ae,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e.label})]})}const _i=[{value:"flex-nowrap",label:"no-wrap"},{value:"flex-wrap",label:"wrap"},{value:"flex-wrap-reverse",label:"wrap-reverse"}],H0=e=>({stroke:e,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"});function Oh({mode:e,color:t}){const n=H0(t),r={...n,strokeDasharray:"2 3"};return e==="flex-nowrap"?u.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[u.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),u.jsx("polyline",{points:"31,1 37,7 31,13",...n})]}):e==="flex-wrap"?u.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[u.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),u.jsx("line",{x1:"37",y1:"7",x2:"3",y2:"33",...r}),u.jsx("line",{x1:"3",y1:"33",x2:"37",y2:"33",...n}),u.jsx("polyline",{points:"31,27 37,33 31,39",...n})]}):u.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[u.jsx("line",{x1:"3",y1:"33",x2:"37",y2:"33",...n}),u.jsx("line",{x1:"37",y1:"33",x2:"3",y2:"7",...r}),u.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),u.jsx("polyline",{points:"31,1 37,7 31,13",...n})]})}function V0({option:e,isActive:t,onHover:n,onClick:r}){const[o,l]=b.useState(!1),s=t||o,i={...$t,borderColor:s?Oe:wt,background:s?ur:Dn,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",alignItems:"center",justifyContent:"center"};return u.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,cursor:"pointer"},onMouseEnter:()=>{l(!0),n()},onMouseLeave:()=>l(!1),onClick:r,children:[u.jsx("div",{style:i,children:u.jsx(Oh,{mode:e.value,color:s?Oe:Ae})}),u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?Oe:Ae,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e.label})]})}function B0({currentValue:e,lockedValue:t,locked:n,onHover:r,onLeave:o,onClick:l}){const[s,i]=b.useState(!1),{refs:a,floatingStyles:c,context:d}=hn({open:s,onOpenChange:k=>{k||(i(!1),o())},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8})],whileElementsMounted:un}),p=sr(d),{getReferenceProps:f,getFloatingProps:g}=ir([p]),v=t!==null&&_i.some(k=>k.value===t),w=n&&!v,S=!v&&e===null,h=v?t:e??"",m=_i.find(k=>k.value===h),y=(m==null?void 0:m.label)??"Wrap";function x(){i(!1),o()}function j(){w||i(k=>(k&&o(),!k))}return u.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:2},children:[u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Wrap"}),u.jsxs("div",{ref:a.setReference,role:"button",tabIndex:w?-1:0,"aria-label":"Wrap",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&j()},onClick:j,...f(),children:[S?u.jsx("div",{style:{...$t,borderStyle:"dashed",borderColor:s?Oe:wt,background:s?ur:"transparent",alignItems:"center",justifyContent:"center"},children:u.jsx("span",{style:{fontSize:10,fontFamily:Je,color:Ae},children:"—"})}):u.jsx("div",{style:{...$t,borderColor:s?Oe:wt,background:s?ur:Dn,boxShadow:s?"0 0 0 2px rgba(0,132,139,0.18)":"none",alignItems:"center",justifyContent:"center"},children:u.jsx(Oh,{mode:h,color:s?Oe:Ae})}),u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?Oe:Ae,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:y})]}),s&&u.jsx(pn,{children:u.jsx("div",{ref:a.setFloating,style:c,className:"z-[9999]",...g(),children:u.jsx(fr,{style:{background:"#1e1e1e",border:`1px solid ${wt}`,borderRadius:8,boxShadow:"0 4px 16px rgba(0,0,0,0.35)",padding:8},onMouseLeave:o,onClose:x,children:u.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:"repeat(3, 60px)"},children:_i.map(k=>{const C=k.value===h;return u.jsx(V0,{option:k,isActive:C,onHover:()=>r(k.value),onClick:()=>{l(k.value),x()}},k.value)})})})})})]})}function U0({flexDirection:e="row",activeValue:t,onSelect:n,onHover:r}){const o=e.startsWith("column"),l=e;function s(f,g){const v=g?Ed:$a;return o?{...v,width:"100%",height:f}:{...v,width:f,height:"100%"}}function i(f){const g=f?Ed:$a;return o?{...g,flex:1,width:"100%"}:{...g,flex:1,height:"100%"}}function a(f,g){return{...g?K0:Lh,flex:f}}const c=f=>t===f,d=f=>()=>n==null?void 0:n(f),p=f=>()=>r==null?void 0:r(f);return u.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 60px)",gap:4},children:[u.jsx(Yt,{label:"start",isActive:c("justify-start"),onClick:d("justify-start"),onHover:p("justify-start"),containerStyle:{flexDirection:l,justifyContent:"flex-start",gap:2},children:f=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:s(10,f)}),u.jsx("div",{style:s(14,f)}),u.jsx("div",{style:s(8,f)})]})}),u.jsx(Yt,{label:"center",isActive:c("justify-center"),onClick:d("justify-center"),onHover:p("justify-center"),containerStyle:{flexDirection:l,justifyContent:"center",gap:2},children:f=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:s(10,f)}),u.jsx("div",{style:s(14,f)}),u.jsx("div",{style:s(8,f)})]})}),u.jsx(Yt,{label:"stretch",isActive:c("justify-stretch"),onClick:d("justify-stretch"),onHover:p("justify-stretch"),containerStyle:{flexDirection:l,gap:2},children:f=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:i(f)}),u.jsx("div",{style:i(f)}),u.jsx("div",{style:i(f)})]})}),u.jsx(Yt,{label:"between",isActive:c("justify-between"),onClick:d("justify-between"),onHover:p("justify-between"),containerStyle:{flexDirection:l},children:f=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:s(12,f)}),u.jsx("div",{style:a(1,f)}),u.jsx("div",{style:s(12,f)})]})}),u.jsx(Yt,{label:"around",isActive:c("justify-around"),onClick:d("justify-around"),onHover:p("justify-around"),containerStyle:{flexDirection:l},children:f=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:a(1,f)}),u.jsx("div",{style:s(12,f)}),u.jsx("div",{style:a(2,f)}),u.jsx("div",{style:s(12,f)}),u.jsx("div",{style:a(1,f)})]})}),u.jsx(Yt,{label:"evenly",isActive:c("justify-evenly"),onClick:d("justify-evenly"),onHover:p("justify-evenly"),containerStyle:{flexDirection:l},children:f=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:a(1,f)}),u.jsx("div",{style:s(12,f)}),u.jsx("div",{style:a(1,f)}),u.jsx("div",{style:s(12,f)}),u.jsx("div",{style:a(1,f)})]})}),u.jsx(Yt,{label:"end",isActive:c("justify-end"),onClick:d("justify-end"),onHover:p("justify-end"),containerStyle:{flexDirection:l,justifyContent:"flex-end",gap:2},children:f=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:s(10,f)}),u.jsx("div",{style:s(14,f)}),u.jsx("div",{style:s(8,f)})]})})]})}const nn="bg-bv-teal/50 rounded-[2px] shrink-0 group-hover:bg-bv-teal/70 transition-colors duration-150",G0="bg-bv-orange/10 rounded-[2px]";function Xt({isCol:e,main:t}){return u.jsx("div",{className:nn,style:e?{height:t}:{width:t}})}function Wn({flex:e=1}){return u.jsx("div",{className:G0,style:{flex:e}})}function Bt({isCol:e,w:t,h:n}){return u.jsx("div",{className:nn,style:e?{width:n,height:t}:{width:t,height:n}})}function Ai({isCol:e,w:t,h:n,pt:r}){return u.jsx("div",{className:`${nn} text-[5px] text-white/80 leading-none overflow-hidden text-center`,style:e?{width:n,height:t,paddingLeft:r}:{width:t,height:n,paddingTop:r},children:"t"})}function Li(e){return u.jsxs(u.Fragment,{children:[u.jsx(Xt,{isCol:e,main:10}),u.jsx(Xt,{isCol:e,main:14}),u.jsx(Xt,{isCol:e,main:8})]})}const Td=[{value:"justify-start",label:"start",getContainerStyle:e=>({flexDirection:e,justifyContent:"flex-start",gap:2}),renderItems:e=>Li(e.startsWith("column"))},{value:"justify-center",label:"center",getContainerStyle:e=>({flexDirection:e,justifyContent:"center",gap:2}),renderItems:e=>Li(e.startsWith("column"))},{value:"justify-stretch",label:"stretch",getContainerStyle:e=>({flexDirection:e,gap:2}),renderItems:()=>u.jsxs(u.Fragment,{children:[u.jsx("div",{className:`${nn} flex-1`}),u.jsx("div",{className:`${nn} flex-1`}),u.jsx("div",{className:`${nn} flex-1`})]})},{value:"justify-between",label:"between",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return u.jsxs(u.Fragment,{children:[u.jsx(Xt,{isCol:t,main:12}),u.jsx(Wn,{}),u.jsx(Xt,{isCol:t,main:12})]})}},{value:"justify-around",label:"around",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return u.jsxs(u.Fragment,{children:[u.jsx(Wn,{flex:1}),u.jsx(Xt,{isCol:t,main:12}),u.jsx(Wn,{flex:2}),u.jsx(Xt,{isCol:t,main:12}),u.jsx(Wn,{flex:1})]})}},{value:"justify-evenly",label:"evenly",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return u.jsxs(u.Fragment,{children:[u.jsx(Wn,{}),u.jsx(Xt,{isCol:t,main:12}),u.jsx(Wn,{}),u.jsx(Xt,{isCol:t,main:12}),u.jsx(Wn,{})]})}},{value:"justify-end",label:"end",getContainerStyle:e=>({flexDirection:e,justifyContent:"flex-end",gap:2}),renderItems:e=>Li(e.startsWith("column"))}],Ii=[{value:"items-start",label:"start",getContainerStyle:e=>({flexDirection:e,alignItems:"flex-start",gap:3}),renderItems:e=>{const t=e.startsWith("column");return u.jsxs(u.Fragment,{children:[u.jsx(Bt,{isCol:t,w:13,h:22}),u.jsx(Bt,{isCol:t,w:15,h:42}),u.jsx(Bt,{isCol:t,w:11,h:14})]})}},{value:"items-center",label:"center",getContainerStyle:e=>({flexDirection:e,alignItems:"center",gap:3}),renderItems:e=>{const t=e.startsWith("column");return u.jsxs(u.Fragment,{children:[u.jsx(Bt,{isCol:t,w:13,h:22}),u.jsx(Bt,{isCol:t,w:15,h:42}),u.jsx(Bt,{isCol:t,w:11,h:14})]})}},{value:"items-baseline",label:"baseline",getContainerStyle:e=>({flexDirection:e,alignItems:"baseline",gap:3}),renderItems:e=>{const t=e.startsWith("column");return u.jsxs(u.Fragment,{children:[u.jsx(Ai,{isCol:t,w:13,h:38,pt:17}),u.jsx(Ai,{isCol:t,w:15,h:26,pt:3}),u.jsx(Ai,{isCol:t,w:11,h:32,pt:10})]})}},{value:"items-stretch",label:"stretch",getContainerStyle:e=>({flexDirection:e,alignItems:"stretch",gap:3}),renderItems:e=>{const t=e.startsWith("column");return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:nn,style:t?{height:13}:{width:13}}),u.jsx("div",{className:nn,style:t?{height:15}:{width:15}}),u.jsx("div",{className:nn,style:t?{height:11}:{width:11}})]})}},{value:"items-end",label:"end",getContainerStyle:e=>({flexDirection:e,alignItems:"flex-end",gap:3}),renderItems:e=>{const t=e.startsWith("column");return u.jsxs(u.Fragment,{children:[u.jsx(Bt,{isCol:t,w:13,h:22}),u.jsx(Bt,{isCol:t,w:15,h:42}),u.jsx(Bt,{isCol:t,w:11,h:14})]})}}];function Y0({currentValue:e,lockedValue:t,locked:n,flexDirection:r="row",onHover:o,onLeave:l,onClick:s,onRemove:i,onRemoveHover:a}){const[c,d]=b.useState(!1),{refs:p,floatingStyles:f,context:g}=hn({open:c,onOpenChange:_=>{_||(d(!1),l())},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8})],whileElementsMounted:un}),v=sr(g),{getReferenceProps:w,getFloatingProps:S}=ir([v]),h=t!==null&&Td.some(_=>_.value===t),m=n&&!h,y=!h&&(e===null||e===""),x=h?t:e??"",j=Td.find(_=>_.value===x),k=(j==null?void 0:j.label)??"—";function C(){d(!1),l()}function T(){m||d(_=>(_&&l(),!_))}const z={...$t,borderStyle:"dashed",alignItems:"center",justifyContent:"center"};return u.jsxs("div",{className:"flex flex-col items-start gap-1",children:[u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae,fontWeight:500},children:"JUSTIFY →"}),u.jsx("div",{ref:p.setReference,className:"cursor-pointer",role:"button",tabIndex:m?-1:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&T()},onClick:T,...w(),children:y?u.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[u.jsx("div",{style:z,children:u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae},children:"—"})}),u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae},children:"none"})]}):u.jsx(Yt,{label:k,isActive:c,containerStyle:(j==null?void 0:j.getContainerStyle(r))??{flexDirection:r},children:_=>(j==null?void 0:j.renderItems(r))??null})}),c&&u.jsx(pn,{children:u.jsx("div",{ref:p.setFloating,style:f,className:"z-[9999]",...S(),children:u.jsxs(fr,{className:"bg-bv-bg border border-bv-border rounded-lg shadow-lg p-2 flex flex-col gap-1",onMouseLeave:l,onClose:C,children:[i&&u.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-1 text-[10px] font-mono text-bv-muted border-b border-bv-border mb-1 pb-1.5 cursor-pointer transition-colors duration-150 hover:text-bv-orange",onMouseEnter:a,onMouseLeave:l,onClick:()=>{i(),C()},children:[u.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",className:"shrink-0",children:[u.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),u.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),u.jsx(U0,{flexDirection:r,activeValue:x,onSelect:_=>{s(_),C()},onHover:o})]})})})]})}function Q0({currentValue:e,lockedValue:t,locked:n,flexDirection:r="row",onHover:o,onLeave:l,onClick:s,onRemove:i,onRemoveHover:a}){const[c,d]=b.useState(!1),{refs:p,floatingStyles:f,context:g}=hn({open:c,onOpenChange:O=>{O||(d(!1),l())},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8})],whileElementsMounted:un}),v=sr(g),{getReferenceProps:w,getFloatingProps:S}=ir([v]),h=t!==null&&Ii.some(O=>O.value===t),m=n&&!h,y=!h&&(e===null||e===""),x=h?t:e??"",j=Ii.find(O=>O.value===x),k=(j==null?void 0:j.label)??"—",C=r;function T(){d(!1),l()}function z(){m||d(O=>(O&&l(),!O))}const _=y?{...$t,borderStyle:"dashed",borderColor:wt,background:Dn,cursor:m?"default":"pointer",alignItems:"center",justifyContent:"center"}:{...$t,borderColor:c?Oe:wt,background:c?"rgba(0,132,139,0.09)":Dn,cursor:m?"default":"pointer",...j?j.getContainerStyle(r):{}};return u.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:2},children:[u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Align ↓"}),u.jsx("div",{ref:p.setReference,role:"button",tabIndex:m?-1:0,onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&z()},onClick:z,...w(),children:u.jsx("div",{style:_,children:y?u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Ae},children:"—"}):j==null?void 0:j.renderItems(r)})}),u.jsx("span",{style:{fontSize:9,fontFamily:Je,color:c?Oe:Ae,fontWeight:c?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:y?"—":k}),c&&u.jsx(pn,{children:u.jsx("div",{ref:p.setFloating,style:f,className:"z-[9999]",...S(),children:u.jsxs(fr,{className:"bg-bv-bg border border-bv-border rounded-lg shadow-lg p-2 flex flex-col gap-1",onMouseLeave:l,onClose:T,children:[i&&u.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-1 text-[10px] font-mono text-bv-muted border-b border-bv-border mb-1 pb-1.5 cursor-pointer transition-colors duration-150 hover:text-bv-orange",onMouseEnter:a,onMouseLeave:l,onClick:()=>{i(),T()},children:[u.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",className:"shrink-0",children:[u.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),u.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),u.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 60px)",gap:4},children:Ii.map(O=>u.jsx(Yt,{label:O.label,isActive:O.value===x,containerStyle:{flexDirection:C,...O.getContainerStyle(r)},onHover:()=>o(O.value),onClick:()=>{s(O.value),T()},children:D=>O.renderItems(r)},O.value))})]})})})]})}function Nd(e){return e.replace(/^gap-x-/,"x-")}function Rd(e){return e.replace(/^gap-y-/,"y-")}function X0({slots:e,onSlotChange:t,onSlotHover:n,onSlotRemove:r,onSlotRemoveHover:o}){const[l,s]=b.useState(null),[i,a]=b.useState(null),c=e.find(S=>S.key==="gap"),d=e.find(S=>S.key==="gap-x"),p=e.find(S=>S.key==="gap-y");function f(S,h){a(h!=null?S:null),n==null||n(S,h)}function g(S){a(S)}function v(){a(null)}const w=i==="gap-x"?"gm-active-x":i==="gap-y"?"gm-active-y":i==="gap"?"gm-active-gap":"";return u.jsx("div",{className:"gm-root",children:u.jsxs("div",{className:`gm-grid${w?` ${w}`:""}`,children:[u.jsx("div",{className:"gm-col-highlight",style:{gridArea:"1 / 2 / 4 / 3"}}),u.jsx("div",{className:"gm-row-highlight",style:{gridArea:"2 / 1 / 3 / 4"}}),u.jsx("div",{className:"gm-box gm-box-tl",style:{gridArea:"1 / 1"}}),u.jsx("div",{className:"gm-cell",style:{gridArea:"1 / 2"},onMouseEnter:()=>g("gap-x"),onMouseLeave:v,children:(d==null?void 0:d.scaleValues)&&u.jsx(Kr,{placeholder:"x",values:d.scaleValues,currentValue:d.value,displayValue:d.value?Nd(d.value):null,formatValue:Nd,axis:"x",disabled:l!==null&&l!=="gap-x",onHover:S=>f("gap-x",S),onLeave:()=>f("gap-x",null),onClick:S=>t==null?void 0:t("gap-x",S),onOpen:()=>s("gap-x"),onClose:()=>s(null),onScrubStart:()=>s("gap-x"),onScrubEnd:()=>s(null),onRemove:d.value?()=>r==null?void 0:r("gap-x"):void 0,onRemoveHover:d.value?()=>{a(null),o==null||o("gap-x")}:void 0})}),u.jsx("div",{className:"gm-box gm-box-tr",style:{gridArea:"1 / 3"}}),u.jsx("div",{className:"gm-cell",style:{gridArea:"2 / 1"},onMouseEnter:()=>g("gap-y"),onMouseLeave:v,children:(p==null?void 0:p.scaleValues)&&u.jsx(Kr,{placeholder:"y",values:p.scaleValues,currentValue:p.value,displayValue:p.value?Rd(p.value):null,formatValue:Rd,axis:"y",disabled:l!==null&&l!=="gap-y",onHover:S=>f("gap-y",S),onLeave:()=>f("gap-y",null),onClick:S=>t==null?void 0:t("gap-y",S),onOpen:()=>s("gap-y"),onClose:()=>s(null),onScrubStart:()=>s("gap-y"),onScrubEnd:()=>s(null),onRemove:p.value?()=>r==null?void 0:r("gap-y"):void 0,onRemoveHover:p.value?()=>{a(null),o==null||o("gap-y")}:void 0})}),u.jsx("div",{className:"gm-cell",style:{gridArea:"2 / 2"},onMouseEnter:()=>g("gap"),onMouseLeave:v,children:(c==null?void 0:c.scaleValues)&&u.jsx(Kr,{placeholder:"gap",values:c.scaleValues,currentValue:c.value,displayValue:c.value??null,axis:"x",disabled:l!==null&&l!=="gap",onHover:S=>f("gap",S),onLeave:()=>f("gap",null),onClick:S=>t==null?void 0:t("gap",S),onOpen:()=>s("gap"),onClose:()=>s(null),onScrubStart:()=>s("gap"),onScrubEnd:()=>s(null),onRemove:c.value?()=>r==null?void 0:r("gap"):void 0,onRemoveHover:c.value?()=>{a(null),o==null||o("gap")}:void 0})}),u.jsx("div",{className:"gm-box gm-box-bl",style:{gridArea:"3 / 1"}})]})})}const Dh={shadow:"Shadow","inset-shadow":"Inset Shadow",ring:"Ring","inset-ring":"Inset Ring","text-shadow":"Text Shadow"},Pd={shadow:"shadow-md","inset-shadow":"inset-shadow-sm",ring:"ring-2","inset-ring":"inset-ring-2","text-shadow":"text-shadow-md"};function Z0(e){switch(e){case"shadow":return[...Iu];case"inset-shadow":return[...Zp];case"ring":return[...Na];case"inset-ring":return[...Na];case"text-shadow":return[...Ou]}}function _d(e,t){return`${e==="shadow"?"shadow-":e==="inset-shadow"?"inset-shadow-":e==="ring"?"ring-":e==="inset-ring"?"inset-ring-":"text-shadow-"}${t}`}function J0(e,t){const n=e==="shadow"?"shadow-":e==="inset-shadow"?"inset-shadow-":e==="ring"?"ring-":e==="inset-ring"?"inset-ring-":"text-shadow-";return t.startsWith(n)?t.slice(n.length):t}function q0(e){if(e.isNone||!e.sizeClass)return"none";const t=r=>{if(!e.colorHex)return r;if(e.opacity!==null&&e.opacity<100){const o=(e.opacity/100).toFixed(2),l=parseInt(e.colorHex.slice(1,3),16),s=parseInt(e.colorHex.slice(3,5),16),i=parseInt(e.colorHex.slice(5,7),16);return`rgba(${l},${s},${i},${o})`}return e.colorHex},n=e.colorHex?t(e.colorHex):void 0;switch(e.type){case"shadow":{const r=bo(e.sizeClass,"shadow-");return n1(r,n)}case"inset-shadow":{const r=bo(e.sizeClass,"inset-shadow-");return r1(r,n)}case"ring":{const r=bo(e.sizeClass,"ring-");return`0 0 0 ${r==="0"?0:Number(r)||1}px ${n??"rgba(99,102,241,0.5)"}`}case"inset-ring":{const r=bo(e.sizeClass,"inset-ring-");return`inset 0 0 0 ${r==="0"?0:Number(r)||1}px ${n??"rgba(99,102,241,0.5)"}`}case"text-shadow":return"none"}}function e1(e){if(e.isNone||!e.sizeClass)return"none";const t=o=>{if(!e.colorHex)return o;if(e.opacity!==null&&e.opacity<100){const l=(e.opacity/100).toFixed(2),s=parseInt(e.colorHex.slice(1,3),16),i=parseInt(e.colorHex.slice(3,5),16),a=parseInt(e.colorHex.slice(5,7),16);return`rgba(${s},${i},${a},${l})`}return e.colorHex},n=e.colorHex?t(e.colorHex):void 0,r=bo(e.sizeClass,"text-shadow-");return t1(r,n)}function t1(e,t){const n=t??"rgba(0,0,0,0.25)";return{"2xs":`0 1px 0 ${n}`,xs:`0 1px 1px ${n}`,sm:`0 1px 2px ${n}`,md:`0 2px 4px ${n}`,lg:`0 4px 6px ${n}`}[e]??"none"}function bo(e,t){return e.startsWith(t)?e.slice(t.length):e}function n1(e,t){const n=t??"rgba(0,0,0,0.15)";return{"2xs":`0 1px ${n}`,xs:`0 1px 2px 0 ${n}`,sm:`0 1px 3px 0 ${n}, 0 1px 2px -1px ${n}`,md:`0 4px 6px -1px ${n}, 0 2px 4px -2px ${n}`,lg:`0 10px 15px -3px ${n}, 0 4px 6px -4px ${n}`,xl:`0 20px 25px -5px ${n}, 0 8px 10px -6px ${n}`,"2xl":`0 25px 50px -12px ${n}`}[e]??"none"}function r1(e,t){const n=t??"rgba(0,0,0,0.05)";return{"2xs":`inset 0 0.5px ${n}`,xs:`inset 0 1px 1px ${n}`,sm:`inset 0 2px 4px ${n}`}[e]??"none"}const o1=Array.from({length:21},(e,t)=>`${t*5}%`);function l1({layer:e,onSizeHover:t,onSizeLeave:n,onSizeClick:r,onColorClick:o,onOpacityHover:l,onOpacityLeave:s,onOpacityClick:i,onRemove:a,onRemoveHover:c}){const[d,p]=b.useState(!1),f=b.useRef(),g={onMouseEnter:()=>{clearTimeout(f.current),p(!0)},onMouseLeave:()=>{f.current=setTimeout(()=>p(!1),60)}},v=Z0(e.type),w=q0(e),S=e.type==="text-shadow"?e1(e):"none",h=e.isNone,m=e.sizeClass?J0(e.type,e.sizeClass):v[0],y=!!e.colorHex,x=e.opacity!==null?`${e.opacity}%`:"100%",j=e.colorHex??void 0;function k(T){t(_d(e.type,T))}function C(T){r(_d(e.type,T))}return u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"flex items-center justify-center",...g,children:u.jsx("span",{className:"w-1 h-1 rounded-full bg-bv-orange"})}),u.jsx("span",{className:"flex items-center text-[9px] font-semibold uppercase tracking-[0.8px] text-bv-text-mid font-mono whitespace-nowrap",...g,children:Dh[e.type]}),u.jsx("span",{className:"flex items-center",...g,children:u.jsx(xn,{values:v,currentValue:m,lockedValue:null,locked:!1,onHover:k,onLeave:n,onClick:C})}),u.jsx("button",{type:"button",className:`w-[26px] h-[26px] rounded-[5px] border shrink-0 cursor-pointer transition-[border-color] ${e.colorHex?"border-bv-border hover:border-bv-teal":"border-dashed border-bv-border hover:border-bv-teal"} ${h?"opacity-30 pointer-events-none":""}`,onClick:T=>o(T.currentTarget),title:e.colorClass?e.colorClass:"Default color — click to override",...g,children:e.colorHex?u.jsx("div",{className:"w-full h-full rounded-[4px]",style:{background:j,opacity:e.opacity!==null?e.opacity/100:1}}):u.jsx("div",{className:"w-full h-full rounded-[4px] flex items-center justify-center",children:u.jsx("span",{className:"w-2 h-2 rounded-full bg-bv-text-mid opacity-40"})})}),u.jsx("span",{className:`flex items-center ${h||!y?"opacity-30 pointer-events-none":""}`,...g,children:y&&!h?u.jsx(xn,{values:o1,currentValue:x,lockedValue:null,locked:!1,onHover:l,onLeave:s,onClick:i}):u.jsx("span",{className:"flex items-center justify-center w-full h-[26px] bg-bv-surface border border-bv-border rounded-[5px]",children:u.jsx("span",{className:"font-mono text-[11px] text-bv-muted select-none",children:"—"})})}),u.jsx("span",{className:"ml-4 flex w-[26px] h-[26px] rounded-[5px] bg-bv-surface-hi border border-bv-border transition-[box-shadow] duration-200 items-center justify-center overflow-hidden",style:e.type==="text-shadow"?{}:{boxShadow:w},title:`Preview: ${e.sizeClass??""} ${e.colorClass??""}`.trim(),...g,children:e.type==="text-shadow"&&u.jsx("span",{className:"text-[11px] font-semibold text-bv-text select-none transition-[text-shadow] duration-200",style:{textShadow:S},children:"Aa"})}),u.jsx("button",{type:"button",className:`ml-4 w-[18px] h-[18px] rounded-[3px] border-none bg-transparent text-bv-muted text-xs cursor-pointer flex items-center justify-center transition-all hover:text-bv-orange hover:bg-bv-orange/10 ${d?"opacity-100":"opacity-0"}`,onClick:a,onMouseEnter:()=>{clearTimeout(f.current),p(!0),c()},onMouseLeave:()=>{f.current=setTimeout(()=>p(!1),60)},title:"Remove layer",children:"×"})]})}const s1=["shadow","inset-shadow","ring","inset-ring","text-shadow"];function i1({layers:e,onPreview:t,onRevert:n,onStage:r,onAdd:o,onRemove:l,onRemoveHover:s,onColorClick:i}){function a(d){const p=[];return d.sizeClass&&p.push(d.sizeClass),d.colorClass&&p.push(d.opacity!==null?`${d.colorClass}/${d.opacity}`:d.colorClass),p}const c=s1.map(d=>({type:d,layer:e.find(p=>p.type===d)}));return u.jsx("div",{className:"grid items-center gap-x-1.5 gap-y-1",style:{gridTemplateColumns:"16px auto 1fr 26px 1fr 26px 18px"},children:c.map(({type:d,layer:p},f)=>u.jsxs(b.Fragment,{children:[f>0&&u.jsx("div",{className:"h-px bg-bv-border opacity-50",style:{gridColumn:"1 / -1"}}),p?u.jsx(l1,{layer:p,onSizeHover:g=>t(p.sizeClass??"",g),onSizeLeave:n,onSizeClick:g=>r(p.sizeClass??"",g),onColorClick:g=>i==null?void 0:i(p,g),onOpacityHover:g=>{if(!p.colorClass)return;const v=p.colorClass.split("/")[0],w=parseInt(g),S=w===100?v:`${v}/${w}`,h=p.opacity!==null?`${v}/${p.opacity}`:v;t(h,S)},onOpacityLeave:n,onOpacityClick:g=>{if(!p.colorClass)return;const v=p.colorClass.split("/")[0],w=parseInt(g),S=w===100?v:`${v}/${w}`,h=p.opacity!==null?`${v}/${p.opacity}`:v;r(h,S)},onRemove:()=>l(a(p)),onRemoveHover:()=>s(a(p))}):u.jsxs(u.Fragment,{children:[u.jsx("button",{type:"button",className:"w-4 h-4 rounded-[3px] border border-dashed border-bv-border bg-transparent text-bv-muted text-[11px] cursor-pointer flex items-center justify-center transition-all hover:border-bv-teal hover:border-solid hover:text-bv-teal hover:bg-bv-teal/10",onClick:()=>o(Pd[d]),title:`Add ${Pd[d]}`,children:"+"}),u.jsx("div",{className:"flex items-center leading-none text-[9px] font-mono uppercase tracking-[0.6px] text-bv-muted whitespace-nowrap",children:Dh[d]})]})]},d))})}const Ad=[{prop:"shadow",prefix:"shadow-",sizeSet:ps},{prop:"inset-shadow",prefix:"inset-shadow-",sizeSet:hs},{prop:"ring",prefix:"ring-",sizeSet:Yr},{prop:"inset-ring",prefix:"inset-ring-",sizeSet:Yr},{prop:"text-shadow",prefix:"text-shadow-",sizeSet:ms}];function yr(e,t,n,r,o){if(!t)return n?[...e,n]:e;if(e.includes(t))return n?e.map(c=>c===t?n:c):e.filter(c=>c!==t);if(e.length===0)return n?[n]:[];const l=t.startsWith(r)?t.slice(r.length).split("/")[0]:"",s=o.has(l);let i=!1;const a=e.flatMap(c=>{const d=c.startsWith(r)?c.slice(r.length).split("/")[0]:"";return o.has(d)===s&&!i?(i=!0,n?[n]:[]):[c]});return i?a:n?[...e,n]:e}function a1(e,t){if(!t)return null;const n=e.lastIndexOf("-");if(n===-1){const i=t[e];return typeof i=="string"?i:null}const r=e.slice(0,n),o=e.slice(n+1),l=t[r];if(!l)return null;if(typeof l=="string")return l;const s=l[o];return typeof s=="string"?s:null}function u1(e,t){const n=e.trim().split(/\s+/).filter(Boolean),r=t==null?void 0:t.colors,o=[{type:"shadow",prefix:"shadow-",sizeSet:ps},{type:"inset-shadow",prefix:"inset-shadow-",sizeSet:hs},{type:"ring",prefix:"ring-",sizeSet:Yr},{type:"inset-ring",prefix:"inset-ring-",sizeSet:Yr},{type:"text-shadow",prefix:"text-shadow-",sizeSet:ms}],l=[];for(const{type:s,prefix:i,sizeSet:a}of o){const c=n.filter(v=>v===i.slice(0,-1)||v.startsWith(i));if(c.length===0)continue;let d=null,p=null,f=null,g=null;for(const v of c){const S=v.slice(i.length).split("/")[0];if(a.has(S))d=v;else{p=v;const h=v.split("/");h.length===2&&(g=parseInt(h[1])),f=a1(S,r??null)}}l.push({type:s,sizeClass:d,colorClass:p,colorHex:f,opacity:g,isNone:d!==null&&(d.endsWith("-none")||d.endsWith("-0"))})}return l}function c1(e,t){const n=new Set(["shadow","inset-shadow","ring","inset-ring","text-shadow","shadow-size","shadow-color","inset-shadow-size","inset-shadow-color","ring-size","ring-color","inset-ring-size","inset-ring-color","text-shadow-size","text-shadow-color"]),r=t.filter(s=>n.has(s.property)),o=e.trim().split(/\s+/).filter(Boolean),l=o.filter(s=>!Ad.some(({prefix:i})=>s===i.slice(0,-1)||s.startsWith(i)));for(const{prop:s,prefix:i,sizeSet:a}of Ad){const c=r.find(v=>v.property===s),d=r.find(v=>v.property===`${s}-size`),p=r.find(v=>v.property===`${s}-color`),f=o.filter(v=>v===i.slice(0,-1)||v.startsWith(i));if(c){if(c.newClass)l.push(...yr(f,c.originalClass,c.newClass,i,a));else{const v=c.originalClass.startsWith(i)?c.originalClass.slice(i.length).split("/")[0]:"";a.has(v)||!c.originalClass||l.push(...yr(f,c.originalClass,c.newClass,i,a))}continue}let g=[...f];d&&(d.newClass?g=yr(g,d.originalClass,d.newClass,i,a):d.originalClass&&(g=yr(g,d.originalClass,"",i,a))),p&&(p.newClass?g=yr(g,p.originalClass,p.newClass,i,a):p.originalClass&&(g=yr(g,p.originalClass,"",i,a))),l.push(...g)}return l.join(" ")}const d1={spacing:"Spacing",sizing:"Sizing",typography:"Typography",color:"Backgrounds",borders:"Radius",effects:"Effects",layout:"Layout",flexbox:"Flexbox & Grid",overflow:"Overflow"},f1=["layout","borders","sizing","typography","color","flexbox","shadows","effects"];function Ld(e){const t=e.scale??e.color??e.style??e.align??e.size??e.value;return t?e.fullClass.slice(0,e.fullClass.length-t.length):e.property+"-"}function p1(e){return e.section==="spacing"||e.property==="border"||e.property==="rounded"||e.property==="bg"||e.property==="bg-gradient-to"||e.property==="from"||e.property==="via"||e.property==="to"||e.property==="shadow"||e.property==="text-shadow"}function Hn(e){const t=e.filter(s=>s.property==="rounded"),n=[{prefix:/^rounded-tl(-|$)/,key:"tl"},{prefix:/^rounded-tr(-|$)/,key:"tr"},{prefix:/^rounded-br(-|$)/,key:"br"},{prefix:/^rounded-bl(-|$)/,key:"bl"},{prefix:/^rounded-t(-|$)/,key:"t"},{prefix:/^rounded-r(-|$)/,key:"r"},{prefix:/^rounded-b(-|$)/,key:"b"},{prefix:/^rounded-l(-|$)/,key:"l"}],r=new Map;let o=null;for(const s of t){const i=s.fullClass,a=n.find(c=>c.prefix.test(i));a?r.set(a.key,i):o=i}return{shorthandValue:o,shorthandScaleValues:Ra,slots:["all","t","r","b","l","tl","tr","br","bl"].map(s=>({key:s,value:s==="all"?o:r.get(s)??null,placeholder:s,scaleValues:s==="all"?Ra:Ry(`rounded-${s}`)}))}}const Vn=a0(),Mh=u0(),h1={"text-size":{scaleName:"fontSize",valueType:"scalar"},"text-color":{scaleName:null,valueType:"color"}};Mh.typography.unshift({name:"Font size",prefixHint:"text-sm/base/lg/…",prefix:"text-size"},{name:"Text color",prefixHint:"text-{color}",prefix:"text-color"});function Wl(e){const t=h1[e];if(t)return{...t,stagingKey:e};const n=Object.entries(ar).find(([o,l])=>(l.propertyKey??o.replace(/-$/g,""))===e&&l.addable);if(n){const[o,l]=n;return{scaleName:l.themeKey,valueType:l.valueType,enumAlts:l.enumAlts,stagingKey:e}}const r=ar[e];return r?{scaleName:r.themeKey,valueType:r.valueType,enumAlts:r.enumAlts,stagingKey:e.replace(/-$/g,"")}:null}function m1(e,t,n,r){const o=new Set(t.map(s=>s.fullClass)),l=new Set(t.map(s=>s.property));return e.filter(s=>{if(n.has(s.prefix)||r!=null&&r.has(s.prefix))return!1;const i=Wl(s.prefix);if((i==null?void 0:i.valueType)==="enum"&&i.enumAlts)return!i.enumAlts.some(a=>o.has(a));if(i&&i.valueType!=="enum"){if(s.prefix==="text-size")return!t.some(a=>a.property==="text"&&a.scaleName==="fontSize");if(s.prefix==="text-color")return!t.some(a=>a.property==="text"&&a.color!==void 0)}return!l.has(s.prefix.replace(/-$/g,""))})}function g1(e){const t=new Map;for(const n of e){const r=n.section??"unknown",o=t.get(r)||[];o.push(n),t.set(r,o)}return t}function y1({componentName:e,instanceCount:t,rawClasses:n,parsedClasses:r,tailwindConfig:o,patchManager:l}){var re,le;const[s,i]=b.useState(null),[a,c]=b.useState(new Map),[d,p]=b.useState(new Map),[f,g]=b.useState(null),[v,w]=b.useState(null),[S,h]=b.useState(null),m=b.useRef(null),{refs:y,floatingStyles:x,context:j}=hn({open:f!==null,onOpenChange:E=>{E||(g(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8}),Ma({apply({availableHeight:E,elements:M}){Object.assign(M.floating.style,{maxHeight:`${E}px`})},padding:8})],whileElementsMounted:un}),k=sr(j),{getFloatingProps:C}=ir([k]);b.useEffect(()=>{f!=null&&f.anchorEl&&y.setReference(f.anchorEl)},[f==null?void 0:f.anchorEl]);const{refs:T,floatingStyles:z,context:_}=hn({open:v!==null||S!==null,onOpenChange:E=>{E||(w(null),h(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8}),Ma({apply({availableHeight:E,elements:M}){Object.assign(M.floating.style,{maxHeight:`${E}px`})},padding:8})],whileElementsMounted:un}),O=sr(_),{getFloatingProps:D}=ir([O]);b.useEffect(()=>{const E=(v==null?void 0:v.anchorEl)??(S==null?void 0:S.anchorEl);E&&T.setReference(E)},[v==null?void 0:v.anchorEl,S==null?void 0:S.anchorEl]);const[R,L]=b.useState(new Set),[Y,W]=b.useState(!1),ne=b.useRef(r.map(E=>E.fullClass).join(" ")),N=r.map(E=>E.fullClass).join(" ");b.useEffect(()=>{ne.current!==N&&(ne.current=N,l.revertPreview(),c(new Map),p(new Map),g(null),w(null),L(new Set))});const I=e,P=l.patches.filter(E=>E.status==="staged"&&E.elementKey===I),U=new Set(P.filter(E=>E.originalClass==="").map(E=>E.property));function J(E,M){const K=P.find(ge=>ge.property===E),X=(M==null?void 0:M.fullClass)??(K==null?void 0:K.originalClass)??"",ee=(K==null?void 0:K.newClass)??(M==null?void 0:M.fullClass)??"";return{originalClass:X,effectiveClass:ee,hasValue:ee!==""}}function Qe(E){return a.size===0?E:E.map(M=>{const K=a.get(`${M.layer}-shorthand`),X=M.slots.map(ge=>{const ke=a.get(`${M.layer}-${ge.key}`);return ke!==void 0?{...ge,value:ke}:ge}),ee=K??M.shorthandValue;let de=M.classState;return K!==void 0&&(de=X.some(ke=>ke.value!=null)?"mixed":"shorthand"),{...M,shorthandValue:ee,classState:de,slots:X}})}function ze(E){if(d.size===0)return E;const M=d.get("all");return{...E,shorthandValue:M===void 0?E.shorthandValue:M,slots:E.slots.map(K=>{const X=d.get(K.key);return X===void 0?K:{...K,value:X}})}}const je=g1(r);function ae(E,M){l.preview(E,M)}function Re(){l.revertPreview()}function me(E,M,K){l.stage(I,E,M,K)}function eo(E,M){const K=E||M,X=K.startsWith("bg-gradient-to-")?"bg-gradient-to-":K.startsWith("from-")?"from-":K.startsWith("via-")?"via-":K.startsWith("to-")?"to-":"bg-";me(X,E,M)}function to(E,M){l.revertPreview(),pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),E.color!==void 0&&M?(w(K=>(K==null?void 0:K.cls.fullClass)===E.fullClass?null:{cls:E,anchorEl:M}),i(null)):(w(null),i(E))}function pr(E,M){l.preview(E.fullClass,M)}function no(E){l.revertPreview()}function ro(E){const M=ar[E];if(!((M==null?void 0:M.controlGroup)==="flex-container"&&(M==null?void 0:M.propertyKey)==="display")){if((M==null?void 0:M.controlGroup)==="flex-container"){const K=r.some(ee=>ee.fullClass==="flex"||ee.fullClass==="inline-flex"),X=P.some(ee=>ee.property==="display"&&ee.originalClass===""&&(ee.newClass==="flex"||ee.newClass==="inline-flex"));!K&&!X&&l.stage(I,"display","","flex")}}L(K=>new Set(K).add(E))}function Ft(E,M){l.preview("",M)}function Kn(E){l.revertPreview()}function q(E,M){const K=Wl(E);l.stage(I,(K==null?void 0:K.stagingKey)??E,"",M),L(X=>{const ee=new Set(X);return ee.delete(E),ee})}return u.jsxs("div",{className:"divide-y divide-bv-border",children:[u.jsxs("div",{className:"px-4 py-3",children:[u.jsxs("div",{className:"flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>W(E=>!E),children:[u.jsx("svg",{className:`w-3 h-3 text-bv-muted transition-transform ${Y?"":"rotate-90"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),u.jsx("span",{className:"text-[10px] font-semibold text-bv-text",children:"Box model"})]}),u.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-200 ease-in-out ${Y?"max-h-0 opacity-0":"max-h-[600px] opacity-100"}`,children:u.jsxs("div",{className:"mt-3",children:[u.jsx(w0,{layers:Qe(gr(r,o)),onEditStart:()=>{pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),g(null)},onSlotClick:(E,M,K)=>{var ke;if(M!=="color"||!K){g(null);return}const X=gr(r,o).find(tt=>tt.layer===E),ee=`${E}-color`,de=a.get(ee)??((ke=X==null?void 0:X.slots.find(tt=>tt.key==="color"))==null?void 0:ke.value)??"",ge=E==="outline"?"outline-":"border-";g(tt=>(tt==null?void 0:tt.layer)===E?null:{layer:E,prefix:ge,currentClass:de,staged:!1,anchorEl:K})},onSlotHover:(E,M,K)=>{var X;if(K===null)l.revertPreview();else{const ee=`${E}-${M}`,de=gr(r,o).find(ke=>ke.layer===E),ge=M==="shorthand"?a.get(ee)??(de==null?void 0:de.shorthandValue):a.get(ee)??((X=de==null?void 0:de.slots.find(ke=>ke.key===M))==null?void 0:X.value);l.preview(ge??"",K)}},onSlotChange:(E,M,K)=>{var ge;const X=`${E}-${M}`,ee=gr(r,o).find(ke=>ke.layer===E),de=M==="shorthand"?a.get(X)??(ee==null?void 0:ee.shorthandValue):a.get(X)??((ge=ee==null?void 0:ee.slots.find(ke=>ke.key===M))==null?void 0:ge.value);me(`${E}-${M}`,de??"",K),c(ke=>new Map(ke).set(X,K))},onSlotRemoveHover:(E,M)=>{var de;const K=`${E}-${M}`,X=gr(r,o).find(ge=>ge.layer===E),ee=M==="shorthand"?a.get(K)??(X==null?void 0:X.shorthandValue):a.get(K)??((de=X==null?void 0:X.slots.find(ge=>ge.key===M))==null?void 0:de.value);ee&&l.preview(ee,"")},onSlotRemove:(E,M)=>{var de;const K=`${E}-${M}`,X=gr(r,o).find(ge=>ge.layer===E),ee=M==="shorthand"?a.get(K)??(X==null?void 0:X.shorthandValue):a.get(K)??((de=X==null?void 0:X.slots.find(ge=>ge.key===M))==null?void 0:de.value);ee&&(me(`${E}-${M}`,ee,""),c(ge=>{const ke=new Map(ge);return ke.delete(K),ke}))}}),f&&u.jsx(pn,{children:u.jsx("div",{ref:y.setFloating,style:{...x,zIndex:9999,overflowY:"auto"},...C(),children:u.jsx(Fl,{prefix:f.prefix,currentValue:f.currentClass.startsWith(f.prefix)?f.currentClass.slice(f.prefix.length):"",colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:((re=P.find(E=>E.property===f.prefix))==null?void 0:re.newClass)??null,onHover:E=>{m.current=E,l.preview(f.currentClass,E)},onLeave:()=>{f.staged&&m.current?(l.preview(m.current,f.currentClass),m.current=null):l.revertPreview()},onClick:E=>{const M=`${f.layer}-color`;me(f.prefix,f.currentClass,E),c(K=>new Map(K).set(M,E)),g(K=>K?{...K,currentClass:E,staged:!0}:null)}})})})]})})]}),(v||S)&&u.jsx(pn,{children:u.jsxs("div",{ref:T.setFloating,style:{...z,zIndex:9999,overflowY:"auto"},...D(),children:[v&&u.jsx(Fl,{prefix:Ld(v.cls),currentValue:v.cls.color??"",colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:((le=P.find(E=>E.property===v.cls.property))==null?void 0:le.newClass)??null,onHover:E=>ae(v.cls.fullClass,E),onLeave:Re,onClick:E=>me(v.cls.property,v.cls.fullClass,E),onRemoveHover:()=>ae(v.cls.fullClass,""),onRemove:()=>{me(v.cls.property,v.cls.fullClass,""),w(null)}}),S&&(()=>{const{layer:E}=S,M=E.type==="shadow"?"shadow-":E.type==="inset-shadow"?"inset-shadow-":E.type==="ring"?"ring-":E.type==="text-shadow"?"text-shadow-":"inset-ring-",K=E.colorClass??"",X=K?K.slice(M.length).split("/")[0]:"";return u.jsx(Fl,{prefix:M,currentValue:X,colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:null,onHover:ee=>ae(K,ee),onLeave:Re,onClick:ee=>{const de=E.type==="shadow"?"shadow-color":E.type==="inset-shadow"?"inset-shadow-color":E.type==="ring"?"ring-color":E.type==="text-shadow"?"text-shadow-color":"inset-ring-color";l.stage(I,de,K,ee),h(null)},onRemoveHover:()=>{K&&ae(K,"")},onRemove:()=>{if(K){const ee=E.type==="shadow"?"shadow-color":E.type==="inset-shadow"?"inset-shadow-color":E.type==="ring"?"ring-color":E.type==="text-shadow"?"text-shadow-color":"inset-ring-color";l.stage(I,ee,K,"")}h(null)}})})()]})}),f1.map(E=>{if(E==="shadows"){const A=c1(n,P),Q=u1(A,o);return u.jsx(jd,{label:"Shadows & Rings",onAddProperty:()=>{},isEmpty:!1,classCount:Q.length,children:u.jsx(i1,{layers:Q,onPreview:(V,B)=>l.preview(V,B),onRevert:()=>l.revertPreview(),onStage:(V,B)=>{const ue=V||B,oe=Ve=>{if(Ve.startsWith("shadow-")){const Ke=Ve.slice(7).split("/")[0];return ps.has(Ke)}if(Ve.startsWith("inset-shadow-")){const Ke=Ve.slice(13).split("/")[0];return hs.has(Ke)}if(Ve.startsWith("ring-")||Ve.startsWith("inset-ring-")){const Ke=Ve.slice(Ve.startsWith("ring-")?5:11).split("/")[0];return Yr.has(Ke)}if(Ve.startsWith("text-shadow-")){const Ke=Ve.slice(12).split("/")[0];return ms.has(Ke)}return!1},De=ue.startsWith("text-shadow")?"text-shadow":ue.startsWith("inset-shadow")?"inset-shadow":ue.startsWith("inset-ring")?"inset-ring":ue.startsWith("ring")?"ring":"shadow",Wt=oe(V)||V===""&&oe(B)?`${De}-size`:`${De}-color`;l.stage(I,Wt,V,B)},onAdd:V=>{const B=V.startsWith("text-shadow")?"text-shadow-size":V.startsWith("inset-shadow")?"inset-shadow-size":V.startsWith("inset-ring")?"inset-ring-size":V.startsWith("ring")?"ring-size":"shadow-size";l.stage(I,B,"",V)},onRemove:V=>{const B=oe=>{if(oe.startsWith("shadow-")){const De=oe.slice(7).split("/")[0];return ps.has(De)}if(oe.startsWith("inset-shadow-")){const De=oe.slice(13).split("/")[0];return hs.has(De)}if(oe.startsWith("ring-")||oe.startsWith("inset-ring-")){const De=oe.slice(oe.startsWith("ring-")?5:11).split("/")[0];return Yr.has(De)}if(oe.startsWith("text-shadow-")){const De=oe.slice(12).split("/")[0];return ms.has(De)}return!1},ue=[...V].reverse();for(const oe of ue){const De=oe.startsWith("text-shadow")?"text-shadow":oe.startsWith("inset-shadow")?"inset-shadow":oe.startsWith("inset-ring")?"inset-ring":oe.startsWith("ring")?"ring":"shadow",Wt=B(oe)?`${De}-size`:`${De}-color`;l.stage(I,Wt,oe,"")}},onRemoveHover:V=>{V.length===1?l.preview(V[0],""):V.length>1&&l.preview(V.join(" "),"")},onColorClick:(V,B)=>{w(null),h(ue=>(ue==null?void 0:ue.layer.type)===V.type?null:{layer:V,anchorEl:B})}})},"shadows")}const K=(je.get(E)||[]).filter(A=>!p1(A)),X=Mh[E]||[],ee=s0.get("flex-container")??new Set,de=i0.get("flex-container")??new Set,ge=r.some(A=>{if(A.fullClass==="flex"||A.fullClass==="inline-flex")return!0;const Q=Vn[A.fullClass];return!!(Q&&Q.propertyKey!=="display"&&ee.has(Q.propertyKey)||ee.has(A.property))}),ke=[...de].some(A=>R.has(A)||U.has(A.replace(/-$/,""))),tt=E==="flexbox"&&(ge||ke),$h=tt?X.filter(A=>!de.has(A.prefix)):X,zh=m1($h,K,R,U),Bs=X.filter(A=>R.has(A.prefix)).map(A=>A.prefix),Us=X.filter(A=>U.has(A.prefix.replace(/-$/g,""))).map(A=>A.prefix),Kh=E==="color"||E==="flexbox"&&tt||E==="borders"?!1:K.length===0&&Bs.length===0&&Us.length===0,Fh=E==="borders"?Hn(r).slots.filter(A=>A.value!=null).length+(Hn(r).shorthandValue?1:0):K.length+Bs.length+Us.length;return u.jsxs(jd,{label:d1[E]??E,availableProperties:zh,onAddProperty:ro,isEmpty:Kh,classCount:Fh,children:[E==="borders"&&u.jsx(R0,{state:ze(Hn(r)),onSlotHover:(A,Q)=>{var oe;const V=Hn(r),ue=(A==="all"?d.get("all")??V.shorthandValue:d.get(A)??((oe=V.slots.find(De=>De.key===A))==null?void 0:oe.value)??null)??"";Q===null?l.revertPreview():l.preview(ue,Q)},onSlotChange:(A,Q)=>{var ue;const V=Hn(r),B=d.get(A)??(A==="all"?V.shorthandValue:(ue=V.slots.find(oe=>oe.key===A))==null?void 0:ue.value)??"";me(`rounded-${A}`,B,Q),p(oe=>new Map(oe).set(A,Q))},onSlotRemove:A=>{var V;const Q=d.get(A)??((V=Hn(r).slots.find(B=>B.key===A))==null?void 0:V.value)??"";Q&&(me(`rounded-${A}`,Q,""),p(B=>new Map(B).set(A,null)))},onSlotRemoveHover:A=>{var V;const Q=d.get(A)??((V=Hn(r).slots.find(B=>B.key===A))==null?void 0:V.value)??"";Q&&l.preview(Q,"")},onEditStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"})}),E==="color"&&u.jsx(M0,{...$0(r,(o==null?void 0:o.colors)||{},P.filter(A=>A.elementKey===I)),onPreview:ae,onPreviewBatch:A=>l.previewBatch(A),onRevert:Re,onStage:eo}),E==="flexbox"&&tt&&(()=>{const A=r,Q=A.find(te=>{const fe=Vn[te.fullClass];return(fe==null?void 0:fe.propertyKey)==="flex-direction"}),V=A.find(te=>{const fe=Vn[te.fullClass];return(fe==null?void 0:fe.propertyKey)==="justify-content"}),B=A.find(te=>{const fe=Vn[te.fullClass];return(fe==null?void 0:fe.propertyKey)==="align-items"}),ue=A.find(te=>{const fe=Vn[te.fullClass];return(fe==null?void 0:fe.propertyKey)==="flex-wrap"}),oe={"flex-row":"row","flex-col":"column","flex-row-reverse":"row-reverse","flex-col-reverse":"column-reverse"},De=(Q==null?void 0:Q.fullClass)??null,ol=De?oe[De]??"row":"row",Wt=J("flex-direction",Q),Ve=J("flex-wrap",ue),Ke=J("justify-content",V),Ht=J("align-items",B),Wh=r.find(te=>te.property==="gap"),Hh=r.find(te=>te.property==="gap-x"),Vh=r.find(te=>te.property==="gap-y"),oo=J("gap",Wh),lo=J("gap-x",Hh),so=J("gap-y",Vh),Bh=[{key:"gap",value:oo.effectiveClass||null,scaleValues:mr("gap-","spacing",o)},{key:"gap-x",value:lo.effectiveClass||null,scaleValues:mr("gap-x-","spacing",o)},{key:"gap-y",value:so.effectiveClass||null,scaleValues:mr("gap-y-","spacing",o)}];return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex justify-between items-start w-full",children:[u.jsx(F0,{currentValue:(Q==null?void 0:Q.fullClass)??null,lockedValue:Wt.effectiveClass!==Wt.originalClass?Wt.effectiveClass:null,locked:!1,onHover:te=>ae(Wt.effectiveClass,te),onLeave:Re,onClick:te=>me("flex-direction",Wt.originalClass,te)}),u.jsx(B0,{currentValue:(ue==null?void 0:ue.fullClass)??null,lockedValue:Ve.effectiveClass!==Ve.originalClass?Ve.effectiveClass:null,locked:!1,onHover:te=>ae(Ve.effectiveClass,te),onLeave:Re,onClick:te=>me("flex-wrap",Ve.originalClass,te)}),u.jsx(Y0,{currentValue:(V==null?void 0:V.fullClass)??null,lockedValue:Ke.effectiveClass!==Ke.originalClass?Ke.effectiveClass:null,locked:!1,flexDirection:ol,onHover:te=>ae(Ke.effectiveClass,te),onLeave:Re,onClick:te=>me("justify-content",Ke.originalClass,te),onRemove:Ke.hasValue?()=>me("justify-content",Ke.originalClass,""):void 0,onRemoveHover:Ke.hasValue?()=>ae(Ke.effectiveClass,""):void 0}),u.jsx(Q0,{currentValue:(B==null?void 0:B.fullClass)??null,lockedValue:Ht.effectiveClass!==Ht.originalClass?Ht.effectiveClass:null,locked:!1,flexDirection:ol,onHover:te=>ae(Ht.effectiveClass,te),onLeave:Re,onClick:te=>me("align-items",Ht.originalClass,te),onRemove:Ht.hasValue?()=>me("align-items",Ht.originalClass,""):void 0,onRemoveHover:Ht.hasValue?()=>ae(Ht.effectiveClass,""):void 0})]}),u.jsx("div",{className:"h-px w-full bg-bv-border opacity-50 my-2"}),u.jsx(X0,{slots:Bh,onSlotHover:(te,fe)=>{const Ku=te==="gap"?oo:te==="gap-x"?lo:so;fe===null?l.revertPreview():l.preview(Ku.effectiveClass,fe)},onSlotRemoveHover:te=>{const fe=te==="gap"?oo:te==="gap-x"?lo:so;fe.hasValue&&l.preview(fe.effectiveClass,"")},onSlotChange:(te,fe)=>{me(te,(te==="gap"?oo:te==="gap-x"?lo:so).originalClass,fe)},onSlotRemove:te=>{const fe=te==="gap"?oo:te==="gap-x"?lo:so;fe.hasValue&&(l.preview(fe.effectiveClass,""),me(te,fe.originalClass,""))}})]})})(),K.map(A=>{var Q,V;if(tt){const B=Vn[A.fullClass];if(B&&ee.has(B.propertyKey)||ee.has(A.property))return null}if(A.scaleName!==void 0){const B=mr(Ld(A),A.scaleName,o);if(B.length>0){const ue=((Q=P.find(oe=>oe.property===A.property))==null?void 0:Q.newClass)??null;return u.jsx(xn,{values:B,currentValue:A.fullClass,lockedValue:ue,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:oe=>pr(A,oe),onLeave:()=>no(),onClick:oe=>me(A.property,A.fullClass,oe),onRemoveHover:()=>l.preview(A.fullClass,""),onRemove:()=>me(A.property,A.fullClass,"")},A.fullClass)}}if(A.scaleName===void 0&&A.color===void 0){const B=Vn[A.fullClass];if(B){const ue=((V=P.find(oe=>oe.property===B.propertyKey))==null?void 0:V.newClass)??null;return u.jsx(xn,{values:B.alternatives,currentValue:A.fullClass,lockedValue:ue,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:oe=>pr(A,oe),onLeave:()=>no(),onClick:oe=>me(B.propertyKey,A.fullClass,oe),onRemoveHover:()=>l.preview(A.fullClass,""),onRemove:()=>me(B.propertyKey,A.fullClass,"")},A.fullClass)}}return u.jsxs("div",{className:`group flex items-center gap-1 px-2 py-0.5 rounded cursor-pointer text-[11px] font-mono border transition-colors ${(s==null?void 0:s.fullClass)===A.fullClass||(v==null?void 0:v.cls.fullClass)===A.fullClass?"border-bv-border bg-bv-surface-hi text-bv-text":"bg-bv-surface text-bv-text-mid border-transparent hover:border-bv-teal hover:text-bv-teal"}`,onClick:B=>to(A,B.currentTarget),children:[A.fullClass,u.jsx("span",{className:"opacity-0 group-hover:opacity-60 hover:!opacity-100 ml-0.5 shrink-0",title:"Remove class",onClick:B=>{B.stopPropagation(),me(A.property,A.fullClass,"")},onMouseEnter:B=>{B.stopPropagation(),l.preview(A.fullClass,"")},onMouseLeave:B=>{B.stopPropagation(),l.revertPreview()},children:u.jsxs("svg",{viewBox:"0 0 10 10",width:"8",height:"8",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),u.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]})})]},A.fullClass)}),Us.filter(A=>!(tt&&de.has(A))).map(A=>{const Q=Wl(A);if(!Q)return null;if(Q.valueType==="scalar"){const V=mr(A,Q.scaleName,o);if(V.length===0)return null;const B=P.find(ue=>ue.property===Q.stagingKey);return u.jsx(xn,{values:V,currentValue:(B==null?void 0:B.newClass)??V[Math.floor(V.length/2)],lockedValue:(B==null?void 0:B.newClass)??null,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:ue=>Ft(A,ue),onLeave:()=>Kn(),onClick:ue=>q(A,ue)},`staged-${A}`)}if(Q.valueType==="enum"&&Q.enumAlts){const V=P.find(B=>B.property===Q.stagingKey);return u.jsx(xn,{values:Q.enumAlts,currentValue:(V==null?void 0:V.newClass)??Q.enumAlts[0],lockedValue:(V==null?void 0:V.newClass)??null,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:B=>Ft(A,B),onLeave:()=>Kn(),onClick:B=>q(A,B)},`staged-${A}`)}return null}),Bs.filter(A=>!(tt&&de.has(A))).map(A=>{const Q=Wl(A);if(!Q)return null;if(Q.valueType==="scalar"){const V=mr(A,Q.scaleName,o);if(V.length>0)return u.jsx(xn,{values:V,currentValue:V[Math.floor(V.length/2)],lockedValue:null,locked:!1,ghost:!0,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:B=>Ft(A,B),onLeave:()=>Kn(),onClick:B=>q(A,B)},`pending-${A}`)}return Q.valueType==="enum"&&Q.enumAlts?u.jsx(xn,{values:Q.enumAlts,currentValue:Q.enumAlts[0],lockedValue:null,locked:!1,ghost:!0,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:V=>Ft(A,V),onLeave:()=>Kn(),onClick:V=>q(A,V)},`pending-${A}`):Q.valueType==="color"?u.jsxs("div",{"data-testid":`pending-ghost-${A}`,className:"px-2 py-0.5 rounded cursor-pointer text-[11px] font-mono border border-dashed border-bv-border text-bv-muted hover:border-bv-teal hover:text-bv-teal transition-colors",onClick:V=>{w({cls:{property:"text",fullClass:"",section:"typography",color:""},anchorEl:V.currentTarget}),i(null)},children:[A==="text-color"?"text-":A,"color"]},`pending-${A}`):null})]},E)})]})}const v1=b.lazy(()=>ky(()=>import("./DesignMode-CFbFFIBZ.js"),[]).then(e=>({default:e.DesignMode}))),x1=new URLSearchParams(window.location.search),w1=x1.get("mode"),Id=[{id:"design",label:"Design"},{id:"draw",label:"Components"},{id:"message",label:"Message"}];function b1(){return w1==="design"?u.jsx(b.Suspense,{fallback:null,children:u.jsx(v1,{})}):u.jsx(S1,{})}function S1(){const[e,t]=b.useState(!1),[n,r]=b.useState(null),[o,l]=b.useState(0),[s,i]=b.useState("design"),[a,c]=b.useState(!1),d=Cv();b.useEffect(()=>{const R=Jy(()=>{t(!0);try{const W=localStorage.getItem("tw-panel-container");W&&W!=="popover"&&pe("overlay",{type:"SWITCH_CONTAINER",container:W})}catch{}}),L=qy(()=>t(!1)),Y=th(W=>{W.type==="RESET_SELECTION"?(r(null),l(ne=>ne+1)):W.type==="ELEMENT_SELECTED"?(r({componentName:W.componentName,instanceCount:W.instanceCount,classes:W.classes,parsedClasses:Dy(W.classes,Xy),tailwindConfig:W.tailwindConfig}),l(ne=>ne+1),c(!1)):W.type==="SELECT_MODE_CHANGED"?c(!!W.active):W.type==="QUEUE_UPDATE"?d.handleQueueUpdate({draftCount:W.draftCount,committedCount:W.committedCount,implementingCount:W.implementingCount,implementedCount:W.implementedCount,partialCount:W.partialCount,errorCount:W.errorCount,draft:W.draft,commits:W.commits,agentWaiting:W.agentWaiting}):W.type==="PATCH_UPDATE"&&d.handlePatchUpdate({staged:W.staged,committed:W.committed,implementing:W.implementing,implemented:W.implemented,patches:W.patches})});return eh(),t(ev()),()=>{R(),L(),Y()}},[]),b.useEffect(()=>{const R=L=>{L.key==="Escape"&&n&&(r(null),l(Y=>Y+1),pe("overlay",{type:"CLEAR_HIGHLIGHTS"}))};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[n]);const{draft:p,committed:f,implementing:g,implemented:v,partial:w,error:S}=d.counts,h=(p>0||f>0)&&!d.agentWaiting&&g===0,m=new Map(d.patches.filter(R=>R.status==="staged").map(R=>[R.id,{id:R.id,kind:R.kind??"class-change",elementKey:R.elementKey,status:R.status,originalClass:R.originalClass,newClass:R.newClass,property:R.property,timestamp:R.timestamp,component:R.component,message:R.message,image:R.image}])),y=new Set(d.queueState.draft.map(R=>R.id)),x=[...d.queueState.draft.map(R=>m.get(R.id)??R),...d.patches.filter(R=>R.status==="staged"&&!y.has(R.id)).map(R=>m.get(R.id))],j=d.queueState.commits.filter(R=>R.status==="committed"),k=d.queueState.commits.filter(R=>R.status==="implementing"),C=d.queueState.commits.filter(R=>R.status==="implemented"),T="Please implement the next change and continue implementing changes with VyBit.";async function z(R){if(navigator.clipboard){try{if((await navigator.permissions.query({name:"clipboard-write"})).state==="denied"){_(R);return}}catch{}navigator.clipboard.writeText(R).catch(()=>_(R))}else _(R)}function _(R){const L=document.createElement("textarea");L.value=R,L.style.position="fixed",L.style.opacity="0",document.body.appendChild(L),L.select(),document.execCommand("copy"),document.body.removeChild(L)}const O=u.jsxs("div",{className:"shrink-0",children:[!e&&u.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 bg-amber-950/40 border-t border-amber-800/40 text-amber-300 text-[10px] font-medium",children:[u.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-bv-orange animate-pulse shrink-0"}),u.jsxs("span",{className:"flex-1 leading-tight",children:["No agent listening —"," ",u.jsx("a",{href:"https://github.com/bitovi/vybit?tab=readme-ov-file#telling-your-agent-to-start-making-features",target:"_blank",rel:"noreferrer",className:"underline hover:text-amber-100",children:"ask your agent"})," ","to start!"]}),u.jsx("button",{onClick:()=>z(T),className:"shrink-0 px-1.5 py-0.5 rounded border border-amber-700/50 bg-amber-900/40 hover:bg-amber-800/40 text-amber-300 font-semibold text-[9px] transition-colors",title:`Copy: "${T}"`,children:"Copy prompt"})]}),h&&u.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 bg-amber-950/40 border-t border-amber-800/40 text-amber-300 text-[10px] font-medium",children:[u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"currentColor",className:"shrink-0 text-amber-400",children:u.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.19-1.458-1.516-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),u.jsxs("span",{className:"flex-1 leading-tight",children:["No agent watching —"," ",u.jsx("a",{href:"https://github.com/bitovi/vybit?tab=readme-ov-file#telling-your-agent-to-start-making-features",target:"_blank",rel:"noreferrer",className:"underline hover:text-amber-100",children:"ask your agent"})," ","to start"]}),u.jsx("button",{onClick:()=>z(T),className:"shrink-0 px-1.5 py-0.5 rounded border border-amber-700/50 bg-amber-900/40 hover:bg-amber-800/40 text-amber-300 font-semibold text-[9px] transition-colors",title:`Copy: "${T}"`,children:"Copy prompt"})]}),u.jsxs("div",{className:"flex items-center justify-center px-3 py-1.5 border-t border-bv-border gap-3 text-[10px]",children:[u.jsx(Sl,{label:"draft",count:p,items:x,activeColor:"text-amber-400",onDiscard:R=>d.discard(R),onCommitAll:()=>d.commitAll(),onDiscardAll:()=>d.discardAll()}),u.jsx(Sl,{label:"committed",count:f,items:j.flatMap(R=>R.patches),activeColor:"text-bv-orange"}),u.jsx(Sl,{label:"implementing",count:g,items:k.flatMap(R=>R.patches),activeColor:"text-blue-400"}),u.jsx(Sl,{label:"implemented",count:v,items:C.flatMap(R=>R.patches),activeColor:"text-bv-teal"})]})]});if(!n)return u.jsxs("div",{className:"h-full flex flex-col",children:[u.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsx(Od,{active:a,onToggle:()=>{const R=!a;c(R),pe("overlay",{type:"TOGGLE_SELECT_MODE",active:R})}}),u.jsx("div",{className:"flex-1 min-w-0",children:a?u.jsx("span",{className:"text-[11px] text-bv-teal font-medium",children:"● Selecting… click an element on the page"}):u.jsx("span",{className:"text-[12px] text-bv-muted",children:"No element selected"})}),u.jsx(Jc,{})]})}),u.jsx(rd,{tabs:Id,activeTab:s,onTabChange:i}),u.jsx("div",{className:"flex-1 overflow-auto",children:s==="draw"?u.jsx(td,{}):s==="message"?u.jsx(nd,{draft:x,currentElementKey:"",onAddMessage:(R,L)=>d.stageMessage(R,L),onDiscard:R=>d.discard(R)}):a?u.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-8",children:[u.jsx("div",{className:"w-10 h-10 rounded-full bg-bv-teal text-white flex items-center justify-center",children:u.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"currentColor",children:[u.jsx("path",{d:"M14,0H2C.895,0,0,.895,0,2V14c0,1.105,.895,2,2,2H6c.552,0,1-.448,1-1h0c0-.552-.448-1-1-1H2V2H14V6c0,.552,.448,1,1,1h0c.552,0,1-.448,1-1V2c0-1.105-.895-2-2-2Z"}),u.jsx("path",{d:"M12.043,10.629l2.578-.644c.268-.068,.43-.339,.362-.607-.043-.172-.175-.308-.345-.358l-7-2c-.175-.051-.363-.002-.492,.126-.128,.129-.177,.317-.126,.492l2,7c.061,.214,.257,.362,.48,.362h.009c.226-.004,.421-.16,.476-.379l.644-2.578,3.664,3.664c.397,.384,1.03,.373,1.414-.025,.374-.388,.374-1.002,0-1.389l-3.664-3.664Z"})]})}),u.jsx("span",{className:"text-[12px] text-bv-teal font-medium",children:"Selection mode active"}),u.jsxs("span",{className:"text-[12px] text-bv-muted text-center leading-relaxed",children:["Hover over elements on the page to preview, then click to select.",u.jsx("br",{}),"Press"," ",u.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-white/6 border border-white/8 font-mono text-[10px] text-bv-text-mid leading-none",children:"Esc"})," ","to cancel."]})]}):u.jsx("div",{className:"flex flex-1 flex-col justify-center p-4",children:u.jsxs("button",{onClick:()=>{c(!0),pe("overlay",{type:"TOGGLE_SELECT_MODE",active:!0})},className:"w-full flex flex-col items-center gap-3 px-6 py-5 rounded-lg border border-bv-border bg-bv-surface hover:border-bv-teal hover:bg-bv-teal/5 transition-all cursor-pointer",children:[u.jsx("div",{className:"w-14 h-14 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:u.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 64 64",fill:"currentColor",children:[u.jsx("path",{d:"M2,9C1.447,9,1,8.552,1,8V2c0-0.552,0.447-1,1-1h6c0.553,0,1,0.448,1,1S8.553,3,8,3H3v5C3,8.552,2.553,9,2,9z"}),u.jsx("path",{d:"M8,48H2c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v5h5c0.553,0,1,0.448,1,1S8.553,48,8,48z"}),u.jsx("path",{d:"M47,9c-0.553,0-1-0.448-1-1V3h-5c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1v6C48,8.552,47.553,9,47,9z"}),u.jsx("path",{d:"M21,3h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S21.553,3,21,3z"}),u.jsx("path",{d:"M2,22c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C3,21.552,2.553,22,2,22z"}),u.jsx("path",{d:"M2,35c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C3,34.552,2.553,35,2,35z"}),u.jsx("path",{d:"M47,22c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C48,21.552,47.553,22,47,22z"}),u.jsx("path",{d:"M47,31c-0.553,0-1-0.448-1-1v-2c0-0.552,0.447-1,1-1s1,0.448,1,1v2C48,30.552,47.553,31,47,31z"}),u.jsx("path",{d:"M34,3h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S34.553,3,34,3z"}),u.jsx("path",{d:"M21,48h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S21.553,48,21,48z"}),u.jsx("path",{d:"M30,48h-2c-0.553,0-1-0.448-1-1s0.447-1,1-1h2c0.553,0,1,0.448,1,1S30.553,48,30,48z"}),u.jsx("path",{d:"M62.707,57.293L51.688,46.274l10.759-5.379c0.368-0.184,0.586-0.575,0.549-0.985c-0.037-0.41-0.322-0.755-0.717-0.87l-31-9c-0.355-0.1-0.729-0.005-0.986,0.253c-0.258,0.258-0.355,0.636-0.253,0.986l9,31c0.114,0.396,0.46,0.68,0.869,0.717C39.94,62.999,39.971,63,40,63c0.376,0,0.724-0.212,0.895-0.553l5.38-10.759l11.019,11.019c0.391,0.391,1.023,0.391,1.414,0l4-4C63.098,58.316,63.098,57.684,62.707,57.293z"})]})}),u.jsx("span",{className:"text-[12px] text-bv-text font-medium",children:"Select an element to inspect"}),u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx("span",{className:"w-5 h-5 rounded flex items-center justify-center bg-white/6 border border-white/8 font-mono text-[10px] font-semibold text-bv-text-mid leading-none",children:"⌘"}),u.jsx("span",{className:"w-5 h-5 rounded flex items-center justify-center bg-white/6 border border-white/8 font-mono text-[10px] font-semibold text-bv-text-mid leading-none",children:"⇧"}),u.jsx("span",{className:"w-5 h-5 rounded flex items-center justify-center bg-white/6 border border-white/8 font-mono text-[10px] font-semibold text-bv-text-mid leading-none",children:"C"})]})]})})}),O]});const D=n.parsedClasses;return u.jsxs("div",{className:"h-full flex flex-col",children:[u.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx(Od,{active:a,onToggle:()=>{const R=!a;c(R),pe("overlay",{type:"TOGGLE_SELECT_MODE",active:R})}}),u.jsxs("div",{className:"font-[family-name:var(--font-display)] font-bold text-[13px] text-bv-text leading-tight truncate",children:[n.componentName," ",u.jsxs("span",{className:"font-[family-name:var(--font-ui)] font-normal text-bv-text-mid",children:["— ",n.instanceCount," instance",n.instanceCount!==1?"s":""]})]})]}),u.jsx(Jc,{})]})}),u.jsx(rd,{tabs:Id,activeTab:s,onTabChange:i}),u.jsxs("div",{className:"flex-1 overflow-auto",children:[s==="design"&&u.jsx(y1,{componentName:n.componentName,instanceCount:n.instanceCount,rawClasses:n.classes,parsedClasses:D,tailwindConfig:n.tailwindConfig,patchManager:d},o),s==="draw"&&u.jsx(td,{}),s==="message"&&u.jsx(nd,{draft:x,currentElementKey:n.componentName,onAddMessage:(R,L)=>d.stageMessage(R,L,n.componentName),onDiscard:R=>d.discard(R)})]}),O]})}function Od({active:e,onToggle:t}){return u.jsx("button",{onClick:t,title:`${e?"Stop selecting":"Select an element"} (⌘⇧C)`,className:`w-7 h-7 rounded flex items-center justify-center shrink-0 border transition-all
|
|
62
|
-
${e?"bg-bv-teal border-bv-teal text-white":"bg-transparent border-bv-border text-bv-text-mid hover:border-bv-teal hover:text-bv-teal hover:bg-bv-teal/10"}`,children:u.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[u.jsx("path",{d:"M14,0H2C.895,0,0,.895,0,2V14c0,1.105,.895,2,2,2H6c.552,0,1-.448,1-1h0c0-.552-.448-1-1-1H2V2H14V6c0,.552,.448,1,1,1h0c.552,0,1-.448,1-1V2c0-1.105-.895-2-2-2Z"}),u.jsx("path",{d:"M12.043,10.629l2.578-.644c.268-.068,.43-.339,.362-.607-.043-.172-.175-.308-.345-.358l-7-2c-.175-.051-.363-.002-.492,.126-.128,.129-.177,.317-.126,.492l2,7c.061,.214,.257,.362,.48,.362h.009c.226-.004,.421-.16,.476-.379l.644-2.578,3.664,3.664c.397,.384,1.03,.373,1.414-.025,.374-.388,.374-1.002,0-1.389l-3.664-3.664Z"})]})})}function k1(){const e=["height","minHeight","maxHeight","overflow","overflowY","display","flexDirection","flex","position"],t=[{selector:"html",el:document.documentElement},{selector:"body",el:document.body}],n=document.getElementById("root");n&&t.push({selector:"#root",el:n}),console.group("[vybit-panel] Layout diagnostics"),console.log("window innerHeight:",window.innerHeight,"| document.body.scrollHeight:",document.body.scrollHeight),console.log("window.frameElement:",window.frameElement,"| parent === self:",window.parent===window);for(const{selector:r,el:o}of t){const l=getComputedStyle(o),s=o.getBoundingClientRect(),i={offsetHeight:o.offsetHeight,clientHeight:o.clientHeight,rectHeight:Math.round(s.height)};for(const a of e)i[a]=l[a];console.log(`[${r}]`,i)}console.groupEnd()}requestAnimationFrame(()=>setTimeout(k1,100));Oi.createRoot(document.getElementById("root")).render(u.jsx(Ud.StrictMode,{children:u.jsx(b1,{})}));export{th as a,eh as c,u as j,Jy as o,b as r,_r as s};
|