@valbuild/ui 0.32.0 → 0.33.0

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.
@@ -0,0 +1,200 @@
1
+ var DC=Object.defineProperty;var IC=(e,t,n)=>t in e?DC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var je=(e,t,n)=>(IC(e,typeof t!="symbol"?t+"":t,n),n),jC=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Wd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var Ya=(e,t,n)=>(jC(e,t,"access private method"),n);function zC(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 i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{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 i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function ba(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o1={exports:{}},Ee={};/**
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 Na=Symbol.for("react.element"),FC=Symbol.for("react.portal"),BC=Symbol.for("react.fragment"),WC=Symbol.for("react.strict_mode"),UC=Symbol.for("react.profiler"),VC=Symbol.for("react.provider"),HC=Symbol.for("react.context"),KC=Symbol.for("react.forward_ref"),GC=Symbol.for("react.suspense"),YC=Symbol.for("react.memo"),XC=Symbol.for("react.lazy"),Jm=Symbol.iterator;function QC(e){return e===null||typeof e!="object"?null:(e=Jm&&e[Jm]||e["@@iterator"],typeof e=="function"?e:null)}var i1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},l1=Object.assign,s1={};function Ll(e,t,n){this.props=e,this.context=t,this.refs=s1,this.updater=n||i1}Ll.prototype.isReactComponent={};Ll.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")};Ll.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function a1(){}a1.prototype=Ll.prototype;function jp(e,t,n){this.props=e,this.context=t,this.refs=s1,this.updater=n||i1}var zp=jp.prototype=new a1;zp.constructor=jp;l1(zp,Ll.prototype);zp.isPureReactComponent=!0;var Zm=Array.isArray,u1=Object.prototype.hasOwnProperty,Fp={current:null},c1={key:!0,ref:!0,__self:!0,__source:!0};function d1(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)u1.call(t,r)&&!c1.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var a=Array(s),u=0;u<s;u++)a[u]=arguments[u+2];o.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return{$$typeof:Na,type:e,key:i,ref:l,props:o,_owner:Fp.current}}function JC(e,t){return{$$typeof:Na,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Bp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Na}function ZC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var qm=/\/+/g;function Ud(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ZC(""+e.key):t.toString(36)}function Tu(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Na:case FC:l=!0}}if(l)return l=e,o=o(l),e=r===""?"."+Ud(l,0):r,Zm(o)?(n="",e!=null&&(n=e.replace(qm,"$&/")+"/"),Tu(o,t,n,"",function(u){return u})):o!=null&&(Bp(o)&&(o=JC(o,n+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(qm,"$&/")+"/")+e)),t.push(o)),1;if(l=0,r=r===""?".":r+":",Zm(e))for(var s=0;s<e.length;s++){i=e[s];var a=r+Ud(i,s);l+=Tu(i,t,n,a,o)}else if(a=QC(e),typeof a=="function")for(e=a.call(e),s=0;!(i=e.next()).done;)i=i.value,a=r+Ud(i,s++),l+=Tu(i,t,n,a,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function Xa(e,t,n){if(e==null)return e;var r=[],o=0;return Tu(e,r,"","",function(i){return t.call(n,i,o++)}),r}function qC(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 ln={current:null},bu={transition:null},e$={ReactCurrentDispatcher:ln,ReactCurrentBatchConfig:bu,ReactCurrentOwner:Fp};Ee.Children={map:Xa,forEach:function(e,t,n){Xa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Xa(e,function(){t++}),t},toArray:function(e){return Xa(e,function(t){return t})||[]},only:function(e){if(!Bp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ee.Component=Ll;Ee.Fragment=BC;Ee.Profiler=UC;Ee.PureComponent=jp;Ee.StrictMode=WC;Ee.Suspense=GC;Ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=e$;Ee.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=l1({},e.props),o=e.key,i=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,l=Fp.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(a in t)u1.call(t,a)&&!c1.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&s!==void 0?s[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){s=Array(a);for(var u=0;u<a;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:Na,type:e.type,key:o,ref:i,props:r,_owner:l}};Ee.createContext=function(e){return e={$$typeof:HC,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:VC,_context:e},e.Consumer=e};Ee.createElement=d1;Ee.createFactory=function(e){var t=d1.bind(null,e);return t.type=e,t};Ee.createRef=function(){return{current:null}};Ee.forwardRef=function(e){return{$$typeof:KC,render:e}};Ee.isValidElement=Bp;Ee.lazy=function(e){return{$$typeof:XC,_payload:{_status:-1,_result:e},_init:qC}};Ee.memo=function(e,t){return{$$typeof:YC,type:e,compare:t===void 0?null:t}};Ee.startTransition=function(e){var t=bu.transition;bu.transition={};try{e()}finally{bu.transition=t}};Ee.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Ee.useCallback=function(e,t){return ln.current.useCallback(e,t)};Ee.useContext=function(e){return ln.current.useContext(e)};Ee.useDebugValue=function(){};Ee.useDeferredValue=function(e){return ln.current.useDeferredValue(e)};Ee.useEffect=function(e,t){return ln.current.useEffect(e,t)};Ee.useId=function(){return ln.current.useId()};Ee.useImperativeHandle=function(e,t,n){return ln.current.useImperativeHandle(e,t,n)};Ee.useInsertionEffect=function(e,t){return ln.current.useInsertionEffect(e,t)};Ee.useLayoutEffect=function(e,t){return ln.current.useLayoutEffect(e,t)};Ee.useMemo=function(e,t){return ln.current.useMemo(e,t)};Ee.useReducer=function(e,t,n){return ln.current.useReducer(e,t,n)};Ee.useRef=function(e){return ln.current.useRef(e)};Ee.useState=function(e){return ln.current.useState(e)};Ee.useSyncExternalStore=function(e,t,n){return ln.current.useSyncExternalStore(e,t,n)};Ee.useTransition=function(){return ln.current.useTransition()};Ee.version="18.2.0";o1.exports=Ee;var p=o1.exports;const ee=ba(p),f1=zC({__proto__:null,default:ee},[p]);var jf={},h1={exports:{}},Nn={},p1={exports:{}},g1={};/**
10
+ * @license React
11
+ * scheduler.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
+ */(function(e){function t(E,A){var R=E.length;E.push(A);e:for(;0<R;){var z=R-1>>>1,V=E[z];if(0<o(V,A))E[z]=A,E[R]=V,R=z;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var A=E[0],R=E.pop();if(R!==A){E[0]=R;e:for(var z=0,V=E.length,ie=V>>>1;z<ie;){var ne=2*(z+1)-1,Ce=E[ne],we=ne+1,X=E[we];if(0>o(Ce,R))we<V&&0>o(X,Ce)?(E[z]=X,E[we]=R,z=we):(E[z]=Ce,E[ne]=R,z=ne);else if(we<V&&0>o(X,R))E[z]=X,E[we]=R,z=we;else break e}}return A}function o(E,A){var R=E.sortIndex-A.sortIndex;return R!==0?R:E.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var a=[],u=[],c=1,d=null,f=3,h=!1,m=!1,g=!1,S=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(E){for(var A=n(u);A!==null;){if(A.callback===null)r(u);else if(A.startTime<=E)r(u),A.sortIndex=A.expirationTime,t(a,A);else break;A=n(u)}}function w(E){if(g=!1,x(E),!m)if(n(a)!==null)m=!0,C(k);else{var A=n(u);A!==null&&$(w,A.startTime-E)}}function k(E,A){m=!1,g&&(g=!1,v(N),N=-1),h=!0;var R=f;try{for(x(A),d=n(a);d!==null&&(!(d.expirationTime>A)||E&&!j());){var z=d.callback;if(typeof z=="function"){d.callback=null,f=d.priorityLevel;var V=z(d.expirationTime<=A);A=e.unstable_now(),typeof V=="function"?d.callback=V:d===n(a)&&r(a),x(A)}else r(a);d=n(a)}if(d!==null)var ie=!0;else{var ne=n(u);ne!==null&&$(w,ne.startTime-A),ie=!1}return ie}finally{d=null,f=R,h=!1}}var b=!1,T=null,N=-1,D=5,O=-1;function j(){return!(e.unstable_now()-O<D)}function B(){if(T!==null){var E=e.unstable_now();O=E;var A=!0;try{A=T(!0,E)}finally{A?ae():(b=!1,T=null)}}else b=!1}var ae;if(typeof y=="function")ae=function(){y(B)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,G=H.port2;H.port1.onmessage=B,ae=function(){G.postMessage(null)}}else ae=function(){S(B,0)};function C(E){T=E,b||(b=!0,ae())}function $(E,A){N=S(function(){E(e.unstable_now())},A)}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(E){E.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,C(k))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(E){switch(f){case 1:case 2:case 3:var A=3;break;default:A=f}var R=f;f=A;try{return E()}finally{f=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,A){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var R=f;f=E;try{return A()}finally{f=R}},e.unstable_scheduleCallback=function(E,A,R){var z=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?z+R:z):R=z,E){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=R+V,E={id:c++,callback:A,priorityLevel:E,startTime:R,expirationTime:V,sortIndex:-1},R>z?(E.sortIndex=R,t(u,E),n(a)===null&&E===n(u)&&(g?(v(N),N=-1):g=!0,$(w,R-z))):(E.sortIndex=V,t(a,E),m||h||(m=!0,C(k))),E},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(E){var A=f;return function(){var R=f;f=A;try{return E.apply(this,arguments)}finally{f=R}}}})(g1);p1.exports=g1;var t$=p1.exports;/**
18
+ * @license React
19
+ * react-dom.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
+ */var m1=p,kn=t$;function U(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 v1=new Set,Xs={};function _i(e,t){xl(e,t),xl(e+"Capture",t)}function xl(e,t){for(Xs[e]=t,e=0;e<t.length;e++)v1.add(t[e])}var zr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zf=Object.prototype.hasOwnProperty,n$=/^[: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]*$/,ev={},tv={};function r$(e){return zf.call(tv,e)?!0:zf.call(ev,e)?!1:n$.test(e)?tv[e]=!0:(ev[e]=!0,!1)}function o$(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 i$(e,t,n,r){if(t===null||typeof t>"u"||o$(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 sn(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var It={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){It[e]=new sn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];It[t]=new sn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){It[e]=new sn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){It[e]=new sn(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){It[e]=new sn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){It[e]=new sn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){It[e]=new sn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){It[e]=new sn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){It[e]=new sn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wp=/[\-:]([a-z])/g;function Up(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(Wp,Up);It[t]=new sn(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(Wp,Up);It[t]=new sn(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(Wp,Up);It[t]=new sn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){It[e]=new sn(e,1,!1,e.toLowerCase(),null,!1,!1)});It.xlinkHref=new sn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){It[e]=new sn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vp(e,t,n,r){var o=It.hasOwnProperty(t)?It[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(i$(t,n,o,r)&&(n=null),r||o===null?r$(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 Kr=m1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Qa=Symbol.for("react.element"),Hi=Symbol.for("react.portal"),Ki=Symbol.for("react.fragment"),Hp=Symbol.for("react.strict_mode"),Ff=Symbol.for("react.profiler"),y1=Symbol.for("react.provider"),x1=Symbol.for("react.context"),Kp=Symbol.for("react.forward_ref"),Bf=Symbol.for("react.suspense"),Wf=Symbol.for("react.suspense_list"),Gp=Symbol.for("react.memo"),ao=Symbol.for("react.lazy"),w1=Symbol.for("react.offscreen"),nv=Symbol.iterator;function rs(e){return e===null||typeof e!="object"?null:(e=nv&&e[nv]||e["@@iterator"],typeof e=="function"?e:null)}var nt=Object.assign,Vd;function ys(e){if(Vd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Vd=t&&t[1]||""}return`
26
+ `+Vd+e}var Hd=!1;function Kd(e,t){if(!e||Hd)return"";Hd=!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(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
27
+ `),i=r.stack.split(`
28
+ `),l=o.length-1,s=i.length-1;1<=l&&0<=s&&o[l]!==i[s];)s--;for(;1<=l&&0<=s;l--,s--)if(o[l]!==i[s]){if(l!==1||s!==1)do if(l--,s--,0>s||o[l]!==i[s]){var a=`
29
+ `+o[l].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=l&&0<=s);break}}}finally{Hd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ys(e):""}function l$(e){switch(e.tag){case 5:return ys(e.type);case 16:return ys("Lazy");case 13:return ys("Suspense");case 19:return ys("SuspenseList");case 0:case 2:case 15:return e=Kd(e.type,!1),e;case 11:return e=Kd(e.type.render,!1),e;case 1:return e=Kd(e.type,!0),e;default:return""}}function Uf(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 Ki:return"Fragment";case Hi:return"Portal";case Ff:return"Profiler";case Hp:return"StrictMode";case Bf:return"Suspense";case Wf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x1:return(e.displayName||"Context")+".Consumer";case y1:return(e._context.displayName||"Context")+".Provider";case Kp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gp:return t=e.displayName||null,t!==null?t:Uf(e.type)||"Memo";case ao:t=e._payload,e=e._init;try{return Uf(e(t))}catch{}}return null}function s$(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 Uf(t);case 8:return t===Hp?"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 No(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function a$(e){var t=_1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ja(e){e._valueTracker||(e._valueTracker=a$(e))}function S1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Gu(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 Vf(e,t){var n=t.checked;return nt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function rv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=No(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 E1(e,t){t=t.checked,t!=null&&Vp(e,"checked",t,!1)}function Hf(e,t){E1(e,t);var n=No(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")?Kf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Kf(e,t.type,No(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ov(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 Kf(e,t,n){(t!=="number"||Gu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var xs=Array.isArray;function sl(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=""+No(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 Gf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return nt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function iv(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(U(92));if(xs(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:No(n)}}function C1(e,t){var n=No(t.value),r=No(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 lv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function $1(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 Yf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?$1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Za,k1=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(Za=Za||document.createElement("div"),Za.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Za.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Qs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ks={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},u$=["Webkit","ms","Moz","O"];Object.keys(ks).forEach(function(e){u$.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ks[t]=ks[e]})});function T1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ks.hasOwnProperty(e)&&ks[e]?(""+t).trim():t+"px"}function b1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=T1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var c$=nt({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 Xf(e,t){if(t){if(c$[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function Qf(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 Jf=null;function Yp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zf=null,al=null,ul=null;function sv(e){if(e=Oa(e)){if(typeof Zf!="function")throw Error(U(280));var t=e.stateNode;t&&(t=Qc(t),Zf(e.stateNode,e.type,t))}}function N1(e){al?ul?ul.push(e):ul=[e]:al=e}function R1(){if(al){var e=al,t=ul;if(ul=al=null,sv(e),t)for(e=0;e<t.length;e++)sv(t[e])}}function P1(e,t){return e(t)}function O1(){}var Gd=!1;function A1(e,t,n){if(Gd)return e(t,n);Gd=!0;try{return P1(e,t,n)}finally{Gd=!1,(al!==null||ul!==null)&&(O1(),R1())}}function Js(e,t){var n=e.stateNode;if(n===null)return null;var r=Qc(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(U(231,t,typeof n));return n}var qf=!1;if(zr)try{var os={};Object.defineProperty(os,"passive",{get:function(){qf=!0}}),window.addEventListener("test",os,os),window.removeEventListener("test",os,os)}catch{qf=!1}function d$(e,t,n,r,o,i,l,s,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Ts=!1,Yu=null,Xu=!1,eh=null,f$={onError:function(e){Ts=!0,Yu=e}};function h$(e,t,n,r,o,i,l,s,a){Ts=!1,Yu=null,d$.apply(f$,arguments)}function p$(e,t,n,r,o,i,l,s,a){if(h$.apply(this,arguments),Ts){if(Ts){var u=Yu;Ts=!1,Yu=null}else throw Error(U(198));Xu||(Xu=!0,eh=u)}}function Si(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 M1(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 av(e){if(Si(e)!==e)throw Error(U(188))}function g$(e){var t=e.alternate;if(!t){if(t=Si(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return av(o),e;if(i===r)return av(o),t;i=i.sibling}throw Error(U(188))}if(n.return!==r.return)n=o,r=i;else{for(var l=!1,s=o.child;s;){if(s===n){l=!0,n=o,r=i;break}if(s===r){l=!0,r=o,n=i;break}s=s.sibling}if(!l){for(s=i.child;s;){if(s===n){l=!0,n=i,r=o;break}if(s===r){l=!0,r=i,n=o;break}s=s.sibling}if(!l)throw Error(U(189))}}if(n.alternate!==r)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function L1(e){return e=g$(e),e!==null?D1(e):null}function D1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=D1(e);if(t!==null)return t;e=e.sibling}return null}var I1=kn.unstable_scheduleCallback,uv=kn.unstable_cancelCallback,m$=kn.unstable_shouldYield,v$=kn.unstable_requestPaint,ct=kn.unstable_now,y$=kn.unstable_getCurrentPriorityLevel,Xp=kn.unstable_ImmediatePriority,j1=kn.unstable_UserBlockingPriority,Qu=kn.unstable_NormalPriority,x$=kn.unstable_LowPriority,z1=kn.unstable_IdlePriority,Kc=null,mr=null;function w$(e){if(mr&&typeof mr.onCommitFiberRoot=="function")try{mr.onCommitFiberRoot(Kc,e,void 0,(e.current.flags&128)===128)}catch{}}var tr=Math.clz32?Math.clz32:E$,_$=Math.log,S$=Math.LN2;function E$(e){return e>>>=0,e===0?32:31-(_$(e)/S$|0)|0}var qa=64,eu=4194304;function ws(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 Ju(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=ws(s):(i&=l,i!==0&&(r=ws(i)))}else l=n&~o,l!==0?r=ws(l):i!==0&&(r=ws(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-tr(t),o=1<<n,r|=e[n],t&=~o;return r}function C$(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 $$(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var l=31-tr(i),s=1<<l,a=o[l];a===-1?(!(s&n)||s&r)&&(o[l]=C$(s,t)):a<=t&&(e.expiredLanes|=s),i&=~s}}function th(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function F1(){var e=qa;return qa<<=1,!(qa&4194240)&&(qa=64),e}function Yd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ra(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tr(t),e[t]=n}function k$(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-tr(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Qp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-tr(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Oe=0;function B1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var W1,Jp,U1,V1,H1,nh=!1,tu=[],xo=null,wo=null,_o=null,Zs=new Map,qs=new Map,fo=[],T$="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 cv(e,t){switch(e){case"focusin":case"focusout":xo=null;break;case"dragenter":case"dragleave":wo=null;break;case"mouseover":case"mouseout":_o=null;break;case"pointerover":case"pointerout":Zs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qs.delete(t.pointerId)}}function is(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Oa(t),t!==null&&Jp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function b$(e,t,n,r,o){switch(t){case"focusin":return xo=is(xo,e,t,n,r,o),!0;case"dragenter":return wo=is(wo,e,t,n,r,o),!0;case"mouseover":return _o=is(_o,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Zs.set(i,is(Zs.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,qs.set(i,is(qs.get(i)||null,e,t,n,r,o)),!0}return!1}function K1(e){var t=Zo(e.target);if(t!==null){var n=Si(t);if(n!==null){if(t=n.tag,t===13){if(t=M1(n),t!==null){e.blockedOn=t,H1(e.priority,function(){U1(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 Nu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=rh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Jf=r,n.target.dispatchEvent(r),Jf=null}else return t=Oa(n),t!==null&&Jp(t),e.blockedOn=n,!1;t.shift()}return!0}function dv(e,t,n){Nu(e)&&n.delete(t)}function N$(){nh=!1,xo!==null&&Nu(xo)&&(xo=null),wo!==null&&Nu(wo)&&(wo=null),_o!==null&&Nu(_o)&&(_o=null),Zs.forEach(dv),qs.forEach(dv)}function ls(e,t){e.blockedOn===t&&(e.blockedOn=null,nh||(nh=!0,kn.unstable_scheduleCallback(kn.unstable_NormalPriority,N$)))}function ea(e){function t(o){return ls(o,e)}if(0<tu.length){ls(tu[0],e);for(var n=1;n<tu.length;n++){var r=tu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(xo!==null&&ls(xo,e),wo!==null&&ls(wo,e),_o!==null&&ls(_o,e),Zs.forEach(t),qs.forEach(t),n=0;n<fo.length;n++)r=fo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<fo.length&&(n=fo[0],n.blockedOn===null);)K1(n),n.blockedOn===null&&fo.shift()}var cl=Kr.ReactCurrentBatchConfig,Zu=!0;function R$(e,t,n,r){var o=Oe,i=cl.transition;cl.transition=null;try{Oe=1,Zp(e,t,n,r)}finally{Oe=o,cl.transition=i}}function P$(e,t,n,r){var o=Oe,i=cl.transition;cl.transition=null;try{Oe=4,Zp(e,t,n,r)}finally{Oe=o,cl.transition=i}}function Zp(e,t,n,r){if(Zu){var o=rh(e,t,n,r);if(o===null)of(e,t,r,qu,n),cv(e,r);else if(b$(o,e,t,n,r))r.stopPropagation();else if(cv(e,r),t&4&&-1<T$.indexOf(e)){for(;o!==null;){var i=Oa(o);if(i!==null&&W1(i),i=rh(e,t,n,r),i===null&&of(e,t,r,qu,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else of(e,t,r,null,n)}}var qu=null;function rh(e,t,n,r){if(qu=null,e=Yp(r),e=Zo(e),e!==null)if(t=Si(e),t===null)e=null;else if(n=t.tag,n===13){if(e=M1(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 qu=e,null}function G1(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(y$()){case Xp:return 1;case j1:return 4;case Qu:case x$:return 16;case z1:return 536870912;default:return 16}default:return 16}}var go=null,qp=null,Ru=null;function Y1(){if(Ru)return Ru;var e,t=qp,n=t.length,r,o="value"in go?go.value:go.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===o[i-r];r++);return Ru=o.slice(e,1<r?1-r:void 0)}function Pu(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 nu(){return!0}function fv(){return!1}function Rn(e){function t(n,r,o,i,l){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?nu:fv,this.isPropagationStopped=fv,this}return nt(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=nu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=nu)},persist:function(){},isPersistent:nu}),t}var Dl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eg=Rn(Dl),Pa=nt({},Dl,{view:0,detail:0}),O$=Rn(Pa),Xd,Qd,ss,Gc=nt({},Pa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tg,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!==ss&&(ss&&e.type==="mousemove"?(Xd=e.screenX-ss.screenX,Qd=e.screenY-ss.screenY):Qd=Xd=0,ss=e),Xd)},movementY:function(e){return"movementY"in e?e.movementY:Qd}}),hv=Rn(Gc),A$=nt({},Gc,{dataTransfer:0}),M$=Rn(A$),L$=nt({},Pa,{relatedTarget:0}),Jd=Rn(L$),D$=nt({},Dl,{animationName:0,elapsedTime:0,pseudoElement:0}),I$=Rn(D$),j$=nt({},Dl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),z$=Rn(j$),F$=nt({},Dl,{data:0}),pv=Rn(F$),B$={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},W$={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"},U$={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function V$(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=U$[e])?!!t[e]:!1}function tg(){return V$}var H$=nt({},Pa,{key:function(e){if(e.key){var t=B$[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Pu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?W$[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tg,charCode:function(e){return e.type==="keypress"?Pu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Pu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),K$=Rn(H$),G$=nt({},Gc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gv=Rn(G$),Y$=nt({},Pa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tg}),X$=Rn(Y$),Q$=nt({},Dl,{propertyName:0,elapsedTime:0,pseudoElement:0}),J$=Rn(Q$),Z$=nt({},Gc,{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}),q$=Rn(Z$),ek=[9,13,27,32],ng=zr&&"CompositionEvent"in window,bs=null;zr&&"documentMode"in document&&(bs=document.documentMode);var tk=zr&&"TextEvent"in window&&!bs,X1=zr&&(!ng||bs&&8<bs&&11>=bs),mv=String.fromCharCode(32),vv=!1;function Q1(e,t){switch(e){case"keyup":return ek.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function J1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gi=!1;function nk(e,t){switch(e){case"compositionend":return J1(t);case"keypress":return t.which!==32?null:(vv=!0,mv);case"textInput":return e=t.data,e===mv&&vv?null:e;default:return null}}function rk(e,t){if(Gi)return e==="compositionend"||!ng&&Q1(e,t)?(e=Y1(),Ru=qp=go=null,Gi=!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 X1&&t.locale!=="ko"?null:t.data;default:return null}}var ok={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 yv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ok[e.type]:t==="textarea"}function Z1(e,t,n,r){N1(r),t=ec(t,"onChange"),0<t.length&&(n=new eg("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ns=null,ta=null;function ik(e){ux(e,0)}function Yc(e){var t=Qi(e);if(S1(t))return e}function lk(e,t){if(e==="change")return t}var q1=!1;if(zr){var Zd;if(zr){var qd="oninput"in document;if(!qd){var xv=document.createElement("div");xv.setAttribute("oninput","return;"),qd=typeof xv.oninput=="function"}Zd=qd}else Zd=!1;q1=Zd&&(!document.documentMode||9<document.documentMode)}function wv(){Ns&&(Ns.detachEvent("onpropertychange",ex),ta=Ns=null)}function ex(e){if(e.propertyName==="value"&&Yc(ta)){var t=[];Z1(t,ta,e,Yp(e)),A1(ik,t)}}function sk(e,t,n){e==="focusin"?(wv(),Ns=t,ta=n,Ns.attachEvent("onpropertychange",ex)):e==="focusout"&&wv()}function ak(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yc(ta)}function uk(e,t){if(e==="click")return Yc(t)}function ck(e,t){if(e==="input"||e==="change")return Yc(t)}function dk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rr=typeof Object.is=="function"?Object.is:dk;function na(e,t){if(rr(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(!zf.call(t,o)||!rr(e[o],t[o]))return!1}return!0}function _v(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sv(e,t){var n=_v(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=_v(n)}}function tx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nx(){for(var e=window,t=Gu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gu(e.document)}return t}function rg(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 fk(e){var t=nx(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tx(n.ownerDocument.documentElement,n)){if(r!==null&&rg(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Sv(n,i);var l=Sv(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var hk=zr&&"documentMode"in document&&11>=document.documentMode,Yi=null,oh=null,Rs=null,ih=!1;function Ev(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ih||Yi==null||Yi!==Gu(r)||(r=Yi,"selectionStart"in r&&rg(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}),Rs&&na(Rs,r)||(Rs=r,r=ec(oh,"onSelect"),0<r.length&&(t=new eg("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Yi)))}function ru(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Xi={animationend:ru("Animation","AnimationEnd"),animationiteration:ru("Animation","AnimationIteration"),animationstart:ru("Animation","AnimationStart"),transitionend:ru("Transition","TransitionEnd")},ef={},rx={};zr&&(rx=document.createElement("div").style,"AnimationEvent"in window||(delete Xi.animationend.animation,delete Xi.animationiteration.animation,delete Xi.animationstart.animation),"TransitionEvent"in window||delete Xi.transitionend.transition);function Xc(e){if(ef[e])return ef[e];if(!Xi[e])return e;var t=Xi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in rx)return ef[e]=t[n];return e}var ox=Xc("animationend"),ix=Xc("animationiteration"),lx=Xc("animationstart"),sx=Xc("transitionend"),ax=new Map,Cv="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 zo(e,t){ax.set(e,t),_i(t,[e])}for(var tf=0;tf<Cv.length;tf++){var nf=Cv[tf],pk=nf.toLowerCase(),gk=nf[0].toUpperCase()+nf.slice(1);zo(pk,"on"+gk)}zo(ox,"onAnimationEnd");zo(ix,"onAnimationIteration");zo(lx,"onAnimationStart");zo("dblclick","onDoubleClick");zo("focusin","onFocus");zo("focusout","onBlur");zo(sx,"onTransitionEnd");xl("onMouseEnter",["mouseout","mouseover"]);xl("onMouseLeave",["mouseout","mouseover"]);xl("onPointerEnter",["pointerout","pointerover"]);xl("onPointerLeave",["pointerout","pointerover"]);_i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));_i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));_i("onBeforeInput",["compositionend","keypress","textInput","paste"]);_i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));_i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));_i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _s="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(" "),mk=new Set("cancel close invalid load scroll toggle".split(" ").concat(_s));function $v(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,p$(r,t,void 0,e),e.currentTarget=null}function ux(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 i=void 0;if(t)for(var l=r.length-1;0<=l;l--){var s=r[l],a=s.instance,u=s.currentTarget;if(s=s.listener,a!==i&&o.isPropagationStopped())break e;$v(o,s,u),i=a}else for(l=0;l<r.length;l++){if(s=r[l],a=s.instance,u=s.currentTarget,s=s.listener,a!==i&&o.isPropagationStopped())break e;$v(o,s,u),i=a}}}if(Xu)throw e=eh,Xu=!1,eh=null,e}function Ue(e,t){var n=t[ch];n===void 0&&(n=t[ch]=new Set);var r=e+"__bubble";n.has(r)||(cx(t,e,2,!1),n.add(r))}function rf(e,t,n){var r=0;t&&(r|=4),cx(n,e,r,t)}var ou="_reactListening"+Math.random().toString(36).slice(2);function ra(e){if(!e[ou]){e[ou]=!0,v1.forEach(function(n){n!=="selectionchange"&&(mk.has(n)||rf(n,!1,e),rf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ou]||(t[ou]=!0,rf("selectionchange",!1,t))}}function cx(e,t,n,r){switch(G1(t)){case 1:var o=R$;break;case 4:o=P$;break;default:o=Zp}n=o.bind(null,t,n,e),o=void 0,!qf||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 of(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var s=r.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&&(a=l.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;l=l.return}for(;s!==null;){if(l=Zo(s),l===null)return;if(a=l.tag,a===5||a===6){r=i=l;continue e}s=s.parentNode}}r=r.return}A1(function(){var u=i,c=Yp(n),d=[];e:{var f=ax.get(e);if(f!==void 0){var h=eg,m=e;switch(e){case"keypress":if(Pu(n)===0)break e;case"keydown":case"keyup":h=K$;break;case"focusin":m="focus",h=Jd;break;case"focusout":m="blur",h=Jd;break;case"beforeblur":case"afterblur":h=Jd;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":h=hv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=M$;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=X$;break;case ox:case ix:case lx:h=I$;break;case sx:h=J$;break;case"scroll":h=O$;break;case"wheel":h=q$;break;case"copy":case"cut":case"paste":h=z$;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=gv}var g=(t&4)!==0,S=!g&&e==="scroll",v=g?f!==null?f+"Capture":null:f;g=[];for(var y=u,x;y!==null;){x=y;var w=x.stateNode;if(x.tag===5&&w!==null&&(x=w,v!==null&&(w=Js(y,v),w!=null&&g.push(oa(y,w,x)))),S)break;y=y.return}0<g.length&&(f=new h(f,m,null,n,c),d.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==Jf&&(m=n.relatedTarget||n.fromElement)&&(Zo(m)||m[Fr]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?Zo(m):null,m!==null&&(S=Si(m),m!==S||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(g=hv,w="onMouseLeave",v="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=gv,w="onPointerLeave",v="onPointerEnter",y="pointer"),S=h==null?f:Qi(h),x=m==null?f:Qi(m),f=new g(w,y+"leave",h,n,c),f.target=S,f.relatedTarget=x,w=null,Zo(c)===u&&(g=new g(v,y+"enter",m,n,c),g.target=x,g.relatedTarget=S,w=g),S=w,h&&m)t:{for(g=h,v=m,y=0,x=g;x;x=Mi(x))y++;for(x=0,w=v;w;w=Mi(w))x++;for(;0<y-x;)g=Mi(g),y--;for(;0<x-y;)v=Mi(v),x--;for(;y--;){if(g===v||v!==null&&g===v.alternate)break t;g=Mi(g),v=Mi(v)}g=null}else g=null;h!==null&&kv(d,f,h,g,!1),m!==null&&S!==null&&kv(d,S,m,g,!0)}}e:{if(f=u?Qi(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var k=lk;else if(yv(f))if(q1)k=ck;else{k=ak;var b=sk}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=uk);if(k&&(k=k(e,u))){Z1(d,k,n,c);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&Kf(f,"number",f.value)}switch(b=u?Qi(u):window,e){case"focusin":(yv(b)||b.contentEditable==="true")&&(Yi=b,oh=u,Rs=null);break;case"focusout":Rs=oh=Yi=null;break;case"mousedown":ih=!0;break;case"contextmenu":case"mouseup":case"dragend":ih=!1,Ev(d,n,c);break;case"selectionchange":if(hk)break;case"keydown":case"keyup":Ev(d,n,c)}var T;if(ng)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Gi?Q1(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(X1&&n.locale!=="ko"&&(Gi||N!=="onCompositionStart"?N==="onCompositionEnd"&&Gi&&(T=Y1()):(go=c,qp="value"in go?go.value:go.textContent,Gi=!0)),b=ec(u,N),0<b.length&&(N=new pv(N,e,null,n,c),d.push({event:N,listeners:b}),T?N.data=T:(T=J1(n),T!==null&&(N.data=T)))),(T=tk?nk(e,n):rk(e,n))&&(u=ec(u,"onBeforeInput"),0<u.length&&(c=new pv("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=T))}ux(d,t)})}function oa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ec(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Js(e,n),i!=null&&r.unshift(oa(e,i,o)),i=Js(e,t),i!=null&&r.push(oa(e,i,o))),e=e.return}return r}function Mi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function kv(e,t,n,r,o){for(var i=t._reactName,l=[];n!==null&&n!==r;){var s=n,a=s.alternate,u=s.stateNode;if(a!==null&&a===r)break;s.tag===5&&u!==null&&(s=u,o?(a=Js(n,i),a!=null&&l.unshift(oa(n,a,s))):o||(a=Js(n,i),a!=null&&l.push(oa(n,a,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var vk=/\r\n?/g,yk=/\u0000|\uFFFD/g;function Tv(e){return(typeof e=="string"?e:""+e).replace(vk,`
30
+ `).replace(yk,"")}function iu(e,t,n){if(t=Tv(t),Tv(e)!==t&&n)throw Error(U(425))}function tc(){}var lh=null,sh=null;function ah(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 uh=typeof setTimeout=="function"?setTimeout:void 0,xk=typeof clearTimeout=="function"?clearTimeout:void 0,bv=typeof Promise=="function"?Promise:void 0,wk=typeof queueMicrotask=="function"?queueMicrotask:typeof bv<"u"?function(e){return bv.resolve(null).then(e).catch(_k)}:uh;function _k(e){setTimeout(function(){throw e})}function lf(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),ea(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);ea(t)}function So(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 Nv(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 Il=Math.random().toString(36).slice(2),dr="__reactFiber$"+Il,ia="__reactProps$"+Il,Fr="__reactContainer$"+Il,ch="__reactEvents$"+Il,Sk="__reactListeners$"+Il,Ek="__reactHandles$"+Il;function Zo(e){var t=e[dr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Fr]||n[dr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Nv(e);e!==null;){if(n=e[dr])return n;e=Nv(e)}return t}e=n,n=e.parentNode}return null}function Oa(e){return e=e[dr]||e[Fr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Qi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function Qc(e){return e[ia]||null}var dh=[],Ji=-1;function Fo(e){return{current:e}}function Ge(e){0>Ji||(e.current=dh[Ji],dh[Ji]=null,Ji--)}function Fe(e,t){Ji++,dh[Ji]=e.current,e.current=t}var Ro={},Xt=Fo(Ro),fn=Fo(!1),ui=Ro;function wl(e,t){var n=e.type.contextTypes;if(!n)return Ro;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function hn(e){return e=e.childContextTypes,e!=null}function nc(){Ge(fn),Ge(Xt)}function Rv(e,t,n){if(Xt.current!==Ro)throw Error(U(168));Fe(Xt,t),Fe(fn,n)}function dx(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(U(108,s$(e)||"Unknown",o));return nt({},n,r)}function rc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ro,ui=Xt.current,Fe(Xt,e),Fe(fn,fn.current),!0}function Pv(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=dx(e,t,ui),r.__reactInternalMemoizedMergedChildContext=e,Ge(fn),Ge(Xt),Fe(Xt,e)):Ge(fn),Fe(fn,n)}var Ar=null,Jc=!1,sf=!1;function fx(e){Ar===null?Ar=[e]:Ar.push(e)}function Ck(e){Jc=!0,fx(e)}function Bo(){if(!sf&&Ar!==null){sf=!0;var e=0,t=Oe;try{var n=Ar;for(Oe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ar=null,Jc=!1}catch(o){throw Ar!==null&&(Ar=Ar.slice(e+1)),I1(Xp,Bo),o}finally{Oe=t,sf=!1}}return null}var Zi=[],qi=0,oc=null,ic=0,Mn=[],Ln=0,ci=null,Dr=1,Ir="";function Yo(e,t){Zi[qi++]=ic,Zi[qi++]=oc,oc=e,ic=t}function hx(e,t,n){Mn[Ln++]=Dr,Mn[Ln++]=Ir,Mn[Ln++]=ci,ci=e;var r=Dr;e=Ir;var o=32-tr(r)-1;r&=~(1<<o),n+=1;var i=32-tr(t)+o;if(30<i){var l=o-o%5;i=(r&(1<<l)-1).toString(32),r>>=l,o-=l,Dr=1<<32-tr(t)+o|n<<o|r,Ir=i+e}else Dr=1<<i|n<<o|r,Ir=e}function og(e){e.return!==null&&(Yo(e,1),hx(e,1,0))}function ig(e){for(;e===oc;)oc=Zi[--qi],Zi[qi]=null,ic=Zi[--qi],Zi[qi]=null;for(;e===ci;)ci=Mn[--Ln],Mn[Ln]=null,Ir=Mn[--Ln],Mn[Ln]=null,Dr=Mn[--Ln],Mn[Ln]=null}var Sn=null,_n=null,Ye=!1,Zn=null;function px(e,t){var n=jn(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 Ov(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,Sn=e,_n=So(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Sn=e,_n=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ci!==null?{id:Dr,overflow:Ir}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=jn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Sn=e,_n=null,!0):!1;default:return!1}}function fh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function hh(e){if(Ye){var t=_n;if(t){var n=t;if(!Ov(e,t)){if(fh(e))throw Error(U(418));t=So(n.nextSibling);var r=Sn;t&&Ov(e,t)?px(r,n):(e.flags=e.flags&-4097|2,Ye=!1,Sn=e)}}else{if(fh(e))throw Error(U(418));e.flags=e.flags&-4097|2,Ye=!1,Sn=e}}}function Av(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Sn=e}function lu(e){if(e!==Sn)return!1;if(!Ye)return Av(e),Ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ah(e.type,e.memoizedProps)),t&&(t=_n)){if(fh(e))throw gx(),Error(U(418));for(;t;)px(e,t),t=So(t.nextSibling)}if(Av(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){_n=So(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}_n=null}}else _n=Sn?So(e.stateNode.nextSibling):null;return!0}function gx(){for(var e=_n;e;)e=So(e.nextSibling)}function _l(){_n=Sn=null,Ye=!1}function lg(e){Zn===null?Zn=[e]:Zn.push(e)}var $k=Kr.ReactCurrentBatchConfig;function Xn(e,t){if(e&&e.defaultProps){t=nt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var lc=Fo(null),sc=null,el=null,sg=null;function ag(){sg=el=sc=null}function ug(e){var t=lc.current;Ge(lc),e._currentValue=t}function ph(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 dl(e,t){sc=e,sg=el=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(dn=!0),e.firstContext=null)}function Bn(e){var t=e._currentValue;if(sg!==e)if(e={context:e,memoizedValue:t,next:null},el===null){if(sc===null)throw Error(U(308));el=e,sc.dependencies={lanes:0,firstContext:e}}else el=el.next=e;return t}var qo=null;function cg(e){qo===null?qo=[e]:qo.push(e)}function mx(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,cg(t)):(n.next=o.next,o.next=n),t.interleaved=n,Br(e,r)}function Br(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 uo=!1;function dg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vx(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 jr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Eo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ke&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Br(e,n)}return o=r.interleaved,o===null?(t.next=t,cg(r)):(t.next=o.next,o.next=t),r.interleaved=t,Br(e,n)}function Ou(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,Qp(e,n)}}function Mv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ac(e,t,n,r){var o=e.updateQueue;uo=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var a=s,u=a.next;a.next=null,l===null?i=u:l.next=u,l=a;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==l&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=a))}if(i!==null){var d=o.baseState;l=0,c=u=a=null,s=i;do{var f=s.lane,h=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(f=t,h=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(h,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(h,d,f):m,f==null)break e;d=nt({},d,f);break e;case 2:uo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=h,a=d):c=c.next=h,l|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(1);if(c===null&&(a=d),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);fi|=l,e.lanes=l,e.memoizedState=d}}function Lv(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(U(191,o));o.call(r)}}}var yx=new m1.Component().refs;function gh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:nt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zc={isMounted:function(e){return(e=e._reactInternals)?Si(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=on(),o=$o(e),i=jr(r,o);i.payload=t,n!=null&&(i.callback=n),t=Eo(e,i,o),t!==null&&(nr(t,e,o,r),Ou(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=on(),o=$o(e),i=jr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Eo(e,i,o),t!==null&&(nr(t,e,o,r),Ou(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=on(),r=$o(e),o=jr(n,r);o.tag=2,t!=null&&(o.callback=t),t=Eo(e,o,r),t!==null&&(nr(t,e,r,n),Ou(t,e,r))}};function Dv(e,t,n,r,o,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,l):t.prototype&&t.prototype.isPureReactComponent?!na(n,r)||!na(o,i):!0}function xx(e,t,n){var r=!1,o=Ro,i=t.contextType;return typeof i=="object"&&i!==null?i=Bn(i):(o=hn(t)?ui:Xt.current,r=t.contextTypes,i=(r=r!=null)?wl(e,o):Ro),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Iv(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&&Zc.enqueueReplaceState(t,t.state,null)}function mh(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=yx,dg(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Bn(i):(i=hn(t)?ui:Xt.current,o.context=wl(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(gh(e,t,i,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&&Zc.enqueueReplaceState(o,o.state,null),ac(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function as(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(U(309));var r=n.stateNode}if(!r)throw Error(U(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(l){var s=o.refs;s===yx&&(s=o.refs={}),l===null?delete s[i]:s[i]=l},t._stringRef=i,t)}if(typeof e!="string")throw Error(U(284));if(!n._owner)throw Error(U(290,e))}return e}function su(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function jv(e){var t=e._init;return t(e._payload)}function wx(e){function t(v,y){if(e){var x=v.deletions;x===null?(v.deletions=[y],v.flags|=16):x.push(y)}}function n(v,y){if(!e)return null;for(;y!==null;)t(v,y),y=y.sibling;return null}function r(v,y){for(v=new Map;y!==null;)y.key!==null?v.set(y.key,y):v.set(y.index,y),y=y.sibling;return v}function o(v,y){return v=ko(v,y),v.index=0,v.sibling=null,v}function i(v,y,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<y?(v.flags|=2,y):x):(v.flags|=2,y)):(v.flags|=1048576,y)}function l(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,y,x,w){return y===null||y.tag!==6?(y=pf(x,v.mode,w),y.return=v,y):(y=o(y,x),y.return=v,y)}function a(v,y,x,w){var k=x.type;return k===Ki?c(v,y,x.props.children,w,x.key):y!==null&&(y.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ao&&jv(k)===y.type)?(w=o(y,x.props),w.ref=as(v,y,x),w.return=v,w):(w=ju(x.type,x.key,x.props,null,v.mode,w),w.ref=as(v,y,x),w.return=v,w)}function u(v,y,x,w){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=gf(x,v.mode,w),y.return=v,y):(y=o(y,x.children||[]),y.return=v,y)}function c(v,y,x,w,k){return y===null||y.tag!==7?(y=oi(x,v.mode,w,k),y.return=v,y):(y=o(y,x),y.return=v,y)}function d(v,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=pf(""+y,v.mode,x),y.return=v,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Qa:return x=ju(y.type,y.key,y.props,null,v.mode,x),x.ref=as(v,null,y),x.return=v,x;case Hi:return y=gf(y,v.mode,x),y.return=v,y;case ao:var w=y._init;return d(v,w(y._payload),x)}if(xs(y)||rs(y))return y=oi(y,v.mode,x,null),y.return=v,y;su(v,y)}return null}function f(v,y,x,w){var k=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return k!==null?null:s(v,y,""+x,w);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Qa:return x.key===k?a(v,y,x,w):null;case Hi:return x.key===k?u(v,y,x,w):null;case ao:return k=x._init,f(v,y,k(x._payload),w)}if(xs(x)||rs(x))return k!==null?null:c(v,y,x,w,null);su(v,x)}return null}function h(v,y,x,w,k){if(typeof w=="string"&&w!==""||typeof w=="number")return v=v.get(x)||null,s(y,v,""+w,k);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Qa:return v=v.get(w.key===null?x:w.key)||null,a(y,v,w,k);case Hi:return v=v.get(w.key===null?x:w.key)||null,u(y,v,w,k);case ao:var b=w._init;return h(v,y,x,b(w._payload),k)}if(xs(w)||rs(w))return v=v.get(x)||null,c(y,v,w,k,null);su(y,w)}return null}function m(v,y,x,w){for(var k=null,b=null,T=y,N=y=0,D=null;T!==null&&N<x.length;N++){T.index>N?(D=T,T=null):D=T.sibling;var O=f(v,T,x[N],w);if(O===null){T===null&&(T=D);break}e&&T&&O.alternate===null&&t(v,T),y=i(O,y,N),b===null?k=O:b.sibling=O,b=O,T=D}if(N===x.length)return n(v,T),Ye&&Yo(v,N),k;if(T===null){for(;N<x.length;N++)T=d(v,x[N],w),T!==null&&(y=i(T,y,N),b===null?k=T:b.sibling=T,b=T);return Ye&&Yo(v,N),k}for(T=r(v,T);N<x.length;N++)D=h(T,v,N,x[N],w),D!==null&&(e&&D.alternate!==null&&T.delete(D.key===null?N:D.key),y=i(D,y,N),b===null?k=D:b.sibling=D,b=D);return e&&T.forEach(function(j){return t(v,j)}),Ye&&Yo(v,N),k}function g(v,y,x,w){var k=rs(x);if(typeof k!="function")throw Error(U(150));if(x=k.call(x),x==null)throw Error(U(151));for(var b=k=null,T=y,N=y=0,D=null,O=x.next();T!==null&&!O.done;N++,O=x.next()){T.index>N?(D=T,T=null):D=T.sibling;var j=f(v,T,O.value,w);if(j===null){T===null&&(T=D);break}e&&T&&j.alternate===null&&t(v,T),y=i(j,y,N),b===null?k=j:b.sibling=j,b=j,T=D}if(O.done)return n(v,T),Ye&&Yo(v,N),k;if(T===null){for(;!O.done;N++,O=x.next())O=d(v,O.value,w),O!==null&&(y=i(O,y,N),b===null?k=O:b.sibling=O,b=O);return Ye&&Yo(v,N),k}for(T=r(v,T);!O.done;N++,O=x.next())O=h(T,v,N,O.value,w),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?N:O.key),y=i(O,y,N),b===null?k=O:b.sibling=O,b=O);return e&&T.forEach(function(B){return t(v,B)}),Ye&&Yo(v,N),k}function S(v,y,x,w){if(typeof x=="object"&&x!==null&&x.type===Ki&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Qa:e:{for(var k=x.key,b=y;b!==null;){if(b.key===k){if(k=x.type,k===Ki){if(b.tag===7){n(v,b.sibling),y=o(b,x.props.children),y.return=v,v=y;break e}}else if(b.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ao&&jv(k)===b.type){n(v,b.sibling),y=o(b,x.props),y.ref=as(v,b,x),y.return=v,v=y;break e}n(v,b);break}else t(v,b);b=b.sibling}x.type===Ki?(y=oi(x.props.children,v.mode,w,x.key),y.return=v,v=y):(w=ju(x.type,x.key,x.props,null,v.mode,w),w.ref=as(v,y,x),w.return=v,v=w)}return l(v);case Hi:e:{for(b=x.key;y!==null;){if(y.key===b)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(v,y.sibling),y=o(y,x.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else t(v,y);y=y.sibling}y=gf(x,v.mode,w),y.return=v,v=y}return l(v);case ao:return b=x._init,S(v,y,b(x._payload),w)}if(xs(x))return m(v,y,x,w);if(rs(x))return g(v,y,x,w);su(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(v,y.sibling),y=o(y,x),y.return=v,v=y):(n(v,y),y=pf(x,v.mode,w),y.return=v,v=y),l(v)):n(v,y)}return S}var Sl=wx(!0),_x=wx(!1),Aa={},vr=Fo(Aa),la=Fo(Aa),sa=Fo(Aa);function ei(e){if(e===Aa)throw Error(U(174));return e}function fg(e,t){switch(Fe(sa,t),Fe(la,e),Fe(vr,Aa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Yf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Yf(t,e)}Ge(vr),Fe(vr,t)}function El(){Ge(vr),Ge(la),Ge(sa)}function Sx(e){ei(sa.current);var t=ei(vr.current),n=Yf(t,e.type);t!==n&&(Fe(la,e),Fe(vr,n))}function hg(e){la.current===e&&(Ge(vr),Ge(la))}var Ze=Fo(0);function uc(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 af=[];function pg(){for(var e=0;e<af.length;e++)af[e]._workInProgressVersionPrimary=null;af.length=0}var Au=Kr.ReactCurrentDispatcher,uf=Kr.ReactCurrentBatchConfig,di=0,et=null,vt=null,$t=null,cc=!1,Ps=!1,aa=0,kk=0;function Bt(){throw Error(U(321))}function gg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!rr(e[n],t[n]))return!1;return!0}function mg(e,t,n,r,o,i){if(di=i,et=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Au.current=e===null||e.memoizedState===null?Rk:Pk,e=n(r,o),Ps){i=0;do{if(Ps=!1,aa=0,25<=i)throw Error(U(301));i+=1,$t=vt=null,t.updateQueue=null,Au.current=Ok,e=n(r,o)}while(Ps)}if(Au.current=dc,t=vt!==null&&vt.next!==null,di=0,$t=vt=et=null,cc=!1,t)throw Error(U(300));return e}function vg(){var e=aa!==0;return aa=0,e}function ur(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?et.memoizedState=$t=e:$t=$t.next=e,$t}function Wn(){if(vt===null){var e=et.alternate;e=e!==null?e.memoizedState:null}else e=vt.next;var t=$t===null?et.memoizedState:$t.next;if(t!==null)$t=t,vt=e;else{if(e===null)throw Error(U(310));vt=e,e={memoizedState:vt.memoizedState,baseState:vt.baseState,baseQueue:vt.baseQueue,queue:vt.queue,next:null},$t===null?et.memoizedState=$t=e:$t=$t.next=e}return $t}function ua(e,t){return typeof t=="function"?t(e):t}function cf(e){var t=Wn(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=vt,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var s=l=null,a=null,u=i;do{var c=u.lane;if((di&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(s=a=d,l=r):a=a.next=d,et.lanes|=c,fi|=c}u=u.next}while(u!==null&&u!==i);a===null?l=r:a.next=s,rr(r,t.memoizedState)||(dn=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,et.lanes|=i,fi|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function df(e){var t=Wn(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var l=o=o.next;do i=e(i,l.action),l=l.next;while(l!==o);rr(i,t.memoizedState)||(dn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Ex(){}function Cx(e,t){var n=et,r=Wn(),o=t(),i=!rr(r.memoizedState,o);if(i&&(r.memoizedState=o,dn=!0),r=r.queue,yg(Tx.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||$t!==null&&$t.memoizedState.tag&1){if(n.flags|=2048,ca(9,kx.bind(null,n,r,o,t),void 0,null),Rt===null)throw Error(U(349));di&30||$x(n,t,o)}return o}function $x(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=et.updateQueue,t===null?(t={lastEffect:null,stores:null},et.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kx(e,t,n,r){t.value=n,t.getSnapshot=r,bx(t)&&Nx(e)}function Tx(e,t,n){return n(function(){bx(t)&&Nx(e)})}function bx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rr(e,n)}catch{return!0}}function Nx(e){var t=Br(e,1);t!==null&&nr(t,e,1,-1)}function zv(e){var t=ur();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:e},t.queue=e,e=e.dispatch=Nk.bind(null,et,e),[t.memoizedState,e]}function ca(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=et.updateQueue,t===null?(t={lastEffect:null,stores:null},et.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 Rx(){return Wn().memoizedState}function Mu(e,t,n,r){var o=ur();et.flags|=e,o.memoizedState=ca(1|t,n,void 0,r===void 0?null:r)}function qc(e,t,n,r){var o=Wn();r=r===void 0?null:r;var i=void 0;if(vt!==null){var l=vt.memoizedState;if(i=l.destroy,r!==null&&gg(r,l.deps)){o.memoizedState=ca(t,n,i,r);return}}et.flags|=e,o.memoizedState=ca(1|t,n,i,r)}function Fv(e,t){return Mu(8390656,8,e,t)}function yg(e,t){return qc(2048,8,e,t)}function Px(e,t){return qc(4,2,e,t)}function Ox(e,t){return qc(4,4,e,t)}function Ax(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 Mx(e,t,n){return n=n!=null?n.concat([e]):null,qc(4,4,Ax.bind(null,t,e),n)}function xg(){}function Lx(e,t){var n=Wn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Dx(e,t){var n=Wn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ix(e,t,n){return di&21?(rr(n,t)||(n=F1(),et.lanes|=n,fi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,dn=!0),e.memoizedState=n)}function Tk(e,t){var n=Oe;Oe=n!==0&&4>n?n:4,e(!0);var r=uf.transition;uf.transition={};try{e(!1),t()}finally{Oe=n,uf.transition=r}}function jx(){return Wn().memoizedState}function bk(e,t,n){var r=$o(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zx(e))Fx(t,n);else if(n=mx(e,t,n,r),n!==null){var o=on();nr(n,e,r,o),Bx(n,t,r)}}function Nk(e,t,n){var r=$o(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zx(e))Fx(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,rr(s,l)){var a=t.interleaved;a===null?(o.next=o,cg(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=mx(e,t,o,r),n!==null&&(o=on(),nr(n,e,r,o),Bx(n,t,r))}}function zx(e){var t=e.alternate;return e===et||t!==null&&t===et}function Fx(e,t){Ps=cc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qp(e,n)}}var dc={readContext:Bn,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useInsertionEffect:Bt,useLayoutEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useMutableSource:Bt,useSyncExternalStore:Bt,useId:Bt,unstable_isNewReconciler:!1},Rk={readContext:Bn,useCallback:function(e,t){return ur().memoizedState=[e,t===void 0?null:t],e},useContext:Bn,useEffect:Fv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Mu(4194308,4,Ax.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Mu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Mu(4,2,e,t)},useMemo:function(e,t){var n=ur();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ur();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=bk.bind(null,et,e),[r.memoizedState,e]},useRef:function(e){var t=ur();return e={current:e},t.memoizedState=e},useState:zv,useDebugValue:xg,useDeferredValue:function(e){return ur().memoizedState=e},useTransition:function(){var e=zv(!1),t=e[0];return e=Tk.bind(null,e[1]),ur().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=et,o=ur();if(Ye){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Rt===null)throw Error(U(349));di&30||$x(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Fv(Tx.bind(null,r,i,e),[e]),r.flags|=2048,ca(9,kx.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ur(),t=Rt.identifierPrefix;if(Ye){var n=Ir,r=Dr;n=(r&~(1<<32-tr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=aa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=kk++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Pk={readContext:Bn,useCallback:Lx,useContext:Bn,useEffect:yg,useImperativeHandle:Mx,useInsertionEffect:Px,useLayoutEffect:Ox,useMemo:Dx,useReducer:cf,useRef:Rx,useState:function(){return cf(ua)},useDebugValue:xg,useDeferredValue:function(e){var t=Wn();return Ix(t,vt.memoizedState,e)},useTransition:function(){var e=cf(ua)[0],t=Wn().memoizedState;return[e,t]},useMutableSource:Ex,useSyncExternalStore:Cx,useId:jx,unstable_isNewReconciler:!1},Ok={readContext:Bn,useCallback:Lx,useContext:Bn,useEffect:yg,useImperativeHandle:Mx,useInsertionEffect:Px,useLayoutEffect:Ox,useMemo:Dx,useReducer:df,useRef:Rx,useState:function(){return df(ua)},useDebugValue:xg,useDeferredValue:function(e){var t=Wn();return vt===null?t.memoizedState=e:Ix(t,vt.memoizedState,e)},useTransition:function(){var e=df(ua)[0],t=Wn().memoizedState;return[e,t]},useMutableSource:Ex,useSyncExternalStore:Cx,useId:jx,unstable_isNewReconciler:!1};function Cl(e,t){try{var n="",r=t;do n+=l$(r),r=r.return;while(r);var o=n}catch(i){o=`
31
+ Error generating stack: `+i.message+`
32
+ `+i.stack}return{value:e,source:t,stack:o,digest:null}}function ff(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function vh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Ak=typeof WeakMap=="function"?WeakMap:Map;function Wx(e,t,n){n=jr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){hc||(hc=!0,Th=r),vh(e,t)},n}function Ux(e,t,n){n=jr(-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(){vh(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){vh(e,t),typeof r!="function"&&(Co===null?Co=new Set([this]):Co.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Bv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ak;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=Gk.bind(null,e,t,n),t.then(e,e))}function Wv(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 Uv(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=jr(-1,1),t.tag=2,Eo(n,t,1))),n.lanes|=1),e)}var Mk=Kr.ReactCurrentOwner,dn=!1;function Qt(e,t,n,r){t.child=e===null?_x(t,null,n,r):Sl(t,e.child,n,r)}function Vv(e,t,n,r,o){n=n.render;var i=t.ref;return dl(t,o),r=mg(e,t,n,r,i,o),n=vg(),e!==null&&!dn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Wr(e,t,o)):(Ye&&n&&og(t),t.flags|=1,Qt(e,t,r,o),t.child)}function Hv(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Tg(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Vx(e,t,i,r,o)):(e=ju(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var l=i.memoizedProps;if(n=n.compare,n=n!==null?n:na,n(l,r)&&e.ref===t.ref)return Wr(e,t,o)}return t.flags|=1,e=ko(i,r),e.ref=t.ref,e.return=t,t.child=e}function Vx(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(na(i,r)&&e.ref===t.ref)if(dn=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(dn=!0);else return t.lanes=e.lanes,Wr(e,t,o)}return yh(e,t,n,r,o)}function Hx(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Fe(nl,yn),yn|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Fe(nl,yn),yn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Fe(nl,yn),yn|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Fe(nl,yn),yn|=r;return Qt(e,t,o,n),t.child}function Kx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function yh(e,t,n,r,o){var i=hn(n)?ui:Xt.current;return i=wl(t,i),dl(t,o),n=mg(e,t,n,r,i,o),r=vg(),e!==null&&!dn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Wr(e,t,o)):(Ye&&r&&og(t),t.flags|=1,Qt(e,t,n,o),t.child)}function Kv(e,t,n,r,o){if(hn(n)){var i=!0;rc(t)}else i=!1;if(dl(t,o),t.stateNode===null)Lu(e,t),xx(t,n,r),mh(t,n,r,o),r=!0;else if(e===null){var l=t.stateNode,s=t.memoizedProps;l.props=s;var a=l.context,u=n.contextType;typeof u=="object"&&u!==null?u=Bn(u):(u=hn(n)?ui:Xt.current,u=wl(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";d||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==r||a!==u)&&Iv(t,l,r,u),uo=!1;var f=t.memoizedState;l.state=f,ac(t,r,l,o),a=t.memoizedState,s!==r||f!==a||fn.current||uo?(typeof c=="function"&&(gh(t,n,c,r),a=t.memoizedState),(s=uo||Dv(t,n,s,r,f,a,u))?(d||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),l.props=r,l.state=a,l.context=u,r=s):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,vx(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Xn(t.type,s),l.props=u,d=t.pendingProps,f=l.context,a=n.contextType,typeof a=="object"&&a!==null?a=Bn(a):(a=hn(n)?ui:Xt.current,a=wl(t,a));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==d||f!==a)&&Iv(t,l,r,a),uo=!1,f=t.memoizedState,l.state=f,ac(t,r,l,o);var m=t.memoizedState;s!==d||f!==m||fn.current||uo?(typeof h=="function"&&(gh(t,n,h,r),m=t.memoizedState),(u=uo||Dv(t,n,u,r,f,m,a)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,m,a),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,m,a)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),l.props=r,l.state=m,l.context=a,r=u):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return xh(e,t,n,r,i,o)}function xh(e,t,n,r,o,i){Kx(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return o&&Pv(t,n,!1),Wr(e,t,i);r=t.stateNode,Mk.current=t;var s=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Sl(t,e.child,null,i),t.child=Sl(t,null,s,i)):Qt(e,t,s,i),t.memoizedState=r.state,o&&Pv(t,n,!0),t.child}function Gx(e){var t=e.stateNode;t.pendingContext?Rv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rv(e,t.context,!1),fg(e,t.containerInfo)}function Gv(e,t,n,r,o){return _l(),lg(o),t.flags|=256,Qt(e,t,n,r),t.child}var wh={dehydrated:null,treeContext:null,retryLane:0};function _h(e){return{baseLanes:e,cachePool:null,transitions:null}}function Yx(e,t,n){var r=t.pendingProps,o=Ze.current,i=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Fe(Ze,o&1),e===null)return hh(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):(l=r.children,e=r.fallback,i?(r=t.mode,i=t.child,l={mode:"hidden",children:l},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=l):i=nd(l,r,0,null),e=oi(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=_h(n),t.memoizedState=wh,e):wg(t,l));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return Lk(e,t,l,r,s,o,n);if(i){i=r.fallback,l=t.mode,o=e.child,s=o.sibling;var a={mode:"hidden",children:r.children};return!(l&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=ko(o,a),r.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=ko(s,i):(i=oi(i,l,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,l=e.child.memoizedState,l=l===null?_h(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~n,t.memoizedState=wh,r}return i=e.child,e=i.sibling,r=ko(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function wg(e,t){return t=nd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function au(e,t,n,r){return r!==null&&lg(r),Sl(t,e.child,null,n),e=wg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Lk(e,t,n,r,o,i,l){if(n)return t.flags&256?(t.flags&=-257,r=ff(Error(U(422))),au(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=nd({mode:"visible",children:r.children},o,0,null),i=oi(i,o,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Sl(t,e.child,null,l),t.child.memoizedState=_h(l),t.memoizedState=wh,i);if(!(t.mode&1))return au(e,t,l,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var s=r.dgst;return r=s,i=Error(U(419)),r=ff(i,r,void 0),au(e,t,l,r)}if(s=(l&e.childLanes)!==0,dn||s){if(r=Rt,r!==null){switch(l&-l){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|l)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Br(e,o),nr(r,e,o,-1))}return kg(),r=ff(Error(U(421))),au(e,t,l,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Yk.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,_n=So(o.nextSibling),Sn=t,Ye=!0,Zn=null,e!==null&&(Mn[Ln++]=Dr,Mn[Ln++]=Ir,Mn[Ln++]=ci,Dr=e.id,Ir=e.overflow,ci=t),t=wg(t,r.children),t.flags|=4096,t)}function Yv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ph(e.return,t,n)}function hf(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Xx(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Qt(e,t,r.children,n),r=Ze.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&&Yv(e,n,t);else if(e.tag===19)Yv(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(Fe(Ze,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&&uc(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),hf(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&uc(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}hf(t,!0,n,null,i);break;case"together":hf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Lu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),fi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=ko(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ko(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dk(e,t,n){switch(t.tag){case 3:Gx(t),_l();break;case 5:Sx(t);break;case 1:hn(t.type)&&rc(t);break;case 4:fg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Fe(lc,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Fe(Ze,Ze.current&1),t.flags|=128,null):n&t.child.childLanes?Yx(e,t,n):(Fe(Ze,Ze.current&1),e=Wr(e,t,n),e!==null?e.sibling:null);Fe(Ze,Ze.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Xx(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Fe(Ze,Ze.current),r)break;return null;case 22:case 23:return t.lanes=0,Hx(e,t,n)}return Wr(e,t,n)}var Qx,Sh,Jx,Zx;Qx=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}};Sh=function(){};Jx=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ei(vr.current);var i=null;switch(n){case"input":o=Vf(e,o),r=Vf(e,r),i=[];break;case"select":o=nt({},o,{value:void 0}),r=nt({},r,{value:void 0}),i=[];break;case"textarea":o=Gf(e,o),r=Gf(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=tc)}Xf(n,r);var l;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var s=o[u];for(l in s)s.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Xs.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(s=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&a!==s&&(a!=null||s!=null))if(u==="style")if(s){for(l in s)!s.hasOwnProperty(l)||a&&a.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in a)a.hasOwnProperty(l)&&s[l]!==a[l]&&(n||(n={}),n[l]=a[l])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Xs.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Ue("scroll",e),i||s===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Zx=function(e,t,n,r){n!==r&&(t.flags|=4)};function us(e,t){if(!Ye)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 Wt(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 Ik(e,t,n){var r=t.pendingProps;switch(ig(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wt(t),null;case 1:return hn(t.type)&&nc(),Wt(t),null;case 3:return r=t.stateNode,El(),Ge(fn),Ge(Xt),pg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(lu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Zn!==null&&(Rh(Zn),Zn=null))),Sh(e,t),Wt(t),null;case 5:hg(t);var o=ei(sa.current);if(n=t.type,e!==null&&t.stateNode!=null)Jx(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return Wt(t),null}if(e=ei(vr.current),lu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[dr]=t,r[ia]=i,e=(t.mode&1)!==0,n){case"dialog":Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":case"embed":Ue("load",r);break;case"video":case"audio":for(o=0;o<_s.length;o++)Ue(_s[o],r);break;case"source":Ue("error",r);break;case"img":case"image":case"link":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"input":rv(r,i),Ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Ue("invalid",r);break;case"textarea":iv(r,i),Ue("invalid",r)}Xf(n,i),o=null;for(var l in i)if(i.hasOwnProperty(l)){var s=i[l];l==="children"?typeof s=="string"?r.textContent!==s&&(i.suppressHydrationWarning!==!0&&iu(r.textContent,s,e),o=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&iu(r.textContent,s,e),o=["children",""+s]):Xs.hasOwnProperty(l)&&s!=null&&l==="onScroll"&&Ue("scroll",r)}switch(n){case"input":Ja(r),ov(r,i,!0);break;case"textarea":Ja(r),lv(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=tc)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=$1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[dr]=t,e[ia]=r,Qx(e,t,!1,!1),t.stateNode=e;e:{switch(l=Qf(n,r),n){case"dialog":Ue("cancel",e),Ue("close",e),o=r;break;case"iframe":case"object":case"embed":Ue("load",e),o=r;break;case"video":case"audio":for(o=0;o<_s.length;o++)Ue(_s[o],e);o=r;break;case"source":Ue("error",e),o=r;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),o=r;break;case"details":Ue("toggle",e),o=r;break;case"input":rv(e,r),o=Vf(e,r),Ue("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=nt({},r,{value:void 0}),Ue("invalid",e);break;case"textarea":iv(e,r),o=Gf(e,r),Ue("invalid",e);break;default:o=r}Xf(n,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="style"?b1(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&k1(e,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Qs(e,a):typeof a=="number"&&Qs(e,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Xs.hasOwnProperty(i)?a!=null&&i==="onScroll"&&Ue("scroll",e):a!=null&&Vp(e,i,a,l))}switch(n){case"input":Ja(e),ov(e,r,!1);break;case"textarea":Ja(e),lv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+No(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?sl(e,!!r.multiple,i,!1):r.defaultValue!=null&&sl(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=tc)}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 Wt(t),null;case 6:if(e&&t.stateNode!=null)Zx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=ei(sa.current),ei(vr.current),lu(t)){if(r=t.stateNode,n=t.memoizedProps,r[dr]=t,(i=r.nodeValue!==n)&&(e=Sn,e!==null))switch(e.tag){case 3:iu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&iu(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[dr]=t,t.stateNode=r}return Wt(t),null;case 13:if(Ge(Ze),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ye&&_n!==null&&t.mode&1&&!(t.flags&128))gx(),_l(),t.flags|=98560,i=!1;else if(i=lu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[dr]=t}else _l(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wt(t),i=!1}else Zn!==null&&(Rh(Zn),Zn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ze.current&1?wt===0&&(wt=3):kg())),t.updateQueue!==null&&(t.flags|=4),Wt(t),null);case 4:return El(),Sh(e,t),e===null&&ra(t.stateNode.containerInfo),Wt(t),null;case 10:return ug(t.type._context),Wt(t),null;case 17:return hn(t.type)&&nc(),Wt(t),null;case 19:if(Ge(Ze),i=t.memoizedState,i===null)return Wt(t),null;if(r=(t.flags&128)!==0,l=i.rendering,l===null)if(r)us(i,!1);else{if(wt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=uc(e),l!==null){for(t.flags|=128,us(i,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,l=i.alternate,l===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Fe(Ze,Ze.current&1|2),t.child}e=e.sibling}i.tail!==null&&ct()>$l&&(t.flags|=128,r=!0,us(i,!1),t.lanes=4194304)}else{if(!r)if(e=uc(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),us(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Ye)return Wt(t),null}else 2*ct()-i.renderingStartTime>$l&&n!==1073741824&&(t.flags|=128,r=!0,us(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ct(),t.sibling=null,n=Ze.current,Fe(Ze,r?n&1|2:n&1),t):(Wt(t),null);case 22:case 23:return $g(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?yn&1073741824&&(Wt(t),t.subtreeFlags&6&&(t.flags|=8192)):Wt(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function jk(e,t){switch(ig(t),t.tag){case 1:return hn(t.type)&&nc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return El(),Ge(fn),Ge(Xt),pg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return hg(t),null;case 13:if(Ge(Ze),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));_l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(Ze),null;case 4:return El(),null;case 10:return ug(t.type._context),null;case 22:case 23:return $g(),null;case 24:return null;default:return null}}var uu=!1,Vt=!1,zk=typeof WeakSet=="function"?WeakSet:Set,q=null;function tl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){rt(e,t,r)}else n.current=null}function Eh(e,t,n){try{n()}catch(r){rt(e,t,r)}}var Xv=!1;function Fk(e,t){if(lh=Zu,e=nx(),rg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||o!==0&&d.nodeType!==3||(s=l+o),d!==i||r!==0&&d.nodeType!==3||(a=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=l),f===i&&++c===r&&(a=l),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(sh={focusedElem:e,selectionRange:n},Zu=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,S=m.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Xn(t.type,g),S);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(w){rt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return m=Xv,Xv=!1,m}function Os(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Eh(t,n,i)}o=o.next}while(o!==r)}}function ed(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 Ch(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 qx(e){var t=e.alternate;t!==null&&(e.alternate=null,qx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[dr],delete t[ia],delete t[ch],delete t[Sk],delete t[Ek])),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 ew(e){return e.tag===5||e.tag===3||e.tag===4}function Qv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ew(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 $h(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=tc));else if(r!==4&&(e=e.child,e!==null))for($h(e,t,n),e=e.sibling;e!==null;)$h(e,t,n),e=e.sibling}function kh(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(kh(e,t,n),e=e.sibling;e!==null;)kh(e,t,n),e=e.sibling}var Mt=null,Qn=!1;function no(e,t,n){for(n=n.child;n!==null;)tw(e,t,n),n=n.sibling}function tw(e,t,n){if(mr&&typeof mr.onCommitFiberUnmount=="function")try{mr.onCommitFiberUnmount(Kc,n)}catch{}switch(n.tag){case 5:Vt||tl(n,t);case 6:var r=Mt,o=Qn;Mt=null,no(e,t,n),Mt=r,Qn=o,Mt!==null&&(Qn?(e=Mt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Mt.removeChild(n.stateNode));break;case 18:Mt!==null&&(Qn?(e=Mt,n=n.stateNode,e.nodeType===8?lf(e.parentNode,n):e.nodeType===1&&lf(e,n),ea(e)):lf(Mt,n.stateNode));break;case 4:r=Mt,o=Qn,Mt=n.stateNode.containerInfo,Qn=!0,no(e,t,n),Mt=r,Qn=o;break;case 0:case 11:case 14:case 15:if(!Vt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Eh(n,t,l),o=o.next}while(o!==r)}no(e,t,n);break;case 1:if(!Vt&&(tl(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){rt(n,t,s)}no(e,t,n);break;case 21:no(e,t,n);break;case 22:n.mode&1?(Vt=(r=Vt)||n.memoizedState!==null,no(e,t,n),Vt=r):no(e,t,n);break;default:no(e,t,n)}}function Jv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new zk),t.forEach(function(r){var o=Xk.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Kn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,l=t,s=l;e:for(;s!==null;){switch(s.tag){case 5:Mt=s.stateNode,Qn=!1;break e;case 3:Mt=s.stateNode.containerInfo,Qn=!0;break e;case 4:Mt=s.stateNode.containerInfo,Qn=!0;break e}s=s.return}if(Mt===null)throw Error(U(160));tw(i,l,o),Mt=null,Qn=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){rt(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)nw(t,e),t=t.sibling}function nw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Kn(t,e),ar(e),r&4){try{Os(3,e,e.return),ed(3,e)}catch(g){rt(e,e.return,g)}try{Os(5,e,e.return)}catch(g){rt(e,e.return,g)}}break;case 1:Kn(t,e),ar(e),r&512&&n!==null&&tl(n,n.return);break;case 5:if(Kn(t,e),ar(e),r&512&&n!==null&&tl(n,n.return),e.flags&32){var o=e.stateNode;try{Qs(o,"")}catch(g){rt(e,e.return,g)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,l=n!==null?n.memoizedProps:i,s=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&E1(o,i),Qf(s,l);var u=Qf(s,i);for(l=0;l<a.length;l+=2){var c=a[l],d=a[l+1];c==="style"?b1(o,d):c==="dangerouslySetInnerHTML"?k1(o,d):c==="children"?Qs(o,d):Vp(o,c,d,u)}switch(s){case"input":Hf(o,i);break;case"textarea":C1(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?sl(o,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?sl(o,!!i.multiple,i.defaultValue,!0):sl(o,!!i.multiple,i.multiple?[]:"",!1))}o[ia]=i}catch(g){rt(e,e.return,g)}}break;case 6:if(Kn(t,e),ar(e),r&4){if(e.stateNode===null)throw Error(U(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){rt(e,e.return,g)}}break;case 3:if(Kn(t,e),ar(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ea(t.containerInfo)}catch(g){rt(e,e.return,g)}break;case 4:Kn(t,e),ar(e);break;case 13:Kn(t,e),ar(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Eg=ct())),r&4&&Jv(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Vt=(u=Vt)||c,Kn(t,e),Vt=u):Kn(t,e),ar(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(q=e,c=e.child;c!==null;){for(d=q=c;q!==null;){switch(f=q,h=f.child,f.tag){case 0:case 11:case 14:case 15:Os(4,f,f.return);break;case 1:tl(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){rt(r,n,g)}}break;case 5:tl(f,f.return);break;case 22:if(f.memoizedState!==null){qv(d);continue}}h!==null?(h.return=f,q=h):qv(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{o=d.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=d.stateNode,a=d.memoizedProps.style,l=a!=null&&a.hasOwnProperty("display")?a.display:null,s.style.display=T1("display",l))}catch(g){rt(e,e.return,g)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){rt(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Kn(t,e),ar(e),r&4&&Jv(e);break;case 21:break;default:Kn(t,e),ar(e)}}function ar(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ew(n)){var r=n;break e}n=n.return}throw Error(U(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Qs(o,""),r.flags&=-33);var i=Qv(e);kh(e,i,o);break;case 3:case 4:var l=r.stateNode.containerInfo,s=Qv(e);$h(e,s,l);break;default:throw Error(U(161))}}catch(a){rt(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Bk(e,t,n){q=e,rw(e)}function rw(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var o=q,i=o.child;if(o.tag===22&&r){var l=o.memoizedState!==null||uu;if(!l){var s=o.alternate,a=s!==null&&s.memoizedState!==null||Vt;s=uu;var u=Vt;if(uu=l,(Vt=a)&&!u)for(q=o;q!==null;)l=q,a=l.child,l.tag===22&&l.memoizedState!==null?ey(o):a!==null?(a.return=l,q=a):ey(o);for(;i!==null;)q=i,rw(i),i=i.sibling;q=o,uu=s,Vt=u}Zv(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,q=i):Zv(e)}}function Zv(e){for(;q!==null;){var t=q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Vt||ed(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Vt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Xn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Lv(t,i,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Lv(t,l,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;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 u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&ea(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}Vt||t.flags&512&&Ch(t)}catch(f){rt(t,t.return,f)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function qv(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}function ey(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ed(4,t)}catch(a){rt(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){rt(t,o,a)}}var i=t.return;try{Ch(t)}catch(a){rt(t,i,a)}break;case 5:var l=t.return;try{Ch(t)}catch(a){rt(t,l,a)}}}catch(a){rt(t,t.return,a)}if(t===e){q=null;break}var s=t.sibling;if(s!==null){s.return=t.return,q=s;break}q=t.return}}var Wk=Math.ceil,fc=Kr.ReactCurrentDispatcher,_g=Kr.ReactCurrentOwner,Fn=Kr.ReactCurrentBatchConfig,ke=0,Rt=null,dt=null,Dt=0,yn=0,nl=Fo(0),wt=0,da=null,fi=0,td=0,Sg=0,As=null,cn=null,Eg=0,$l=1/0,Rr=null,hc=!1,Th=null,Co=null,cu=!1,mo=null,pc=0,Ms=0,bh=null,Du=-1,Iu=0;function on(){return ke&6?ct():Du!==-1?Du:Du=ct()}function $o(e){return e.mode&1?ke&2&&Dt!==0?Dt&-Dt:$k.transition!==null?(Iu===0&&(Iu=F1()),Iu):(e=Oe,e!==0||(e=window.event,e=e===void 0?16:G1(e.type)),e):1}function nr(e,t,n,r){if(50<Ms)throw Ms=0,bh=null,Error(U(185));Ra(e,n,r),(!(ke&2)||e!==Rt)&&(e===Rt&&(!(ke&2)&&(td|=n),wt===4&&ho(e,Dt)),pn(e,r),n===1&&ke===0&&!(t.mode&1)&&($l=ct()+500,Jc&&Bo()))}function pn(e,t){var n=e.callbackNode;$$(e,t);var r=Ju(e,e===Rt?Dt:0);if(r===0)n!==null&&uv(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&uv(n),t===1)e.tag===0?Ck(ty.bind(null,e)):fx(ty.bind(null,e)),wk(function(){!(ke&6)&&Bo()}),n=null;else{switch(B1(r)){case 1:n=Xp;break;case 4:n=j1;break;case 16:n=Qu;break;case 536870912:n=z1;break;default:n=Qu}n=dw(n,ow.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ow(e,t){if(Du=-1,Iu=0,ke&6)throw Error(U(327));var n=e.callbackNode;if(fl()&&e.callbackNode!==n)return null;var r=Ju(e,e===Rt?Dt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=gc(e,r);else{t=r;var o=ke;ke|=2;var i=lw();(Rt!==e||Dt!==t)&&(Rr=null,$l=ct()+500,ri(e,t));do try{Hk();break}catch(s){iw(e,s)}while(1);ag(),fc.current=i,ke=o,dt!==null?t=0:(Rt=null,Dt=0,t=wt)}if(t!==0){if(t===2&&(o=th(e),o!==0&&(r=o,t=Nh(e,o))),t===1)throw n=da,ri(e,0),ho(e,r),pn(e,ct()),n;if(t===6)ho(e,r);else{if(o=e.current.alternate,!(r&30)&&!Uk(o)&&(t=gc(e,r),t===2&&(i=th(e),i!==0&&(r=i,t=Nh(e,i))),t===1))throw n=da,ri(e,0),ho(e,r),pn(e,ct()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:Xo(e,cn,Rr);break;case 3:if(ho(e,r),(r&130023424)===r&&(t=Eg+500-ct(),10<t)){if(Ju(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){on(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=uh(Xo.bind(null,e,cn,Rr),t);break}Xo(e,cn,Rr);break;case 4:if(ho(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var l=31-tr(r);i=1<<l,l=t[l],l>o&&(o=l),r&=~i}if(r=o,r=ct()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Wk(r/1960))-r,10<r){e.timeoutHandle=uh(Xo.bind(null,e,cn,Rr),r);break}Xo(e,cn,Rr);break;case 5:Xo(e,cn,Rr);break;default:throw Error(U(329))}}}return pn(e,ct()),e.callbackNode===n?ow.bind(null,e):null}function Nh(e,t){var n=As;return e.current.memoizedState.isDehydrated&&(ri(e,t).flags|=256),e=gc(e,t),e!==2&&(t=cn,cn=n,t!==null&&Rh(t)),e}function Rh(e){cn===null?cn=e:cn.push.apply(cn,e)}function Uk(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],i=o.getSnapshot;o=o.value;try{if(!rr(i(),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 ho(e,t){for(t&=~Sg,t&=~td,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-tr(t),r=1<<n;e[n]=-1,t&=~r}}function ty(e){if(ke&6)throw Error(U(327));fl();var t=Ju(e,0);if(!(t&1))return pn(e,ct()),null;var n=gc(e,t);if(e.tag!==0&&n===2){var r=th(e);r!==0&&(t=r,n=Nh(e,r))}if(n===1)throw n=da,ri(e,0),ho(e,t),pn(e,ct()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xo(e,cn,Rr),pn(e,ct()),null}function Cg(e,t){var n=ke;ke|=1;try{return e(t)}finally{ke=n,ke===0&&($l=ct()+500,Jc&&Bo())}}function hi(e){mo!==null&&mo.tag===0&&!(ke&6)&&fl();var t=ke;ke|=1;var n=Fn.transition,r=Oe;try{if(Fn.transition=null,Oe=1,e)return e()}finally{Oe=r,Fn.transition=n,ke=t,!(ke&6)&&Bo()}}function $g(){yn=nl.current,Ge(nl)}function ri(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,xk(n)),dt!==null)for(n=dt.return;n!==null;){var r=n;switch(ig(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&nc();break;case 3:El(),Ge(fn),Ge(Xt),pg();break;case 5:hg(r);break;case 4:El();break;case 13:Ge(Ze);break;case 19:Ge(Ze);break;case 10:ug(r.type._context);break;case 22:case 23:$g()}n=n.return}if(Rt=e,dt=e=ko(e.current,null),Dt=yn=t,wt=0,da=null,Sg=td=fi=0,cn=As=null,qo!==null){for(t=0;t<qo.length;t++)if(n=qo[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var l=i.next;i.next=o,r.next=l}n.pending=r}qo=null}return e}function iw(e,t){do{var n=dt;try{if(ag(),Au.current=dc,cc){for(var r=et.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}cc=!1}if(di=0,$t=vt=et=null,Ps=!1,aa=0,_g.current=null,n===null||n.return===null){wt=1,da=t,dt=null;break}e:{var i=e,l=n.return,s=n,a=t;if(t=Dt,s.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Wv(l);if(h!==null){h.flags&=-257,Uv(h,l,s,i,t),h.mode&1&&Bv(i,u,t),t=h,a=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(a),t.updateQueue=g}else m.add(a);break e}else{if(!(t&1)){Bv(i,u,t),kg();break e}a=Error(U(426))}}else if(Ye&&s.mode&1){var S=Wv(l);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Uv(S,l,s,i,t),lg(Cl(a,s));break e}}i=a=Cl(a,s),wt!==4&&(wt=2),As===null?As=[i]:As.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=Wx(i,a,t);Mv(i,v);break e;case 1:s=a;var y=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Co===null||!Co.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var w=Ux(i,s,t);Mv(i,w);break e}}i=i.return}while(i!==null)}aw(n)}catch(k){t=k,dt===n&&n!==null&&(dt=n=n.return);continue}break}while(1)}function lw(){var e=fc.current;return fc.current=dc,e===null?dc:e}function kg(){(wt===0||wt===3||wt===2)&&(wt=4),Rt===null||!(fi&268435455)&&!(td&268435455)||ho(Rt,Dt)}function gc(e,t){var n=ke;ke|=2;var r=lw();(Rt!==e||Dt!==t)&&(Rr=null,ri(e,t));do try{Vk();break}catch(o){iw(e,o)}while(1);if(ag(),ke=n,fc.current=r,dt!==null)throw Error(U(261));return Rt=null,Dt=0,wt}function Vk(){for(;dt!==null;)sw(dt)}function Hk(){for(;dt!==null&&!m$();)sw(dt)}function sw(e){var t=cw(e.alternate,e,yn);e.memoizedProps=e.pendingProps,t===null?aw(e):dt=t,_g.current=null}function aw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=jk(n,t),n!==null){n.flags&=32767,dt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{wt=6,dt=null;return}}else if(n=Ik(n,t,yn),n!==null){dt=n;return}if(t=t.sibling,t!==null){dt=t;return}dt=t=e}while(t!==null);wt===0&&(wt=5)}function Xo(e,t,n){var r=Oe,o=Fn.transition;try{Fn.transition=null,Oe=1,Kk(e,t,n,r)}finally{Fn.transition=o,Oe=r}return null}function Kk(e,t,n,r){do fl();while(mo!==null);if(ke&6)throw Error(U(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(U(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(k$(e,i),e===Rt&&(dt=Rt=null,Dt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||cu||(cu=!0,dw(Qu,function(){return fl(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Fn.transition,Fn.transition=null;var l=Oe;Oe=1;var s=ke;ke|=4,_g.current=null,Fk(e,n),nw(n,e),fk(sh),Zu=!!lh,sh=lh=null,e.current=n,Bk(n),v$(),ke=s,Oe=l,Fn.transition=i}else e.current=n;if(cu&&(cu=!1,mo=e,pc=o),i=e.pendingLanes,i===0&&(Co=null),w$(n.stateNode),pn(e,ct()),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(hc)throw hc=!1,e=Th,Th=null,e;return pc&1&&e.tag!==0&&fl(),i=e.pendingLanes,i&1?e===bh?Ms++:(Ms=0,bh=e):Ms=0,Bo(),null}function fl(){if(mo!==null){var e=B1(pc),t=Fn.transition,n=Oe;try{if(Fn.transition=null,Oe=16>e?16:e,mo===null)var r=!1;else{if(e=mo,mo=null,pc=0,ke&6)throw Error(U(331));var o=ke;for(ke|=4,q=e.current;q!==null;){var i=q,l=i.child;if(q.flags&16){var s=i.deletions;if(s!==null){for(var a=0;a<s.length;a++){var u=s[a];for(q=u;q!==null;){var c=q;switch(c.tag){case 0:case 11:case 15:Os(8,c,i)}var d=c.child;if(d!==null)d.return=c,q=d;else for(;q!==null;){c=q;var f=c.sibling,h=c.return;if(qx(c),c===u){q=null;break}if(f!==null){f.return=h,q=f;break}q=h}}}var m=i.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var S=g.sibling;g.sibling=null,g=S}while(g!==null)}}q=i}}if(i.subtreeFlags&2064&&l!==null)l.return=i,q=l;else e:for(;q!==null;){if(i=q,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Os(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,q=v;break e}q=i.return}}var y=e.current;for(q=y;q!==null;){l=q;var x=l.child;if(l.subtreeFlags&2064&&x!==null)x.return=l,q=x;else e:for(l=y;q!==null;){if(s=q,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:ed(9,s)}}catch(k){rt(s,s.return,k)}if(s===l){q=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,q=w;break e}q=s.return}}if(ke=o,Bo(),mr&&typeof mr.onPostCommitFiberRoot=="function")try{mr.onPostCommitFiberRoot(Kc,e)}catch{}r=!0}return r}finally{Oe=n,Fn.transition=t}}return!1}function ny(e,t,n){t=Cl(n,t),t=Wx(e,t,1),e=Eo(e,t,1),t=on(),e!==null&&(Ra(e,1,t),pn(e,t))}function rt(e,t,n){if(e.tag===3)ny(e,e,n);else for(;t!==null;){if(t.tag===3){ny(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Co===null||!Co.has(r))){e=Cl(n,e),e=Ux(t,e,1),t=Eo(t,e,1),e=on(),t!==null&&(Ra(t,1,e),pn(t,e));break}}t=t.return}}function Gk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=on(),e.pingedLanes|=e.suspendedLanes&n,Rt===e&&(Dt&n)===n&&(wt===4||wt===3&&(Dt&130023424)===Dt&&500>ct()-Eg?ri(e,0):Sg|=n),pn(e,t)}function uw(e,t){t===0&&(e.mode&1?(t=eu,eu<<=1,!(eu&130023424)&&(eu=4194304)):t=1);var n=on();e=Br(e,t),e!==null&&(Ra(e,t,n),pn(e,n))}function Yk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),uw(e,n)}function Xk(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(U(314))}r!==null&&r.delete(t),uw(e,n)}var cw;cw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fn.current)dn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return dn=!1,Dk(e,t,n);dn=!!(e.flags&131072)}else dn=!1,Ye&&t.flags&1048576&&hx(t,ic,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Lu(e,t),e=t.pendingProps;var o=wl(t,Xt.current);dl(t,n),o=mg(null,t,r,e,o,n);var i=vg();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,hn(r)?(i=!0,rc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,dg(t),o.updater=Zc,t.stateNode=o,o._reactInternals=t,mh(t,r,e,n),t=xh(null,t,r,!0,i,n)):(t.tag=0,Ye&&i&&og(t),Qt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Lu(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Jk(r),e=Xn(r,e),o){case 0:t=yh(null,t,r,e,n);break e;case 1:t=Kv(null,t,r,e,n);break e;case 11:t=Vv(null,t,r,e,n);break e;case 14:t=Hv(null,t,r,Xn(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xn(r,o),yh(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xn(r,o),Kv(e,t,r,o,n);case 3:e:{if(Gx(t),e===null)throw Error(U(387));r=t.pendingProps,i=t.memoizedState,o=i.element,vx(e,t),ac(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Cl(Error(U(423)),t),t=Gv(e,t,r,n,o);break e}else if(r!==o){o=Cl(Error(U(424)),t),t=Gv(e,t,r,n,o);break e}else for(_n=So(t.stateNode.containerInfo.firstChild),Sn=t,Ye=!0,Zn=null,n=_x(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_l(),r===o){t=Wr(e,t,n);break e}Qt(e,t,r,n)}t=t.child}return t;case 5:return Sx(t),e===null&&hh(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,ah(r,o)?l=null:i!==null&&ah(r,i)&&(t.flags|=32),Kx(e,t),Qt(e,t,l,n),t.child;case 6:return e===null&&hh(t),null;case 13:return Yx(e,t,n);case 4:return fg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Sl(t,null,r,n):Qt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xn(r,o),Vv(e,t,r,o,n);case 7:return Qt(e,t,t.pendingProps,n),t.child;case 8:return Qt(e,t,t.pendingProps.children,n),t.child;case 12:return Qt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Fe(lc,r._currentValue),r._currentValue=l,i!==null)if(rr(i.value,l)){if(i.children===o.children&&!fn.current){t=Wr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=jr(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),ph(i.return,n,t),s.lanes|=n;break}a=a.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(U(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),ph(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}Qt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,dl(t,n),o=Bn(o),r=r(o),t.flags|=1,Qt(e,t,r,n),t.child;case 14:return r=t.type,o=Xn(r,t.pendingProps),o=Xn(r.type,o),Hv(e,t,r,o,n);case 15:return Vx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xn(r,o),Lu(e,t),t.tag=1,hn(r)?(e=!0,rc(t)):e=!1,dl(t,n),xx(t,r,o),mh(t,r,o,n),xh(null,t,r,!0,e,n);case 19:return Xx(e,t,n);case 22:return Hx(e,t,n)}throw Error(U(156,t.tag))};function dw(e,t){return I1(e,t)}function Qk(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 jn(e,t,n,r){return new Qk(e,t,n,r)}function Tg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jk(e){if(typeof e=="function")return Tg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Kp)return 11;if(e===Gp)return 14}return 2}function ko(e,t){var n=e.alternate;return n===null?(n=jn(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 ju(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")Tg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Ki:return oi(n.children,o,i,t);case Hp:l=8,o|=8;break;case Ff:return e=jn(12,n,t,o|2),e.elementType=Ff,e.lanes=i,e;case Bf:return e=jn(13,n,t,o),e.elementType=Bf,e.lanes=i,e;case Wf:return e=jn(19,n,t,o),e.elementType=Wf,e.lanes=i,e;case w1:return nd(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case y1:l=10;break e;case x1:l=9;break e;case Kp:l=11;break e;case Gp:l=14;break e;case ao:l=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=jn(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function oi(e,t,n,r){return e=jn(7,e,r,t),e.lanes=n,e}function nd(e,t,n,r){return e=jn(22,e,r,t),e.elementType=w1,e.lanes=n,e.stateNode={isHidden:!1},e}function pf(e,t,n){return e=jn(6,e,null,t),e.lanes=n,e}function gf(e,t,n){return t=jn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zk(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=Yd(0),this.expirationTimes=Yd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yd(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function bg(e,t,n,r,o,i,l,s,a){return e=new Zk(e,t,n,s,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=jn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},dg(i),e}function qk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Hi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function fw(e){if(!e)return Ro;e=e._reactInternals;e:{if(Si(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(hn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var n=e.type;if(hn(n))return dx(e,n,t)}return t}function hw(e,t,n,r,o,i,l,s,a){return e=bg(n,r,!0,e,o,i,l,s,a),e.context=fw(null),n=e.current,r=on(),o=$o(n),i=jr(r,o),i.callback=t??null,Eo(n,i,o),e.current.lanes=o,Ra(e,o,r),pn(e,r),e}function rd(e,t,n,r){var o=t.current,i=on(),l=$o(o);return n=fw(n),t.context===null?t.context=n:t.pendingContext=n,t=jr(i,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Eo(o,t,l),e!==null&&(nr(e,o,l,i),Ou(e,o,l)),l}function mc(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 ry(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ng(e,t){ry(e,t),(e=e.alternate)&&ry(e,t)}function eT(){return null}var pw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Rg(e){this._internalRoot=e}od.prototype.render=Rg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));rd(e,t,null,null)};od.prototype.unmount=Rg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hi(function(){rd(null,e,null,null)}),t[Fr]=null}};function od(e){this._internalRoot=e}od.prototype.unstable_scheduleHydration=function(e){if(e){var t=V1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<fo.length&&t!==0&&t<fo[n].priority;n++);fo.splice(n,0,e),n===0&&K1(e)}};function Pg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function id(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function oy(){}function tT(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=mc(l);i.call(u)}}var l=hw(t,r,e,0,null,!1,!1,"",oy);return e._reactRootContainer=l,e[Fr]=l.current,ra(e.nodeType===8?e.parentNode:e),hi(),l}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var s=r;r=function(){var u=mc(a);s.call(u)}}var a=bg(e,0,!1,null,null,!1,!1,"",oy);return e._reactRootContainer=a,e[Fr]=a.current,ra(e.nodeType===8?e.parentNode:e),hi(function(){rd(t,a,n,r)}),a}function ld(e,t,n,r,o){var i=n._reactRootContainer;if(i){var l=i;if(typeof o=="function"){var s=o;o=function(){var a=mc(l);s.call(a)}}rd(t,l,e,o)}else l=tT(n,t,e,o,r);return mc(l)}W1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ws(t.pendingLanes);n!==0&&(Qp(t,n|1),pn(t,ct()),!(ke&6)&&($l=ct()+500,Bo()))}break;case 13:hi(function(){var r=Br(e,1);if(r!==null){var o=on();nr(r,e,1,o)}}),Ng(e,1)}};Jp=function(e){if(e.tag===13){var t=Br(e,134217728);if(t!==null){var n=on();nr(t,e,134217728,n)}Ng(e,134217728)}};U1=function(e){if(e.tag===13){var t=$o(e),n=Br(e,t);if(n!==null){var r=on();nr(n,e,t,r)}Ng(e,t)}};V1=function(){return Oe};H1=function(e,t){var n=Oe;try{return Oe=e,t()}finally{Oe=n}};Zf=function(e,t,n){switch(t){case"input":if(Hf(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=Qc(r);if(!o)throw Error(U(90));S1(r),Hf(r,o)}}}break;case"textarea":C1(e,n);break;case"select":t=n.value,t!=null&&sl(e,!!n.multiple,t,!1)}};P1=Cg;O1=hi;var nT={usingClientEntryPoint:!1,Events:[Oa,Qi,Qc,N1,R1,Cg]},cs={findFiberByHostInstance:Zo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rT={bundleType:cs.bundleType,version:cs.version,rendererPackageName:cs.rendererPackageName,rendererConfig:cs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Kr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=L1(e),e===null?null:e.stateNode},findFiberByHostInstance:cs.findFiberByHostInstance||eT,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!du.isDisabled&&du.supportsFiber)try{Kc=du.inject(rT),mr=du}catch{}}Nn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nT;Nn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pg(t))throw Error(U(200));return qk(e,t,null,n)};Nn.createRoot=function(e,t){if(!Pg(e))throw Error(U(299));var n=!1,r="",o=pw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=bg(e,1,!1,null,null,n,!1,r,o),e[Fr]=t.current,ra(e.nodeType===8?e.parentNode:e),new Rg(t)};Nn.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(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=L1(t),e=e===null?null:e.stateNode,e};Nn.flushSync=function(e){return hi(e)};Nn.hydrate=function(e,t,n){if(!id(t))throw Error(U(200));return ld(null,e,t,!0,n)};Nn.hydrateRoot=function(e,t,n){if(!Pg(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",l=pw;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=hw(t,null,e,1,n??null,o,!1,i,l),e[Fr]=t.current,ra(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 od(t)};Nn.render=function(e,t,n){if(!id(t))throw Error(U(200));return ld(null,e,t,!1,n)};Nn.unmountComponentAtNode=function(e){if(!id(e))throw Error(U(40));return e._reactRootContainer?(hi(function(){ld(null,null,e,!1,function(){e._reactRootContainer=null,e[Fr]=null})}),!0):!1};Nn.unstable_batchedUpdates=Cg;Nn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!id(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return ld(e,t,n,!1,r)};Nn.version="18.2.0-next-9e3b772b8-20220608";function gw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gw)}catch(e){console.error(e)}}gw(),h1.exports=Nn;var Gr=h1.exports;const oT=ba(Gr);var iy=Gr;jf.createRoot=iy.createRoot,jf.hydrateRoot=iy.hydrateRoot;var mw={exports:{}},sd={};/**
33
+ * @license React
34
+ * react-jsx-runtime.production.min.js
35
+ *
36
+ * Copyright (c) Facebook, Inc. and its affiliates.
37
+ *
38
+ * This source code is licensed under the MIT license found in the
39
+ * LICENSE file in the root directory of this source tree.
40
+ */var iT=p,lT=Symbol.for("react.element"),sT=Symbol.for("react.fragment"),aT=Object.prototype.hasOwnProperty,uT=iT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cT={key:!0,ref:!0,__self:!0,__source:!0};function vw(e,t,n){var r,o={},i=null,l=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)aT.call(t,r)&&!cT.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:lT,type:e,key:i,ref:l,props:o,_owner:uT.current}}sd.Fragment=sT;sd.jsx=vw;sd.jsxs=vw;mw.exports=sd;var _=mw.exports;function Ph(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Og(e,t){if(e){if(typeof e=="string")return Ph(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ph(e,t)}}function Ag(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Og(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(a){throw a},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
41
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,l=!1,s;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return i=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function yw(e){return e.length>0}var Ma=Object.freeze({kind:"ok",value:void 0});function La(e){return e===void 0?Ma:{kind:"ok",value:e}}function Ei(e){return{kind:"err",error:e}}function jl(e){return e===Ma||e.kind==="ok"}function Mg(e){return e!==Ma&&e.kind==="err"}function xw(e){var t=[],n=[],r=Ag(e),o;try{for(r.s();!(o=r.n()).done;){var i=o.value;jl(i)?t.push(i.value):n.push(i.error)}}catch(l){r.e(l)}finally{r.f()}return yw(n)?Ei(n):La(t)}function dT(e){return xw(e)}function fT(e){var t=[],n=Ag(e),r;try{for(n.s();!(r=n.n()).done;){var o=r.value;Mg(o)&&t.push(o.error)}}catch(i){n.e(i)}finally{n.f()}return yw(t)?Ei(t):Ma}function hT(e,t){return function(n){for(var r=La(t),o=0;o<n.length&&jl(r);++o)r=e(r.value,n[o],o);return r}}function pT(e){return function(t){return jl(t)?La(e(t.value)):t}}function gT(e){return function(t){return jl(t)?e(t.value):t}}function mT(e){return function(t){return Mg(t)?Ei(e(t.error)):t}}function vT(e,t){return function(n){return e(n)?La(n):Ei(t(n))}}var yT=function(t,n){return function(r){return jl(r)?t(r.value)?r:Ei(n(r.value)):r}},hl=Object.freeze({__proto__:null,voidOk:Ma,ok:La,err:Ei,isOk:jl,isErr:Mg,allT:xw,all:dT,allV:fT,flatMapReduce:hT,map:pT,flatMap:gT,mapErr:mT,fromPredicate:vT,filterOrElse:yT});function xT(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ww(e){var t=xT(e,"string");return typeof t=="symbol"?t:String(t)}function yt(e,t,n){return t=ww(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ly(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function kl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ly(Object(n),!0).forEach(function(r){yt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ly(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wT(e){if(Array.isArray(e))return Ph(e)}function _T(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ST(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
42
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ET(e){return wT(e)||_T(e)||Og(e)||ST()}function ge(e){"@babel/helpers - typeof";return ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ge(e)}function CT(e){if(Array.isArray(e))return e}function $T(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,l,s=[],a=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);a=!0);}catch(c){u=!0,o=c}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw o}}return s}}function kT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
43
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ii(e,t){return CT(e)||$T(e,t)||Og(e,t)||kT()}function Sr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ww(r.key),r)}}function Er(e,t,n){return t&&sy(e.prototype,t),n&&sy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oh(e,t){return Oh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Oh(e,t)}function Ci(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oh(e,t)}function vc(e){return vc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vc(e)}function TT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _w(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bT(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _w(e)}function $i(e){var t=TT();return function(){var r=vc(e),o;if(t){var i=vc(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return bT(this,o)}}var ki=function(){function e(){Sr(this,e)}return Er(e,[{key:"appendValidationError",value:function(n,r,o,i){return n?(n[r]?n[r].push({message:o,value:i}):n[r]=[{message:o,value:i}],n):yt({},r,[{message:o,value:i}])}}]),e}(),zu=Symbol("GetSchema"),tn=Symbol("Path"),xt=Symbol("GetSource");function NT(e){return e[zu]}var Lg=Er(function e(t){Sr(this,e),this.span=t}),RT=function(e){Ci(n,e);var t=$i(n);function n(r,o){var i;return Sr(this,n),i=t.call(this,o),yt(_w(i),"type","Sym"),i.value=r,i}return Er(n,[{key:"transpile",value:function(){return this.value}}]),n}(Lg);new RT("()");var Yt="_type",gn="_ref",PT=function(e){Ci(n,e);var t=$i(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Sr(this,n),o=t.call(this),o.options=r,o.opt=i,o}return Er(n,[{key:"validate",value:function(o,i){return this.opt&&i==null?!1:i==null?yt({},o,[{message:"Non-optional image was null or undefined.",value:i}]):typeof i[gn]!="string"?yt({},o,[{message:"Image did not have a file reference string. Got: ".concat(ge(i[gn])),value:i}]):i[Yt]!=="file"?yt({},o,[{message:"Image did not have the valid file extension type. Got: ".concat(i[Yt]),value:i}]):i.metadata?yt({},o,[{message:"Found metadata, but it could not be validated. Image metadata must be an object with the required props: width (positive number), height (positive number) and sha256 (string of length 64 of the base16 hash).",value:i,fixes:["image:replace-metadata"]}]):yt({},o,[{message:"Could not validate Image metadata.",value:i,fixes:["image:add-metadata"]}])}},{key:"assert",value:function(o){return this.opt&&o==null?!0:(o==null?void 0:o[gn])==="image"&&(o==null?void 0:o[Yt])==="file"}},{key:"optional",value:function(){return new n(this.options,!0)}},{key:"serialize",value:function(){return{type:"image",options:this.options,opt:this.opt}}}]),n}(ki),Sw=function(t){var n;if(!t[gn].startsWith("/public")){var r;return{url:t[gn]+"?sha256=".concat((r=t.metadata)===null||r===void 0?void 0:r.sha256),metadata:t.metadata}}return{url:t[gn].slice(7)+"?sha256=".concat((n=t.metadata)===null||n===void 0?void 0:n.sha256),metadata:t.metadata}};function Ew(e){return ge(e)==="object"&&e!==null&&e!==void 0&&("val"in e||"valPath"in e)}function OT(e){return ge(e)==="object"&&e!==null&&e!==void 0&&tn in e&&"val"in e}function AT(e){return e[tn]}function MT(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ay(e,t,n){return t?Et(e(Et(t,n))):Et(t,n)}function To(e){return ge(e)==="object"&&e!==null&&(xt in e||tn in e)}function Et(e,t,n){var r;if(ge(e)==="object"){if(To(e))return e;if(Ew(e))return Et(e.val,e.valPath)}if(e&&e[gn]&&e[Yt]==="file"){var o=e[gn];if(typeof o!="string")throw Error("Invalid file ref: "+o);return Et(Sw(e),t,n)}switch(ge(e)){case"function":case"symbol":throw Error("Invalid selector type: ".concat(ge(e),": ").concat(e));case"object":if(e!==null)return new Proxy(e,{has:function(l,s){return s===xt||s===tn||s==="andThen"||s===zu?!0:s in l},get:function(l,s){if(s===xt)return e;if(s===tn)return t;if(s===zu)return n;if(s==="andThen")return function(u){return ay(u,e,t)};if(Array.isArray(l)){if(s==="filter")return function(u){var c=l.map(function(d,f){return Et(d,qn(t,f),n==null?void 0:n.item)}).filter(function(d){return u&&u instanceof ki?u.assert(uy(d)):uy(u(d))});return Et(c,t,n)};if(s==="map")return function(u){var c=l.map(function(d,f){var h=u(Et(d,qn(t,f),n==null?void 0:n.item),Et(f));return To(h)?h:Et(h)});return Et(c,t,n)}}if(Array.isArray(l)&&s==="length")return Et(l.length);var a=Reflect.get(l,s);return MT(e,s)?Number.isNaN(Number(s))?Et(a,qn(t,s),n==null?void 0:n.items[s]):Et(a,qn(t,Number(s)),n==null?void 0:n.item):a}});default:return r={eq:function(l){var s=l;if(To(l)&&(s=l[xt],s instanceof Lg))throw Error("TODO: Cannot evaluate equality with an Expr");return Et(e===s,void 0)},andThen:function(l){return ay(l,e===void 0?null:e,t)}},yt(r,xt,e===void 0?null:e),yt(r,tn,t),yt(r,zu,n),r}}function qn(e,t){if(ge(t)==="symbol")throw Error("Cannot create val path of array item with symbol prop: ".concat(t.toString()));return e&&"".concat(e,".").concat(JSON.stringify(t))}function uy(e){if(ge(e)==="object"&&(xt in e||tn in e)){var t=e[xt];return t}return e}var LT=function(e){Ci(n,e);var t=$i(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Sr(this,n),o=t.call(this),o.items=r,o.opt=i,o}return Er(n,[{key:"validate",value:function(o,i){var l=this,s=!1;return this.opt&&i==null?!1:ge(i)!=="object"?yt({},o,[{message:"Expected 'object', got '".concat(ge(i),"'")}]):Array.isArray(i)?yt({},o,[{message:"Expected 'object', got 'array'"}]):(Object.entries(this.items).forEach(function(a){var u=ii(a,2),c=u[0],d=u[1],f=qn(o,c);if(!f)s=l.appendValidationError(s,o,"Internal error: could not create path at ".concat(!o&&typeof o=="string"?"<empty string>":o," at key ").concat(c),i);else{var h=d.validate(f,i[c]);h&&s?s=kl(kl({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(o){if(this.opt&&o==null)return!0;if(!o)return!1;for(var i=0,l=Object.entries(this.items);i<l.length;i++){var s=ii(l[i],2),a=s[0],u=s[1];if(!u.assert(o[a]))return!1}return ge(o)==="object"&&!Array.isArray(o)}},{key:"optional",value:function(){return new n(this.items,!0)}},{key:"serialize",value:function(){return{type:"object",items:Object.fromEntries(Object.entries(this.items).map(function(o){var i=ii(o,2),l=i[0],s=i[1];return[l,s.serialize()]})),opt:this.opt}}}]),n}(ki),DT=function(e){Ci(n,e);var t=$i(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Sr(this,n),o=t.call(this),o.item=r,o.opt=i,o}return Er(n,[{key:"validate",value:function(o,i){var l=this,s=!1;return this.opt&&i==null?!1:ge(i)!=="object"||!Array.isArray(i)?yt({},o,[{message:"Expected 'array', got '".concat(ge(i),"'")}]):(i.forEach(function(a,u){var c=qn(o,u);if(!c)s=l.appendValidationError(s,o,"Internal error: could not create path at ".concat(!o&&typeof o=="string"?"<empty string>":o," at index ").concat(u),i);else{var d=l.item.validate(c,a);d&&s?s=kl(kl({},d),s):d&&(s=d)}}),s)}},{key:"assert",value:function(o){if(this.opt&&o==null)return!0;if(!o)return!1;var i=Ag(o),l;try{for(i.s();!(l=i.n()).done;){var s=l.value;if(!this.item.assert(s))return!1}}catch(a){i.e(a)}finally{i.f()}return ge(o)==="object"&&Array.isArray(o)}},{key:"optional",value:function(){return new n(this.item,!0)}},{key:"serialize",value:function(){return{type:"array",item:this.item.serialize(),opt:this.opt}}}]),n}(ki),IT=function(e){Ci(n,e);var t=$i(n);function n(r,o){var i,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return Sr(this,n),i=t.call(this),i.key=r,i.items=o,i.opt=l,i}return Er(n,[{key:"validate",value:function(o,i){throw new Error("Method not implemented.")}},{key:"assert",value:function(o){throw new Error("Method not implemented.")}},{key:"optional",value:function(){throw new Error("Method not implemented.")}},{key:"serialize",value:function(){return{type:"union",key:this.key,items:this.items.map(function(o){return o.serialize()}),opt:this.opt}}}]),n}(ki),jT=function(e){Ci(n,e);var t=$i(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Sr(this,n),o=t.call(this),o.options=r,o.opt=i,o}return Er(n,[{key:"validate",value:function(o,i){return!1}},{key:"assert",value:function(o){return!0}},{key:"optional",value:function(){return new n(this.options,!0)}},{key:"serialize",value:function(){return{type:"richtext",opt:this.opt}}}]),n}(ki),zT=function(e){Ci(n,e);var t=$i(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Sr(this,n),o=t.call(this),o.item=r,o.opt=i,o}return Er(n,[{key:"validate",value:function(o,i){var l=this,s=!1;return this.opt&&i==null?!1:ge(i)!=="object"?yt({},o,[{message:"Expected 'object', got '".concat(ge(i),"'")}]):Array.isArray(i)?yt({},o,[{message:"Expected 'object', got 'array'"}]):(Object.entries(i).forEach(function(a){var u=ii(a,2),c=u[0],d=u[1],f=qn(o,c);if(!f)s=l.appendValidationError(s,o,"Internal error: could not create path at ".concat(!o&&typeof o=="string"?"<empty string>":o," at key ").concat(d),i);else{var h=l.item.validate(f,d);h&&s?s=kl(kl({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(o){if(this.opt&&o==null)return!0;if(!o)return!1;for(var i=0,l=Object.entries(o);i<l.length;i++){var s=ii(l[i],2),a=s[1];if(!this.item.assert(a))return!1}return ge(o)==="object"&&!Array.isArray(o)}},{key:"optional",value:function(){return new n(this.item,!0)}},{key:"serialize",value:function(){return{type:"record",item:this.item.serialize(),opt:this.opt}}}]),n}(ki);function FT(e){var t=e[xt];if(t instanceof Lg)throw Error("Cannot get raw source of an Expr");var n=t;return n}function BT(e){return e.indexOf(".")===-1?[e,""]:[e.slice(0,e.indexOf(".")),e.slice(e.indexOf(".")+1)]}function WT(e){return e instanceof LT||ge(e)==="object"&&"type"in e&&e.type==="object"}function UT(e){return e instanceof zT||ge(e)==="object"&&"type"in e&&e.type==="record"}function VT(e){return e instanceof DT||ge(e)==="object"&&"type"in e&&e.type==="array"}function HT(e){return e instanceof IT||ge(e)==="object"&&"type"in e&&e.type==="union"}function KT(e){return e instanceof jT||ge(e)==="object"&&"type"in e&&e.type==="richtext"}function GT(e){return e instanceof PT||ge(e)==="object"&&"type"in e&&e.type==="image"}function YT(e,t,n){for(var r=XT(e),o=ET(r),i=n,l=t,s=function(){var c=r.shift();if(c===void 0)throw Error("Unexpected undefined part");if(VT(i)){if(Number.isNaN(Number(c)))throw Error("Invalid path: array schema ".concat(JSON.stringify(i)," must have a number as path, but got ").concat(c,". Path: ").concat(e));if(ge(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of array, but got ".concat(ge(l)));if(!l[c]){var d;throw Error("Invalid path: array source (length: ".concat((d=l)===null||d===void 0?void 0:d.length,") did not have index ").concat(c," from path: ").concat(e))}l=l[c],i=i.item}else if(UT(i)){if(typeof c!="string")throw Error("Invalid path: record schema ".concat(i," must have path: ").concat(c," as string"));if(ge(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of record, but got ".concat(ge(l)));if(!l[c])throw Error("Invalid path: record source did not have key ".concat(c," from path: ").concat(e));l=l[c],i=i.item}else if(WT(i)){if(ge(l)!=="object")throw Error("Schema type error: expected source to be type of object, but got ".concat(ge(l)));if(!l[c])throw Error("Invalid path: object source did not have key ".concat(c," from path: ").concat(e));l=l[c],i=i.items[c]}else{if(GT(i))return{v:{path:o.slice(0,o.length-r.length-1).map(function(g){return JSON.stringify(g)}).join("."),schema:i,source:l}};if(HT(i)){var f=i.key,h=l[f];if(!h)throw Error("Invalid path: union source ".concat(i," did not have required key ").concat(f," in path: ").concat(e));var m=i.items.find(function(g){var S,v;return(g==null||(S=g.items)===null||S===void 0||(v=S[f])===null||v===void 0?void 0:v.value)===h});if(!m)throw Error("Invalid path: union schema ".concat(i," did not have a child object with ").concat(f," of value ").concat(h," in path: ").concat(e));i=m.items[c],l=l[c]}else{if(KT(i))return{v:{path:o.slice(0,o.length-r.length-1).map(function(g){return JSON.stringify(g)}).join("."),schema:i,source:l}};throw Error("Invalid path: ".concat(c," resolved to an unexpected schema ").concat(JSON.stringify(i)))}}};r.length>0;){var a=s();if(ge(a)==="object")return a.v}if(r.length>0)throw Error("Invalid path: ".concat(r.join(".")," is not a valid path"));return{path:o.map(function(u){return Number.isNaN(Number(u))?JSON.stringify(u):u}).join("."),schema:i,source:l}}function XT(e){for(var t=[],n=0;n<e.length;){var r="";if(e[n]==='"'){for(n++;n<e.length&&e[n]!=='"';)e[n]==="\\"&&e[n+1]==='"'?(r+='"',n++):r+=e[n],n++;if(e[n]!=='"'){var o;throw new Error("Invalid input (".concat(JSON.stringify(e),"): Missing closing double quote: ").concat((o=e[n])!==null&&o!==void 0?o:"at end of string"," (char: ").concat(n,"; length: ").concat(e.length,")"))}}else for(;n<e.length&&e[n]!==".";)r+=e[n],n++;r!==""&&t.push(r),n++}return t}function QT(e){return Cw(qT(e))}function JT(e){return To(e)?ge(e[xt])==="object"&&ge(e[xt])!==null&&Array.isArray(e[xt]):Array.isArray(e)}function ZT(e){return To(e)?ge(e[xt])==="object"&&ge(e[xt])!==null&&!Array.isArray(e[xt]):ge(e)==="object"}function qT(e){var t=Et(e);function n(r){var o=JT(r),i=ZT(r);if(o){var l=xt in r?r[xt]:r,s=tn in r?r[tn]:void 0;return{val:l.map(function(c,d){return n(To(c)?c:Et(c,qn(s,d)))}),valPath:s}}else if(i){var a=xt in r?r[xt]:r,u=tn in r?r[tn]:void 0;return{val:a!==null&&Object.fromEntries(Object.entries(a).map(function(c){var d=ii(c,2),f=d[0],h=d[1];return[f,n(To(h)?h:Et(h,qn(u,f)))]})),valPath:u}}else return To(r)?{val:n(r[xt]),valPath:r[tn]}:r}return n(t)}function Ah(e){var t=Ew(e)?e.val:e;switch(ge(t)){case"function":case"symbol":throw Error("Invalid val type: ".concat(ge(t)));case"object":return t===null?null:Array.isArray(t)?t.map(Ah):Object.fromEntries(Object.entries(t).map(function(n){var r=ii(n,2),o=r[0],i=r[1];return[o,i&&Ah(i)]}));default:return t}}function Cw(e){var t,n=e.val;switch(ge(n)){case"function":case"symbol":throw Error("Invalid val type: ".concat(ge(n)));case"object":if(n!==null)return new Proxy(n,{has:function(o,i){return i==="val"||i===tn?!0:cy(o,i)},get:function(o,i){if(i===tn)return e.valPath;if(i==="val")return Ah(e);if(Array.isArray(o)&&i==="length")return o.length;if(cy(n,i)){var l,s;return Cw({val:Reflect.get(o,i).val,valPath:(l=(s=Reflect.get(o,i))===null||s===void 0?void 0:s.valPath)!==null&&l!==void 0?l:qn(e.valPath,Array.isArray(o)?Number(i):i)})}return Reflect.get(o,i)}});default:return t={},yt(t,tn,e.valPath),yt(t,"val",e.val),t}}function cy(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function pi(){pi=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(C,$,E){C[$]=E.value},i=typeof Symbol=="function"?Symbol:{},l=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(C,$,E){return Object.defineProperty(C,$,{value:E,enumerable:!0,configurable:!0,writable:!0}),C[$]}try{u({},"")}catch{u=function($,E,A){return $[E]=A}}function c(C,$,E,A){var R=$&&$.prototype instanceof v?$:v,z=Object.create(R.prototype),V=new H(A||[]);return o(z,"_invoke",{value:O(C,E,V)}),z}function d(C,$,E){try{return{type:"normal",arg:C.call($,E)}}catch(A){return{type:"throw",arg:A}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",m="executing",g="completed",S={};function v(){}function y(){}function x(){}var w={};u(w,l,function(){return this});var k=Object.getPrototypeOf,b=k&&k(k(G([])));b&&b!==n&&r.call(b,l)&&(w=b);var T=x.prototype=v.prototype=Object.create(w);function N(C){["next","throw","return"].forEach(function($){u(C,$,function(E){return this._invoke($,E)})})}function D(C,$){function E(R,z,V,ie){var ne=d(C[R],C,z);if(ne.type!=="throw"){var Ce=ne.arg,we=Ce.value;return we&&typeof we=="object"&&r.call(we,"__await")?$.resolve(we.__await).then(function(X){E("next",X,V,ie)},function(X){E("throw",X,V,ie)}):$.resolve(we).then(function(X){Ce.value=X,V(Ce)},function(X){return E("throw",X,V,ie)})}ie(ne.arg)}var A;o(this,"_invoke",{value:function(R,z){function V(){return new $(function(ie,ne){E(R,z,ie,ne)})}return A=A?A.then(V,V):V()}})}function O(C,$,E){var A=f;return function(R,z){if(A===m)throw new Error("Generator is already running");if(A===g){if(R==="throw")throw z;return{value:e,done:!0}}for(E.method=R,E.arg=z;;){var V=E.delegate;if(V){var ie=j(V,E);if(ie){if(ie===S)continue;return ie}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(A===f)throw A=g,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);A=m;var ne=d(C,$,E);if(ne.type==="normal"){if(A=E.done?g:h,ne.arg===S)continue;return{value:ne.arg,done:E.done}}ne.type==="throw"&&(A=g,E.method="throw",E.arg=ne.arg)}}}function j(C,$){var E=$.method,A=C.iterator[E];if(A===e)return $.delegate=null,E==="throw"&&C.iterator.return&&($.method="return",$.arg=e,j(C,$),$.method==="throw")||E!=="return"&&($.method="throw",$.arg=new TypeError("The iterator does not provide a '"+E+"' method")),S;var R=d(A,C.iterator,$.arg);if(R.type==="throw")return $.method="throw",$.arg=R.arg,$.delegate=null,S;var z=R.arg;return z?z.done?($[C.resultName]=z.value,$.next=C.nextLoc,$.method!=="return"&&($.method="next",$.arg=e),$.delegate=null,S):z:($.method="throw",$.arg=new TypeError("iterator result is not an object"),$.delegate=null,S)}function B(C){var $={tryLoc:C[0]};1 in C&&($.catchLoc=C[1]),2 in C&&($.finallyLoc=C[2],$.afterLoc=C[3]),this.tryEntries.push($)}function ae(C){var $=C.completion||{};$.type="normal",delete $.arg,C.completion=$}function H(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(B,this),this.reset(!0)}function G(C){if(C||C===""){var $=C[l];if($)return $.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var E=-1,A=function R(){for(;++E<C.length;)if(r.call(C,E))return R.value=C[E],R.done=!1,R;return R.value=e,R.done=!0,R};return A.next=A}}throw new TypeError(typeof C+" is not iterable")}return y.prototype=x,o(T,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:y,configurable:!0}),y.displayName=u(x,a,"GeneratorFunction"),t.isGeneratorFunction=function(C){var $=typeof C=="function"&&C.constructor;return!!$&&($===y||($.displayName||$.name)==="GeneratorFunction")},t.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,x):(C.__proto__=x,u(C,a,"GeneratorFunction")),C.prototype=Object.create(T),C},t.awrap=function(C){return{__await:C}},N(D.prototype),u(D.prototype,s,function(){return this}),t.AsyncIterator=D,t.async=function(C,$,E,A,R){R===void 0&&(R=Promise);var z=new D(c(C,$,E,A),R);return t.isGeneratorFunction($)?z:z.next().then(function(V){return V.done?V.value:z.next()})},N(T),u(T,a,"Generator"),u(T,l,function(){return this}),u(T,"toString",function(){return"[object Generator]"}),t.keys=function(C){var $=Object(C),E=[];for(var A in $)E.push(A);return E.reverse(),function R(){for(;E.length;){var z=E.pop();if(z in $)return R.value=z,R.done=!1,R}return R.done=!0,R}},t.values=G,H.prototype={constructor:H,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(ae),!C)for(var $ in this)$.charAt(0)==="t"&&r.call(this,$)&&!isNaN(+$.slice(1))&&(this[$]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var $=this;function E(ne,Ce){return z.type="throw",z.arg=C,$.next=ne,Ce&&($.method="next",$.arg=e),!!Ce}for(var A=this.tryEntries.length-1;A>=0;--A){var R=this.tryEntries[A],z=R.completion;if(R.tryLoc==="root")return E("end");if(R.tryLoc<=this.prev){var V=r.call(R,"catchLoc"),ie=r.call(R,"finallyLoc");if(V&&ie){if(this.prev<R.catchLoc)return E(R.catchLoc,!0);if(this.prev<R.finallyLoc)return E(R.finallyLoc)}else if(V){if(this.prev<R.catchLoc)return E(R.catchLoc,!0)}else{if(!ie)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return E(R.finallyLoc)}}}},abrupt:function(C,$){for(var E=this.tryEntries.length-1;E>=0;--E){var A=this.tryEntries[E];if(A.tryLoc<=this.prev&&r.call(A,"finallyLoc")&&this.prev<A.finallyLoc){var R=A;break}}R&&(C==="break"||C==="continue")&&R.tryLoc<=$&&$<=R.finallyLoc&&(R=null);var z=R?R.completion:{};return z.type=C,z.arg=$,R?(this.method="next",this.next=R.finallyLoc,S):this.complete(z)},complete:function(C,$){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&$&&(this.next=$),S},finish:function(C){for(var $=this.tryEntries.length-1;$>=0;--$){var E=this.tryEntries[$];if(E.finallyLoc===C)return this.complete(E.completion,E.afterLoc),ae(E),S}},catch:function(C){for(var $=this.tryEntries.length-1;$>=0;--$){var E=this.tryEntries[$];if(E.tryLoc===C){var A=E.completion;if(A.type==="throw"){var R=A.arg;ae(E)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(C,$,E){return this.delegate={iterator:G(C),resultName:$,nextLoc:E},this.method==="next"&&(this.arg=e),S}},t}function dy(e,t,n,r,o,i,l){try{var s=e[i](l),a=s.value}catch(u){n(u);return}s.done?t(a):Promise.resolve(a).then(r,o)}function Dg(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(a){dy(i,r,o,l,s,"next",a)}function s(a){dy(i,r,o,l,s,"throw",a)}l(void 0)})}}var eb=function(){var e=Dg(pi().mark(function t(n){var r,o,i;return pi().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,crypto.subtle.digest("SHA-256",n);case 2:return r=s.sent,o=Array.from(new Uint8Array(r)),i=o.map(function(a){return a.toString(16).padStart(2,"0")}).join(""),s.abrupt("return",i);case 6:case"end":return s.stop()}},t)}));return function(n){return e.apply(this,arguments)}}(),tb=function(){function e(t){Sr(this,e),this.host=t}return Er(e,[{key:"getDisableUrl",value:function(){return"".concat(this.host,"/disable")}},{key:"getEditUrl",value:function(){return"".concat(this.host,"/static/edit")}},{key:"getLoginUrl",value:function(n){return"".concat(this.host,"/authorize?redirect_to=").concat(encodeURIComponent(n))}},{key:"getPatches",value:function(){var t=Dg(pi().mark(function r(o){var i,l,s;return pi().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return i=o.patchIds,l=o.headers,s=i?"?".concat(i.map(function(c){return"".concat(c,"=").concat(encodeURIComponent(c))}).join("&")):"",u.abrupt("return",fetch("".concat(this.host,"/patches/~").concat(s),{headers:l||{"Content-Type":"application/json"}}).then(function(c){return fu(c)}));case 3:case"end":return u.stop()}},r,this)}));function n(r){return t.apply(this,arguments)}return n}()},{key:"postPatches",value:function(n,r,o){return fetch("".concat(this.host,"/patches/~"),{headers:o||{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(yt({},n,r))}).then(function(i){return fu(i)})}},{key:"getSession",value:function(){return fetch("".concat(this.host,"/session")).then(function(n){return fu(n)})}},{key:"getModules",value:function(n){var r=n.patch,o=r===void 0?!1:r,i=n.includeSchema,l=i===void 0?!1:i,s=n.includeSource,a=s===void 0?!1:s,u=n.treePath,c=u===void 0?"/":u,d=n.headers,f=new URLSearchParams;return f.set("patch",o.toString()),f.set("schema",l.toString()),f.set("source",a.toString()),fetch("".concat(this.host,"/tree/~").concat(c,"?").concat(f.toString()),{headers:d}).then(function(h){return fu(h)})}}]),e}();function fu(e){return Mh.apply(this,arguments)}function Mh(){return Mh=Dg(pi().mark(function e(t){return pi().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,!t.ok){r.next=9;break}return r.t0=hl,r.next=5,t.json();case 5:return r.t1=r.sent,r.abrupt("return",r.t0.ok.call(r.t0,r.t1));case 9:return r.t2=hl,r.t3=t.status,r.next=13,t.text();case 13:return r.t4=r.sent,r.t5={statusCode:r.t3,message:r.t4},r.abrupt("return",r.t2.err.call(r.t2,r.t5));case 16:r.next=21;break;case 18:return r.prev=18,r.t6=r.catch(0),r.abrupt("return",Ei({message:r.t6 instanceof Error?r.t6.message:"Unknown error"}));case 21:case"end":return r.stop()}},e,null,[[0,18]])})),Mh.apply(this,arguments)}var En={convertFileSource:Sw,getSchema:NT,getValPath:AT,getVal:QT,getSource:FT,resolvePath:YT,splitModuleIdAndModulePath:BT,isVal:OT,createValPathOfItem:qn,getSHA256Hash:eb,createPatchJSONPath:function(t){return"/".concat(t.split(".").map(function(n){return JSON.parse(n)}).join("/"))},VAL_DRAFT_MODE_COOKIE:"val_draft_mode",VAL_ENABLE_COOKIE_NAME:"val_enable",VAL_STATE_COOKIE:"val_state",VAL_SESSION_COOKIE:"val_session"},$w={exports:{}};/*!
44
+ Copyright (c) 2018 Jed Watson.
45
+ Licensed under the MIT License (MIT), see
46
+ http://jedwatson.github.io/classnames
47
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var l=typeof i;if(l==="string"||l==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(l==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var a in i)t.call(i,a)&&i[a]&&r.push(a)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})($w);var nb=$w.exports;const ad=ba(nb);function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},te.apply(this,arguments)}function rb(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kw(...e){return t=>e.forEach(n=>rb(n,t))}function Qe(...e){return p.useCallback(kw(...e),e)}const Tl=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(ib);if(i){const l=i.props.children,s=o.map(a=>a===i?p.Children.count(l)>1?p.Children.only(null):p.isValidElement(l)?l.props.children:null:a);return p.createElement(Lh,te({},r,{ref:t}),p.isValidElement(l)?p.cloneElement(l,void 0,s):null)}return p.createElement(Lh,te({},r,{ref:t}),n)});Tl.displayName="Slot";const Lh=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...lb(r,n.props),ref:t?kw(t,n.ref):n.ref}):p.Children.count(n)>1?p.Children.only(null):null});Lh.displayName="SlotClone";const ob=({children:e})=>p.createElement(p.Fragment,null,e);function ib(e){return p.isValidElement(e)&&e.type===ob}function lb(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const sb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Le=sb.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...l}=r,s=i?Tl:t;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(s,te({},l,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ab(e,t){e&&Gr.flushSync(()=>e.dispatchEvent(t))}const Tn=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function ub(e,t){return p.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const zl=e=>{const{present:t,children:n}=e,r=cb(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=Qe(r.ref,o.ref);return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};zl.displayName="Presence";function cb(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),l=e?"mounted":"unmounted",[s,a]=ub(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=hu(r.current);i.current=s==="mounted"?u:"none"},[s]),Tn(()=>{const u=r.current,c=o.current;if(c!==e){const f=i.current,h=hu(u);e?a("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),Tn(()=>{if(t){const u=d=>{const h=hu(r.current).includes(d.animationName);d.target===t&&h&&Gr.flushSync(()=>a("ANIMATION_END"))},c=d=>{d.target===t&&(i.current=hu(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function hu(e){return(e==null?void 0:e.animationName)||"none"}function Ti(e,t=[]){let n=[];function r(i,l){const s=p.createContext(l),a=n.length;n=[...n,l];function u(d){const{scope:f,children:h,...m}=d,g=(f==null?void 0:f[e][a])||s,S=p.useMemo(()=>m,Object.values(m));return p.createElement(g.Provider,{value:S},h)}function c(d,f){const h=(f==null?void 0:f[e][a])||s,m=p.useContext(h);if(m)return m;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const o=()=>{const i=n.map(l=>p.createContext(l));return function(s){const a=(s==null?void 0:s[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,db(o,...t)]}function db(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const l=r.reduce((s,{useScope:a,scopeName:u})=>{const d=a(i)[`__scope${u}`];return{...s,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Kt(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const fb=p.createContext(void 0);function Ig(e){const t=p.useContext(fb);return e||t||"ltr"}function Dh(e,[t,n]){return Math.min(n,Math.max(t,e))}function He(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function hb(e,t){return p.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Tw="ScrollArea",[bw,z4]=Ti(Tw),[pb,Vn]=bw(Tw),gb=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...l}=e,[s,a]=p.useState(null),[u,c]=p.useState(null),[d,f]=p.useState(null),[h,m]=p.useState(null),[g,S]=p.useState(null),[v,y]=p.useState(0),[x,w]=p.useState(0),[k,b]=p.useState(!1),[T,N]=p.useState(!1),D=Qe(t,j=>a(j)),O=Ig(o);return p.createElement(pb,{scope:n,type:r,dir:O,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:m,scrollbarXEnabled:k,onScrollbarXEnabledChange:b,scrollbarY:g,onScrollbarYChange:S,scrollbarYEnabled:T,onScrollbarYEnabledChange:N,onCornerWidthChange:y,onCornerHeightChange:w},p.createElement(Le.div,te({dir:O},l,{ref:D,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})))}),mb="ScrollAreaViewport",vb=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=Vn(mb,n),l=p.useRef(null),s=Qe(t,l,i.onViewportChange);return p.createElement(p.Fragment,null,p.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),p.createElement(Le.div,te({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),p.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Yr="ScrollAreaScrollbar",Nw=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Vn(Yr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:l}=o,s=e.orientation==="horizontal";return p.useEffect(()=>(s?i(!0):l(!0),()=>{s?i(!1):l(!1)}),[s,i,l]),o.type==="hover"?p.createElement(yb,te({},r,{ref:t,forceMount:n})):o.type==="scroll"?p.createElement(xb,te({},r,{ref:t,forceMount:n})):o.type==="auto"?p.createElement(Rw,te({},r,{ref:t,forceMount:n})):o.type==="always"?p.createElement(jg,te({},r,{ref:t})):null}),yb=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Vn(Yr,e.__scopeScrollArea),[i,l]=p.useState(!1);return p.useEffect(()=>{const s=o.scrollArea;let a=0;if(s){const u=()=>{window.clearTimeout(a),l(!0)},c=()=>{a=window.setTimeout(()=>l(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(a),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",c)}}},[o.scrollArea,o.scrollHideDelay]),p.createElement(zl,{present:n||i},p.createElement(Rw,te({"data-state":i?"visible":"hidden"},r,{ref:t})))}),xb=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Vn(Yr,e.__scopeScrollArea),i=e.orientation==="horizontal",l=cd(()=>a("SCROLL_END"),100),[s,a]=hb("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>a("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,o.scrollHideDelay,a]),p.useEffect(()=>{const u=o.viewport,c=i?"scrollLeft":"scrollTop";if(u){let d=u[c];const f=()=>{const h=u[c];d!==h&&(a("SCROLL"),l()),d=h};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[o.viewport,i,a,l]),p.createElement(zl,{present:n||s!=="hidden"},p.createElement(jg,te({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:He(e.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:He(e.onPointerLeave,()=>a("POINTER_LEAVE"))})))}),Rw=p.forwardRef((e,t)=>{const n=Vn(Yr,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,l]=p.useState(!1),s=e.orientation==="horizontal",a=cd(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,c=n.viewport.offsetHeight<n.viewport.scrollHeight;l(s?u:c)}},10);return bl(n.viewport,a),bl(n.content,a),p.createElement(zl,{present:r||i},p.createElement(jg,te({"data-state":i?"visible":"hidden"},o,{ref:t})))}),jg=p.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=Vn(Yr,e.__scopeScrollArea),i=p.useRef(null),l=p.useRef(0),[s,a]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Mw(s.viewport,s.content),c={...r,sizes:s,onSizesChange:a,hasThumb:u>0&&u<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:f=>l.current=f};function d(f,h){return Tb(f,l.current,s,h)}return n==="horizontal"?p.createElement(wb,te({},c,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollLeft,h=fy(f,s,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}})):n==="vertical"?p.createElement(_b,te({},c,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollTop,h=fy(f,s);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}})):null}),wb=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Vn(Yr,e.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=Qe(t,a,i.onScrollbarXChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(Ow,te({"data-orientation":"horizontal"},o,{ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ud(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(i.viewport){const f=i.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),Dw(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&i.viewport&&l&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:yc(l.paddingLeft),paddingEnd:yc(l.paddingRight)}})}}))}),_b=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Vn(Yr,e.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=Qe(t,a,i.onScrollbarYChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(Ow,te({"data-orientation":"vertical"},o,{ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ud(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(i.viewport){const f=i.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),Dw(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&i.viewport&&l&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:yc(l.paddingTop),paddingEnd:yc(l.paddingBottom)}})}}))}),[Sb,Pw]=bw(Yr),Ow=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:l,onThumbPointerDown:s,onThumbPositionChange:a,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,h=Vn(Yr,n),[m,g]=p.useState(null),S=Qe(t,D=>g(D)),v=p.useRef(null),y=p.useRef(""),x=h.viewport,w=r.content-r.viewport,k=Kt(c),b=Kt(a),T=cd(d,10);function N(D){if(v.current){const O=D.clientX-v.current.left,j=D.clientY-v.current.top;u({x:O,y:j})}}return p.useEffect(()=>{const D=O=>{const j=O.target;(m==null?void 0:m.contains(j))&&k(O,w)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[x,m,w,k]),p.useEffect(b,[r,b]),bl(m,T),bl(h.content,T),p.createElement(Sb,{scope:n,scrollbar:m,hasThumb:o,onThumbChange:Kt(i),onThumbPointerUp:Kt(l),onThumbPositionChange:b,onThumbPointerDown:Kt(s)},p.createElement(Le.div,te({},f,{ref:S,style:{position:"absolute",...f.style},onPointerDown:He(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),v.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),N(D))}),onPointerMove:He(e.onPointerMove,N),onPointerUp:He(e.onPointerUp,D=>{const O=D.target;O.hasPointerCapture(D.pointerId)&&O.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=y.current,h.viewport&&(h.viewport.style.scrollBehavior=""),v.current=null})})))}),Ih="ScrollAreaThumb",Eb=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Pw(Ih,e.__scopeScrollArea);return p.createElement(zl,{present:n||o.hasThumb},p.createElement(Cb,te({ref:t},r)))}),Cb=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=Vn(Ih,n),l=Pw(Ih,n),{onThumbPositionChange:s}=l,a=Qe(t,d=>l.onThumbChange(d)),u=p.useRef(),c=cd(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const d=i.viewport;if(d){const f=()=>{if(c(),!u.current){const h=bb(d,s);u.current=h,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,c,s]),p.createElement(Le.div,te({"data-state":l.hasThumb?"visible":"hidden"},o,{ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:He(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),m=d.clientX-h.left,g=d.clientY-h.top;l.onThumbPointerDown({x:m,y:g})}),onPointerUp:He(e.onPointerUp,l.onThumbPointerUp)}))}),Aw="ScrollAreaCorner",$b=p.forwardRef((e,t)=>{const n=Vn(Aw,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.createElement(kb,te({},e,{ref:t})):null}),kb=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Vn(Aw,n),[i,l]=p.useState(0),[s,a]=p.useState(0),u=!!(i&&s);return bl(o.scrollbarX,()=>{var c;const d=((c=o.scrollbarX)===null||c===void 0?void 0:c.offsetHeight)||0;o.onCornerHeightChange(d),a(d)}),bl(o.scrollbarY,()=>{var c;const d=((c=o.scrollbarY)===null||c===void 0?void 0:c.offsetWidth)||0;o.onCornerWidthChange(d),l(d)}),u?p.createElement(Le.div,te({},r,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function yc(e){return e?parseInt(e,10):0}function Mw(e,t){const n=e/t;return isNaN(n)?0:n}function ud(e){const t=Mw(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Tb(e,t,n,r="ltr"){const o=ud(n),i=o/2,l=t||i,s=o-l,a=n.scrollbar.paddingStart+l,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return Lw([a,u],d)(e)}function fy(e,t,n="ltr"){const r=ud(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,l=t.content-t.viewport,s=i-r,a=n==="ltr"?[0,l]:[l*-1,0],u=Dh(e,a);return Lw([0,l],[0,s])(u)}function Lw(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Dw(e,t){return e>0&&e<t}const bb=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},l=n.left!==i.left,s=n.top!==i.top;(l||s)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function cd(e,t){const n=Kt(e),r=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),p.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function bl(e,t){const n=Kt(t);Tn(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const Iw=gb,Nb=vb,Rb=$b;function jw(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=jw(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Pb(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=jw(e))&&(r&&(r+=" "),r+=t);return r}const zg="-";function Ob(e){const t=Mb(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(l){const s=l.split(zg);return s[0]===""&&s.length!==1&&s.shift(),zw(s,t)||Ab(l)}function i(l,s){const a=n[l]||[];return s&&r[l]?[...a,...r[l]]:a}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function zw(e,t){var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?zw(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(zg);return(l=t.validators.find(({validator:s})=>s(i)))==null?void 0:l.classGroupId}const hy=/^\[(.+)\]$/;function Ab(e){if(hy.test(e)){const t=hy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Mb(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Db(Object.entries(e.classGroups),n).forEach(([i,l])=>{jh(l,r,i,t)}),r}function jh(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:py(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Lb(o)){jh(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{jh(l,py(t,i),n,r)})})}function py(e,t){let n=e;return t.split(zg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Lb(e){return e.isThemeGetter}function Db(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,s])=>[t+l,s])):i);return[n,o]}):e}function Ib(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const Fw="!";function jb(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const s=[];let a=0,u=0,c;for(let g=0;g<l.length;g++){let S=l[g];if(a===0){if(S===r&&(n||l.slice(g,g+o)===t)){s.push(l.slice(u,g)),u=g+o;continue}if(S==="/"){c=g;continue}}S==="["?a++:S==="]"&&a--}const d=s.length===0?l:l.substring(u),f=d.startsWith(Fw),h=f?d.substring(1):d,m=c&&c>u?c-u:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}}}function zb(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function Fb(e){return{cache:Ib(e.cacheSize),splitModifiers:jb(e),...Ob(e)}}const Bb=/\s+/;function Wb(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(Bb).map(l=>{const{modifiers:s,hasImportantModifier:a,baseClassName:u,maybePostfixModifierPosition:c}=n(l);let d=r(c?u.substring(0,c):u),f=!!c;if(!d){if(!c)return{isTailwindClass:!1,originalClassName:l};if(d=r(u),!d)return{isTailwindClass:!1,originalClassName:l};f=!1}const h=zb(s).join(":");return{isTailwindClass:!0,modifierId:a?h+Fw:h,classGroupId:d,originalClassName:l,hasPostfixModifier:f}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:s,classGroupId:a,hasPostfixModifier:u}=l,c=s+a;return i.has(c)?!1:(i.add(c),o(a,u).forEach(d=>i.add(s+d)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function Ub(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Bw(t))&&(r&&(r+=" "),r+=n);return r}function Bw(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Bw(e[r]))&&(n&&(n+=" "),n+=t);return n}function Vb(e,...t){let n,r,o,i=l;function l(a){const u=t.reduce((c,d)=>d(c),e());return n=Fb(u),r=n.cache.get,o=n.cache.set,i=s,s(a)}function s(a){const u=r(a);if(u)return u;const c=Wb(a,n);return o(a,c),c}return function(){return i(Ub.apply(null,arguments))}}function We(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Ww=/^\[(?:([a-z-]+):)?(.+)\]$/i,Hb=/^\d+\/\d+$/,Kb=new Set(["px","full","screen"]),Gb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Yb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Xb=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Gn(e){return ti(e)||Kb.has(e)||Hb.test(e)}function ro(e){return Fl(e,"length",oN)}function ti(e){return!!e&&!Number.isNaN(Number(e))}function pu(e){return Fl(e,"number",ti)}function ds(e){return!!e&&Number.isInteger(Number(e))}function Jb(e){return e.endsWith("%")&&ti(e.slice(0,-1))}function ye(e){return Ww.test(e)}function oo(e){return Gb.test(e)}const Zb=new Set(["length","size","percentage"]);function qb(e){return Fl(e,Zb,Uw)}function eN(e){return Fl(e,"position",Uw)}const tN=new Set(["image","url"]);function nN(e){return Fl(e,tN,lN)}function rN(e){return Fl(e,"",iN)}function fs(){return!0}function Fl(e,t,n){const r=Ww.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function oN(e){return Yb.test(e)}function Uw(){return!1}function iN(e){return Xb.test(e)}function lN(e){return Qb.test(e)}function sN(){const e=We("colors"),t=We("spacing"),n=We("blur"),r=We("brightness"),o=We("borderColor"),i=We("borderRadius"),l=We("borderSpacing"),s=We("borderWidth"),a=We("contrast"),u=We("grayscale"),c=We("hueRotate"),d=We("invert"),f=We("gap"),h=We("gradientColorStops"),m=We("gradientColorStopPositions"),g=We("inset"),S=We("margin"),v=We("opacity"),y=We("padding"),x=We("saturate"),w=We("scale"),k=We("sepia"),b=We("skew"),T=We("space"),N=We("translate"),D=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ye,t],B=()=>[ye,t],ae=()=>["",Gn,ro],H=()=>["auto",ti,ye],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],E=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",ye],R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[ti,pu],V=()=>[ti,ye];return{cacheSize:500,separator:":",theme:{colors:[fs],spacing:[Gn,ro],blur:["none","",oo,ye],brightness:z(),borderColor:[e],borderRadius:["none","","full",oo,ye],borderSpacing:B(),borderWidth:ae(),contrast:z(),grayscale:A(),hueRotate:V(),invert:A(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[Jb,ro],inset:j(),margin:j(),opacity:z(),padding:B(),saturate:z(),scale:z(),sepia:A(),skew:V(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",ye]}],container:["container"],columns:[{columns:[oo]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),ye]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ds,ye]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ye]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",ds,ye]}],"grid-cols":[{"grid-cols":[fs]}],"col-start-end":[{col:["auto",{span:["full",ds,ye]},ye]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[fs]}],"row-start-end":[{row:["auto",{span:[ds,ye]},ye]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ye]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",ye,t]}],"min-w":[{"min-w":["min","max","fit",ye,Gn]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[oo]},oo,ye]}],h:[{h:[ye,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Gn,ye]}],"max-h":[{"max-h":[ye,t,"min","max","fit"]}],"font-size":[{text:["base",oo,ro]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pu]}],"font-family":[{font:[fs]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ye]}],"line-clamp":[{"line-clamp":["none",ti,pu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Gn,ye]}],"list-image":[{"list-image":["none",ye]}],"list-style-type":[{list:["none","disc","decimal",ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...C(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Gn,ro]}],"underline-offset":[{"underline-offset":["auto",Gn,ye]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),eN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nN]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...C(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:C()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...C()]}],"outline-offset":[{"outline-offset":[Gn,ye]}],"outline-w":[{outline:[Gn,ro]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Gn,ro]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",oo,rN]}],"shadow-color":[{shadow:[fs]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":$()}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",oo,ye]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ye]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",ye]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[ds,ye]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ye]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Gn,ro,pu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const aN=Vb(sN);function it(...e){return aN(Pb(e))}const Ls=p.forwardRef(({className:e,children:t,...n},r)=>_.jsxs(Iw,{ref:r,className:it("relative overflow-hidden",e),...n,children:[_.jsx(Nb,{className:"h-full w-full rounded-[inherit]",children:t}),_.jsx(Vw,{}),_.jsx(Rb,{})]}));Ls.displayName=Iw.displayName;const Vw=p.forwardRef(({className:e,orientation:t="vertical",...n},r)=>_.jsx(Nw,{ref:r,orientation:t,className:it("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:_.jsx(Eb,{className:it("relative rounded-full bg-border",t==="vertical"&&"flex-1")})}));Vw.displayName=Nw.displayName;function Ds({children:e}){const t=p.useRef(null),n=p.useRef(null),r=p.useRef(!1),o=p.useRef(0),i=p.useRef(null),l=p.useRef(0),s=()=>{r.current=!1,i.current=null,o.current=0,l.current=0},a=S=>{S.preventDefault();const v=i.current==="left"?t:n;if(v.current&&r.current){const y=i.current==="left"?S.screenX-o.current:o.current-S.screenX;v.current.style.width=`${Math.max(l.current+y,150)}px`}},u=S=>v=>{if(v.target){const x=S==="left"?t:S==="right"?n:null;r.current=!0,x&&x.current&&(o.current=v.screenX,i.current=S,x.current&&(l.current=x.current.offsetWidth))}},[c,d,f,h,m,g]=p.Children.toArray(e);return p.useEffect(()=>(document.addEventListener("mouseup",s),document.addEventListener("mousemove",a),()=>{document.removeEventListener("mouseup",s),document.removeEventListener("mousemove",a)}),[]),_.jsxs("div",{className:"flex h-screen",children:[_.jsxs("div",{ref:t,className:"relative border-r border-border",style:{width:300},children:[_.jsxs(Ds.Column,{children:[c,_.jsx(Ls,{style:{height:"calc(100vh - 50px)"},children:d})]}),_.jsx("div",{className:"absolute inset-y-0 right-0 cursor-col-resize w-[1px] hover:w-[3px] h-full hover:bg-border",onMouseDown:u("left")})]}),_.jsx("div",{className:ad("",{"w-full":!m&&!g}),children:_.jsxs(Ds.Column,{children:[f,_.jsx(Ls,{style:{height:"calc(100vh - 50px)"},children:h})]})}),m||g&&_.jsxs("div",{ref:n,className:"relative h-screen border-l border-border",style:{width:300},children:[_.jsxs(Ds.Column,{children:[m,_.jsx(Ls,{style:{height:"calc(100vh - 50px)"},children:g})]}),_.jsx("div",{onMouseDown:u("right"),className:"absolute inset-y-0 left-0 cursor-col-resize w-[1px] bg-border hover:w-[3px] hover:bg-border"})]})]})}Ds.Column=({children:e})=>{const[t,n]=p.Children.toArray(e);return _.jsxs("div",{className:"flex flex-col",children:[_.jsx("div",{className:"flex items-center border-b border-border",children:t}),n]})};const uN=({className:e})=>_.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 9 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[_.jsxs("g",{clipPath:"url(#clip0_1225_1638)",children:[_.jsx("rect",{y:"0.5",width:"9",height:"9"}),_.jsx("path",{d:"M0 7L8.5 5",stroke:"currentColor"}),_.jsx("circle",{cx:"3",cy:"3.5",r:"1",fill:"currentColor"})]}),_.jsx("rect",{x:"0.5",y:"1",width:"8",height:"8",stroke:"currentColor"}),_.jsx("defs",{children:_.jsx("clipPath",{id:"clip0_1225_1638",children:_.jsx("rect",{y:"0.5",width:"9",height:"9",fill:"white"})})})]}),Hw=uN,cN=({className:e})=>_.jsxs("svg",{width:"9",height:"10",viewBox:"0 0 9 10",className:e,fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[_.jsxs("g",{clipPath:"url(#clip0_1222_1618)",children:[_.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.5H0V0.5H9V1.5Z",fill:"currentColor"}),_.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 9.5H0V8.5H9V9.5Z",fill:"currentColor"})]}),_.jsx("defs",{children:_.jsx("clipPath",{id:"clip0_1222_1618",children:_.jsx("rect",{width:"9",height:"9",fill:"white",transform:"translate(0 0.5)"})})})]}),dN=cN,fN=({className:e})=>_.jsx("svg",{width:"9",height:"10",viewBox:"0 0 9 10",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,children:_.jsx("g",{clipPath:"url(#clip0_1229_1625)",children:_.jsx("path",{d:"M0.0145513 0.5H8.98545L9 3.18569H8.57074C8.43007 2.2276 8.02749 1.57948 7.36298 1.24133C6.98949 1.05491 6.43169 0.953035 5.68957 0.935694V7.94581C5.68957 8.43569 5.78416 8.76084 5.97332 8.92124C6.16734 9.08165 6.5675 9.16185 7.17381 9.16185V9.5H1.86257V9.16185C2.44462 9.16185 2.83023 9.08165 3.0194 8.92124C3.21342 8.7565 3.31043 8.43136 3.31043 7.94581V0.935694C2.58286 0.953035 2.02506 1.05491 1.63703 1.24133C0.92401 1.58815 0.521423 2.23627 0.429264 3.18569H0L0.0145513 0.5Z"})})}),hN=fN;function Kw({children:e,rootPath:t}){return _.jsx("div",{className:"flex flex-col w-full py-2 text-xs",children:p.Children.map(e,n=>p.cloneElement(n,{paths:[t]}))})}Kw.Node=({children:e,paths:t=[],path:n,level:r=1,type:o,setActivePath:i})=>{const l=r*30,s=o==="string"?_.jsx(hN,{}):o==="image"?_.jsx(Hw,{className:"h-[9px] w-[9px]"}):_.jsx(dN,{});return _.jsxs("div",{className:"w-full",children:[_.jsx("button",{className:"flex justify-between w-full group py-2 text-xs font-[400] shrink-0",onClick:()=>{i&&i(n)},style:{paddingLeft:l},children:_.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s,_.jsx("p",{children:n})]})}),e&&_.jsx(_.Fragment,{children:p.Children.map(e,a=>p.cloneElement(a,{level:r+1,paths:[...t,n]}))})]})};function Fg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let bi=Fg();function Gw(e){bi=e}const Yw=/[&<>"']/,pN=new RegExp(Yw.source,"g"),Xw=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,gN=new RegExp(Xw.source,"g"),mN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},gy=e=>mN[e];function xn(e,t){if(t){if(Yw.test(e))return e.replace(pN,gy)}else if(Xw.test(e))return e.replace(gN,gy);return e}const vN=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function yN(e){return e.replace(vN,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const xN=/(^|[^\[])\^/g;function Pe(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(xN,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function my(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const xc={exec:()=>null};function vy(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let a=!1,u=l;for(;--u>=0&&s[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(/\\\|/g,"|");return r}function mf(e,t,n){const r=e.length;if(r===0)return"";let o=0;for(;o<r;){const i=e.charAt(r-o-1);if(i===t&&!n)o++;else if(i!==t&&n)o++;else break}return e.slice(0,r-o)}function wN(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function yy(e,t,n,r){const o=t.href,i=t.title?xn(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const s={type:"link",raw:n,href:o,title:i,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,s}return{type:"image",raw:n,href:o,title:i,text:xn(l)}}function _N(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
48
+ `).map(o=>{const i=o.match(/^\s+/);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(`
49
+ `)}class wc{constructor(t){je(this,"options");je(this,"rules");je(this,"lexer");this.options=t||bi}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:mf(r,`
50
+ `)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=_N(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=mf(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",a="",u=!1;for(;t;){let c=!1;if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;s=n[0],t=t.substring(s.length);let d=n[2].split(`
51
+ `,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),f=t.split(`
52
+ `,1)[0],h=0;this.options.pedantic?(h=2,a=d.trimStart()):(h=n[2].search(/[^ ]/),h=h>4?1:h,a=d.slice(h),h+=n[1].length);let m=!1;if(!d&&/^ *$/.test(f)&&(s+=f+`
53
+ `,t=t.substring(f.length+1),c=!0),!c){const v=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),y=new RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),x=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),w=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;t;){const k=t.split(`
54
+ `,1)[0];if(f=k,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),x.test(f)||w.test(f)||v.test(f)||y.test(t))break;if(f.search(/[^ ]/)>=h||!f.trim())a+=`
55
+ `+f.slice(h);else{if(m||d.search(/[^ ]/)>=4||x.test(d)||w.test(d)||y.test(d))break;a+=`
56
+ `+f}!m&&!f.trim()&&(m=!0),s+=k+`
57
+ `,t=t.substring(k.length+1),d=f.slice(h)}}i.loose||(u?i.loose=!0:/\n *\n *$/.test(s)&&(u=!0));let g=null,S;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(S=g[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!g,checked:S,loose:!1,text:a,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=a.trimEnd(),i.raw=i.raw.trimEnd();for(let c=0;c<i.items.length;c++)if(this.lexer.state.top=!1,i.items[c].tokens=this.lexer.blockTokens(i.items[c].text,[]),!i.loose){const d=i.items[c].tokens.filter(h=>h.type==="space"),f=d.length>0&&d.some(h=>/\n.*\n/.test(h.raw));i.loose=f}if(i.loose)for(let c=0;c<i.items.length;c++)i.items[c].loose=!0;return i}}html(t){const n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){const n=this.rules.block.def.exec(t);if(n){const r=n[1].toLowerCase().replace(/\s+/g," "),o=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:vy(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
58
+ `):[]};if(r.header.length===r.align.length){let o=r.align.length,i,l,s,a;for(i=0;i<o;i++){const u=r.align[i];u&&(/^ *-+: *$/.test(u)?r.align[i]="right":/^ *:-+: *$/.test(u)?r.align[i]="center":/^ *:-+ *$/.test(u)?r.align[i]="left":r.align[i]=null)}for(o=r.rows.length,i=0;i<o;i++)r.rows[i]=vy(r.rows[i],r.header.length).map(u=>({text:u,tokens:[]}));for(o=r.header.length,l=0;l<o;l++)r.header[l].tokens=this.lexer.inline(r.header[l].text);for(o=r.rows.length,l=0;l<o;l++)for(a=r.rows[l],s=0;s<a.length;s++)a[s].tokens=this.lexer.inline(a[s].text);return r}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r=n[1].charAt(n[1].length-1)===`
59
+ `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:xn(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const l=mf(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=wN(n[2],"()");if(l>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l&&(o=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^</.test(o)&&(this.options.pedantic&&!/>$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),yy(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return yy(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...o[0]].length-1;let s,a,u=l,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+o[0].length-1);(o=d.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(a=[...s].length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&l%3&&!((l+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const f=[...t].slice(0,l+o.index+a+1).join("");if(Math.min(l,a)%2){const m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}const h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=xn(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=xn(n[1]),o="mailto:"+r):(r=xn(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=xn(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=xn(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=xn(n[0]),{type:"text",raw:n[0],text:r}}}}const oe={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:xc,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};oe._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;oe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;oe.def=Pe(oe.def).replace("label",oe._label).replace("title",oe._title).getRegex();oe.bullet=/(?:[*+-]|\d{1,9}[.)])/;oe.listItemStart=Pe(/^( *)(bull) */).replace("bull",oe.bullet).getRegex();oe.list=Pe(oe.list).replace(/bull/g,oe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+oe.def.source+")").getRegex();oe._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";oe._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;oe.html=Pe(oe.html,"i").replace("comment",oe._comment).replace("tag",oe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();oe.lheading=Pe(oe.lheading).replace(/bull/g,oe.bullet).getRegex();oe.paragraph=Pe(oe._paragraph).replace("hr",oe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oe._tag).getRegex();oe.blockquote=Pe(oe.blockquote).replace("paragraph",oe.paragraph).getRegex();oe.normal={...oe};oe.gfm={...oe.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};oe.gfm.table=Pe(oe.gfm.table).replace("hr",oe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oe._tag).getRegex();oe.gfm.paragraph=Pe(oe._paragraph).replace("hr",oe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",oe.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oe._tag).getRegex();oe.pedantic={...oe.normal,html:Pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oe._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pe(oe.normal._paragraph).replace("hr",oe.hr).replace("heading",` *#{1,6} *[^
60
+ ]`).replace("lheading",oe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Y={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:xc,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:xc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/};Y._punctuation="\\p{P}$+<=>`^|~";Y.punctuation=Pe(Y.punctuation,"u").replace(/punctuation/g,Y._punctuation).getRegex();Y.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;Y.anyPunctuation=/\\[punct]/g;Y._escapes=/\\([punct])/g;Y._comment=Pe(oe._comment).replace("(?:-->|$)","-->").getRegex();Y.emStrong.lDelim=Pe(Y.emStrong.lDelim,"u").replace(/punct/g,Y._punctuation).getRegex();Y.emStrong.rDelimAst=Pe(Y.emStrong.rDelimAst,"gu").replace(/punct/g,Y._punctuation).getRegex();Y.emStrong.rDelimUnd=Pe(Y.emStrong.rDelimUnd,"gu").replace(/punct/g,Y._punctuation).getRegex();Y.anyPunctuation=Pe(Y.anyPunctuation,"gu").replace(/punct/g,Y._punctuation).getRegex();Y._escapes=Pe(Y._escapes,"gu").replace(/punct/g,Y._punctuation).getRegex();Y._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;Y._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;Y.autolink=Pe(Y.autolink).replace("scheme",Y._scheme).replace("email",Y._email).getRegex();Y._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;Y.tag=Pe(Y.tag).replace("comment",Y._comment).replace("attribute",Y._attribute).getRegex();Y._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;Y._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;Y._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;Y.link=Pe(Y.link).replace("label",Y._label).replace("href",Y._href).replace("title",Y._title).getRegex();Y.reflink=Pe(Y.reflink).replace("label",Y._label).replace("ref",oe._label).getRegex();Y.nolink=Pe(Y.nolink).replace("ref",oe._label).getRegex();Y.reflinkSearch=Pe(Y.reflinkSearch,"g").replace("reflink",Y.reflink).replace("nolink",Y.nolink).getRegex();Y.normal={...Y};Y.pedantic={...Y.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Pe(/^!?\[(label)\]\((.*?)\)/).replace("label",Y._label).getRegex(),reflink:Pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y._label).getRegex()};Y.gfm={...Y.normal,escape:Pe(Y.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};Y.gfm.url=Pe(Y.gfm.url,"i").replace("email",Y.gfm._extended_email).getRegex();Y.breaks={...Y.gfm,br:Pe(Y.br).replace("{2,}","*").getRegex(),text:Pe(Y.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class hr{constructor(t){je(this,"tokens");je(this,"options");je(this,"state");je(this,"tokenizer");je(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||bi,this.options.tokenizer=this.options.tokenizer||new wc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:oe.normal,inline:Y.normal};this.options.pedantic?(n.block=oe.pedantic,n.inline=Y.pedantic):this.options.gfm&&(n.block=oe.gfm,this.options.breaks?n.inline=Y.breaks:n.inline=Y.gfm),this.tokenizer.rules=n}static get rules(){return{block:oe,inline:Y}}static lex(t,n){return new hr(n).lex(t)}static lexInline(t,n){return new hr(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
61
+ `),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(s,a,u)=>a+" ".repeat(u.length));let r,o,i,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
62
+ `:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
63
+ `+r.raw,o.text+=`
64
+ `+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
65
+ `+r.raw,o.text+=`
66
+ `+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const a=t.slice(1);let u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(s=Math.min(s,u))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],l&&o.type==="paragraph"?(o.raw+=`
67
+ `+r.raw,o.text+=`
68
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),l=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=`
69
+ `+r.raw,o.text+=`
70
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,l=t,s,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(h=>{f=h.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(i=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class _c{constructor(t){je(this,"options");this.options=t||bi}code(t,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+`
71
+ `,o?'<pre><code class="language-'+xn(o)+'">'+(r?t:xn(t,!0))+`</code></pre>
72
+ `:"<pre><code>"+(r?t:xn(t,!0))+`</code></pre>
73
+ `}blockquote(t){return`<blockquote>
74
+ ${t}</blockquote>
75
+ `}html(t,n){return t}heading(t,n,r){return`<h${n}>${t}</h${n}>
76
+ `}hr(){return`<hr>
77
+ `}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`>
78
+ `+t+"</"+o+`>
79
+ `}listitem(t,n,r){return`<li>${t}</li>
80
+ `}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
81
+ `}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
82
+ <thead>
83
+ `+t+`</thead>
84
+ `+n+`</table>
85
+ `}tablerow(t){return`<tr>
86
+ ${t}</tr>
87
+ `}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+`</${r}>
88
+ `}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,n,r){const o=my(t);if(o===null)return r;t=o;let i='<a href="'+t+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){const o=my(t);if(o===null)return r;t=o;let i=`<img src="${t}" alt="${r}"`;return n&&(i+=` title="${n}"`),i+=">",i}text(t){return t}}class Bg{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class pr{constructor(t){je(this,"options");je(this,"renderer");je(this,"textRenderer");this.options=t||bi,this.options.renderer=this.options.renderer||new _c,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Bg}static parse(t,n){return new pr(n).parse(t)}static parseInline(t,n){return new pr(n).parseInline(t)}parse(t,n=!0){let r="";for(let o=0;o<t.length;o++){const i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const l=i,s=this.options.extensions.renderers[l.type].call({parser:this},l);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){r+=s||"";continue}}switch(i.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{const l=i;r+=this.renderer.heading(this.parseInline(l.tokens),l.depth,yN(this.parseInline(l.tokens,this.textRenderer)));continue}case"code":{const l=i;r+=this.renderer.code(l.text,l.lang,!!l.escaped);continue}case"table":{const l=i;let s="",a="";for(let c=0;c<l.header.length;c++)a+=this.renderer.tablecell(this.parseInline(l.header[c].tokens),{header:!0,align:l.align[c]});s+=this.renderer.tablerow(a);let u="";for(let c=0;c<l.rows.length;c++){const d=l.rows[c];a="";for(let f=0;f<d.length;f++)a+=this.renderer.tablecell(this.parseInline(d[f].tokens),{header:!1,align:l.align[f]});u+=this.renderer.tablerow(a)}r+=this.renderer.table(s,u);continue}case"blockquote":{const l=i,s=this.parse(l.tokens);r+=this.renderer.blockquote(s);continue}case"list":{const l=i,s=l.ordered,a=l.start,u=l.loose;let c="";for(let d=0;d<l.items.length;d++){const f=l.items[d],h=f.checked,m=f.task;let g="";if(f.task){const S=this.renderer.checkbox(!!h);u?f.tokens.length>0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=S+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=S+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:S+" "}):g+=S+" "}g+=this.parse(f.tokens,u),c+=this.renderer.listitem(g,m,!!h)}r+=this.renderer.list(c,s,a);continue}case"html":{const l=i;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=i;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=i,s=l.tokens?this.parseInline(l.tokens):l.text;for(;o+1<t.length&&t[o+1].type==="text";)l=t[++o],s+=`
89
+ `+(l.tokens?this.parseInline(l.tokens):l.text);r+=n?this.renderer.paragraph(s):s;continue}default:{const l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}parseInline(t,n){n=n||this.renderer;let r="";for(let o=0;o<t.length;o++){const i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=l||"";continue}}switch(i.type){case"escape":{const l=i;r+=n.text(l.text);break}case"html":{const l=i;r+=n.html(l.text);break}case"link":{const l=i;r+=n.link(l.href,l.title,this.parseInline(l.tokens,n));break}case"image":{const l=i;r+=n.image(l.href,l.title,l.text);break}case"strong":{const l=i;r+=n.strong(this.parseInline(l.tokens,n));break}case"em":{const l=i;r+=n.em(this.parseInline(l.tokens,n));break}case"codespan":{const l=i;r+=n.codespan(l.text);break}case"br":{r+=n.br();break}case"del":{const l=i;r+=n.del(this.parseInline(l.tokens,n));break}case"text":{const l=i;r+=n.text(l.text);break}default:{const l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}}class Is{constructor(t){je(this,"options");this.options=t||bi}preprocess(t){return t}postprocess(t){return t}}je(Is,"passThroughHooks",new Set(["preprocess","postprocess"]));var Ta,zh,Hc,Qw;class SN{constructor(...t){Wd(this,Ta);Wd(this,Hc);je(this,"defaults",Fg());je(this,"options",this.setOptions);je(this,"parse",Ya(this,Ta,zh).call(this,hr.lex,pr.parse));je(this,"parseInline",Ya(this,Ta,zh).call(this,hr.lexInline,pr.parseInline));je(this,"Parser",pr);je(this,"parser",pr.parse);je(this,"Renderer",_c);je(this,"TextRenderer",Bg);je(this,"Lexer",hr);je(this,"lexer",hr.lex);je(this,"Tokenizer",wc);je(this,"Hooks",Is);this.use(...t)}walkTokens(t,n){var o,i;let r=[];for(const l of t)switch(r=r.concat(n.call(this,l)),l.type){case"table":{const s=l;for(const a of s.header)r=r.concat(this.walkTokens(a.tokens,n));for(const a of s.rows)for(const u of a)r=r.concat(this.walkTokens(u.tokens,n));break}case"list":{const s=l;r=r.concat(this.walkTokens(s.items,n));break}default:{const s=l;(i=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{r=r.concat(this.walkTokens(s[a],n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=n.renderers[i.name];l?n.renderers[i.name]=function(...s){let a=i.renderer.apply(this,s);return a===!1&&(a=l.apply(this,s)),a}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[i.level];l?l.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new _c(this.defaults);for(const l in r.renderer){const s=r.renderer[l],a=l,u=i[a];i[a]=(...c)=>{let d=s.apply(i,c);return d===!1&&(d=u.apply(i,c)),d||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new wc(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],a=l,u=i[a];i[a]=(...c)=>{let d=s.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new Is;for(const l in r.hooks){const s=r.hooks[l],a=l,u=i[a];Is.passThroughHooks.has(l)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(s.call(i,c)).then(f=>u.call(i,f));const d=s.call(i,c);return u.call(i,d)}:i[a]=(...c)=>{let d=s.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(s){let a=[];return a.push(l.call(this,s)),i&&(a=a.concat(i.call(this,s))),a}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}}Ta=new WeakSet,zh=function(t,n){return(r,o)=>{const i={...o},l={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const s=Ya(this,Hc,Qw).call(this,!!l.silent,!!l.async);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(a=>t(a,l)).then(a=>l.walkTokens?Promise.all(this.walkTokens(a,l.walkTokens)).then(()=>a):a).then(a=>n(a,l)).then(a=>l.hooks?l.hooks.postprocess(a):a).catch(s);try{l.hooks&&(r=l.hooks.preprocess(r));const a=t(r,l);l.walkTokens&&this.walkTokens(a,l.walkTokens);let u=n(a,l);return l.hooks&&(u=l.hooks.postprocess(u)),u}catch(a){return s(a)}}},Hc=new WeakSet,Qw=function(t,n){return r=>{if(r.message+=`
90
+ Please report this to https://github.com/markedjs/marked.`,t){const o="<p>An error occurred:</p><pre>"+xn(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const gi=new SN;function Me(e,t){return gi.parse(e,t)}Me.options=Me.setOptions=function(e){return gi.setOptions(e),Me.defaults=gi.defaults,Gw(Me.defaults),Me};Me.getDefaults=Fg;Me.defaults=bi;Me.use=function(...e){return gi.use(...e),Me.defaults=gi.defaults,Gw(Me.defaults),Me};Me.walkTokens=function(e,t){return gi.walkTokens(e,t)};Me.parseInline=gi.parseInline;Me.Parser=pr;Me.parser=pr.parse;Me.Renderer=_c;Me.TextRenderer=Bg;Me.Lexer=hr;Me.lexer=hr.lex;Me.Tokenizer=wc;Me.Hooks=Is;Me.parse=Me;Me.options;Me.setOptions;Me.use;Me.walkTokens;Me.parseInline;pr.parse;const EN=hr.lex;function fa(){fa=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(C,$,E){C[$]=E.value},i=typeof Symbol=="function"?Symbol:{},l=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(C,$,E){return Object.defineProperty(C,$,{value:E,enumerable:!0,configurable:!0,writable:!0}),C[$]}try{u({},"")}catch{u=function($,E,A){return $[E]=A}}function c(C,$,E,A){var R=$&&$.prototype instanceof v?$:v,z=Object.create(R.prototype),V=new H(A||[]);return o(z,"_invoke",{value:O(C,E,V)}),z}function d(C,$,E){try{return{type:"normal",arg:C.call($,E)}}catch(A){return{type:"throw",arg:A}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",m="executing",g="completed",S={};function v(){}function y(){}function x(){}var w={};u(w,l,function(){return this});var k=Object.getPrototypeOf,b=k&&k(k(G([])));b&&b!==n&&r.call(b,l)&&(w=b);var T=x.prototype=v.prototype=Object.create(w);function N(C){["next","throw","return"].forEach(function($){u(C,$,function(E){return this._invoke($,E)})})}function D(C,$){function E(R,z,V,ie){var ne=d(C[R],C,z);if(ne.type!=="throw"){var Ce=ne.arg,we=Ce.value;return we&&typeof we=="object"&&r.call(we,"__await")?$.resolve(we.__await).then(function(X){E("next",X,V,ie)},function(X){E("throw",X,V,ie)}):$.resolve(we).then(function(X){Ce.value=X,V(Ce)},function(X){return E("throw",X,V,ie)})}ie(ne.arg)}var A;o(this,"_invoke",{value:function(R,z){function V(){return new $(function(ie,ne){E(R,z,ie,ne)})}return A=A?A.then(V,V):V()}})}function O(C,$,E){var A=f;return function(R,z){if(A===m)throw new Error("Generator is already running");if(A===g){if(R==="throw")throw z;return{value:e,done:!0}}for(E.method=R,E.arg=z;;){var V=E.delegate;if(V){var ie=j(V,E);if(ie){if(ie===S)continue;return ie}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(A===f)throw A=g,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);A=m;var ne=d(C,$,E);if(ne.type==="normal"){if(A=E.done?g:h,ne.arg===S)continue;return{value:ne.arg,done:E.done}}ne.type==="throw"&&(A=g,E.method="throw",E.arg=ne.arg)}}}function j(C,$){var E=$.method,A=C.iterator[E];if(A===e)return $.delegate=null,E==="throw"&&C.iterator.return&&($.method="return",$.arg=e,j(C,$),$.method==="throw")||E!=="return"&&($.method="throw",$.arg=new TypeError("The iterator does not provide a '"+E+"' method")),S;var R=d(A,C.iterator,$.arg);if(R.type==="throw")return $.method="throw",$.arg=R.arg,$.delegate=null,S;var z=R.arg;return z?z.done?($[C.resultName]=z.value,$.next=C.nextLoc,$.method!=="return"&&($.method="next",$.arg=e),$.delegate=null,S):z:($.method="throw",$.arg=new TypeError("iterator result is not an object"),$.delegate=null,S)}function B(C){var $={tryLoc:C[0]};1 in C&&($.catchLoc=C[1]),2 in C&&($.finallyLoc=C[2],$.afterLoc=C[3]),this.tryEntries.push($)}function ae(C){var $=C.completion||{};$.type="normal",delete $.arg,C.completion=$}function H(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(B,this),this.reset(!0)}function G(C){if(C||C===""){var $=C[l];if($)return $.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var E=-1,A=function R(){for(;++E<C.length;)if(r.call(C,E))return R.value=C[E],R.done=!1,R;return R.value=e,R.done=!0,R};return A.next=A}}throw new TypeError(typeof C+" is not iterable")}return y.prototype=x,o(T,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:y,configurable:!0}),y.displayName=u(x,a,"GeneratorFunction"),t.isGeneratorFunction=function(C){var $=typeof C=="function"&&C.constructor;return!!$&&($===y||($.displayName||$.name)==="GeneratorFunction")},t.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,x):(C.__proto__=x,u(C,a,"GeneratorFunction")),C.prototype=Object.create(T),C},t.awrap=function(C){return{__await:C}},N(D.prototype),u(D.prototype,s,function(){return this}),t.AsyncIterator=D,t.async=function(C,$,E,A,R){R===void 0&&(R=Promise);var z=new D(c(C,$,E,A),R);return t.isGeneratorFunction($)?z:z.next().then(function(V){return V.done?V.value:z.next()})},N(T),u(T,a,"Generator"),u(T,l,function(){return this}),u(T,"toString",function(){return"[object Generator]"}),t.keys=function(C){var $=Object(C),E=[];for(var A in $)E.push(A);return E.reverse(),function R(){for(;E.length;){var z=E.pop();if(z in $)return R.value=z,R.done=!1,R}return R.done=!0,R}},t.values=G,H.prototype={constructor:H,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(ae),!C)for(var $ in this)$.charAt(0)==="t"&&r.call(this,$)&&!isNaN(+$.slice(1))&&(this[$]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var $=this;function E(ne,Ce){return z.type="throw",z.arg=C,$.next=ne,Ce&&($.method="next",$.arg=e),!!Ce}for(var A=this.tryEntries.length-1;A>=0;--A){var R=this.tryEntries[A],z=R.completion;if(R.tryLoc==="root")return E("end");if(R.tryLoc<=this.prev){var V=r.call(R,"catchLoc"),ie=r.call(R,"finallyLoc");if(V&&ie){if(this.prev<R.catchLoc)return E(R.catchLoc,!0);if(this.prev<R.finallyLoc)return E(R.finallyLoc)}else if(V){if(this.prev<R.catchLoc)return E(R.catchLoc,!0)}else{if(!ie)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return E(R.finallyLoc)}}}},abrupt:function(C,$){for(var E=this.tryEntries.length-1;E>=0;--E){var A=this.tryEntries[E];if(A.tryLoc<=this.prev&&r.call(A,"finallyLoc")&&this.prev<A.finallyLoc){var R=A;break}}R&&(C==="break"||C==="continue")&&R.tryLoc<=$&&$<=R.finallyLoc&&(R=null);var z=R?R.completion:{};return z.type=C,z.arg=$,R?(this.method="next",this.next=R.finallyLoc,S):this.complete(z)},complete:function(C,$){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&$&&(this.next=$),S},finish:function(C){for(var $=this.tryEntries.length-1;$>=0;--$){var E=this.tryEntries[$];if(E.finallyLoc===C)return this.complete(E.completion,E.afterLoc),ae(E),S}},catch:function(C){for(var $=this.tryEntries.length-1;$>=0;--$){var E=this.tryEntries[$];if(E.tryLoc===C){var A=E.completion;if(A.type==="throw"){var R=A.arg;ae(E)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(C,$,E){return this.delegate={iterator:G(C),resultName:$,nextLoc:E},this.method==="next"&&(this.arg=e),S}},t}function Fh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wg(e,t){if(e){if(typeof e=="string")return Fh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fh(e,t)}}function CN(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Wg(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(a){throw a},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
91
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,l=!1,s;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return i=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function $N(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kN(e){var t=$N(e,"string");return typeof t=="symbol"?t:String(t)}function Ht(e,t,n){return t=kN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TN(e){if(Array.isArray(e))return e}function bN(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,l,s=[],a=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);a=!0);}catch(c){u=!0,o=c}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw o}}return s}}function NN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
92
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RN(e,t){return TN(e)||bN(e,t)||Wg(e,t)||NN()}function xy(e,t,n,r,o,i,l){try{var s=e[i](l),a=s.value}catch(u){n(u);return}s.done?t(a):Promise.resolve(a).then(r,o)}function Jw(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(a){xy(i,r,o,l,s,"next",a)}function s(a){xy(i,r,o,l,s,"throw",a)}l(void 0)})}}function PN(e){if(Array.isArray(e))return Fh(e)}function ON(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AN(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
93
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bh(e){return PN(e)||ON(e)||Wg(e)||AN()}var MN=/^data:(image\/(png|jpeg|jpg|gif|webp|bmp|tiff|ico|svg\+xml));base64,/;function Ug(e){var t=MN.exec(e);if(t&&t[1])return t[1]}function Vg(e){return e==="image/svg+xml"?"svg":e==="image/vnd.microsoft.icon"?"ico":e.startsWith("image/")?e.slice(6):e}var LN=/^h([\d+])$/;function DN(e){var t=e.children.map(IN);return jN(t)}function IN(e){if(e.type==="heading"){var t,n="",r=Number((t=e.tag.match(LN))===null||t===void 0?void 0:t[1]);if(Number.isNaN(r))throw new Error("Invalid header depth");for(var o=0;o<Number(r);o++)n+="#";var i=["".concat(n," ")];return{type:"block",children:i.concat.apply(i,Bh(e.children.map(Uh)))}}else{if(e.type==="paragraph")return e.children.length===0?{type:"block",children:["<br />"]}:{type:"block",children:e.children.map(function(s){return Uh(s)})};if(e.type==="list")return{type:"block",children:e.children.flatMap(function(s,a){return qw(e_(e),s,0,a===0)})};var l=e;throw new Error("Unhandled node type: ".concat("type"in l?"exhaustiveCheck.type":"unknown"))}}function jN(e){return Wh.apply(this,arguments)}function Wh(){return Wh=Jw(fa().mark(function e(t){var n,r,o,i,l,s,a,u,c,d;return fa().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:r=[`
94
+ `],o=[],i={},l=0;case 4:if(!(l<t.length)){h.next=44;break}s=t[l],a=CN(s.children),h.prev=7,a.s();case 9:if((u=a.n()).done){h.next=32;break}if(c=u.value,typeof c!="string"){h.next=15;break}r[r.length-1]+=c,h.next=30;break;case 15:if(c.type!=="image"){h.next=23;break}return h.t0=o,h.next=19,WN(c,i);case 19:h.t1=h.sent,h.t0.push.call(h.t0,h.t1),h.next=29;break;case 23:if(c.type!=="link"){h.next=27;break}o.push(VN(c)),h.next=29;break;case 27:throw d=c,new Error("Unexpected node type: ".concat(JSON.stringify(d,null,2)));case 29:r.push("");case 30:h.next=9;break;case 32:h.next=37;break;case 34:h.prev=34,h.t2=h.catch(7),a.e(h.t2);case 37:return h.prev=37,a.f(),h.finish(37);case 40:l===t.length-1?r[r.length-1]+=`
95
+ `:r[r.length-1]+=`
96
+
97
+ `;case 41:l++,h.next=4;break;case 44:return h.abrupt("return",(n={},Ht(n,Yt,"richtext"),Ht(n,"templateStrings",r),Ht(n,"exprs",o),Ht(n,"files",i),n));case 45:case"end":return h.stop()}},e,null,[[7,34,37,40]])})),Wh.apply(this,arguments)}function Zw(e){var t=typeof e.format=="number"?FN(e.format):[],n=e.text.trimStart(),r=e.text.length-n.length;n=n.trimEnd();var o=e.text.length-n.length-r;return t.includes("bold")&&t.includes("italic")?n="***".concat(n,"***"):t.includes("bold")?n="**".concat(n,"**"):t.includes("italic")&&(n="_".concat(n,"_")),t.includes("line-through")&&(n="~~".concat(n,"~~")),"".concat(" ".repeat(r)).concat(n).concat(" ".repeat(o))}function Uh(e){return e.type==="text"?Zw(e):e.type==="linebreak"?`
98
+ `:e}function qw(e,t,n){var r,o,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,l=i?"":`
99
+ `,s=["".concat(l).concat(" ".repeat(n)).concat(e)];return((r=t.children)===null||r===void 0||(o=r[0])===null||o===void 0?void 0:o.type)!=="list"&&s.push(" "),s.concat(t.children.flatMap(function(a){return a.type==="list"?a.children.flatMap(function(u){return qw(e_(a),u,n+4)}):[Uh(a)]}))}function e_(e){if(e.listType==="bullet")return"-";if(e.listType==="number")return"1.";throw new Error("Unhandled list type: ".concat(e.listType))}var zN={bold:1,italic:2,"line-through":4};function FN(e){return Object.entries(zN).flatMap(function(t){var n=RN(t,2),r=n[0],o=n[1];return(o&e)===o?[r]:[]})}var BN=new TextEncoder;function WN(e,t){return Vh.apply(this,arguments)}function Vh(){return Vh=Jw(fa().mark(function e(t,n){var r,o,i,l,s,a,u;return fa().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(!t.src.startsWith("data:")){d.next=13;break}return d.next=3,En.getSHA256Hash(BN.encode(t.src));case 3:if(o=d.sent,i=Ug(t.src),i!==void 0){d.next=7;break}throw new Error("Could not detect Mime Type for image: ".concat(t.src));case 7:return l=Vg(i),s="/public/".concat(o,".").concat(l),n[s]=t.src,d.abrupt("return",(r={},Ht(r,Yt,"file"),Ht(r,gn,s),Ht(r,"metadata",{width:t.width||0,height:t.height||0,sha256:o||""}),r));case 13:return u=UN("sha256",t.src),d.abrupt("return",(a={},Ht(a,Yt,"file"),Ht(a,gn,"/public".concat(t.src.split("?")[0])),Ht(a,"metadata",{width:t.width||0,height:t.height||0,sha256:u||""}),a));case 15:case"end":return d.stop()}},e)})),Vh.apply(this,arguments)}function UN(e,t){var n=t.split("?");if(!(n.length<2)){var r=n[1],o=new URLSearchParams(r);if(o.has(e))return o.get(e)}}function VN(e){var t;return t={},Ht(t,Yt,"link"),Ht(t,"href",e.url),Ht(t,"children",e.children.map(Zw)),t}function wy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wy(Object(n),!0).forEach(function(r){Ht(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var or={version:1,format:"",indent:0,direction:null};function Bl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(typeof e=="string")return Xe(Xe({},or),{},{type:"text",format:"",text:e});if("tag"in e)switch(e.tag){case"h1":return Li(e);case"h2":return Li(e);case"h3":return Li(e);case"h4":return Li(e);case"h5":return Li(e);case"h6":return Li(e);case"li":return QN(e);case"p":return YN(e);case"ul":return _y(e);case"ol":return _y(e);case"span":return t_(e);case"a":return KN(e);case"img":return HN(e);case"br":return t?Xe(Xe({},or),{},{type:"linebreak"}):XN();default:throw Error("Unexpected node tag: "+JSON.stringify(e,null,2))}else throw Error("Unexpected node: "+JSON.stringify(e,null,2))}function HN(e){var t=e.src;return Xe(Xe({},or),{},{type:"image",src:t,width:e.width,height:e.height})}function KN(e){return Xe(Xe({},or),{},{type:"link",url:e.href,children:e.children.map(function(t){return Bl(t)})})}function GN(e){return Xe(Xe({},or),{},{format:"",type:"root",children:e.children.map(function(t){return Bl(t)})})}function Li(e){return Xe(Xe({},or),{},{type:"heading",tag:e.tag,children:e.children.map(function(t){return Bl(t)})})}function YN(e){return Xe(Xe({},or),{},{type:"paragraph",children:e.children.map(function(t){return Bl(t,!0)})})}function XN(){return Xe(Xe({},or),{},{type:"paragraph",children:[]})}function QN(e){return Xe(Xe({},or),{},{type:"listitem",children:e.children.map(function(t){return Bl(t,!0)})})}function _y(e){return Xe(Xe({},or),{},{type:"list",listType:e.tag==="ol"?"number":"bullet",children:e.children.map(function(t){return Bl(t)})},e.dir?{direction:e.dir}:{direction:null})}var JN={bold:1,italic:2,"line-through":4};function ZN(e){return e.reduce(function(t,n){return t|JN[n]},0)}function t_(e){var t=e.children[0];return typeof t=="string"?Xe(Xe({},or),{},{type:"text",text:t,format:ZN(e.classes)}):t_(Xe(Xe({},t),{},{classes:e.classes.concat(t.classes)}))}function Hh(e){"@babel/helpers - typeof";return Hh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hh(e)}var Sc='<val value="',Kh='">',Gh="</val>";function Yn(e,t,n){for(var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=[],i=function(){var a=e[n];if(a.type==="heading")o.push({tag:"h".concat(a.depth),children:Yn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="paragraph")o.push({tag:"p",children:Yn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="strong")o.push({tag:"span",classes:["bold"],children:Yn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="em")o.push({tag:"span",classes:["italic"],children:Yn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="del")o.push({tag:"span",classes:["line-through"],children:Yn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="text")if("tokens"in a&&Array.isArray(a.tokens))o.push.apply(o,Bh(Yn(a.tokens,t,n,r).children));else if(r&&typeof a.raw=="string"){var u=a.raw.split(`
100
+ `),c=u.flatMap(function(w,k){return k===u.length-1?[w]:[w,{tag:"br",children:[]}]});o.push.apply(o,Bh(c))}else o.push(a.raw);else if(a.type==="list")o.push({tag:a.ordered?"ol":"ul",children:Yn(a.items,t,0).children});else if(a.type==="list_item")o.push({tag:"li",children:Yn(a.tokens?a.tokens:[],t,0,!0).children});else if(a.type!=="space")if(a.type==="html"){if(a.text===Gh)return{v:{children:o,cursor:n}};var d=a.text.indexOf(Kh);if(a.text.startsWith(Sc)&&d>-1){var f=Number(a.text.slice(Sc.length,d));if(Number.isNaN(f))throw Error("Illegal val intermediate node: ".concat(JSON.stringify(a)));var h=Yn(e.map(function(w){return w.type==="link"||w.type==="list"?{type:"text",raw:w.raw,text:w.raw}:w}),t,n+1),m=h.children,g=h.cursor,S=t[f];if(S._type==="link")o.push({tag:"a",href:S.href,children:m});else if(S._type==="file"){var v,y;o.push({tag:"img",src:En.convertFileSource(S).url,width:(v=S.metadata)===null||v===void 0?void 0:v.width,height:(y=S.metadata)===null||y===void 0?void 0:y.height,children:[]})}n=g}var x=/<br\s*\/?>/gi;a.text.trim().match(x)&&o.push({tag:"br",children:[]})}else a.type==="link"?a.raw===a.href?o.push(a.raw):o.push({tag:"a",href:a.href,children:Yn(a.tokens?a.tokens:[],t,0).children}):a.type==="br"?o.push({tag:"br",children:[]}):console.error("Could not parse markdown: unsupported token type: ".concat(a.type,". Found: ").concat(a.raw));n++};n<e.length;){var l=i();if(Hh(l)==="object")return l.v}return{children:o,cursor:n}}function n_(e){var t,n=e.templateStrings,r=e.exprs,o=n.flatMap(function(u,c){var d=r[c];return d?d[Yt]==="link"?u.concat("".concat(Sc).concat(c).concat(Kh).concat(d.children[0]).concat(Gh)):u.concat("".concat(Sc).concat(c).concat(Kh).concat(Gh)):u}).join(""),i=EN(o,{gfm:!0}),l=Yn(i,r,0),s=l.children,a=l.cursor;if(a!==i.length)throw Error("Unexpectedly terminated markdown parsing. Possible reason: unclosed html tag?");return t={},Ht(t,Yt,"richtext"),Ht(t,"children",s),t}var an={},I={};let dd={},r_={},ha={},js={},Yh={},pl={},Hg={},Xh={},pa={},ga={},vo={},Kg={},Gg={},o_={},i_={},l_={},s_={},a_={},u_={},c_={},Ec={},d_={},f_={},h_={},p_={},g_={},m_={},v_={},y_={},x_={},Yg={},Xg={},Qh={},w_={},__={},S_={};function K(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let Xr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qN=Xr&&"documentMode"in document?document.documentMode:null,Ut=Xr&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Po=Xr&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Cc=Xr&&"InputEvent"in window&&!qN?"getTargetRanges"in new window.InputEvent("input"):!1,Qg=Xr&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),fd=Xr&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,e2=Xr&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Jg=Xr&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!e2,hd=Qg||fd||Jg?" ":"​",t2=Po?" ":hd,n2=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,r2=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,li={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},o2={directionless:1,unmergeable:2},Sy={center:2,end:6,justify:4,left:1,right:3,start:5},i2={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},l2={normal:0,segmented:2,token:1},s2={0:"normal",2:"segmented",1:"token"},Jh=!1,Zg=0;function a2(e){Zg=e.timeStamp}function vf(e,t,n){return t.__lexicalLineBreak===e||e[`__lexicalKey_${n._key}`]!==void 0}function u2(e){return e.getEditorState().read(()=>{let t=Ke();return t!==null?t.clone():null})}function E_(e,t,n){Jh=!0;let r=100<performance.now()-Zg;try{bn(e,()=>{let o=Ke()||u2(e);var i=new Map,l=e.getRootElement(),s=e._editorState,a=e._blockCursorElement;let u=!1,c="";for(var d=0;d<t.length;d++){var f=t[d],h=f.type,m=f.target,g=Ia(m,s);if(!(g===null&&m!==l||Ve(g))){if(h==="characterData"){if(f=r&&Z(g))e:{f=o,h=m;var S=g;if(he(f)){var v=f.anchor.getNode();if(v.is(S)&&f.format!==v.getFormat()){f=!1;break e}}f=h.nodeType===3&&S.isAttached()}f&&(S=$r(e._window),h=f=null,S!==null&&S.anchorNode===m&&(f=S.anchorOffset,h=S.focusOffset),m=m.nodeValue,m!==null&&om(g,m,f,h,!1))}else if(h==="childList"){for(u=!0,h=f.addedNodes,S=0;S<h.length;S++){v=h[S];var y=R_(v),x=v.parentNode;x==null||v===a||y!==null||v.nodeName==="BR"&&vf(v,x,e)||(Po&&(y=v.innerText||v.nodeValue)&&(c+=y),x.removeChild(v))}if(f=f.removedNodes,h=f.length,0<h){for(S=0,v=0;v<h;v++)x=f[v],(x.nodeName==="BR"&&vf(x,m,e)||a===x)&&(m.appendChild(x),S++);h!==S&&(m===l&&(g=s._nodeMap.get("root")),i.set(m,g))}}}}if(0<i.size)for(let[w,k]of i)if(W(k))for(i=k.getChildrenKeys(),l=w.firstChild,s=0;s<i.length;s++)a=e.getElementByKey(i[s]),a!==null&&(l==null?(w.appendChild(a),l=a):l!==a&&w.replaceChild(a,l),l=l.nextSibling);else Z(k)&&k.markDirty();if(i=n.takeRecords(),0<i.length){for(l=0;l<i.length;l++)for(a=i[l],s=a.addedNodes,a=a.target,d=0;d<s.length;d++)g=s[d],m=g.parentNode,m==null||g.nodeName!=="BR"||vf(g,a,e)||m.removeChild(g);n.takeRecords()}o!==null&&(u&&(o.dirty=!0,xr(o)),Po&&M_(e)&&o.insertRawText(c))})}finally{Jh=!1}}function C_(e){let t=e._observer;if(t!==null){let n=t.takeRecords();E_(e,n,t)}}function $_(e){Zg===0&&gd(e).addEventListener("textInput",a2,!0),e._observer=new MutationObserver((t,n)=>{E_(e,t,n)})}function Ey(e,t){let n=e.__mode,r=e.__format;e=e.__style;let o=t.__mode,i=t.__format;return t=t.__style,(n===null||n===o)&&(r===null||r===i)&&(e===null||e===t)}function Cy(e,t){let n=e.mergeWithSibling(t),r=tt()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function k_(e){if(e.__text===""&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;(t=e.getPreviousSibling())!==null&&Z(t)&&t.isSimpleText()&&!t.isUnmergeable();)if(t.__text==="")t.remove();else{Ey(t,e)&&(e=Cy(t,e));break}for(var n;(n=e.getNextSibling())!==null&&Z(n)&&n.isSimpleText()&&!n.isUnmergeable();)if(n.__text==="")n.remove();else{Ey(e,n)&&Cy(e,n);break}}}function qg(e){return $y(e.anchor),$y(e.focus),e}function $y(e){for(;e.type==="element";){var t=e.getNode(),n=e.offset;if(n===t.getChildrenSize()?(t=t.getChildAtIndex(n-1),n=!0):(t=t.getChildAtIndex(n),n=!1),Z(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}else if(!W(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let c2=1,d2=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function em(e){let t=document.activeElement;if(t===null)return!1;let n=t.nodeName;return Ve(Ia(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&t.__lexicalEditor==null)}function Da(e,t,n){let r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!em(t)&&tm(t)===e}catch{return!1}}function tm(e){for(;e!=null;){let t=e.__lexicalEditor;if(t!=null)return t;e=pd(e)}return null}function Zh(e){return e.isToken()||e.isSegmented()}function $c(e){for(;e!=null;){if(e.nodeType===3)return e;e=e.firstChild}return null}function T_(e,t,n){return t=li[t],e&t&&(n===null||!(n&t))?e^t:n===null||n&t?e|t:e}function b_(e){return Z(e)||xa(e)||Ve(e)}function N_(e,t){if(t!=null)e.__key=t;else{en(),99<wa&&K(14),t=tt();var n=kr(),r=""+c2++;n._nodeMap.set(r,e),W(e)?t._dirtyElements.set(r,!0):t._dirtyLeaves.add(r),t._cloneNotNeeded.add(r),t._dirtyType=1,e.__key=r}}function si(e){var t=e.getParent();if(t!==null){let o=e.getWritable();t=t.getWritable();var n=e.getPreviousSibling();if(e=e.getNextSibling(),n===null)if(e!==null){var r=e.getWritable();t.__first=e.__key,r.__prev=null}else t.__first=null;else{if(r=n.getWritable(),e!==null){let i=e.getWritable();i.__prev=r.__key,r.__next=i.__key}else r.__next=null;o.__prev=null}e===null?n!==null?(e=n.getWritable(),t.__last=n.__key,e.__next=null):t.__last=null:(e=e.getWritable(),n!==null?(n=n.getWritable(),n.__next=e.__key,e.__prev=n.__key):e.__prev=null,o.__next=null),t.__size--,o.__parent=null}}function kc(e){99<wa&&K(14);var t=e.getLatest(),n=t.__parent,r=kr();let o=tt(),i=r._nodeMap;if(r=o._dirtyElements,n!==null)e:for(;n!==null;){if(r.has(n))break e;let l=i.get(n);if(l===void 0)break;r.set(n,!1),n=l.__parent}t=t.__key,o._dirtyType=1,W(e)?r.set(t,!0):o._dirtyLeaves.add(t)}function Lt(e){en();var t=tt();let n=t._compositionKey;e!==n&&(t._compositionKey=e,n!==null&&(t=kt(n),t!==null&&t.getWritable()),e!==null&&(e=kt(e),e!==null&&e.getWritable()))}function yo(){return Kl()?null:tt()._compositionKey}function kt(e,t){return e=(t||kr())._nodeMap.get(e),e===void 0?null:e}function R_(e,t){let n=tt();return e=e[`__lexicalKey_${n._key}`],e!==void 0?kt(e,t):null}function Ia(e,t){for(;e!=null;){let n=R_(e,t);if(n!==null)return n;e=pd(e)}return null}function P_(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t}function ky(e){return e.read(()=>Cr().getTextContent())}function f2(e,t){bn(e,()=>{var n=kr();if(!n.isEmpty())if(t==="root")Cr().markDirty();else{n=n._nodeMap;for(let[,r]of n)r.markDirty()}},e._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Cr(){return kr()._nodeMap.get("root")}function xr(e){en();let t=kr();e!==null&&(e.dirty=!0,e._cachedNodes=null),t._selection=e}function rl(e){var t=tt(),n;e:{for(n=e;n!=null;){let r=n[`__lexicalKey_${t._key}`];if(r!==void 0){n=r;break e}n=pd(n)}n=null}return n===null?(t=t.getRootElement(),e===t?kt("root"):null):kt(n)}function O_(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function nm(e){let t=[];for(;e!==null;)t.push(e),e=e._parentEditor;return t}function A_(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function rm(e,t,n){if(t=$r(t._window),t!==null){var r=t.anchorNode,{anchorOffset:o,focusOffset:i}=t;if(r!==null&&(t=r.nodeType===3?r.nodeValue:null,r=Ia(r),t!==null&&Z(r))){if(t===hd&&n){let l=n.length;t=n,i=o=l}t!==null&&om(r,t,o,i,e)}}}function om(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){let u=i.isComposing(),c=t;if((u||o)&&t[t.length-1]===hd&&(c=t.slice(0,-1)),t=i.getTextContent(),o||c!==t)if(c==="")if(Lt(null),Qg||fd||Jg)i.remove();else{let d=tt();setTimeout(()=>{d.update(()=>{i.isAttached()&&i.remove()})},20)}else{o=i.getParent(),t=Hl();var l=i.getTextContentSize(),s=yo(),a=i.getKey();i.isToken()||s!==null&&a===s&&!u||he(t)&&(o!==null&&!o.canInsertTextBefore()&&t.anchor.offset===0||t.anchor.key===e.__key&&t.anchor.offset===0&&!i.canInsertTextBefore()||t.focus.key===e.__key&&t.focus.offset===l&&!i.canInsertTextAfter())?i.markDirty():(e=Ke(),he(e)&&n!==null&&r!==null&&(e.setTextNodeRange(i,n,i,r),i.isSegmented()&&(n=i.getTextContent(),n=Ct(n),i.replace(n),i=n)),i.setTextContent(c))}}}function h2(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;e=e.anchor.offset;let n=t.getParentOrThrow(),r=t.isToken();return e===0?((e=!t.canInsertTextBefore()||!n.canInsertTextBefore()||r)||(t=t.getPreviousSibling(),e=(Z(t)||W(t)&&t.isInline())&&!t.canInsertTextAfter()),e):e===t.getTextContentSize()?!t.canInsertTextAfter()||!n.canInsertTextAfter()||r:!1}function zs(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];return r!==void 0?r:(e=e[t],typeof e=="string"?(e=e.split(" "),n[t]=e):e)}function im(e,t,n,r,o){n.size!==0&&(n=r.__type,r=r.__key,t=t.get(n),t===void 0&&K(33,n),n=t.klass,t=e.get(n),t===void 0&&(t=new Map,e.set(n,t)),e=t.get(r),n=e==="destroyed"&&o==="created",(e===void 0||n)&&t.set(r,n?"updated":o))}function Ty(e,t,n){let r=e.getParent(),o=n;return r!==null&&(t&&n===0?(o=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(o=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?o-1:o)}function qh(e,t){var n=e.offset;return e.type==="element"?(e=e.getNode(),Ty(e,t,n)):(e=e.getNode(),t&&n===0||!t&&n===e.getTextContentSize()?(n=t?e.getPreviousSibling():e.getNextSibling(),n===null?Ty(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n):null)}function M_(e){return e=(e=gd(e).event)&&e.inputType,e==="insertFromPaste"||e==="insertFromPasteAsQuotation"}function Tc(e){return!nn(e)&&!e.isLastChild()&&!e.isInline()}function bc(e,t){return e=e._keyToDOMMap.get(t),e===void 0&&K(75,t),e}function pd(e){return e=e.assignedSlot||e.parentElement,e!==null&&e.nodeType===11?e.host:e}function Nc(e,t){for(e=e.getParent();e!==null;){if(e.is(t))return!0;e=e.getParent()}return!1}function gd(e){return e=e._window,e===null&&K(78),e}function L_(e){for(e=e.getParentOrThrow();e!==null&&!er(e);)e=e.getParentOrThrow();return e}function er(e){return nn(e)||W(e)&&e.isShadowRoot()}function D_(e){return e=e.constructor.clone(e),N_(e,null),e}function ja(e){var t=tt();let n=e.constructor.getType();return t=t._nodes.get(n),t===void 0&&K(97),t=t.replace,t!==null?(t=t(e),t instanceof e.constructor||K(98),t):e}function yf(e,t){e=e.getParent(),!nn(e)||W(t)||Ve(t)||K(99)}function xf(e){return(Ve(e)||W(e)&&!e.canBeEmpty())&&!e.isInline()}function ep(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,t=e.parentElement,t!==null&&t.removeChild(e)}function $r(e){return Xr?(e||window).getSelection():null}function I_(e,t){let n=e.getChildAtIndex(t);n==null&&(n=e),er(e)&&K(102);let r=l=>{const s=l.getParentOrThrow(),a=er(s),u=l!==n||a?D_(l):l;if(a)return l.insertAfter(u),[l,u,u];const[c,d,f]=r(s);return l=l.getNextSiblings(),f.append(u,...l),[c,d,u]},[o,i]=r(n);return[o,i]}function Rc(e,t){for(;e!==Cr()&&e!=null;){if(t(e))return e;e=e.getParent()}return null}function p2(e){let t=[],n=[e];for(;0<n.length;){let r=n.pop();r===void 0&&K(112),W(r)&&n.unshift(...r.getChildren()),r!==e&&t.push(r)}return t}function md(e){return e.nodeType===1}function j_(e,t,n,r,o,i){for(e=e.getFirstChild();e!==null;){let l=e.__key;e.__parent===t&&(W(e)&&j_(e,l,n,r,o,i),n.has(l)||i.delete(l),o.push(l)),e=e.getNextSibling()}}function g2(e,t,n,r){e=e._nodeMap,t=t._nodeMap;let o=[];for(let[i]of r){let l=t.get(i);l===void 0||l.isAttached()||(W(l)&&j_(l,i,e,t,o,r),e.has(i)||r.delete(i),o.push(i))}for(let i of o)t.delete(i);for(let i of n)r=t.get(i),r===void 0||r.isAttached()||(e.has(i)||n.delete(i),t.delete(i))}let mt="",qt="",Mr="",Oo,Gt,ma,z_=!1,lm=!1,vd,Fu=null,tp,np,mi,Ao,rp,va;function Bu(e,t){let n=mi.get(e);if(t!==null){let r=lp(e);r.parentNode===t&&t.removeChild(r)}Ao.has(e)||Gt._keyToDOMMap.delete(e),W(n)&&(e=Pc(n,mi),op(e,0,e.length-1,null)),n!==void 0&&im(va,ma,vd,n,"destroyed")}function op(e,t,n,r){for(;t<=n;++t){let o=e[t];o!==void 0&&Bu(o,r)}}function Go(e,t){e.setProperty("text-align",t)}function F_(e,t){var n=Oo.theme.indent;if(typeof n=="string"){let r=e.classList.contains(n);0<t&&!r?e.classList.add(n):1>t&&r&&e.classList.remove(n)}n=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||"40px",e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${n})`)}function B_(e,t){e=e.style,t===0?Go(e,""):t===1?Go(e,"left"):t===2?Go(e,"center"):t===3?Go(e,"right"):t===4?Go(e,"justify"):t===5?Go(e,"start"):t===6&&Go(e,"end")}function Wu(e,t,n){let r=Ao.get(e);r===void 0&&K(60);let o=r.createDOM(Oo,Gt);var i=Gt._keyToDOMMap;if(o["__lexicalKey_"+Gt._key]=e,i.set(e,o),Z(r)?o.setAttribute("data-lexical-text","true"):Ve(r)&&o.setAttribute("data-lexical-decorator","true"),W(r)){if(e=r.__indent,i=r.__size,e!==0&&F_(o,e),i!==0){--i,e=Pc(r,Ao);var l=qt;qt="",ip(e,r,0,i,o,null),U_(r,o),qt=l}e=r.__format,e!==0&&B_(o,e),r.isInline()||W_(null,r,o),Tc(r)&&(mt+=`
101
+
102
+ `,Mr+=`
103
+
104
+ `)}else i=r.getTextContent(),Ve(r)?(l=r.decorate(Gt,Oo),l!==null&&V_(e,l),o.contentEditable="false"):Z(r)&&(r.isDirectionless()||(qt+=i)),mt+=i,Mr+=i;return t!==null&&(n!=null?t.insertBefore(o,n):(n=t.__lexicalLineBreak,n!=null?t.insertBefore(o,n):t.appendChild(o))),im(va,ma,vd,r,"created"),o}function ip(e,t,n,r,o,i){let l=mt;for(mt="";n<=r;++n)Wu(e[n],o,i);Tc(t)&&(mt+=`
105
+
106
+ `),o.__lexicalTextContent=mt,mt=l+mt}function by(e,t){return e=t.get(e),xa(e)||Ve(e)&&e.isInline()}function W_(e,t,n){e=e!==null&&(e.__size===0||by(e.__last,mi)),t=t.__size===0||by(t.__last,Ao),e?t||(t=n.__lexicalLineBreak,t!=null&&n.removeChild(t),n.__lexicalLineBreak=null):t&&(t=document.createElement("br"),n.__lexicalLineBreak=t,n.appendChild(t))}function U_(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==qt||n!==Fu){let i=qt==="";if(i)var r=Fu;else r=qt,r=n2.test(r)?"rtl":r2.test(r)?"ltr":null;if(r!==n){let l=t.classList,s=Oo.theme;var o=n!==null?s[n]:void 0;let a=r!==null?s[r]:void 0;o!==void 0&&(typeof o=="string"&&(o=o.split(" "),o=s[n]=o),l.remove(...o)),r===null||i&&r==="ltr"?t.removeAttribute("dir"):(a!==void 0&&(typeof a=="string"&&(n=a.split(" "),a=s[r]=n),a!==void 0&&l.add(...a)),t.dir=r),lm||(e.getWritable().__dir=r)}Fu=r,t.__lexicalDirTextContent=qt,t.__lexicalDir=r}}function Pc(e,t){let n=[];for(e=e.__first;e!==null;){let r=t.get(e);r===void 0&&K(101),n.push(e),e=r.__next}return n}function Ss(e,t){var n=mi.get(e),r=Ao.get(e);n!==void 0&&r!==void 0||K(61);var o=z_||np.has(e)||tp.has(e);let i=bc(Gt,e);if(n===r&&!o)return W(n)?(r=i.__lexicalTextContent,r!==void 0&&(mt+=r,Mr+=r),r=i.__lexicalDirTextContent,r!==void 0&&(qt+=r)):(r=n.getTextContent(),Z(n)&&!n.isDirectionless()&&(qt+=r),Mr+=r,mt+=r),i;if(n!==r&&o&&im(va,ma,vd,r,"updated"),r.updateDOM(n,i,Oo))return r=Wu(e,null,null),t===null&&K(62),t.replaceChild(r,i),Bu(e,null),r;if(W(n)&&W(r)){if(e=r.__indent,e!==n.__indent&&F_(i,e),e=r.__format,e!==n.__format&&B_(i,e),o){e=r,o=qt,qt="",t=mt;var l=n.__size,s=e.__size;if(mt="",l===1&&s===1){var a=n.__first,u=e.__first;if(a===u)Ss(a,i);else{var c=lp(a);u=Wu(u,null,null),i.replaceChild(u,c),Bu(a,null)}}else{u=Pc(n,mi);var d=Pc(e,Ao);if(l===0)s!==0&&ip(d,e,0,s-1,i,null);else if(s===0)l!==0&&(a=i.__lexicalLineBreak==null,op(u,0,l-1,a?null:i),a&&(i.textContent=""));else{var f=u;u=d,d=l-1,l=s-1;let m=i.firstChild,g=0;for(s=0;g<=d&&s<=l;){var h=f[g];let S=u[s];if(h===S)m=wf(Ss(S,i)),g++,s++;else{a===void 0&&(a=new Set(f)),c===void 0&&(c=new Set(u));let v=c.has(h),y=a.has(S);v?(y?(h=bc(Gt,S),h===m?m=wf(Ss(S,i)):(m!=null?i.insertBefore(h,m):i.appendChild(h),Ss(S,i)),g++):Wu(S,i,m),s++):(m=wf(lp(h)),Bu(h,i),g++)}}a=g>d,c=s>l,a&&!c?(a=u[l+1],a=a===void 0?null:Gt.getElementByKey(a),ip(u,e,s,l,i,a)):c&&!a&&op(f,g,d,i)}}Tc(e)&&(mt+=`
107
+
108
+ `),i.__lexicalTextContent=mt,mt=t+mt,U_(e,i),qt=o,nn(r)||r.isInline()||W_(n,r,i)}Tc(r)&&(mt+=`
109
+
110
+ `,Mr+=`
111
+
112
+ `)}else n=r.getTextContent(),Ve(r)?(o=r.decorate(Gt,Oo),o!==null&&V_(e,o)):Z(r)&&!r.isDirectionless()&&(qt+=n),mt+=n,Mr+=n;return!lm&&nn(r)&&r.__cachedText!==Mr&&(r=r.getWritable(),r.__cachedText=Mr),i}function V_(e,t){let n=Gt._pendingDecorators,r=Gt._decorators;if(n===null){if(r[e]===t)return;n=P_(Gt)}n[e]=t}function wf(e){return e=e.nextSibling,e!==null&&e===Gt._blockCursorElement&&(e=e.nextSibling),e}function lp(e){let t=rp.get(e);return t===void 0&&K(75,e),t}let Nr=Object.freeze({}),sp=[["keydown",E2],["pointerdown",v2],["compositionstart",_2],["compositionend",S2],["input",w2],["click",m2],["cut",Nr],["copy",Nr],["dragstart",Nr],["dragover",Nr],["dragend",Nr],["paste",Nr],["focus",Nr],["blur",Nr],["drop",Nr]];Cc&&sp.push(["beforeinput",(e,t)=>x2(e,t)]);let ya=0,H_=0,K_=0,Vi=null,Fs=0,ap=!1,up=!1,Bs=!1,Es=!1,G_=[0,"",0,"root",0];function Y_(e,t,n,r,o){let i=e.anchor,l=e.focus,s=i.getNode();var a=tt();let u=$r(a._window),c=u!==null?u.anchorNode:null,d=i.key;a=a.getElementByKey(d);let f=n.length;return d!==l.key||!Z(s)||(!o&&(!Cc||K_<r+50)||s.isDirty()&&2>f||O_(n))&&i.offset!==l.offset&&!s.isComposing()||Zh(s)||s.isDirty()&&1<f||(o||!Cc)&&a!==null&&!s.isComposing()&&c!==$c(a)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||h2(e,s)}function Ny(e,t){return e!==null&&e.nodeValue!==null&&e.nodeType===3&&t!==0&&t!==e.nodeValue.length}function Ry(e,t,n){let{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:l}=e;ap&&(ap=!1,Ny(r,o)&&Ny(i,l))||bn(t,()=>{if(!n)xr(null);else if(Da(t,r,i)){var s=Ke();if(he(s)){var a=s.anchor,u=a.getNode();if(s.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(s.dirty=!0);var c=gd(t).event;c=c?c.timeStamp:performance.now();let[d,f,h,m,g]=G_;c<g+200&&a.offset===h&&a.key===m?(s.format=d,s.style=f):a.type==="text"?(s.format=u.getFormat(),s.style=u.getStyle()):a.type==="element"&&(s.format=0,s.style="")}else{a=255,u=!1,c=s.getNodes();let d=c.length;for(let f=0;f<d;f++){let h=c[f];if(Z(h)&&(u=!0,a&=h.getFormat(),a===0))break}s.format=u?a:0}}J(t,dd,void 0)}})}function m2(e,t){bn(t,()=>{let n=Ke();var r=$r(t._window);let o=Hl();if(r)if(he(n)){let l=n.anchor;var i=l.getNode();l.type==="element"&&l.offset===0&&n.isCollapsed()&&!nn(i)&&Cr().getChildrenSize()===1&&i.getTopLevelElementOrThrow().isEmpty()&&o!==null&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):e.detail!==3||n.isCollapsed()||(r=n.focus.getNode(),i!==r&&(W(i)?i.select(0):i.getParentOrThrow().select(0)))}else e.pointerType==="touch"&&(i=r.anchorNode,i!==null&&(i=i.nodeType,i===1||i===3))&&(r=am(o,r,t),xr(r));J(t,r_,e)})}function v2(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&e!=="touch"&&bn(t,()=>{Ve(Ia(n))||(up=!0)})}function X_(e){return e.getTargetRanges?(e=e.getTargetRanges(),e.length===0?null:e[0]):null}function y2(e,t){return e!==t||W(e)||W(t)||!e.isToken()||!t.isToken()}function x2(e,t){let n=e.inputType,r=X_(e);n==="deleteCompositionText"||Po&&M_(t)||n!=="insertCompositionText"&&bn(t,()=>{let o=Ke();if(n==="deleteContentBackward"){if(o===null){var i=Hl();if(!he(i))return;xr(i.clone())}if(he(o)){H_===229&&e.timeStamp<ya+30&&t.isComposing()&&o.anchor.key===o.focus.key?(Lt(null),ya=0,setTimeout(()=>{bn(t,()=>{Lt(null)})},30),he(o)&&(i=o.anchor.getNode(),i.markDirty(),o.format=i.getFormat(),o.style=i.getStyle())):(e.preventDefault(),J(t,ha,!0));return}}if(he(o)){i=e.data,Vi!==null&&rm(!1,t,Vi),o.dirty&&Vi===null||!o.isCollapsed()||nn(o.anchor.getNode())||r===null||o.applyDOMRange(r),Vi=null;var l=o.focus,s=o.anchor.getNode();if(l=l.getNode(),n==="insertText"||n==="insertTranspose")i===`
113
+ `?(e.preventDefault(),J(t,js,!1)):i===`
114
+
115
+ `?(e.preventDefault(),J(t,Yh,void 0)):i==null&&e.dataTransfer?(i=e.dataTransfer.getData("text/plain"),e.preventDefault(),o.insertRawText(i)):i!=null&&Y_(o,r,i,e.timeStamp,!0)?(e.preventDefault(),J(t,pl,i)):Vi=i,K_=e.timeStamp;else switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":J(t,pl,e);break;case"insertFromComposition":Lt(null),J(t,pl,e);break;case"insertLineBreak":Lt(null),J(t,js,!1);break;case"insertParagraph":Lt(null),Bs&&!fd?(Bs=!1,J(t,js,!1)):J(t,Yh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":J(t,Hg,e);break;case"deleteByComposition":y2(s,l)&&J(t,Xh,e);break;case"deleteByDrag":case"deleteByCut":J(t,Xh,e);break;case"deleteContent":J(t,ha,!1);break;case"deleteWordBackward":J(t,pa,!0);break;case"deleteWordForward":J(t,pa,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":J(t,ga,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":J(t,ga,!1);break;case"formatStrikeThrough":J(t,vo,"strikethrough");break;case"formatBold":J(t,vo,"bold");break;case"formatItalic":J(t,vo,"italic");break;case"formatUnderline":J(t,vo,"underline");break;case"historyUndo":J(t,Kg,void 0);break;case"historyRedo":J(t,Gg,void 0)}}})}function w2(e,t){e.stopPropagation(),bn(t,()=>{var n=Ke(),r=e.data,o=X_(e);if(r!=null&&he(n)&&Y_(n,o,r,e.timeStamp,!1)){Es&&(cp(t,r),Es=!1);var i=n.anchor,l=i.getNode();if(o=$r(t._window),o===null)return;let s=i.offset;(i=Cc&&!n.isCollapsed()&&Z(l)&&o.anchorNode!==null)&&(l=l.getTextContent().slice(0,s)+r+l.getTextContent().slice(s+n.focus.offset),o=o.anchorNode,i=l===(o.nodeType===3?o.nodeValue:null)),i||J(t,pl,r),r=r.length,Po&&1<r&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=r),Qg||fd||Jg||!t.isComposing()||(ya=0,Lt(null))}else rm(!1,t,r!==null?r:void 0),Es&&(cp(t,r||void 0),Es=!1);en(),n=tt(),C_(n)}),Vi=null}function _2(e,t){bn(t,()=>{let n=Ke();if(he(n)&&!t.isComposing()){let r=n.anchor,o=n.anchor.getNode();Lt(r.key),(e.timeStamp<ya+30||r.type==="element"||!n.isCollapsed()||o.getFormat()!==n.format||o.getStyle()!==n.style)&&J(t,pl,t2)}})}function cp(e,t){var n=e._compositionKey;if(Lt(null),n!==null&&t!=null){if(t===""){t=kt(n),e=$c(e.getElementByKey(n)),e!==null&&e.nodeValue!==null&&Z(t)&&om(t,e.nodeValue,null,null,!0);return}if(t[t.length-1]===`
116
+ `&&(n=Ke(),he(n))){t=n.focus,n.anchor.set(t.key,t.offset,t.type),J(e,Ec,null);return}}rm(!0,e,t)}function S2(e,t){Po?Es=!0:bn(t,()=>{cp(t,e.data)})}function E2(e,t){if(ya=e.timeStamp,H_=e.keyCode,!t.isComposing()){var{keyCode:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:l}=e;if(!J(t,o_,e)){if(n!==39||o||i||l)if(n!==39||l||r||!o&&!i)if(n!==37||o||i||l)if(n!==37||l||r||!o&&!i)if(n!==38||o||i)if(n!==40||o||i)if(n===13&&r)Bs=!0,J(t,Ec,e);else if(n===32)J(t,d_,e);else if(Ut&&o&&n===79)e.preventDefault(),Bs=!0,J(t,js,!0);else if(n!==13||r){var s=Ut?l||i?!1:n===8||n===72&&o:o||l||i?!1:n===8;s?n===8?J(t,f_,e):(e.preventDefault(),J(t,ha,!0)):n===27?J(t,h_,e):(s=Ut?r||l||i?!1:n===46||n===68&&o:o||l||i?!1:n===46,s?n===46?J(t,p_,e):(e.preventDefault(),J(t,ha,!1)):n===8&&(Ut?l:o)?(e.preventDefault(),J(t,pa,!0)):n===46&&(Ut?l:o)?(e.preventDefault(),J(t,pa,!1)):Ut&&i&&n===8?(e.preventDefault(),J(t,ga,!0)):Ut&&i&&n===46?(e.preventDefault(),J(t,ga,!1)):n===66&&!l&&(Ut?i:o)?(e.preventDefault(),J(t,vo,"bold")):n===85&&!l&&(Ut?i:o)?(e.preventDefault(),J(t,vo,"underline")):n===73&&!l&&(Ut?i:o)?(e.preventDefault(),J(t,vo,"italic")):n!==9||l||o||i?n===90&&!r&&(Ut?i:o)?(e.preventDefault(),J(t,Kg,void 0)):(s=Ut?n===90&&i&&r:n===89&&o||n===90&&o&&r,s?(e.preventDefault(),J(t,Gg,void 0)):Vl(t._editorState._selection)?(s=r?!1:n===67?Ut?i:o:!1,s?(e.preventDefault(),J(t,Yg,e)):(s=r?!1:n===88?Ut?i:o:!1,s?(e.preventDefault(),J(t,Xg,e)):n===65&&(Ut?i:o)&&(e.preventDefault(),J(t,Qh,e)))):!Po&&n===65&&(Ut?i:o)&&(e.preventDefault(),J(t,Qh,e))):J(t,g_,e))}else Bs=!1,J(t,Ec,e);else J(t,c_,e);else J(t,u_,e);else J(t,a_,e);else J(t,s_,e);else J(t,l_,e);else J(t,i_,e);(o||r||l||i)&&J(t,S_,e)}}}function Q_(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}let gl=new Map;function J_(e){e=e.target;let t=$r(e==null?null:e.nodeType===9?e.defaultView:e.ownerDocument.defaultView);if(t!==null){var n=tm(t.anchorNode);if(n!==null){up&&(up=!1,bn(n,()=>{var l=Hl(),s=t.anchorNode;s!==null&&(s=s.nodeType,s===1||s===3)&&(l=am(l,t,n),xr(l))})),e=nm(n),e=e[e.length-1];var r=e._key,o=gl.get(r),i=o||e;i!==n&&Ry(t,i,!1),Ry(t,n,!0),n!==e?gl.set(r,n):o&&gl.delete(r)}}}function C2(e,t){Fs===0&&e.ownerDocument.addEventListener("selectionchange",J_),Fs++,e.__lexicalEditor=t;let n=Q_(e);for(let r=0;r<sp.length;r++){let[o,i]=sp[r],l=typeof i=="function"?s=>{s._lexicalHandled!==!0&&(s._lexicalHandled=!0,t.isEditable()&&i(s,t))}:s=>{if(s._lexicalHandled!==!0&&(s._lexicalHandled=!0,t.isEditable()))switch(o){case"cut":return J(t,Xg,s);case"copy":return J(t,Yg,s);case"paste":return J(t,Hg,s);case"dragstart":return J(t,v_,s);case"dragover":return J(t,y_,s);case"dragend":return J(t,x_,s);case"focus":return J(t,w_,s);case"blur":return J(t,__,s);case"drop":return J(t,m_,s)}};e.addEventListener(o,l),n.push(()=>{e.removeEventListener(o,l)})}}function dp(e,t,n){en();var r=e.__key;let o=e.getParent();if(o!==null){var i=Ke();if(he(i)&&W(e)){var{anchor:l,focus:s}=i,a=l.getNode(),u=s.getNode();Nc(a,e)&&l.set(e.__key,0,"element"),Nc(u,e)&&s.set(e.__key,0,"element")}if(a=i,u=!1,he(a)&&t){i=a.anchor;let c=a.focus;i.key===r&&(Ac(i,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0),c.key===r&&(Ac(c,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0)}else Vl(a)&&t&&e.isSelected()&&e.selectPrevious();he(a)&&t&&!u?(r=e.getIndexWithinParent(),si(e),Oc(a,o,r,-1)):si(e),n||er(o)||o.canBeEmpty()||!o.isEmpty()||dp(o,t),t&&nn(o)&&o.isEmpty()&&o.selectEnd()}}class za{static getType(){K(64,this.name)}static clone(){K(65,this.name)}constructor(t){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,N_(this,t)}getType(){return this.__type}isAttached(){for(var t=this.__key;t!==null;){if(t==="root")return!0;if(t=kt(t),t===null)break;t=t.__parent}return!1}isSelected(t){if(t=t||Ke(),t==null)return!1;let n=t.getNodes().some(r=>r.__key===this.__key);return Z(this)?n:he(t)&&t.anchor.type==="element"&&t.focus.type==="element"&&t.anchor.key===t.focus.key&&t.anchor.offset===t.focus.offset?!1:n}getKey(){return this.__key}getIndexWithinParent(){var t=this.getParent();if(t===null)return-1;t=t.getFirstChild();let n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let t=this.getLatest().__parent;return t===null?null:kt(t)}getParentOrThrow(){let t=this.getParent();return t===null&&K(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){let n=t.getParent();if(er(n))return t;t=n}return null}getTopLevelElementOrThrow(){let t=this.getTopLevelElement();return t===null&&K(67,this.__key),t}getParents(){let t=[],n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){let t=[],n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){let t=this.getLatest().__prev;return t===null?null:kt(t)}getPreviousSiblings(){let t=[];var n=this.getParent();if(n===null)return t;for(n=n.getFirstChild();n!==null&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){let t=this.getLatest().__next;return t===null?null:kt(t)}getNextSiblings(){let t=[],n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){let n=this.getParents();var r=t.getParents();W(this)&&n.unshift(this),W(t)&&r.unshift(t),t=n.length;var o=r.length;if(t===0||o===0||n[t-1]!==r[o-1])return null;for(r=new Set(r),o=0;o<t;o++){let i=n[o];if(r.has(i))return i}return null}is(t){return t==null?!1:this.__key===t.__key}isBefore(t){if(this===t)return!1;if(t.isParentOf(this))return!0;if(this.isParentOf(t))return!1;var n=this.getCommonAncestor(t);let r=this;for(;;){var o=r.getParentOrThrow();if(o===n){o=r.getIndexWithinParent();break}r=o}for(r=t;;){if(t=r.getParentOrThrow(),t===n){n=r.getIndexWithinParent();break}r=t}return o<n}isParentOf(t){let n=this.__key;if(n===t.__key)return!1;for(;t!==null;){if(t.__key===n)return!0;t=t.getParent()}return!1}getNodesBetween(t){let n=this.isBefore(t),r=[],o=new Set;for(var i=this;;){var l=i.__key;if(o.has(l)||(o.add(l),r.push(i)),i===t)break;if(l=W(i)?n?i.getFirstChild():i.getLastChild():null,l!==null)i=l;else if(l=n?i.getNextSibling():i.getPreviousSibling(),l!==null)i=l;else{if(i=i.getParentOrThrow(),o.has(i.__key)||r.push(i),i===t)break;l=i;do l===null&&K(68),i=n?l.getNextSibling():l.getPreviousSibling(),l=l.getParent(),l!==null&&(i!==null||o.has(l.__key)||r.push(l));while(i===null)}}return n||r.reverse(),r}isDirty(){let t=tt()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){let t=kt(this.__key);return t===null&&K(113),t}getWritable(){en();var t=kr(),n=tt();t=t._nodeMap;let r=this.__key,o=this.getLatest(),i=o.__parent;n=n._cloneNotNeeded;var l=Ke();return l!==null&&(l._cachedNodes=null),n.has(r)?(kc(o),o):(l=o.constructor.clone(o),l.__parent=i,l.__next=o.__next,l.__prev=o.__prev,W(o)&&W(l)?(l.__first=o.__first,l.__last=o.__last,l.__size=o.__size,l.__indent=o.__indent,l.__format=o.__format,l.__dir=o.__dir):Z(o)&&Z(l)&&(l.__format=o.__format,l.__style=o.__style,l.__mode=o.__mode,l.__detail=o.__detail),n.add(r),l.__key=r,kc(l),t.set(r,l),l)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){K(70)}updateDOM(){K(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){K(72)}static importJSON(){K(18,this.name)}static transform(){return null}remove(t){dp(this,!0,t)}replace(t,n){en();var r=Ke();r!==null&&(r=r.clone()),yf(this,t);let o=this.getLatest(),i=this.__key,l=t.__key,s=t.getWritable();t=this.getParentOrThrow().getWritable();let a=t.__size;si(s);let u=o.getPreviousSibling(),c=o.getNextSibling(),d=o.__prev,f=o.__next,h=o.__parent;return dp(o,!1,!0),u===null?t.__first=l:u.getWritable().__next=l,s.__prev=d,c===null?t.__last=l:c.getWritable().__prev=l,s.__next=f,s.__parent=h,t.__size=a,n&&this.getChildren().forEach(m=>{s.append(m)}),he(r)&&(xr(r),n=r.anchor,r=r.focus,n.key===i&&Ay(n,s),r.key===i&&Ay(r,s)),yo()===i&&Lt(l),s}insertAfter(t,n=!0){en(),yf(this,t);var r=this.getWritable();let o=t.getWritable();var i=o.getParent();let l=Ke();var s=!1,a=!1;if(i!==null){var u=t.getIndexWithinParent();si(o),he(l)&&(a=i.__key,s=l.anchor,i=l.focus,s=s.type==="element"&&s.key===a&&s.offset===u+1,a=i.type==="element"&&i.key===a&&i.offset===u+1)}i=this.getNextSibling(),u=this.getParentOrThrow().getWritable();let c=o.__key,d=r.__next;return i===null?u.__last=c:i.getWritable().__prev=c,u.__size++,r.__next=c,o.__next=d,o.__prev=r.__key,o.__parent=r.__parent,n&&he(l)&&(n=this.getIndexWithinParent(),Oc(l,u,n+1),r=u.__key,s&&l.anchor.set(r,n+2,"element"),a&&l.focus.set(r,n+2,"element")),t}insertBefore(t,n=!0){en(),yf(this,t);var r=this.getWritable();let o=t.getWritable(),i=o.__key;si(o);let l=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),a=r.__prev,u=this.getIndexWithinParent();return l===null?s.__first=i:l.getWritable().__next=i,s.__size++,r.__prev=i,o.__prev=a,o.__next=r.__key,o.__parent=r.__parent,r=Ke(),n&&he(r)&&(n=this.getParentOrThrow(),Oc(r,n,u)),t}isParentRequired(){return!1}createParentElementNode(){return vi()}selectPrevious(t,n){en();let r=this.getPreviousSibling(),o=this.getParentOrThrow();return r===null?o.select(0,0):W(r)?r.select():Z(r)?r.select(t,n):(t=r.getIndexWithinParent()+1,o.select(t,t))}selectNext(t,n){en();let r=this.getNextSibling(),o=this.getParentOrThrow();return r===null?o.select():W(r)?r.select(0,0):Z(r)?r.select(t,n):(t=r.getIndexWithinParent(),o.select(t,t))}markDirty(){this.getWritable()}}class Wl extends za{static getType(){return"linebreak"}static clone(t){return new Wl(t.__key)}constructor(t){super(t)}getTextContent(){return`
117
+ `}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:t=>{let n=t.parentElement,r,o;return n!==null&&((r=n.firstChild)===t||r.nextSibling===t&&r.nodeType===3&&(r.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((o=n.lastChild)===t||o.previousSibling===t&&o.nodeType===3&&(o.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:$2,priority:0}}}}static importJSON(){return Nl()}exportJSON(){return{type:"linebreak",version:1}}}function $2(){return{node:Nl()}}function Nl(){return ja(new Wl)}function xa(e){return e instanceof Wl}function _f(e,t){return t&16?"code":t&128?"mark":t&32?"sub":t&64?"sup":null}function Sf(e,t){return t&1?"strong":t&2?"em":"span"}function Ef(e,t,n,r,o){e=r.classList,r=zs(o,"base"),r!==void 0&&e.add(...r),r=zs(o,"underlineStrikethrough");let i=!1,l=t&8&&t&4;var s=n&8&&n&4;r!==void 0&&(s?(i=!0,l||e.add(...r)):l&&e.remove(...r));for(let a in li)s=li[a],r=zs(o,a),r!==void 0&&(n&s?!i||a!=="underline"&&a!=="strikethrough"?(!(t&s)||l&&a==="underline"||a==="strikethrough")&&e.add(...r):t&s&&e.remove(...r):t&s&&e.remove(...r))}function Cf(e,t,n){let r=t.firstChild;if(n=n.isComposing(),e+=n?hd:"",r==null)t.textContent=e;else if(t=r.nodeValue,t!==e)if(n||Po){n=t.length;let o=e.length,i=0,l=0;for(;i<n&&i<o&&t[i]===e[i];)i++;for(;l+i<n&&l+i<o&&t[n-l-1]===e[o-l-1];)l++;e=[i,n-i-l,e.slice(i,o-l)];let[s,a,u]=e;a!==0&&r.deleteData(s,a),r.insertData(s,u)}else r.nodeValue=e}function gu(e,t){return t=document.createElement(t),t.appendChild(e),t}class Ni extends za{static getType(){return"text"}static clone(t){return new Ni(t.__text,t.__key)}constructor(t,n){super(n),this.__text=t,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let t=this.getLatest();return s2[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===yo()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(t){return t=li[t],(this.getFormat()&t)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){let r=this.getLatest().__format;return T_(r,t,n)}createDOM(t){var n=this.__format,r=_f(this,n);let o=Sf(this,n),i=document.createElement(r===null?o:r),l=i;return this.hasFormat("code")&&i.setAttribute("spellcheck","false"),r!==null&&(l=document.createElement(o),i.appendChild(l)),r=l,Cf(this.__text,r,this),t=t.theme.text,t!==void 0&&Ef(o,0,n,r,t),n=this.__style,n!==""&&(i.style.cssText=n),i}updateDOM(t,n,r){let o=this.__text;var i=t.__format,l=this.__format,s=_f(this,i);let a=_f(this,l);var u=Sf(this,i);let c=Sf(this,l);return(s===null?u:s)!==(a===null?c:a)?!0:s===a&&u!==c?(i=n.firstChild,i==null&&K(48),t=s=document.createElement(c),Cf(o,t,this),r=r.theme.text,r!==void 0&&Ef(c,0,l,t,r),n.replaceChild(s,i),!1):(u=n,a!==null&&s!==null&&(u=n.firstChild,u==null&&K(49)),Cf(o,u,this),r=r.theme.text,r!==void 0&&i!==l&&Ef(c,i,l,u,r),l=this.__style,t.__style!==l&&(n.style.cssText=l),!1)}static importDOM(){return{"#text":()=>({conversion:b2,priority:0}),b:()=>({conversion:T2,priority:0}),code:()=>({conversion:io,priority:0}),em:()=>({conversion:io,priority:0}),i:()=>({conversion:io,priority:0}),s:()=>({conversion:io,priority:0}),span:()=>({conversion:k2,priority:0}),strong:()=>({conversion:io,priority:0}),sub:()=>({conversion:io,priority:0}),sup:()=>({conversion:io,priority:0}),u:()=>({conversion:io,priority:0})}}static importJSON(t){let n=Ct(t.text);return n.setFormat(t.format),n.setDetail(t.detail),n.setMode(t.mode),n.setStyle(t.style),n}exportDOM(t){return{element:t}=super.exportDOM(t),t!==null&&md(t)||K(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=gu(t,"b")),this.hasFormat("italic")&&(t=gu(t,"i")),this.hasFormat("strikethrough")&&(t=gu(t,"s")),this.hasFormat("underline")&&(t=gu(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(t){let n=this.getWritable();return n.__format=typeof t=="string"?li[t]:t,n}setDetail(t){let n=this.getWritable();return n.__detail=typeof t=="string"?o2[t]:t,n}setStyle(t){let n=this.getWritable();return n.__style=t,n}toggleFormat(t){return t=li[t],this.setFormat(this.getFormat()^t)}toggleDirectionless(){let t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){let t=this.getWritable();return t.__detail^=2,t}setMode(t){if(t=l2[t],this.__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(t){if(this.__text===t)return this;let n=this.getWritable();return n.__text=t,n}select(t,n){en();let r=Ke();var o=this.getTextContent();let i=this.__key;if(typeof o=="string"?(o=o.length,t===void 0&&(t=o),n===void 0&&(n=o)):n=t=0,he(r))o=yo(),o!==r.anchor.key&&o!==r.focus.key||Lt(i),r.setTextNodeRange(this,t,this,n);else return eS(i,t,i,n,"text","text");return r}spliceText(t,n,r,o){let i=this.getWritable(),l=i.__text,s=r.length,a=t;0>a&&(a=s+a,0>a&&(a=0));let u=Ke();return o&&he(u)&&(t+=s,u.setTextNodeRange(i,t,i,t)),n=l.slice(0,a)+r+l.slice(a+n),i.__text=n,i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){en();var n=this.getLatest(),r=n.getTextContent(),o=n.__key,i=yo(),l=new Set(t);t=[];for(var s=r.length,a="",u=0;u<s;u++)a!==""&&l.has(u)&&(t.push(a),a=""),a+=r[u];if(a!==""&&t.push(a),l=t.length,l===0)return[];if(t[0]===r)return[n];var c=t[0];r=n.getParentOrThrow(),u=n.getFormat();let d=n.getStyle(),f=n.__detail;s=!1,n.isSegmented()?(a=Ct(c),a.__format=u,a.__style=d,a.__detail=f,s=!0):(a=n.getWritable(),a.__text=c),n=Ke(),a=[a],c=c.length;for(let g=1;g<l;g++){var h=t[g],m=h.length;h=Ct(h).getWritable(),h.__format=u,h.__style=d,h.__detail=f;let S=h.__key;if(m=c+m,he(n)){let v=n.anchor,y=n.focus;v.key===o&&v.type==="text"&&v.offset>c&&v.offset<=m&&(v.key=S,v.offset-=c,n.dirty=!0),y.key===o&&y.type==="text"&&y.offset>c&&y.offset<=m&&(y.key=S,y.offset-=c,n.dirty=!0)}i===o&&Lt(S),c=m,a.push(h)}return o=this.getPreviousSibling(),i=this.getNextSibling(),o!==null&&kc(o),i!==null&&kc(i),o=r.getWritable(),i=this.getIndexWithinParent(),s?(o.splice(i,0,a),this.remove()):o.splice(i,1,a),he(n)&&Oc(n,r,i,l-1),a}mergeWithSibling(t){var n=t===this.getPreviousSibling();n||t===this.getNextSibling()||K(50);var r=this.__key;let o=t.__key,i=this.__text,l=i.length;yo()===o&&Lt(r);let s=Ke();if(he(s)){let a=s.anchor,u=s.focus;a!==null&&a.key===o&&(Fy(a,n,r,t,l),s.dirty=!0),u!==null&&u.key===o&&(Fy(u,n,r,t,l),s.dirty=!0)}return r=t.__text,this.setTextContent(n?r+i:i+r),n=this.getWritable(),t.remove(),n}isTextEntity(){return!1}}function k2(e){let t=e.style.fontWeight==="700",n=e.style.textDecoration==="line-through",r=e.style.fontStyle==="italic",o=e.style.textDecoration==="underline",i=e.style.verticalAlign;return{forChild:l=>(Z(l)&&(t&&l.toggleFormat("bold"),n&&l.toggleFormat("strikethrough"),r&&l.toggleFormat("italic"),o&&l.toggleFormat("underline"),i==="sub"&&l.toggleFormat("subscript"),i==="super"&&l.toggleFormat("superscript")),l),node:null}}function T2(e){let t=e.style.fontWeight==="normal";return{forChild:n=>(Z(n)&&!t&&n.toggleFormat("bold"),n),node:null}}let Py=new WeakMap;function b2(e){e.parentElement===null&&K(129);for(var t=e.textContent||"",n,r=e.parentNode,o=[e];r!==null&&(n=Py.get(r))===void 0&&!(r.nodeName==="PRE"||r.nodeType===1&&r.style.whiteSpace.startsWith("pre"));)o.push(r),r=r.parentNode;for(n=n===void 0?r:n,r=0;r<o.length;r++)Py.set(o[r],n);if(n!==null){for(t=t.split(/(\r?\n|\t)/),e=[],o=t.length,n=0;n<o;n++)r=t[n],r===`
118
+ `||r===`\r
119
+ `?e.push(Nl()):r===" "?e.push(yd()):r!==""&&e.push(Ct(r));return{node:e}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){for(o=e,n=!0;o!==null&&(o=Oy(o,!1))!==null;)if(r=o.textContent||"",0<r.length){/[ \t\n]$/.test(r)&&(t=t.slice(1)),n=!1;break}n&&(t=t.slice(1))}if(t[t.length-1]===" "){for(o=!0;e!==null&&(e=Oy(e,!0))!==null;)if(0<(e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){o=!1;break}o&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:Ct(t)}}let N2=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function Oy(e,t){for(;;){for(var n=void 0;(n=t?e.nextSibling:e.previousSibling)===null;)if(e=e.parentElement,e===null)return null;if(e=n,e.nodeType===1&&(n=e.style.display,n===""&&e.nodeName.match(N2)===null||n!==""&&!n.startsWith("inline")))return null;for(;(n=t?e.firstChild:e.lastChild)!==null;)e=n;if(e.nodeType===3)return e;if(e.nodeName==="BR")return null}}let R2={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function io(e){let t=R2[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:n=>(Z(n)&&!n.hasFormat(t)&&n.toggleFormat(t),n),node:null}}function Ct(e=""){return ja(new Ni(e))}function Z(e){return e instanceof Ni}class Ul extends Ni{static getType(){return"tab"}static clone(t){let n=new Ul(t.__key);return n.__text=t.__text,n.__format=t.__format,n.__style=t.__style,n}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}static importJSON(t){let n=yd();return n.setFormat(t.format),n.setStyle(t.style),n}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){K(126)}setDetail(){K(127)}setMode(){K(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function yd(){return ja(new Ul)}class wr{constructor(t,n,r){this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){let n=this.getNode(),r=t.getNode(),o=this.offset;if(t=t.offset,W(n)){var i=n.getDescendantByIndex(o);n=i??n}return W(r)&&(i=r.getDescendantByIndex(t),r=i??r),n===r?o<t:n.isBefore(r)}getNode(){let t=kt(this.key);return t===null&&K(20),t}set(t,n,r){let o=this._selection,i=this.key;this.key=t,this.offset=n,this.type=r,Kl()||(yo()===i&&Lt(t),o!==null&&(o._cachedNodes=null,o.dirty=!0))}}function $f(e,t){let n=t.__key,r=e.offset,o="element";if(Z(t))o="text",t=t.getTextContentSize(),r>t&&(r=t);else if(!W(t)){var i=t.getNextSibling();Z(i)?(n=i.__key,r=0,o="text"):(i=t.getParent())&&(n=i.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,o)}function Ay(e,t){if(W(t)){let n=t.getLastDescendant();W(n)||Z(n)?$f(e,n):$f(e,t)}else $f(e,t)}function My(e,t,n,r){let o=e.getNode(),i=o.getChildAtIndex(e.offset),l=Ct(),s=nn(o)?vi().append(l):l;l.setFormat(n),l.setStyle(r),i===null?o.append(s):(i.insertBefore(s),t.type==="element"&&t.key===e.key&&t.offset!==e.offset&&t.set(t.key,t.offset+1,"element")),e.is(t)&&t.set(l.__key,0,"text"),e.set(l.__key,0,"text")}function co(e,t,n,r){e.key=t,e.offset=n,e.type=r}class xd{constructor(t){this.dirty=!1,this._nodes=t,this._cachedNodes=null}is(t){if(!Vl(t))return!1;let n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(o=>r.has(o))}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new xd(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t,n){let r=this.getNodes(),o=r.length;var i=r[o-1];if(Z(i))i=i.select();else{let l=i.getIndexWithinParent()+1;i=i.getParentOrThrow().select(l,l)}for(i.insertNodes(t,n),t=0;t<o;t++)r[t].remove();return!0}getNodes(){var t=this._cachedNodes;if(t!==null)return t;var n=this._nodes;t=[];for(let r of n)n=kt(r),n!==null&&t.push(n);return Kl()||(this._cachedNodes=t),t}getTextContent(){let t=this.getNodes(),n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}}function he(e){return e instanceof Ri}function fp(e){let[t,,n]=nS(e);e=n.getChildren();let r=e.length;var o=e[0].getChildren().length;let i=Array(r);for(var l=0;l<r;l++)i[l]=Array(o);for(o=0;o<r;o++){l=e[o].getChildren();let s=0;for(let a=0;a<l.length;a++){for(;i[o][s];)s++;let u=l[a],c=u.__rowSpan||1,d=u.__colSpan||1;for(let f=0;f<c;f++)for(let h=0;h<d;h++)i[o+f][s+h]=u;if(t===u)return{colSpan:d,columnIndex:s,rowIndex:o,rowSpan:c};s+=d}}return null}class wd{constructor(t,n,r){this.gridKey=t,this.anchor=n,this.focus=r,this.dirty=!1,this._cachedNodes=null,n._selection=this,r._selection=this}is(t){return sm(t)?this.gridKey===t.gridKey&&this.anchor.is(t.anchor)&&this.focus.is(t.focus):!1}set(t,n,r){this.dirty=!0,this.gridKey=t,this.anchor.key=n,this.focus.key=r,this._cachedNodes=null}clone(){return new wd(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Uu(this)}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t,n){let r=this.focus.getNode();return qg(r.select(0,r.getChildrenSize())).insertNodes(t,n)}getShape(){var t=kt(this.anchor.key);if(Dn(t)||K(103),t=fp(t),t===null)throw Error("getCellRect: expected to find AnchorNode");var n=kt(this.focus.key);Dn(n)||K(104);let r=fp(n);if(r===null)throw Error("getCellRect: expected to find focusCellNode");n=Math.min(t.columnIndex,r.columnIndex);let o=Math.max(t.columnIndex,r.columnIndex),i=Math.min(t.rowIndex,r.rowIndex);return t=Math.max(t.rowIndex,r.rowIndex),{fromX:Math.min(n,o),fromY:Math.min(i,t),toX:Math.max(n,o),toY:Math.max(i,t)}}getNodes(){function t(S){let{cell:v,startColumn:y,startRow:x}=S;a=Math.min(a,y),u=Math.min(u,x),c=Math.max(c,y+v.__colSpan-1),d=Math.max(d,x+v.__rowSpan-1)}var n=this._cachedNodes;if(n!==null)return n;var r=this.anchor.getNode();n=this.focus.getNode(),r=Rc(r,Dn);var o=Rc(n,Dn);Dn(r)||K(103),Dn(o)||K(104),n=r.getParent(),_a(n)||K(105),n=n.getParent(),fm(n)||K(106);let[i,l,s]=tS(n,r,o),a=Math.min(l.startColumn,s.startColumn),u=Math.min(l.startRow,s.startRow),c=Math.max(l.startColumn+l.cell.__colSpan-1,s.startColumn+s.cell.__colSpan-1),d=Math.max(l.startRow+l.cell.__rowSpan-1,s.startRow+s.cell.__rowSpan-1);r=a,o=u;for(var f=a,h=u;a<r||u<o||c>f||d>h;){if(a<r){var m=h-o;--r;for(var g=0;g<=m;g++)t(i[o+g][r])}if(u<o)for(m=f-r,--o,g=0;g<=m;g++)t(i[o][r+g]);if(c>f)for(m=h-o,f+=1,g=0;g<=m;g++)t(i[o+g][f]);if(d>h)for(m=f-r,h+=1,g=0;g<=m;g++)t(i[h][r+g])}for(n=[n],r=null,o=u;o<=d;o++)for(f=a;f<=c;f++)({cell:h}=i[o][f]),m=h.getParent(),_a(m)||K(107),m!==r&&n.push(m),n.push(h,...p2(h)),r=m;return Kl()||(this._cachedNodes=n),n}getTextContent(){let t=this.getNodes(),n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}}function sm(e){return e instanceof wd}class Ri{constructor(t,n,r,o){this.anchor=t,this.focus=n,this.dirty=!1,this.format=r,this.style=o,this._cachedNodes=null,t._selection=this,n._selection=this}is(t){return he(t)?this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style:!1}isBackward(){return this.focus.isBefore(this.anchor)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var t=this._cachedNodes;if(t!==null)return t;t=this.anchor;var n=this.focus,r=t.isBefore(n),o=r?t:n;r=r?n:t,t=o.getNode(),n=r.getNode();let i=o.offset;return o=r.offset,W(t)&&(r=t.getDescendantByIndex(i),t=r??t),W(n)&&(r=n.getDescendantByIndex(o),r!==null&&r!==t&&n.getChildAtIndex(o)===r&&(r=r.getPreviousSibling()),n=r??n),t=t.is(n)?W(t)&&0<t.getChildrenSize()?[]:[t]:t.getNodesBetween(n),Kl()||(this._cachedNodes=t),t}setTextNodeRange(t,n,r,o){co(this.anchor,t.__key,n,"text"),co(this.focus,r.__key,o,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let t=this.getNodes();if(t.length===0)return"";let n=t[0],r=t[t.length-1],o=this.anchor,i=this.focus,l=o.isBefore(i),[s,a]=Uu(this),u="",c=!0;for(let d=0;d<t.length;d++){let f=t[d];if(W(f)&&!f.isInline())c||(u+=`
120
+ `),c=!f.isEmpty();else if(c=!1,Z(f)){let h=f.getTextContent();f===n?f===r?(o.type!=="element"||i.type!=="element"||i.offset===o.offset)&&(h=s<a?h.slice(s,a):h.slice(a,s)):h=l?h.slice(s):h.slice(a):f===r&&(h=l?h.slice(0,a):h.slice(0,s)),u+=h}else!Ve(f)&&!xa(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(t){let n=tt(),r=n.getEditorState()._selection;if(t=q_(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r),t!==null){var[o,i]=t;co(this.anchor,o.key,o.offset,o.type),co(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}}clone(){let t=this.anchor,n=this.focus;return new Ri(new wr(t.key,t.offset,t.type),new wr(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=T_(this.format,t,null),this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){return(this.format&li[t])!==0}insertRawText(t){t=t.split(/(\r?\n|\t)/);let n=[],r=t.length;for(let o=0;o<r;o++){let i=t[o];i===`
121
+ `||i===`\r
122
+ `?n.push(Nl()):i===" "?n.push(yd()):n.push(Ct(i))}this.insertNodes(n)}insertText(t){var n=this.anchor,r=this.focus,o=this.isCollapsed()||n.isBefore(r),i=this.format,l=this.style;o&&n.type==="element"?My(n,r,i,l):o||r.type!=="element"||My(r,n,i,l);var s=this.getNodes(),a=s.length,u=o?r:n;r=(o?n:r).offset;var c=u.offset;n=s[0],Z(n)||K(26),o=n.getTextContent().length;var d=n.getParentOrThrow(),f=s[a-1];if(this.isCollapsed()&&r===o&&(n.isSegmented()||n.isToken()||!n.canInsertTextAfter()||!d.canInsertTextAfter()&&n.getNextSibling()===null)){var h=n.getNextSibling();if(Z(h)&&h.canInsertTextBefore()&&!Zh(h)||(h=Ct(),h.setFormat(i),d.canInsertTextAfter()?n.insertAfter(h):d.insertAfter(h)),h.select(0,0),n=h,t!==""){this.insertText(t);return}}else if(this.isCollapsed()&&r===0&&(n.isSegmented()||n.isToken()||!n.canInsertTextBefore()||!d.canInsertTextBefore()&&n.getPreviousSibling()===null)){if(h=n.getPreviousSibling(),(!Z(h)||Zh(h))&&(h=Ct(),h.setFormat(i),d.canInsertTextBefore()?n.insertBefore(h):d.insertBefore(h)),h.select(),n=h,t!==""){this.insertText(t);return}}else if(n.isSegmented()&&r!==o)d=Ct(n.getTextContent()),d.setFormat(i),n.replace(d),n=d;else if(!(this.isCollapsed()||t===""||(h=f.getParent(),d.canInsertTextBefore()&&d.canInsertTextAfter()&&(!W(h)||h.canInsertTextBefore()&&h.canInsertTextAfter())))){this.insertText(""),Z_(this.anchor,this.focus,null),this.insertText(t);return}if(a===1)if(n.isToken())t=Ct(t),t.select(),n.replace(t);else{if(s=n.getFormat(),a=n.getStyle(),r===c&&(s!==i||a!==l))if(n.getTextContent()==="")n.setFormat(i),n.setStyle(l);else{s=Ct(t),s.setFormat(i),s.setStyle(l),s.select(),r===0?n.insertBefore(s,!1):([a]=n.splitText(r),a.insertAfter(s,!1)),s.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);return}n=n.spliceText(r,c-r,t,!0),n.getTextContent()===""?n.remove():this.anchor.type==="text"&&(n.isComposing()?this.anchor.offset-=t.length:(this.format=s,this.style=a))}else{if(i=new Set([...n.getParentKeys(),...f.getParentKeys()]),h=W(n)?n:n.getParentOrThrow(),l=W(f)?f:f.getParentOrThrow(),d=f,!h.is(l)&&l.isInline())do d=l,l=l.getParentOrThrow();while(l.isInline());if(u.type==="text"&&(c!==0||f.getTextContent()==="")||u.type==="element"&&f.getIndexWithinParent()<c)if(Z(f)&&!f.isToken()&&c!==f.getTextContentSize()){if(f.isSegmented()){var m=Ct(f.getTextContent());f.replace(m),f=m}nn(u.getNode())||(f=f.spliceText(0,c,"")),i.add(f.__key)}else u=f.getParentOrThrow(),u.canBeEmpty()||u.getChildrenSize()!==1?f.remove():u.remove();else i.add(f.__key);for(u=l.getChildren(),c=new Set(s),f=h.is(l),h=h.isInline()&&n.getNextSibling()===null?h:n,m=u.length-1;0<=m;m--){let g=u[m];if(g.is(n)||W(g)&&g.isParentOf(n))break;g.isAttached()&&(!c.has(g)||g.is(d)?f||h.insertAfter(g,!1):g.remove())}if(!f)for(u=l,c=null;u!==null;)l=u.getChildren(),f=l.length,(f===0||l[f-1].is(c))&&(i.delete(u.__key),c=u),u=u.getParent();for(n.isToken()?r===o?n.select():(t=Ct(t),t.select(),n.replace(t)):(n=n.spliceText(r,o-r,t,!0),n.getTextContent()===""?n.remove():n.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length)),t=1;t<a;t++)n=s[t],i.has(n.__key)||n.remove()}}removeText(){this.insertText("")}formatText(t){if(this.isCollapsed())this.toggleFormat(t),Lt(null);else{var n=this.getNodes(),r=[];for(var o of n)Z(o)&&r.push(o);var i=r.length;if(i===0)this.toggleFormat(t),Lt(null);else{o=this.anchor;var l=this.focus,s=this.isBackward();n=s?l:o,o=s?o:l;var a=0,u=r[0];if(l=n.type==="element"?0:n.offset,n.type==="text"&&l===u.getTextContentSize()&&(a=1,u=r[1],l=0),u!=null){s=u.getFormatFlags(t,null);var c=i-1,d=r[c];if(i=o.type==="text"?o.offset:d.getTextContentSize(),u.is(d))l!==i&&(l===0&&i===u.getTextContentSize()?u.setFormat(s):(t=u.splitText(l,i),t=l===0?t[0]:t[1],t.setFormat(s),n.type==="text"&&n.set(t.__key,0,"text"),o.type==="text"&&o.set(t.__key,i-l,"text")),this.format=s);else{l!==0&&([,u]=u.splitText(l),l=0),u.setFormat(s);var f=d.getFormatFlags(t,s);for(0<i&&(i!==d.getTextContentSize()&&([d]=d.splitText(i)),d.setFormat(f)),a+=1;a<c;a++){let h=r[a];if(!h.isToken()){let m=h.getFormatFlags(t,f);h.setFormat(m)}}n.type==="text"&&n.set(u.__key,l,"text"),o.type==="text"&&o.set(d.__key,i,"text"),this.format=s|f}}}}}insertNodes(t,n){if(!this.isCollapsed()){var r=this.isBackward()?this.anchor:this.focus,o=r.getNode().getNextSibling();if(o=o?o.getKey():null,r=(r=r.getNode().getPreviousSibling())?r.getKey():null,this.removeText(),this.isCollapsed()&&this.focus.type==="element"){if(this.focus.key===o&&this.focus.offset===0){var i=Ct();this.focus.getNode().insertBefore(i)}else this.focus.key===r&&this.focus.offset===this.focus.getNode().getChildrenSize()&&(i=Ct(),this.focus.getNode().insertAfter(i));i&&(this.focus.set(i.__key,0,"text"),this.anchor.set(i.__key,0,"text"))}}i=this.anchor,r=i.offset;var l=i.getNode();o=l,i.type==="element"&&(i=i.getNode(),o=i.getChildAtIndex(r-1),o=o===null?i:o),i=[];var s=l.getNextSiblings(),a=er(l)?null:l.getTopLevelElementOrThrow();if(Z(l))if(o=l.getTextContent().length,r===0&&o!==0)o=l.getPreviousSibling(),o=o!==null?o:l.getParentOrThrow(),i.push(l);else if(r===o)o=l;else{if(l.isToken())return!1;[o,l]=l.splitText(r),i.push(l)}l=o,i.push(...s),s=t[0];var u=!1,c=null;for(let m=0;m<t.length;m++){var d=t[m];if(er(o)||Ve(o)||!W(d)||d.isInline())u&&!W(d)&&!Ve(d)&&er(o.getParent())&&K(28);else{if(d.is(s)){if(W(o)&&o.isEmpty()&&o.canReplaceWith(d)){o.replace(d),o=d,u=!0;continue}if(u=d.getFirstDescendant(),b_(u)){for(var f=u.getParentOrThrow();f.isInline();)f=f.getParentOrThrow();if(c=f.getChildren(),u=c.length,W(o)){var h=o.getFirstChild();for(let g=0;g<u;g++){let S=c[g];h===null?o.append(S):h.insertAfter(S),h=S}}else{for(h=u-1;0<=h;h--)o.insertAfter(c[h]);o=o.getParentOrThrow()}if(c=c[u-1],f.remove(),u=!0,f.is(d))continue}}Z(o)&&(a===null&&K(27),o=a)}u=!1,W(o)&&!o.isInline()?(c=d,Ve(d)&&!d.isInline()?o=t.length===1&&o.canBeEmpty()&&o.isEmpty()?o.insertBefore(d,!1):o.insertAfter(d,!1):W(d)?(d.canBeEmpty()||!d.isEmpty())&&(nn(o)?(f=o.getChildAtIndex(r),f!==null?f.insertBefore(d):o.append(d),o=d):d.isInline()?(o.append(d),o=d):o=o.insertAfter(d,!1)):(f=o.getFirstChild(),f!==null?f.insertBefore(d):o.append(d),o=d)):!W(d)||W(d)&&d.isInline()||Ve(o)&&!o.isInline()?(c=d,he(this)&&Ve(d)&&(W(o)||Z(o))&&!d.isInline()?(Z(o)?(f=o.getParentOrThrow(),[o]=o.splitText(r),o=o.getIndexWithinParent()+1):(f=o,o=r),[,o]=I_(f,o),o=o.insertBefore(d)):o=o.insertAfter(d,!1)):(d=o.getParentOrThrow(),xa(o)&&o.remove(),o=d,m--)}if(n&&(Z(l)?l.select():(t=o.getPreviousSibling(),Z(t)?t.select():(t=o.getIndexWithinParent(),o.getParentOrThrow().select(t,t)))),W(o)){if(t=Z(c)?c:W(c)&&c.isInline()?c.getLastDescendant():o.getLastDescendant(),n||(t===null?o.select():Z(t)?t.getTextContent()===""?t.selectPrevious():t.select():t.selectNext()),i.length!==0)for(n=o,t=i.length-1;0<=t;t--)r=i[t],a=r.getParentOrThrow(),!W(o)||hp(r)||Ve(r)&&(!r.isInline()||r.isIsolated())?W(o)||hp(r)?W(r)&&!r.canInsertAfter(o)?(l=a.constructor.clone(a),W(l)||K(29),l.append(r),o.insertAfter(l)):o.insertAfter(r):(o.insertBefore(r),o=r):(n===o?o.append(r):o.insertBefore(r),o=r),a.isEmpty()&&!a.canBeEmpty()&&a.remove()}else n||(Z(o)?o.select():(n=o.getParentOrThrow(),t=o.getIndexWithinParent()+1,n.select(t,t)));return!0}insertParagraph(){this.isCollapsed()||this.removeText();var t=this.anchor,n=t.offset,r=[];if(t.type==="text"){var o=t.getNode(),i=o.getNextSiblings().reverse(),l=o.getParentOrThrow(),s=l.isInline(),a=s?l.getTextContentSize():o.getTextContentSize();n===0?i.push(o):(s&&(r=l.getNextSiblings()),n===a||s&&n===o.getTextContentSize()||([,o]=o.splitText(n),i.push(o)))}else{if(l=t.getNode(),er(l)){i=vi(),r=l.getChildAtIndex(n),i.select(),r!==null?r.insertBefore(i,!1):l.append(i);return}i=l.getChildren().slice(n).reverse()}if(o=i.length,n===0&&0<o&&l.isInline()){if(r=l.getParentOrThrow(),i=r.insertNewAfter(this,!1),W(i))for(r=r.getChildren(),l=0;l<r.length;l++)i.append(r[l])}else if(s=l.insertNewAfter(this,!1),s===null)this.insertLineBreak();else if(W(s))if(a=l.getFirstChild(),n===0&&(l.is(t.getNode())||a&&a.is(t.getNode()))&&0<o)l.insertBefore(s);else{if(l=null,n=r.length,t=s.getParentOrThrow(),0<n)for(a=0;a<n;a++)t.append(r[a]);if(o!==0)for(r=0;r<o;r++)n=i[r],l===null?s.append(n):l.insertBefore(n),l=n;s.canBeEmpty()||s.getChildrenSize()!==0?s.selectStart():(s.selectPrevious(),s.remove())}}insertLineBreak(t){let n=Nl();var r=this.anchor;r.type==="element"&&(r=r.getNode(),nn(r)&&this.insertParagraph()),t?this.insertNodes([n],!0):this.insertNodes([n])&&n.selectNext(0,0)}getCharacterOffsets(){return Uu(this)}extract(){var t=this.getNodes(),n=t.length,r=n-1,o=this.anchor;let i=this.focus;var l=t[0];let s=t[r],[a,u]=Uu(this);return n===0?[]:n===1?Z(l)&&!this.isCollapsed()?(t=a>u?u:a,r=l.splitText(t,a>u?a:u),t=t===0?r[0]:r[1],t!=null?[t]:[]):[l]:(n=o.isBefore(i),Z(l)&&(o=n?a:u,o===l.getTextContentSize()?t.shift():o!==0&&([,l]=l.splitText(o),t[0]=l)),Z(s)&&(l=s.getTextContent().length,n=n?u:a,n===0?t.pop():n!==l&&([s]=s.splitText(n),t[r]=s)),t)}modify(t,n,r){var o=this.focus,i=this.anchor,l=t==="move",s=qh(o,n);if(Ve(s)&&!s.isIsolated())l&&s.isKeyboardSelectable()?(n=pp(),n.add(s.__key),xr(n)):(t=n?s.getPreviousSibling():s.getNextSibling(),Z(t)?(s=t.__key,n=n?t.getTextContent().length:0,o.set(s,n,"text"),l&&i.set(s,n,"text")):(r=s.getParentOrThrow(),W(t)?(r=t.__key,s=n?t.getChildrenSize():0):(s=s.getIndexWithinParent(),r=r.__key,n||s++),o.set(r,s,"element"),l&&i.set(r,s,"element")));else if(i=tt(),o=$r(i._window)){var a=i._blockCursorElement,u=i._rootElement;if(u===null||a===null||!W(s)||s.isInline()||s.canBeEmpty()||ep(a,i,u),o.modify(t,n?"backward":"forward",r),0<o.rangeCount&&(s=o.getRangeAt(0),i=this.anchor.getNode(),i=nn(i)?i:L_(i),this.applyDOMRange(s),this.dirty=!0,!l)){for(l=this.getNodes(),t=[],r=!1,a=0;a<l.length;a++)u=l[a],Nc(u,i)?t.push(u):r=!0;r&&0<t.length&&(n?(n=t[0],W(n)?n.selectStart():n.getParentOrThrow().selectStart()):(n=t[t.length-1],W(n)?n.selectEnd():n.getParentOrThrow().selectEnd())),(o.anchorNode!==s.startContainer||o.anchorOffset!==s.startOffset)&&(n=this.focus,l=this.anchor,o=l.key,s=l.offset,i=l.type,co(l,n.key,n.offset,n.type),co(n,o,s,i),this._cachedNodes=null)}}}deleteCharacter(t){let n=this.isCollapsed();if(this.isCollapsed()){var r=this.anchor,o=this.focus,i=r.getNode();if(!t&&(r.type==="element"&&W(i)&&r.offset===i.getChildrenSize()||r.type==="text"&&r.offset===i.getTextContentSize())){var l=i.getParent();if(l=i.getNextSibling()||(l===null?null:l.getNextSibling()),W(l)&&l.isShadowRoot())return}if(l=qh(o,t),Ve(l)&&!l.isIsolated()){l.isKeyboardSelectable()&&W(i)&&i.getChildrenSize()===0?(i.remove(),t=pp(),t.add(l.__key),xr(t)):(l.remove(),tt().dispatchCommand(dd,void 0));return}if(!t&&W(l)&&W(i)&&i.isEmpty()){i.remove(),l.selectStart();return}if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&(r.type==="element"?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(l=o.type==="text"?o.getNode():null,i=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){if(r=o.offset,o=l.getTextContentSize(),l.is(i)||t&&r!==o||!t&&r!==0){Dy(l,t,r);return}}else if(i!==null&&i.isSegmented()&&(r=r.offset,o=i.getTextContentSize(),i.is(l)||t&&r!==0||!t&&r!==o)){Dy(i,t,r);return}if(i=this.anchor,l=this.focus,r=i.getNode(),o=l.getNode(),r===o&&i.type==="text"&&l.type==="text"){var s=i.offset,a=l.offset;let u=s<a;o=u?s:a,a=u?a:s,s=a-1,o!==s&&(r=r.getTextContent().slice(o,a),O_(r)||(t?l.offset=s:i.offset=s))}}}this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(t=this.anchor.getNode(),t.isEmpty()&&nn(t.getParent())&&t.getIndexWithinParent()===0&&t.collapseAtStart(this))}deleteLine(t){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",t,"lineboundary"),(t?this.focus:this.anchor).offset===0&&this.modify("extend",t,"character")),this.removeText()}deleteWord(t){this.isCollapsed()&&this.modify("extend",t,"word"),this.removeText()}}function Vl(e){return e instanceof xd}function Ly(e){let t=e.offset;return e.type==="text"?t:(e=e.getNode(),t===e.getChildrenSize()?e.getTextContent().length:0)}function Uu(e){let t=e.anchor;return e=e.focus,t.type==="element"&&e.type==="element"&&t.key===e.key&&t.offset===e.offset?[0,0]:[Ly(t),Ly(e)]}function Dy(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),o=r.length,i=0,l=0;for(let s=0;s<o;s++){let a=r[s],u=s===o-1;if(l=i,i+=a.length,t&&i===n||i>n||u){r.splice(s,1),u&&(l=void 0);break}}t=r.join("").trim(),t===""?e.remove():(e.setTextContent(t),e.select(l,l))}function Iy(e,t,n,r){var o=t;if(e.nodeType===1){let s=!1;var i=e.childNodes,l=i.length;o===l&&(s=!0,o=l-1);let a=i[o];if(l=!1,a===r._blockCursorElement?(a=i[o+1],l=!0):r._blockCursorElement!==null&&o--,r=rl(a),Z(r))o=s?r.getTextContentSize():0;else{if(i=rl(e),i===null)return null;if(W(i)?(e=i.getChildAtIndex(o),(t=W(e))&&(t=e.getParent(),t=n===null||t===null||!t.canBeEmpty()||t!==n.getNode()),t&&(n=s?e.getLastDescendant():e.getFirstDescendant(),n===null?(i=e,o=0):(e=n,i=W(e)?e:e.getParentOrThrow())),Z(e)?(r=e,i=null,o=s?e.getTextContentSize():0):e!==i&&s&&!l&&o++):(o=i.getIndexWithinParent(),o=t===0&&Ve(i)&&rl(e)===i?o:o+1,i=i.getParentOrThrow()),W(i))return new wr(i.__key,o,"element")}}else r=rl(e);return Z(r)?new wr(r.__key,o,"text"):null}function jy(e,t,n){var r=e.offset,o=e.getNode();r===0?(r=o.getPreviousSibling(),o=o.getParent(),t?(n||!t)&&r===null&&W(o)&&o.isInline()&&(t=o.getPreviousSibling(),Z(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)):W(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Z(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===o.getTextContent().length&&(r=o.getNextSibling(),o=o.getParent(),t&&W(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&r===null&&W(o)&&o.isInline()&&!o.canInsertTextAfter()&&(t=o.getNextSibling(),Z(t)&&(e.key=t.__key,e.offset=0)))}function Z_(e,t,n){if(e.type==="text"&&t.type==="text"){var r=e.isBefore(t);let o=e.is(t);jy(e,r,o),jy(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type),r=tt(),r.isComposing()&&r._compositionKey!==e.key&&he(n)&&(r=n.anchor,n=n.focus,co(e,r.key,r.offset,r.type),co(t,n.key,n.offset,n.type))}}function q_(e,t,n,r,o,i){return e===null||n===null||!Da(o,e,n)||(t=Iy(e,t,he(i)?i.anchor:null,o),t===null)||(r=Iy(n,r,he(i)?i.focus:null,o),r===null||t.type==="element"&&r.type==="element"&&(e=rl(e),n=rl(n),Ve(e)&&Ve(n)))?null:(Z_(t,r,i),[t,r])}function hp(e){return W(e)&&!e.isInline()}function eS(e,t,n,r,o,i){let l=kr();return e=new Ri(new wr(e,t,o),new wr(n,r,i),0,""),e.dirty=!0,l._selection=e}function pp(){return new xd(new Set)}function P2(e){let t=e.getEditorState()._selection,n=$r(e._window);return Vl(t)||sm(t)?t.clone():am(t,n,e)}function am(e,t,n){var r=n._window;if(r===null)return null;var o=r.event,i=o?o.type:void 0;r=i==="selectionchange",o=!Jh&&(r||i==="beforeinput"||i==="compositionstart"||i==="compositionend"||i==="click"&&o&&o.detail===3||i==="drop"||i===void 0);let l;if(!he(e)||o){if(t===null)return null;if(o=t.anchorNode,i=t.focusNode,l=t.anchorOffset,t=t.focusOffset,r&&he(e)&&!Da(n,o,i))return e.clone()}else return e.clone();if(n=q_(o,l,i,t,n,e),n===null)return null;let[s,a]=n;return new Ri(s,a,he(e)?e.format:0,he(e)?e.style:"")}function Ke(){return kr()._selection}function Hl(){return tt()._editorState._selection}function Oc(e,t,n,r=1){var o=e.anchor,i=e.focus,l=o.getNode(),s=i.getNode();if(t.is(l)||t.is(s)){if(l=t.__key,e.isCollapsed())t=o.offset,(n<=t&&0<r||n<t&&0>r)&&(n=Math.max(0,t+r),o.set(l,n,"element"),i.set(l,n,"element"),zy(e));else{let u=e.isBackward();s=u?i:o;var a=s.getNode();o=u?o:i,i=o.getNode(),t.is(a)&&(a=s.offset,(n<=a&&0<r||n<a&&0>r)&&s.set(l,Math.max(0,a+r),"element")),t.is(i)&&(t=o.offset,(n<=t&&0<r||n<t&&0>r)&&o.set(l,Math.max(0,t+r),"element"))}zy(e)}}function zy(e){var t=e.anchor,n=t.offset;let r=e.focus;var o=r.offset,i=t.getNode(),l=r.getNode();if(e.isCollapsed())W(i)&&(l=i.getChildrenSize(),l=(o=n>=l)?i.getChildAtIndex(l-1):i.getChildAtIndex(n),Z(l)&&(n=0,o&&(n=l.getTextContentSize()),t.set(l.__key,n,"text"),r.set(l.__key,n,"text")));else{if(W(i)){let s=i.getChildrenSize();n=(e=n>=s)?i.getChildAtIndex(s-1):i.getChildAtIndex(n),Z(n)&&(i=0,e&&(i=n.getTextContentSize()),t.set(n.__key,i,"text"))}W(l)&&(n=l.getChildrenSize(),o=(t=o>=n)?l.getChildAtIndex(n-1):l.getChildAtIndex(o),Z(o)&&(l=0,t&&(l=o.getTextContentSize()),r.set(o.__key,l,"text")))}}function O2(e,t){if(t=t.getEditorState()._selection,e=e._selection,he(e)){var n=e.anchor;let r=e.focus,o;n.type==="text"&&(o=n.getNode(),o.selectionTransform(t,e)),r.type==="text"&&(n=r.getNode(),o!==n&&n.selectionTransform(t,e))}}function Ac(e,t,n,r,o){let i=null,l=0,s=null;r!==null?(i=r.__key,Z(r)?(l=r.getTextContentSize(),s="text"):W(r)&&(l=r.getChildrenSize(),s="element")):o!==null&&(i=o.__key,Z(o)?s="text":W(o)&&(s="element")),i!==null&&s!==null?e.set(i,l,s):(l=t.getIndexWithinParent(),l===-1&&(l=n.getChildrenSize()),e.set(n.__key,l,"element"))}function Fy(e,t,n,r,o){e.type==="text"?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&--e.offset}function tS(e,t,n){let r=[],o=null,i=null;e=e.getChildren();for(let c=0;c<e.length;c++){var l=e[c];_a(l)||K(108);var s=l.getChildren();l=0;for(let d of s){for(Dn(d)||K(109);r[c]!==void 0&&r[c][l]!==void 0;)l++;s=c;var a=l,u=d;let f={cell:u,startColumn:a,startRow:s},h=u.__rowSpan,m=u.__colSpan;for(let g=0;g<h;g++){r[s+g]===void 0&&(r[s+g]=[]);for(let S=0;S<m;S++)r[s+g][a+S]=f}t.is(u)&&(o=f),n.is(u)&&(i=f),l+=d.__colSpan}}return o===null&&K(110),i===null&&K(111),[r,o,i]}function nS(e){e instanceof dm||(e instanceof za?(e=Rc(e,Dn),Dn(e)||K(114)):(e=Rc(e.getNode(),Dn),Dn(e)||K(114)));let t=e.getParent();_a(t)||K(115);let n=t.getParent();return fm(n)||K(116),[e,t,n]}let Tt=null,bt=null,mn=!1,kf=!1,wa=0,By={characterData:!0,childList:!0,subtree:!0};function Kl(){return mn||Tt!==null&&Tt._readOnly}function en(){mn&&K(13)}function kr(){return Tt===null&&K(15),Tt}function tt(){return bt===null&&K(16),bt}function Wy(e,t,n){var r=t.__type;let o=e._nodes.get(r);for(o===void 0&&K(30,r),e=n.get(r),e===void 0&&(e=Array.from(o.transforms),n.set(r,e)),n=e.length,r=0;r<n&&(e[r](t),t.isAttached());r++);}function A2(e,t){t=t._dirtyLeaves,e=e._nodeMap;for(let n of t)t=e.get(n),Z(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&k_(t)}function M2(e,t){let n=t._dirtyLeaves,r=t._dirtyElements;e=e._nodeMap;let o=yo(),i=new Map;var l=n;let s=l.size;for(var a=r,u=a.size;0<s||0<u;){if(0<s){t._dirtyLeaves=new Set;for(let c of l)l=e.get(c),Z(l)&&l.isAttached()&&l.isSimpleText()&&!l.isUnmergeable()&&k_(l),l!==void 0&&l!==void 0&&l.__key!==o&&l.isAttached()&&Wy(t,l,i),n.add(c);if(l=t._dirtyLeaves,s=l.size,0<s){wa++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(let c of a)a=c[0],u=c[1],(a==="root"||u)&&(l=e.get(a),l!==void 0&&l!==void 0&&l.__key!==o&&l.isAttached()&&Wy(t,l,i),r.set(a,u));l=t._dirtyLeaves,s=l.size,a=t._dirtyElements,u=a.size,wa++}t._dirtyLeaves=n,t._dirtyElements=r}function um(e,t){var n=e.type,r=t.get(n);if(r===void 0&&K(17,n),n=r.klass,e.type!==n.getType()&&K(18,n.name),n=n.importJSON(e),e=e.children,W(n)&&Array.isArray(e))for(r=0;r<e.length;r++){let o=um(e[r],t);n.append(o)}return n}function Uy(e,t){let n=Tt,r=mn,o=bt;Tt=e,mn=!0,bt=null;try{return t()}finally{Tt=n,mn=r,bt=o}}function ai(e,t){let n=e._pendingEditorState,r=e._rootElement,o=e._headless||r===null;if(n!==null){var i=e._editorState,l=i._selection,s=n._selection,a=e._dirtyType!==0,u=Tt,c=mn,d=bt,f=e._updating,h=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!o&&a&&h!==null){bt=e,Tt=n,mn=!1,e._updating=!0;try{let Ne=e._dirtyType,ht=e._dirtyElements,pt=e._dirtyLeaves;h.disconnect();var g=Ne,S=ht,v=pt;qt=Mr=mt="",z_=g===2,Fu=null,Gt=e,Oo=e._config,ma=e._nodes,vd=Gt._listeners.mutation,tp=S,np=v,mi=i._nodeMap,Ao=n._nodeMap,lm=n._readOnly,rp=new Map(e._keyToDOMMap);let _t=new Map;va=_t,Ss("root",null),va=rp=Oo=Ao=mi=np=tp=ma=Gt=void 0,m=_t}catch(Ne){if(Ne instanceof Error&&e._onError(Ne),kf)throw Ne;lS(e,null,r,n),$_(e),e._dirtyType=2,kf=!0,ai(e,i),kf=!1;return}finally{h.observe(r,By),e._updating=f,Tt=u,mn=c,bt=d}}n._readOnly||(n._readOnly=!0);var y=e._dirtyLeaves,x=e._dirtyElements,w=e._normalizedNodes,k=e._updateTags,b=e._deferred;a&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set);var T=e._decorators,N=e._pendingDecorators||T,D=n._nodeMap,O;for(O in N)D.has(O)||(N===T&&(N=P_(e)),delete N[O]);var j=o?null:$r(e._window);if(e._editable&&j!==null&&(a||s===null||s.dirty)){bt=e,Tt=n;try{if(h!==null&&h.disconnect(),a||s===null||s.dirty){let Ne=e._blockCursorElement;Ne!==null&&ep(Ne,e,r);e:{let ht=j.anchorNode,pt=j.focusNode,_t=j.anchorOffset,vn=j.focusOffset,jt=document.activeElement;if(!(k.has("collaboration")&&jt!==r||jt!==null&&em(jt)))if(he(s)){var B=s.anchor,ae=s.focus,H=B.key,G=ae.key,C=bc(e,H),$=bc(e,G),E=B.offset,A=ae.offset,R=s.format,z=s.style,V=s.isCollapsed(),ie=C,ne=$,Ce=!1;if(B.type==="text"){ie=$c(C);let St=B.getNode();Ce=St.getFormat()!==R||St.getStyle()!==z}else he(l)&&l.anchor.type==="text"&&(Ce=!0);if(ae.type==="text"&&(ne=$c($)),ie!==null&&ne!==null){if(V&&(l===null||Ce||he(l)&&(l.format!==R||l.style!==z))){var we=performance.now();G_=[R,z,E,H,we]}if(_t===E&&vn===A&&ht===ie&&pt===ne&&(j.type!=="Range"||!V)&&(jt!==null&&r.contains(jt)||r.focus({preventScroll:!0}),B.type!=="element"))break e;try{j.setBaseAndExtent(ie,E,ne,A)}catch{}if(!k.has("skip-scroll-into-view")&&s.isCollapsed()&&r!==null&&r===document.activeElement){let St=s instanceof Ri&&s.anchor.type==="element"?ie.childNodes[E]||null:0<j.rangeCount?j.getRangeAt(0):null;if(St!==null){let At;if(St instanceof Text){let Ft=document.createRange();Ft.selectNode(St),At=Ft.getBoundingClientRect()}else At=St.getBoundingClientRect();let lr=r.ownerDocument,zt=lr.defaultView;if(zt!==null)for(var{top:X,bottom:be}=At,fe,_e,ve=r;ve!==null;){let Ft=ve===lr.body;if(Ft)fe=0,_e=gd(e).innerHeight;else{let Vo=ve.getBoundingClientRect();fe=Vo.top,_e=Vo.bottom}let sr=0;if(X<fe?sr=-(fe-X):be>_e&&(sr=be-_e),sr!==0)if(Ft)zt.scrollBy(0,sr);else{let Vo=ve.scrollTop;ve.scrollTop+=sr;let Ha=ve.scrollTop-Vo;X-=Ha,be-=Ha}if(Ft)break;ve=pd(ve)}}}ap=!0}}else l!==null&&Da(e,ht,pt)&&j.removeAllRanges()}}e:{let Ne=e._blockCursorElement;if(he(s)&&s.isCollapsed()&&s.anchor.type==="element"&&r.contains(document.activeElement)){let ht=s.anchor,pt=ht.getNode(),_t=ht.offset,vn=pt.getChildrenSize(),jt=!1,St=null;if(_t===vn){let At=pt.getChildAtIndex(_t-1);xf(At)&&(jt=!0)}else{let At=pt.getChildAtIndex(_t);if(xf(At)){let lr=At.getPreviousSibling();(lr===null||xf(lr))&&(jt=!0,St=e.getElementByKey(At.__key))}}if(jt){let At=e.getElementByKey(pt.__key);if(Ne===null){let lr=e._config.theme,zt=document.createElement("div");zt.contentEditable="false",zt.setAttribute("data-lexical-cursor","true");let Ft=lr.blockCursor;if(Ft!==void 0){if(typeof Ft=="string"){let sr=Ft.split(" ");Ft=lr.blockCursor=sr}Ft!==void 0&&zt.classList.add(...Ft)}e._blockCursorElement=Ne=zt}r.style.caretColor="transparent",St===null?At.appendChild(Ne):At.insertBefore(Ne,St);break e}}Ne!==null&&ep(Ne,e,r)}h!==null&&h.observe(r,By)}finally{bt=d,Tt=u}}if(m!==null){var Te=m;let Ne=Array.from(e._listeners.mutation),ht=Ne.length;for(let pt=0;pt<ht;pt++){let[_t,vn]=Ne[pt],jt=Te.get(vn);jt!==void 0&&_t(jt,{dirtyLeaves:y,prevEditorState:i,updateTags:k})}}he(s)||s===null||l!==null&&l.is(s)||e.dispatchCommand(dd,void 0);var Be=e._pendingDecorators;Be!==null&&(e._decorators=Be,e._pendingDecorators=null,Ws("decorator",e,!0,Be));var Ot=ky(t||i),un=ky(n);if(Ot!==un&&Ws("textcontent",e,!0,un),Ws("update",e,!0,{dirtyElements:x,dirtyLeaves:y,editorState:n,normalizedNodes:w,prevEditorState:t||i,tags:k}),e._deferred=[],b.length!==0){let Ne=e._updating;e._updating=!0;try{for(let ht=0;ht<b.length;ht++)b[ht]()}finally{e._updating=Ne}}var On=e._updates;if(On.length!==0){let Ne=On.shift();if(Ne){let[ht,pt]=Ne;rS(e,ht,pt)}}}}function Ws(e,t,n,...r){let o=t._updating;t._updating=n;try{let i=Array.from(t._listeners[e]);for(e=0;e<i.length;e++)i[e].apply(null,r)}finally{t._updating=o}}function J(e,t,n){if(e._updating===!1||bt!==e){let i=!1;return e.update(()=>{i=J(e,t,n)}),i}let r=nm(e);for(let i=4;0<=i;i--)for(let l=0;l<r.length;l++){var o=r[l]._commands.get(t);if(o!==void 0&&(o=o[i],o!==void 0)){o=Array.from(o);let s=o.length;for(let a=0;a<s;a++)if(o[a](n,e)===!0)return!0}}return!1}function Vy(e,t){let n=e._updates;for(t=t||!1;n.length!==0;){var r=n.shift();if(r){let[o,i]=r,l;i!==void 0&&(r=i.onUpdate,l=i.tag,i.skipTransforms&&(t=!0),r&&e._deferred.push(r),l&&e._updateTags.add(l)),o()}}return t}function rS(e,t,n){let r=e._updateTags;var o,i=o=!1;if(n!==void 0){var l=n.onUpdate;o=n.tag,o!=null&&r.add(o),o=n.skipTransforms||!1,i=n.discrete||!1}l&&e._deferred.push(l),n=e._editorState,l=e._pendingEditorState;let s=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=new _d(new Map((l||n)._nodeMap)),s=!0),l._flushSync=i,i=Tt;let a=mn,u=bt,c=e._updating;Tt=l,mn=!1,e._updating=!0,bt=e;try{s&&(e._headless?n._selection!=null&&(l._selection=n._selection.clone()):l._selection=P2(e));let d=e._compositionKey;t(),o=Vy(e,o),O2(l,e),e._dirtyType!==0&&(o?A2(l,e):M2(l,e),Vy(e),g2(n,l,e._dirtyLeaves,e._dirtyElements)),d!==e._compositionKey&&(l._flushSync=!0);let f=l._selection;if(he(f)){let h=l._nodeMap,m=f.focus.key;h.get(f.anchor.key)!==void 0&&h.get(m)!==void 0||K(19)}else Vl(f)&&f._nodes.size===0&&(l._selection=null)}catch(d){d instanceof Error&&e._onError(d),e._pendingEditorState=n,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),ai(e);return}finally{Tt=i,mn=a,bt=u,e._updating=c,wa=0}e._dirtyType!==0||L2(l,e)?l._flushSync?(l._flushSync=!1,ai(e)):s&&d2(()=>{ai(e)}):(l._flushSync=!1,s&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function bn(e,t,n){e._updating?e._updates.push([t,n]):rS(e,t,n)}class oS extends za{constructor(t){super(t)}decorate(){K(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ve(e){return e instanceof oS}class Pi extends za{constructor(t){super(t),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let t=this.getFormat();return i2[t]||""}getIndent(){return this.getLatest().__indent}getChildren(){let t=[],n=this.getFirstChild();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getChildrenKeys(){let t=[],n=this.getFirstChild();for(;n!==null;)t.push(n.__key),n=n.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let t=tt()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){let t=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(t)}getAllTextNodes(){let t=[],n=this.getFirstChild();for(;n!==null;){if(Z(n)&&t.push(n),W(n)){let r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;t!==null;){if(W(t)){let n=t.getFirstChild();if(n!==null){t=n;continue}}break}return t}getLastDescendant(){let t=this.getLastChild();for(;t!==null;){if(W(t)){let n=t.getLastChild();if(n!==null){t=n;continue}}break}return t}getDescendantByIndex(t){let n=this.getChildren(),r=n.length;return t>=r?(t=n[r-1],W(t)&&t.getLastDescendant()||t||null):(t=n[t],W(t)&&t.getFirstDescendant()||t||null)}getFirstChild(){let t=this.getLatest().__first;return t===null?null:kt(t)}getFirstChildOrThrow(){let t=this.getFirstChild();return t===null&&K(45,this.__key),t}getLastChild(){let t=this.getLatest().__last;return t===null?null:kt(t)}getLastChildOrThrow(){let t=this.getLastChild();return t===null&&K(96,this.__key),t}getChildAtIndex(t){var n=this.getChildrenSize();let r;if(t<n/2){for(r=this.getFirstChild(),n=0;r!==null&&n<=t;){if(n===t)return r;r=r.getNextSibling(),n++}return null}for(r=this.getLastChild(),--n;r!==null&&n>=t;){if(n===t)return r;r=r.getPreviousSibling(),n--}return null}getTextContent(){let t="",n=this.getChildren(),r=n.length;for(let o=0;o<r;o++){let i=n[o];t+=i.getTextContent(),W(i)&&o!==r-1&&!i.isInline()&&(t+=`
123
+
124
+ `)}return t}getTextContentSize(){let t=0,n=this.getChildren(),r=n.length;for(let o=0;o<r;o++){let i=n[o];t+=i.getTextContentSize(),W(i)&&o!==r-1&&!i.isInline()&&(t+=2)}return t}getDirection(){return this.getLatest().__dir}hasFormat(t){return t!==""?(t=Sy[t],(this.getFormat()&t)!==0):!1}select(t,n){en();let r=Ke(),o=t,i=n;var l=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&n===0){if(t=this.getFirstChild(),Z(t)||W(t))return t.select(0,0)}else if(!(t!==void 0&&t!==l||n!==void 0&&n!==l)&&(t=this.getLastChild(),Z(t)||W(t)))return t.select()}if(o===void 0&&(o=l),i===void 0&&(i=l),l=this.__key,he(r))r.anchor.set(l,o,"element"),r.focus.set(l,i,"element"),r.dirty=!0;else return eS(l,o,l,i,"element","element");return r}selectStart(){let t=this.getFirstDescendant();return W(t)||Z(t)?t.select(0,0):t!==null?t.selectPrevious():this.select(0,0)}selectEnd(){let t=this.getLastDescendant();return W(t)||Z(t)?t.select():t!==null?t.selectNext():this.select()}clear(){let t=this.getWritable();return this.getChildren().forEach(n=>n.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){let n=this.getWritable();return n.__dir=t,n}setFormat(t){return this.getWritable().__format=t!==""?Sy[t]:0,this}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){let o=r.length,i=this.getChildrenSize(),l=this.getWritable(),s=l.__key;var a=[],u=[];let c=this.getChildAtIndex(t+n),d=null,f=i-n+o;if(t!==0)if(t===i)d=this.getLastChild();else{var h=this.getChildAtIndex(t);h!==null&&(d=h.getPreviousSibling())}if(0<n){var m=d===null?this.getFirstChild():d.getNextSibling();for(h=0;h<n;h++){m===null&&K(100);var g=m.getNextSibling(),S=m.__key;m=m.getWritable(),si(m),u.push(S),m=g}}for(h=d,g=0;g<o;g++){S=r[g],h!==null&&S.is(h)&&(d=h=h.getPreviousSibling()),m=S.getWritable(),m.__parent===s&&f--,si(m);let v=S.__key;h===null?(l.__first=v,m.__prev=null):(h=h.getWritable(),h.__next=v,m.__prev=h.__key),S.__key===s&&K(76),m.__parent=s,a.push(v),h=S}if(t+n===i?h!==null&&(h.getWritable().__next=null,l.__last=h.__key):c!==null&&(t=c.getWritable(),h!==null?(n=h.getWritable(),t.__prev=h.__key,n.__next=c.__key):t.__prev=null),l.__size=f,u.length&&(t=Ke(),he(t))){u=new Set(u),a=new Set(a);let{anchor:v,focus:y}=t;Hy(v,u,a)&&Ac(v,v.getNode(),this,d,c),Hy(y,u,a)&&Ac(y,y.getNode(),this,d,c),f!==0||this.canBeEmpty()||er(this)||this.remove()}return l}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function W(e){return e instanceof Pi}function Hy(e,t,n){for(e=e.getNode();e;){let r=e.__key;if(t.has(r)&&!n.has(r))return!0;e=e.getParent()}return!1}class Gl extends Pi{static getType(){return"root"}static clone(){return new Gl}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){K(51)}getTextContent(){let t=this.__cachedText;return!Kl()&&tt()._dirtyType!==0||t===null?super.getTextContent():t}remove(){K(52)}replace(){K(53)}insertBefore(){K(54)}insertAfter(){K(55)}updateDOM(){return!1}append(...t){for(let n=0;n<t.length;n++){let r=t[n];W(r)||Ve(r)||K(56)}return super.append(...t)}static importJSON(t){let n=Cr();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function nn(e){return e instanceof Gl}function L2(e,t){if(t=t.getEditorState()._selection,e=e._selection,e!==null){if(e.dirty||!e.is(t))return!0}else if(t!==null)return!0;return!1}function cm(){return new _d(new Map([["root",new Gl]]))}function iS(e){let t=e.exportJSON();var n=e.constructor;t.type!==n.getType()&&K(130,n.name);let r=t.children;if(W(e))for(Array.isArray(r)||K(59,n.name),e=e.getChildren(),n=0;n<e.length;n++){let o=iS(e[n]);r.push(o)}return t}class _d{constructor(t,n){this._nodeMap=t,this._selection=n||null,this._readOnly=this._flushSync=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t){return Uy(this,t)}clone(t){return t=new _d(this._nodeMap,t===void 0?this._selection:t),t._readOnly=!0,t}toJSON(){return Uy(this,()=>({root:iS(Cr())}))}}class Yl extends Pi{static getType(){return"paragraph"}static clone(t){return new Yl(t.__key)}createDOM(t){let n=document.createElement("p");return t=zs(t.theme,"paragraph"),t!==void 0&&n.classList.add(...t),n}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:D2,priority:0})}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&md(t)){this.isEmpty()&&t.append(document.createElement("br"));var n=this.getFormatType();t.style.textAlign=n,(n=this.getDirection())&&(t.dir=n),n=this.getIndent(),0<n&&(t.style.textIndent=`${20*n}px`)}return{element:t}}static importJSON(t){let n=vi();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(t,n){t=vi();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=this.getChildren();if(t.length===0||Z(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function D2(e){let t=vi();return e.style&&(t.setFormat(e.style.textAlign),e=parseInt(e.style.textIndent,10)/20,0<e&&t.setIndent(e)),{node:t}}function vi(){return ja(new Yl)}function lS(e,t,n,r){let o=e._keyToDOMMap;o.clear(),e._editorState=cm(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null,r=e._observer,r!==null&&(r.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",o.set("root",n))}function I2(e){let t=new Map,n=new Set;return e.forEach(r=>{if(r=r.klass.importDOM!=null?r.klass.importDOM.bind(r.klass):null,r!=null&&!n.has(r)){n.add(r);var o=r();o!==null&&Object.keys(o).forEach(i=>{let l=t.get(i);l===void 0&&(l=[],t.set(i,l)),l.push(o[i])})}}),t}class j2{constructor(t,n,r,o,i,l,s){this._parentEditor=n,this._rootElement=null,this._editorState=t,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=o,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=A_(),this._onError=i,this._htmlConversions=l,this._editable=s,this._headless=n!==null&&n._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){let n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){let n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){let n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){let n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){let n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&K(35);let o=this._commands;o.has(t)||o.set(t,[new Set,new Set,new Set,new Set,new Set]);let i=o.get(t);i===void 0&&K(36,String(t));let l=i[r];return l.add(n),()=>{l.delete(n),i.every(s=>s.size===0)&&o.delete(t)}}registerMutationListener(t,n){this._nodes.get(t.getType())===void 0&&K(37,t.name);let r=this._listeners.mutation;return r.set(n,t),()=>{r.delete(n)}}registerNodeTransformToKlass(t,n){var r=t.getType();return r=this._nodes.get(r),r===void 0&&K(37,t.name),r.transforms.add(n),r}registerNodeTransform(t,n){var r=this.registerNodeTransformToKlass(t,n);let o=[r];return r=r.replaceWithKlass,r!=null&&(r=this.registerNodeTransformToKlass(r,n),o.push(r)),f2(this,t.getType()),()=>{o.forEach(i=>i.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return J(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){let n=this._rootElement;if(t!==n){let l=zs(this._config.theme,"root");var r=this._pendingEditorState||this._editorState;if(this._rootElement=t,lS(this,n,t,r),n!==null){if(!this._config.disableEvents){Fs!==0&&(Fs--,Fs===0&&n.ownerDocument.removeEventListener("selectionchange",J_));var o=n.__lexicalEditor;if(o!=null){if(o._parentEditor!==null){var i=nm(o);i=i[i.length-1]._key,gl.get(i)===o&&gl.delete(i)}else gl.delete(o._key);n.__lexicalEditor=null}for(o=Q_(n),i=0;i<o.length;i++)o[i]();n.__lexicalEventHandles=[]}l!=null&&n.classList.remove(...l)}t!==null?(r=(r=t.ownerDocument)&&r.defaultView||null,o=t.style,o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=r,this._dirtyType=2,$_(this),this._updateTags.add("history-merge"),ai(this),this._config.disableEvents||C2(t,this),l!=null&&t.classList.add(...l)):(this._editorState=r,this._window=this._pendingEditorState=null),Ws("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&K(38),C_(this);let r=this._pendingEditorState,o=this._updateTags;n=n!==void 0?n.tag:null,r===null||r.isEmpty()||(n!=null&&o.add(n),ai(this)),this._pendingEditorState=t,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,n!=null&&o.add(n),ai(this)}parseEditorState(t,n){t=typeof t=="string"?JSON.parse(t):t;let r=cm(),o=Tt,i=mn,l=bt,s=this._dirtyElements,a=this._dirtyLeaves,u=this._cloneNotNeeded,c=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,Tt=r,mn=!1,bt=this;try{um(t.root,this._nodes),n&&n(),r._readOnly=!0}catch(d){d instanceof Error&&this._onError(d)}finally{this._dirtyElements=s,this._dirtyLeaves=a,this._cloneNotNeeded=u,this._dirtyType=c,Tt=o,mn=i,bt=l}return r}update(t,n){bn(this,t,n)}focus(t,n={}){let r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),bn(this,()=>{let o=Ke(),i=Cr();o!==null?o.dirty=!0:i.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?i.selectStart():i.selectEnd())},{onUpdate:()=>{r.removeAttribute("autocapitalize"),t&&t()},tag:"focus"}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){var t=this._rootElement;t!==null&&t.blur(),t=$r(this._window),t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Ws("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}class dm extends Pi{constructor(t,n){super(n),this.__colSpan=t,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(t){return this.getWritable().__colSpan=t,this}getRowSpan(){return this.__rowSpan}setRowSpan(t){return this.getWritable().__rowSpan=t,this}}function Dn(e){return e instanceof dm}class sS extends Pi{}function fm(e){return e instanceof sS}class aS extends Pi{}function _a(e){return e instanceof aS}I.$addUpdateTag=function(e){en(),tt()._updateTags.add(e)};I.$applyNodeReplacement=ja;I.$copyNode=D_;I.$createLineBreakNode=Nl;I.$createNodeSelection=pp;I.$createParagraphNode=vi;I.$createRangeSelection=function(){let e=new wr("root",0,"element"),t=new wr("root",0,"element");return new Ri(e,t,0,"")};I.$createTabNode=yd;I.$createTextNode=Ct;I.$getAdjacentNode=qh;I.$getNearestNodeFromDOMNode=Ia;I.$getNearestRootOrShadowRoot=L_;I.$getNodeByKey=kt;I.$getPreviousSelection=Hl;I.$getRoot=Cr;I.$getSelection=Ke;I.$getTextContent=function(){let e=Ke();return e===null?"":e.getTextContent()};I.$hasAncestor=Nc;I.$hasUpdateTag=function(e){return tt()._updateTags.has(e)};I.$insertNodes=function(e,t){let n=Ke()||Hl();return n===null&&(n=Cr().selectEnd()),n.insertNodes(e,t)};I.$isBlockElementNode=hp;I.$isDecoratorNode=Ve;I.$isElementNode=W;I.$isInlineElementOrDecoratorNode=function(e){return W(e)&&e.isInline()||Ve(e)&&e.isInline()};I.$isLeafNode=b_;I.$isLineBreakNode=xa;I.$isNodeSelection=Vl;I.$isParagraphNode=function(e){return e instanceof Yl};I.$isRangeSelection=he;I.$isRootNode=nn;I.$isRootOrShadowRoot=er;I.$isTabNode=function(e){return e instanceof Ul};I.$isTextNode=Z;I.$nodesOfType=function(e){var t=kr();let n=t._readOnly,r=e.getType();t=t._nodeMap;let o=[];for(let[,i]of t)i instanceof e&&i.__type===r&&(n||i.isAttached())&&o.push(i);return o};I.$normalizeSelection__EXPERIMENTAL=qg;I.$parseSerializedNode=function(e){return um(e,tt()._nodes)};I.$selectAll=function(){var e=Cr();e=e.select(0,e.getChildrenSize()),xr(qg(e))};I.$setCompositionKey=Lt;I.$setSelection=xr;I.$splitNode=I_;I.BLUR_COMMAND=__;I.CAN_REDO_COMMAND={};I.CAN_UNDO_COMMAND={};I.CLEAR_EDITOR_COMMAND={};I.CLEAR_HISTORY_COMMAND={};I.CLICK_COMMAND=r_;I.COMMAND_PRIORITY_CRITICAL=4;I.COMMAND_PRIORITY_EDITOR=0;I.COMMAND_PRIORITY_HIGH=3;I.COMMAND_PRIORITY_LOW=1;I.COMMAND_PRIORITY_NORMAL=2;I.CONTROLLED_TEXT_INSERTION_COMMAND=pl;I.COPY_COMMAND=Yg;I.CUT_COMMAND=Xg;I.DELETE_CHARACTER_COMMAND=ha;I.DELETE_LINE_COMMAND=ga;I.DELETE_WORD_COMMAND=pa;I.DEPRECATED_$computeGridMap=tS;I.DEPRECATED_$createGridSelection=function(){let e=new wr("root",0,"element"),t=new wr("root",0,"element");return new wd("root",e,t)};I.DEPRECATED_$getGridCellNodeRect=fp;I.DEPRECATED_$getNodeTriplet=nS;I.DEPRECATED_$isGridCellNode=Dn;I.DEPRECATED_$isGridNode=fm;I.DEPRECATED_$isGridRowNode=_a;I.DEPRECATED_$isGridSelection=sm;I.DEPRECATED_GridCellNode=dm;I.DEPRECATED_GridNode=sS;I.DEPRECATED_GridRowNode=aS;I.DRAGEND_COMMAND=x_;I.DRAGOVER_COMMAND=y_;I.DRAGSTART_COMMAND=v_;I.DROP_COMMAND=m_;I.DecoratorNode=oS;I.ElementNode=Pi;I.FOCUS_COMMAND=w_;I.FORMAT_ELEMENT_COMMAND={};I.FORMAT_TEXT_COMMAND=vo;I.INDENT_CONTENT_COMMAND={};I.INSERT_LINE_BREAK_COMMAND=js;I.INSERT_PARAGRAPH_COMMAND=Yh;I.INSERT_TAB_COMMAND={};I.KEY_ARROW_DOWN_COMMAND=c_;I.KEY_ARROW_LEFT_COMMAND=s_;I.KEY_ARROW_RIGHT_COMMAND=i_;I.KEY_ARROW_UP_COMMAND=u_;I.KEY_BACKSPACE_COMMAND=f_;I.KEY_DELETE_COMMAND=p_;I.KEY_DOWN_COMMAND=o_;I.KEY_ENTER_COMMAND=Ec;I.KEY_ESCAPE_COMMAND=h_;I.KEY_MODIFIER_COMMAND=S_;I.KEY_SPACE_COMMAND=d_;I.KEY_TAB_COMMAND=g_;I.LineBreakNode=Wl;I.MOVE_TO_END=l_;I.MOVE_TO_START=a_;I.OUTDENT_CONTENT_COMMAND={};I.PASTE_COMMAND=Hg;I.ParagraphNode=Yl;I.REDO_COMMAND=Gg;I.REMOVE_TEXT_COMMAND=Xh;I.RootNode=Gl;I.SELECTION_CHANGE_COMMAND=dd;I.SELECT_ALL_COMMAND=Qh;I.TabNode=Ul;I.TextNode=Ni;I.UNDO_COMMAND=Kg;I.createCommand=function(){return{}};I.createEditor=function(e){var t=e||{},n=bt,r=t.theme||{};let o=e===void 0?n:t.parentEditor||null,i=t.disableEvents||!1,l=cm(),s=t.namespace||(o!==null?o._config.namespace:A_()),a=t.editorState,u=[Gl,Ni,Wl,Ul,Yl,...t.nodes||[]],c=t.onError;if(t=t.editable!==void 0?t.editable:!0,e===void 0&&n!==null)e=n._nodes;else for(e=new Map,n=0;n<u.length;n++){let f=u[n],h=null;var d=null;typeof f!="function"&&(d=f,f=d.replace,h=d.with,d=d.withKlass?d.withKlass:null);let m=f.getType(),g=f.transform(),S=new Set;g!==null&&S.add(g),e.set(m,{klass:f,replace:h,replaceWithKlass:d,transforms:S})}return r=new j2(l,o,e,{disableEvents:i,namespace:s,theme:r},c||console.error,I2(e),t),a!==void 0&&(r._pendingEditorState=a,r._dirtyType=2),r};I.getNearestEditorFromDOMNode=tm;I.isHTMLAnchorElement=function(e){return md(e)&&e.tagName==="A"};I.isHTMLElement=md;I.isSelectionCapturedInDecoratorInput=em;I.isSelectionWithinEditor=Da;const z2=I;var me=z2,ft={},Pt={},re=me;let Mc=new Map;function Ky(e){for(;e!=null;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function Gy(e){let t=e.parentNode;if(t==null)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function uS(e){let t={};e=e.split(";");for(let n of e)if(n!==""){let[r,o]=n.split(/:([^]+)/);t[r.trim()]=o.trim()}return t}function Lc(e){let t=Mc.get(e);return t===void 0&&(t=uS(e),Mc.set(e,t)),t}function F2(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}function Di(e,t){var n=Lc("getStyle"in e?e.getStyle():e.style);t=Object.entries(t).reduce((r,[o,i])=>(i===null?delete r[o]:r[o]=i,r),{...n}),n=F2(t),e.setStyle(n),Mc.set(n,t)}function cS(e,t){var n=e.getNodes(),r=n.length;if(re.DEPRECATED_$isGridSelection(e)){for(var o=re.$createRangeSelection(),i=o.anchor,l=o.focus,s=0;s<r;s++){var a=n[s];re.DEPRECATED_$isGridCellNode(a)&&(i.set(a.getKey(),0,"element"),l.set(a.getKey(),a.getChildrenSize(),"element"),cS(re.$normalizeSelection__EXPERIMENTAL(o),t))}re.$setSelection(e)}else if(--r,o=n[0],i=n[r],e.isCollapsed())Di(e,t);else{var u=e.anchor,c=e.focus;s=o.getTextContent().length,a=c.offset;var d=u.offset,f=u.isBefore(c);l=f?d:a,e=f?a:d;var h=f?u.type:c.type,m=f?c.type:u.type;if(u=f?c.key:u.key,re.$isTextNode(o)&&l===s&&(c=o.getNextSibling(),re.$isTextNode(c)&&(l=d=0,o=c)),n.length===1)re.$isTextNode(o)&&(l=h==="element"?0:d>a?a:d,e=m==="element"?s:d>a?d:a,l!==e&&(l===0&&e===s?(Di(o,t),o.select(l,e)):(n=o.splitText(l,e),n=l===0?n[0]:n[1],Di(n,t),n.select(0,e-l))));else for(re.$isTextNode(o)&&l<o.getTextContentSize()&&(l!==0&&(o=o.splitText(l)[1]),Di(o,t)),re.$isTextNode(i)&&(l=i.getTextContent().length,i.__key!==u&&e!==0&&(e=l),e!==l&&([i]=i.splitText(e)),e!==0&&Di(i,t)),e=1;e<r;e++)l=n[e],s=l.getKey(),re.$isTextNode(l)&&s!==o.getKey()&&s!==i.getKey()&&!l.isToken()&&Di(l,t)}}function B2(e){for(;e!==null&&!re.$isRootOrShadowRoot(e);){let t=e.getLatest(),n=e.getParent();t.getChildrenSize()===0&&e.remove(!0),e=n}}function Tf(e,t,n,r,o=null){if(t.length!==0){var i=t[0],l=new Map,s=[];i=re.$isElementNode(i)?i:i.getParentOrThrow(),i.isInline()&&(i=i.getParentOrThrow());for(var a=!1;i!==null;){var u=i.getPreviousSibling();if(u!==null){i=u,a=!0;break}if(i=i.getParentOrThrow(),re.$isRootOrShadowRoot(i))break}u=new Set;for(var c=0;c<n;c++){var d=t[c];re.$isElementNode(d)&&d.getChildrenSize()===0&&u.add(d.getKey())}var f=new Set;for(c=0;c<n;c++){d=t[c];var h=d.getParent();if(h!==null&&h.isInline()&&(h=h.getParent()),h!==null&&re.$isLeafNode(d)&&!f.has(d.getKey())){if(d=h.getKey(),l.get(d)===void 0){let m=r();m.setFormat(h.getFormatType()),m.setIndent(h.getIndent()),s.push(m),l.set(d,m),h.getChildren().forEach(g=>{m.append(g),f.add(g.getKey()),re.$isElementNode(g)&&g.getChildrenKeys().forEach(S=>f.add(S))}),B2(h)}}else u.has(d.getKey())&&(h=r(),h.setFormat(d.getFormatType()),h.setIndent(d.getIndent()),s.push(h),d.remove(!0))}if(o!==null)for(t=0;t<s.length;t++)o.append(s[t]);if(t=null,re.$isRootOrShadowRoot(i))if(a)if(o!==null)i.insertAfter(o);else for(o=s.length-1;0<=o;o--)i.insertAfter(s[o]);else if(a=i.getFirstChild(),re.$isElementNode(a)&&(i=a),a===null)if(o)i.append(o);else for(o=0;o<s.length;o++)a=s[o],i.append(a),t=a;else if(o!==null)a.insertBefore(o);else for(i=0;i<s.length;i++)o=s[i],a.insertBefore(o),t=o;else if(o)i.insertAfter(o);else for(o=s.length-1;0<=o;o--)a=s[o],i.insertAfter(a),t=a;s=re.$getPreviousSelection(),re.$isRangeSelection(s)&&s.anchor.getNode().isAttached()&&s.focus.getNode().isAttached()?re.$setSelection(s.clone()):t!==null?t.selectEnd():e.dirty=!0}}function dS(e,t,n,r){e.modify(t?"extend":"move",n,r)}function fS(e){return e=e.anchor.getNode(),(re.$isRootNode(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}Pt.$addNodeStyle=function(e){e=e.getStyle();let t=uS(e);Mc.set(e,t)};Pt.$cloneWithProperties=function(e){let t=e.constructor.clone(e);return t.__parent=e.__parent,t.__next=e.__next,t.__prev=e.__prev,re.$isElementNode(e)&&re.$isElementNode(t)?(t.__first=e.__first,t.__last=e.__last,t.__size=e.__size,t.__format=e.__format,t.__indent=e.__indent,t.__dir=e.__dir,t):(re.$isTextNode(e)&&re.$isTextNode(t)&&(t.__format=e.__format,t.__style=e.__style,t.__mode=e.__mode,t.__detail=e.__detail),t)};Pt.$getSelectionStyleValueForProperty=function(e,t,n=""){let r=null,o=e.getNodes();var i=e.anchor,l=e.focus,s=e.isBackward();let a=s?l.offset:i.offset;if(i=s?l.getNode():i.getNode(),e.style!==""&&(e=Lc(e.style),e!==null&&t in e))return e[t];for(e=0;e<o.length;e++){var u=o[e];if((e===0||a!==0||!u.is(i))&&re.$isTextNode(u)){if(l=t,s=n,u=u.getStyle(),u=Lc(u),l=u!==null&&u[l]||s,r===null)r=l;else if(r!==l){r="";break}}}return r===null?n:r};Pt.$isAtNodeEnd=function(e){return e.type==="text"?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()};Pt.$isParentElementRTL=fS;Pt.$moveCaretSelection=dS;Pt.$moveCharacter=function(e,t,n){let r=fS(e);dS(e,t,n?!r:r,"character")};Pt.$patchStyleText=cS;Pt.$selectAll=function(e){let t=e.anchor;e=e.focus;var n=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();let r=n.getFirstDescendant();n=n.getLastDescendant();let o="element",i="element",l=0;re.$isTextNode(r)?o="text":re.$isElementNode(r)||r===null||(r=r.getParentOrThrow()),re.$isTextNode(n)?(i="text",l=n.getTextContentSize()):re.$isElementNode(n)||n===null||(n=n.getParentOrThrow()),r&&n&&(t.set(r.getKey(),0,o),e.set(n.getKey(),l,i))};Pt.$setBlocksType=function(e,t){if(e.anchor.key==="root"){t=t();var n=re.$getRoot();(e=n.getFirstChild())?e.replace(t,!0):n.append(t)}else for(n=e.getNodes(),e=e.anchor.getNode().getParentOrThrow(),n.indexOf(e)===-1&&n.push(e),e.isInline()&&(e=e.getParentOrThrow(),n.indexOf(e)===-1&&n.push(e)),e=0;e<n.length;e++){let i=n[e];var r=i;if(!re.$isElementNode(r)||re.$isRootOrShadowRoot(r))r=!1;else{var o=r.getFirstChild();o=o===null||re.$isLineBreakNode(o)||re.$isTextNode(o)||o.isInline(),r=!r.isInline()&&r.canBeEmpty()!==!1&&o}r&&(r=t(),r.setFormat(i.getFormatType()),r.setIndent(i.getIndent()),i.replace(r,!0))}};Pt.$shouldOverrideDefaultCharacterSelection=function(e,t){return e=re.$getAdjacentNode(e.focus,t),re.$isDecoratorNode(e)&&!e.isIsolated()||re.$isElementNode(e)&&!e.isInline()&&!e.canBeEmpty()};Pt.$sliceSelectedTextNodeContent=function(e,t){if(t.isSelected()&&!t.isSegmented()&&!t.isToken()&&(re.$isRangeSelection(e)||re.DEPRECATED_$isGridSelection(e))){var n=e.anchor.getNode(),r=e.focus.getNode(),o=t.is(n),i=t.is(r);if(o||i){o=e.isBackward();let[l,s]=e.getCharacterOffsets();e=n.is(r),i=t.is(o?r:n),r=t.is(o?n:r),n=0;let a;e?(n=l>s?s:l,a=l>s?l:s):i?(n=o?s:l,a=void 0):r&&(o=o?l:s,n=0,a=o),t.__text=t.__text.slice(n,a)}}return t};Pt.$wrapNodes=function(e,t,n=null){var r=e.getNodes();let o=r.length;var i=e.anchor;if(o===0||o===1&&i.type==="element"&&i.getNode().getChildrenSize()===0){e=i.type==="text"?i.getNode().getParentOrThrow():i.getNode(),r=e.getChildren();let s=t();s.setFormat(e.getFormatType()),s.setIndent(e.getIndent()),r.forEach(a=>s.append(a)),n&&(s=n.append(s)),e.replace(s)}else{i=null;var l=[];for(let s=0;s<o;s++){let a=r[s];re.$isRootOrShadowRoot(a)?(Tf(e,l,l.length,t,n),l=[],i=a):i===null||i!==null&&re.$hasAncestor(a,i)?l.push(a):(Tf(e,l,l.length,t,n),l=[a])}Tf(e,l,l.length,t,n)}};Pt.createDOMRange=function(e,t,n,r,o){let i=t.getKey(),l=r.getKey(),s=document.createRange(),a=e.getElementByKey(i);if(e=e.getElementByKey(l),re.$isTextNode(t)&&(a=Ky(a)),re.$isTextNode(r)&&(e=Ky(e)),t===void 0||r===void 0||a===null||e===null)return null;a.nodeName==="BR"&&([a,n]=Gy(a)),e.nodeName==="BR"&&([e,o]=Gy(e)),t=a.firstChild,a===e&&t!=null&&t.nodeName==="BR"&&n===0&&o===0&&(o=1);try{s.setStart(a,n),s.setEnd(e,o)}catch{return null}return!s.collapsed||n===o&&i===l||(s.setStart(e,o),s.setEnd(a,n)),s};Pt.createRectsFromDOMRange=function(e,t){var n=e.getRootElement();if(n===null)return[];e=n.getBoundingClientRect(),n=getComputedStyle(n),n=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t=Array.from(t.getClientRects());let r=t.length;t.sort((i,l)=>{let s=i.top-l.top;return 3>=Math.abs(s)?i.left-l.left:s});let o;for(let i=0;i<r;i++){let l=t[i],s=l.width+n===e.width;o&&o.top<=l.top&&o.top+o.height>l.top&&o.left+o.width>l.left||s?(t.splice(i--,1),r--):o=l}return t};Pt.getStyleObjectFromCSS=Lc;Pt.trimTextContentFromAnchor=function(e,t,n){let r=t.getNode();if(re.$isElementNode(r)){var o=r.getDescendantByIndex(t.offset);o!==null&&(r=o)}for(;0<n&&r!==null;){var i=r.getPreviousSibling(),l=0;if(i===null){o=r.getParentOrThrow();for(var s=o.getPreviousSibling();s===null;){if(o=o.getParent(),o===null){i=null;break}s=o.getPreviousSibling()}o!==null&&(l=o.isInline()?0:2,i=re.$isElementNode(s)?s.getLastDescendant():s)}if(s=r.getTextContent(),s===""&&re.$isElementNode(r)&&!r.isInline()&&(s=`
125
+
126
+ `),o=s.length,!re.$isTextNode(r)||n>=o)s=r.getParent(),r.remove(),s==null||s.getChildrenSize()!==0||re.$isRootNode(s)||s.remove(),n-=o+l,r=i;else{let a=r.getKey();l=e.getEditorState().read(()=>{const c=re.$getNodeByKey(a);return re.$isTextNode(c)&&c.isSimpleText()?c.getTextContent():null}),i=o-n;let u=s.slice(0,i);l!==null&&l!==s?(n=re.$getPreviousSelection(),o=r,r.isSimpleText()?r.setTextContent(l):(o=re.$createTextNode(l),r.replace(o)),re.$isRangeSelection(n)&&n.isCollapsed()&&(n=n.anchor.offset,o.select(n,n))):r.isSimpleText()?(l=t.key===a,s=t.offset,s<n&&(s=o),n=l?s-n:0,o=l?s:i,l&&n===0?([n]=r.splitText(n,o),n.remove()):([,n]=r.splitText(n,o),n.remove())):(n=re.$createTextNode(u),r.replace(n)),n=0}}};const W2=Pt;var Mo=W2,U2=Mo,ut=me;function V2(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function hS(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function pS(e,t){for(;e!==ut.$getRoot()&&e!=null;){if(t(e))return e;e=e.getParent()}return null}ft.$splitNode=ut.$splitNode;ft.isHTMLAnchorElement=ut.isHTMLAnchorElement;ft.isHTMLElement=ut.isHTMLElement;ft.$dfs=function(e,t){let n=[];e=(e||ut.$getRoot()).getLatest(),t=t||(ut.$isElementNode(e)?e.getLastDescendant():e);for(var r=e,o=0;(r=r.getParent())!==null;)o++;for(r=o;e!==null&&!e.is(t);)if(n.push({depth:r,node:e}),ut.$isElementNode(e)&&0<e.getChildrenSize())e=e.getFirstChild(),r++;else for(o=null;o===null&&e!==null;)o=e.getNextSibling(),o===null?(e=e.getParent(),r--):e=o;return e!==null&&e.is(t)&&n.push({depth:r,node:e}),n};ft.$filter=function(e,t){let n=[];for(let r=0;r<e.length;r++){let o=t(e[r]);o!==null&&n.push(o)}return n};ft.$findMatchingParent=pS;ft.$getNearestBlockElementAncestorOrThrow=function(e){let t=pS(e,n=>ut.$isElementNode(n)&&!n.isInline());return ut.$isElementNode(t)||V2(4,e.__key),t};ft.$getNearestNodeOfType=function(e,t){for(;e!=null;){if(e instanceof t)return e;e=e.getParent()}return null};ft.$insertFirst=function(e,t){let n=e.getFirstChild();n!==null?n.insertBefore(t):e.append(t)};ft.$insertNodeToNearestRoot=function(e){var t=ut.$getSelection()||ut.$getPreviousSelection();if(ut.$isRangeSelection(t)){var{focus:n}=t;if(t=n.getNode(),n=n.offset,ut.$isRootOrShadowRoot(t))n=t.getChildAtIndex(n),n==null?t.append(e):n.insertBefore(e),e.selectNext();else{let r,o;ut.$isTextNode(t)?(r=t.getParentOrThrow(),o=t.getIndexWithinParent(),0<n&&(o+=1,t.splitText(n))):(r=t,o=n),[,t]=ut.$splitNode(r,o),t.insertBefore(e),t.selectStart()}}else ut.$isNodeSelection(t)||ut.DEPRECATED_$isGridSelection(t)?(t=t.getNodes(),t[t.length-1].getTopLevelElementOrThrow().insertAfter(e)):ut.$getRoot().append(e),t=ut.$createParagraphNode(),e.insertAfter(t),t.select();return e.getLatest()};ft.$restoreEditorState=function(e,t){let n=new Map,r=e._pendingEditorState;for(let[o,i]of t._nodeMap){let l=U2.$cloneWithProperties(i);ut.$isTextNode(l)&&(l.__text=i.__text),n.set(o,l)}r&&(r._nodeMap=n),e._dirtyType=2,e=t._selection,ut.$setSelection(e===null?null:e.clone())};ft.$wrapNodeInElement=function(e,t){return t=t(),e.replace(t),t.append(e),t};ft.addClassNamesToElement=function(e,...t){t.forEach(n=>{typeof n=="string"&&(n=n.split(" ").filter(r=>r!==""),e.classList.add(...n))})};ft.isMimeType=hS;ft.mediaFileReader=function(e,t){let n=e[Symbol.iterator]();return new Promise((r,o)=>{let i=[],l=()=>{const{done:s,value:a}=n.next();if(s)return r(i);const u=new FileReader;u.addEventListener("error",o),u.addEventListener("load",()=>{const c=u.result;typeof c=="string"&&i.push({file:a,result:c}),l()}),hS(a,t)?u.readAsDataURL(a):l()};l()})};ft.mergeRegister=function(...e){return()=>{e.forEach(t=>t())}};ft.objectKlassEquals=function(e,t){return e!==null?Object.getPrototypeOf(e).constructor.name===t.name:!1};ft.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,o=>{e:{for(var i=o.getChildren(),l=0;l<i.length;l++)if(i[l]instanceof t){i=null;break e}for(i=o;i!==null;)if(l=i,i=i.getParent(),i instanceof t){i={child:l,parent:i};break e}i=null}if(i!==null){const{child:s,parent:a}=i;if(s.is(o)){if(r(a,o),o=s.getNextSiblings(),i=o.length,a.insertAfter(s),i!==0){l=n(a),s.insertAfter(l);for(let u=0;u<i;u++)l.append(o[u])}a.canBeEmpty()||a.getChildrenSize()!==0||a.remove()}}})};ft.removeClassNamesFromElement=function(e,...t){t.forEach(n=>{typeof n=="string"&&e.classList.remove(...n.split(" "))})};const H2=ft;var Nt=H2,Re=me,Lo=Nt;function Rl(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function gS(e){let t=1;for(e=e.getParent();e!=null;){if(qe(e)){if(e=e.getParent(),xe(e)){t++,e=e.getParent();continue}Rl(40)}break}return t}function gp(e){e=e.getParent(),xe(e)||Rl(40);let t=e;for(;t!==null;)t=t.getParent(),xe(t)&&(e=t);return e}function mS(e){let t=[];e=e.getChildren().filter(qe);for(let n=0;n<e.length;n++){let r=e[n],o=r.getFirstChild();xe(o)?t=t.concat(mS(o)):t.push(r)}return t}function cr(e){return qe(e)&&xe(e.getFirstChild())}function K2(e){for(;e.getNextSibling()==null&&e.getPreviousSibling()==null;){let t=e.getParent();if(t==null||!qe(e)&&!xe(e))break;e=t}e.remove()}function Yy(e){return Cn().append(e)}function vS(e,t){return qe(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function yi(e,t){e.splice(e.getChildrenSize(),0,t)}function Xy(e,t){if(xe(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),o=Cn();return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),yi(o,e.getChildren()),xe(n)&&t===n.getListType()?(n.append(o),e.remove(),xe(r)&&t===r.getListType()&&(yi(n,r.getChildren()),r.remove()),n):xe(r)&&t===r.getListType()?(r.getFirstChildOrThrow().insertBefore(o),e.remove(),r):(t=rn(t),t.append(o),e.replace(t),Jt(t),t)}function yS(e,t){var n=e.getLastChild();let r=t.getFirstChild();n&&r&&cr(n)&&cr(r)&&(yS(n.getFirstChild(),r.getFirstChild()),r.remove()),n=t.getChildren(),0<n.length&&(e.append(...n),Jt(e)),t.remove()}function Jt(e,t){if(e=t||e.getChildren(),e!==void 0)for(t=0;t<e.length;t++){let i=e[t];if(qe(i)){let l=i.getValue();var n=i,r=n.getParent(),o=1;for(r!=null&&(xe(r)?o=r.getStart():Rl(44)),n=n.getPreviousSiblings(),r=0;r<n.length;r++){let s=n[r];qe(s)&&!xe(s.getFirstChild())&&o++}l!==o&&i.setValue(o)}}}function G2(e){if(!cr(e)){var t=e.getParent(),n=t?t.getParent():void 0,r=n?n.getParent():void 0;if(xe(r)&&qe(n)&&xe(t)){var o=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(o))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{var l=t.getListType();o=Cn();let s=rn(l);o.append(s),e.getPreviousSiblings().forEach(a=>s.append(a)),i=Cn(),l=rn(l),i.append(l),yi(l,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(i),n.replace(e)}Jt(t),Jt(r)}}}let Sd=class xS extends Re.ElementNode{static getType(){return"listitem"}static clone(t){return new xS(t.__value,t.__checked,t.__key)}constructor(t,n,r){super(r),this.__value=t===void 0?1:t,this.__checked=n}createDOM(t){let n=document.createElement("li"),r=this.getParent();return xe(r)&&r.getListType()==="check"&&Jy(n,this,null),n.value=this.__value,Qy(n,t.theme,this),n}updateDOM(t,n,r){let o=this.getParent();return xe(o)&&o.getListType()==="check"&&Jy(n,this,t),n.value=this.__value,Qy(n,r.theme,this),!1}static transform(){return t=>{let n=t.getParent();xe(n)&&(Jt(n),n.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:Y2,priority:0})}}static importJSON(t){let n=Cn();return n.setChecked(t.checked),n.setValue(t.value),n.setFormat(t.format),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...t){for(let n=0;n<t.length;n++){let r=t[n];if(Re.$isElementNode(r)&&this.canMergeWith(r)){let o=r.getChildren();this.append(...o),r.remove()}else super.append(r)}return this}replace(t,n){if(qe(t))return super.replace(t);this.setIndent(0);let r=this.getParentOrThrow();if(!xe(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{let o=rn(r.getListType()),i=this.getNextSibling();for(;i;){let l=i;i=i.getNextSibling(),o.append(l)}r.insertAfter(t),t.insertAfter(o)}return n&&this.getChildren().forEach(o=>{t.append(o)}),this.remove(),r.getChildrenSize()===0&&r.remove(),t}insertAfter(t,n=!0){var r=this.getParentOrThrow();xe(r)||Rl(39);var o=this.getNextSiblings();if(qe(t))return n=super.insertAfter(t,n),t=t.getParentOrThrow(),xe(t)&&Jt(t),n;if(xe(t)){for(r=t,t=t.getChildren(),o=t.length-1;0<=o;o--)r=t[o],this.insertAfter(r,n);return r}if(r.insertAfter(t,n),o.length!==0){let i=rn(r.getListType());o.forEach(l=>i.append(l)),t.insertAfter(i,n)}return t}remove(t){let n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(t),n&&r&&cr(n)&&cr(r)?(yS(n.getFirstChild(),r.getFirstChild()),r.remove()):r&&(t=r.getParent(),xe(t)&&Jt(t))}insertNewAfter(t,n=!0){return t=Cn(this.__checked==null?void 0:!1),this.insertAfter(t,n),t}collapseAtStart(t){let n=Re.$createParagraphNode();this.getChildren().forEach(l=>n.append(l));var r=this.getParentOrThrow(),o=r.getParentOrThrow();let i=qe(o);return r.getChildrenSize()===1?i?(r.remove(),o.select()):(r.insertBefore(n),r.remove(),r=t.anchor,t=t.focus,o=n.getKey(),r.type==="element"&&r.getNode().is(this)&&r.set(o,r.offset,"element"),t.type==="element"&&t.getNode().is(this)&&t.set(o,t.offset,"element")):(r.insertBefore(n),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(t){this.getWritable().__value=t}getChecked(){return this.getLatest().__checked}setChecked(t){this.getWritable().__checked=t}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var t=this.getParent();if(t===null)return this.getLatest().__indent;t=t.getParentOrThrow();let n=0;for(;qe(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t=="number"&&-1<t||Rl(117);let n=this.getIndent();for(;n!==t;)if(n<t){e:{var r=new Set;if(cr(this)||r.has(this.getKey()))break e;let s=this.getParent();var o=this.getNextSibling(),i=this.getPreviousSibling();if(cr(o)&&cr(i)){if(i=i.getFirstChild(),xe(i)){i.append(this);var l=o.getFirstChild();xe(l)&&(l=l.getChildren(),yi(i,l),o.remove(),r.add(o.getKey())),Jt(i)}}else cr(o)?(o=o.getFirstChild(),xe(o)&&(r=o.getFirstChild(),r!==null&&r.insertBefore(this),Jt(o))):cr(i)?(o=i.getFirstChild(),xe(o)&&(o.append(this),Jt(o))):xe(s)&&(r=Cn(),l=rn(s.getListType()),r.append(l),l.append(this),i?i.insertAfter(r):o?o.insertBefore(r):s.append(r),Jt(l));xe(s)&&Jt(s)}n++}else G2(this),n--;return this}insertBefore(t){if(qe(t)){let n=this.getParentOrThrow();if(xe(n)){let r=this.getNextSiblings();Jt(n,r)}}return super.insertBefore(t)}canInsertAfter(t){return qe(t)}canReplaceWith(t){return qe(t)}canMergeWith(t){return Re.$isParagraphNode(t)||qe(t)}extractWithChild(t,n){if(!Re.$isRangeSelection(n))return!1;t=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(t)&&this.isParentOf(r)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return rn("bullet")}};function Qy(e,t,n){let r=[],o=[];var i=(t=t.list)?t.listitem:void 0;if(t&&t.nested)var l=t.nested.listitem;if(i!==void 0&&(i=i.split(" "),r.push(...i)),t){i=n.getParent(),i=xe(i)&&i.getListType()==="check";let s=n.getChecked();i&&!s||o.push(t.listitemUnchecked),i&&s||o.push(t.listitemChecked),i&&r.push(s?t.listitemChecked:t.listitemUnchecked)}l!==void 0&&(l=l.split(" "),n.getChildren().some(s=>xe(s))?r.push(...l):o.push(...l)),0<o.length&&Lo.removeClassNamesFromElement(e,...o),0<r.length&&Lo.addClassNamesToElement(e,...r)}function Jy(e,t,n){xe(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function Y2(e){return e=Lo.isHTMLElement(e)&&e.getAttribute("aria-checked")==="true",{node:Cn(e)}}function Cn(e){return Re.$applyNodeReplacement(new Sd(void 0,e))}function qe(e){return e instanceof Sd}let hm=class wS extends Re.ElementNode{static getType(){return"list"}static clone(t){return new wS(t.__listType||e0[t.__tag],t.__start,t.__key)}constructor(t,n,r){super(r),this.__listType=t=e0[t]||t,this.__tag=t==="number"?"ol":"ul",this.__start=n}getTag(){return this.__tag}setListType(t){let n=this.getWritable();n.__listType=t,n.__tag=t==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(t){let n=document.createElement(this.__tag);return this.__start!==1&&n.setAttribute("start",String(this.__start)),n.__lexicalListType=this.__listType,Zy(n,t.theme,this),n}updateDOM(t,n,r){return t.__tag!==this.__tag?!0:(Zy(n,r.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:qy,priority:0}),ul:()=>({conversion:qy,priority:0})}}static importJSON(t){let n=rn(t.listType,t.start);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportDOM(t){return{element:t}=super.exportDOM(t),t&&Lo.isHTMLElement(t)&&(this.__start!==1&&t.setAttribute("start",String(this.__start)),this.__listType==="check"&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...t){for(let r=0;r<t.length;r++){var n=t[r];if(qe(n))super.append(n);else{let o=Cn();xe(n)||Re.$isElementNode(n)&&(n=Re.$createTextNode(n.getTextContent())),o.append(n),super.append(o)}}return Jt(this),this}extractWithChild(t){return qe(t)}};function Zy(e,t,n){let r=[],o=[];var i=t.list;if(i!==void 0){let s=i[`${n.__tag}Depth`]||[];t=gS(n)-1;let a=t%s.length;var l=s[a];let u=i[n.__tag],c;if(i=i.nested,i!==void 0&&i.list&&(c=i.list),u!==void 0&&r.push(u),l!==void 0)for(l=l.split(" "),r.push(...l),l=0;l<s.length;l++)l!==a&&o.push(n.__tag+l);c!==void 0&&(n=c.split(" "),1<t?r.push(...n):o.push(...n))}0<o.length&&Lo.removeClassNamesFromElement(e,...o),0<r.length&&Lo.addClassNamesToElement(e,...r)}function X2(e){let t=[];for(let r=0;r<e.length;r++){var n=e[r];qe(n)?(t.push(n),n=n.getChildren(),1<n.length&&n.forEach(o=>{xe(o)&&t.push(Yy(o))})):t.push(Yy(n))}return t}function qy(e){let t=e.nodeName.toLowerCase(),n=null;return t==="ol"?n=rn("number",e.start):t==="ul"&&(n=Lo.isHTMLElement(e)&&e.getAttribute("__lexicallisttype")==="check"?rn("check"):rn("bullet")),{after:X2,node:n}}let e0={ol:"number",ul:"bullet"};function rn(e,t=1){return Re.$applyNodeReplacement(new hm(e,t))}function xe(e){return e instanceof hm}let Q2=Re.createCommand("INSERT_UNORDERED_LIST_COMMAND"),J2=Re.createCommand("INSERT_ORDERED_LIST_COMMAND"),Z2=Re.createCommand("INSERT_CHECK_LIST_COMMAND"),q2=Re.createCommand("REMOVE_LIST_COMMAND");an.$createListItemNode=Cn;an.$createListNode=rn;an.$getListDepth=gS;an.$handleListInsertParagraph=function(){var e=Re.$getSelection();if(!Re.$isRangeSelection(e)||!e.isCollapsed()||(e=e.anchor.getNode(),!qe(e)||e.getChildrenSize()!==0))return!1;var t=gp(e),n=e.getParent();xe(n)||Rl(40);let r=n.getParent(),o;if(Re.$isRootOrShadowRoot(r))o=Re.$createParagraphNode(),t.insertAfter(o);else if(qe(r))o=Cn(),r.insertAfter(o);else return!1;if(o.select(),t=e.getNextSiblings(),0<t.length){let i=rn(n.getListType());Re.$isParagraphNode(o)?o.insertAfter(i):(n=Cn(),n.append(i),o.insertAfter(n)),t.forEach(l=>{l.remove(),i.append(l)})}return K2(e),!0};an.$isListItemNode=qe;an.$isListNode=xe;an.INSERT_CHECK_LIST_COMMAND=Z2;an.INSERT_ORDERED_LIST_COMMAND=J2;an.INSERT_UNORDERED_LIST_COMMAND=Q2;an.ListItemNode=Sd;an.ListNode=hm;an.REMOVE_LIST_COMMAND=q2;an.insertList=function(e,t){e.update(()=>{var n=Re.$getSelection();if(Re.$isRangeSelection(n)||Re.DEPRECATED_$isGridSelection(n)){var r=n.getNodes();n=n.anchor.getNode();var o=n.getParent();if(vS(n,r))r=rn(t),Re.$isRootOrShadowRoot(o)?(n.replace(r),o=Cn(),Re.$isElementNode(n)&&(o.setFormat(n.getFormatType()),o.setIndent(n.getIndent())),r.append(o)):qe(n)&&(n=n.getParentOrThrow(),yi(r,n.getChildren()),n.replace(r));else for(n=new Set,o=0;o<r.length;o++){var i=r[o];if(Re.$isElementNode(i)&&i.isEmpty()&&!n.has(i.getKey()))Xy(i,t);else if(Re.$isLeafNode(i))for(i=i.getParent();i!=null;){let s=i.getKey();if(xe(i)){if(!n.has(s)){var l=rn(t);yi(l,i.getChildren()),i.replace(l),Jt(l),n.add(s)}break}else{if(l=i.getParent(),Re.$isRootOrShadowRoot(l)&&!n.has(s)){n.add(s),Xy(i,t);break}i=l}}}}})};an.removeList=function(e){e.update(()=>{let t=Re.$getSelection();if(Re.$isRangeSelection(t)){var n=new Set,r=t.getNodes(),o=t.anchor.getNode();if(vS(o,r))n.add(gp(o));else for(o=0;o<r.length;o++){var i=r[o];Re.$isLeafNode(i)&&(i=Lo.$getNearestNodeOfType(i,Sd),i!=null&&n.add(gp(i)))}for(let l of n){n=l,r=mS(l);for(let s of r)r=Re.$createParagraphNode(),yi(r,s.getChildren()),n.insertAfter(r),n=r,s.__key===t.anchor.key&&t.anchor.set(r.getKey(),0,"element"),s.__key===t.focus.key&&t.focus.set(r.getKey(),0,"element"),s.remove();l.remove()}}})};const eR=an;var po=eR,_S={},Ed={},SS=p;function tR(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let ES=SS.createContext(null);Ed.LexicalComposerContext=ES;Ed.createLexicalComposerContext=function(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n!=null?n.getTheme():null)}}};Ed.useLexicalComposerContext=function(){let e=SS.useContext(ES);return e==null&&tR(8),e};const nR=Ed;var ir=nR,t0=ir,Cs=me,Dc=p;let CS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var rR=CS?Dc.useLayoutEffect:Dc.useEffect;let mu={tag:"history-merge"};function oR(e,t){if(t!==null){if(t===void 0)e.update(()=>{var n=Cs.$getRoot();if(n.isEmpty()){let r=Cs.$createParagraphNode();n.append(r),n=CS?document.activeElement:null,(Cs.$getSelection()!==null||n!==null&&n===e.getRootElement())&&r.select()}},mu);else if(t!==null)switch(typeof t){case"string":let n=e.parseEditorState(t);e.setEditorState(n,mu);break;case"object":e.setEditorState(t,mu);break;case"function":e.update(()=>{Cs.$getRoot().isEmpty()&&t(e)},mu)}}}_S.LexicalComposer=function({initialConfig:e,children:t}){let n=Dc.useMemo(()=>{const{theme:r,namespace:o,editor__DEPRECATED:i,nodes:l,onError:s,editorState:a}=e,u=t0.createLexicalComposerContext(null,r);let c=i||null;if(c===null){const d=Cs.createEditor({editable:e.editable,namespace:o,nodes:l,onError:f=>s(f,d),theme:r});oR(d,a),c=d}return[c,u]},[]);return rR(()=>{let r=e.editable,[o]=n;o.setEditable(r!==void 0?r:!0)},[]),Dc.createElement(t0.LexicalComposerContext.Provider,{value:n},t)};const iR=_S;var lR=iR,Us=p;function mp(e,t){return mp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},mp(e,t)}function sR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,mp(e,t)}function aR(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),e.length!==t.length||e.some(function(n,r){return!Object.is(n,t[r])})}var n0={error:null},uR=function(e){function t(){for(var r,o=arguments.length,i=Array(o),l=0;l<o;l++)i[l]=arguments[l];return r=e.call.apply(e,[this].concat(i))||this,r.state=n0,r.resetErrorBoundary=function(){for(var s,a=arguments.length,u=Array(a),c=0;c<a;c++)u[c]=arguments[c];r.props.onReset==null||(s=r.props).onReset.apply(s,u),r.reset()},r}sR(t,e),t.getDerivedStateFromError=function(r){return{error:r}};var n=t.prototype;return n.reset=function(){this.setState(n0)},n.componentDidCatch=function(r,o){var i,l;(i=(l=this.props).onError)==null||i.call(l,r,o)},n.componentDidUpdate=function(r,o){var i=this.props.resetKeys;if(this.state.error!==null&&o.error!==null&&aR(r.resetKeys,i)){var l,s;(l=(s=this.props).onResetKeysChange)==null||l.call(s,r.resetKeys,i),this.reset()}},n.render=function(){var r=this.state.error,o=this.props,i=o.fallbackRender,l=o.FallbackComponent;if(o=o.fallback,r!==null){if(r={error:r,resetErrorBoundary:this.resetErrorBoundary},Us.isValidElement(o))return o;if(typeof i=="function")return i(r);if(l)return Us.createElement(l,r);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(Us.Component),cR=function({children:e,onError:t}){return Us.createElement(uR,{fallback:Us.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:t},e)};const dR=cR;var fR=dR;const hR=ba(fR);var pm={},gm={},pR=Nt,ze=me;function gR(e,t,n,r,o){if(e===null||n.size===0&&r.size===0&&!o)return 0;var i=t._selection,l=e._selection;if(o)return 1;if(!(ze.$isRangeSelection(i)&&ze.$isRangeSelection(l)&&l.isCollapsed()&&i.isCollapsed()))return 0;o=t._nodeMap;let s=[];for(let a of n)n=o.get(a),n!==void 0&&s.push(n);for(let[a,u]of r)u&&(r=o.get(a),r===void 0||ze.$isRootNode(r)||s.push(r));return s.length===0?0:1<s.length?(r=t._nodeMap,t=r.get(i.anchor.key),l=r.get(l.anchor.key),t&&l&&!e._nodeMap.has(t.__key)&&ze.$isTextNode(t)&&t.__text.length===1&&i.anchor.offset===1?2:0):(t=s[0],e=e._nodeMap.get(t.__key),!ze.$isTextNode(e)||!ze.$isTextNode(t)||e.__mode!==t.__mode||(e=e.__text,t=t.__text,e===t)||(i=i.anchor,l=l.anchor,i.key!==l.key||i.type!=="text")?0:(i=i.offset,l=l.offset,e=t.length-e.length,e===1&&l===i-1?2:e===-1&&l===i+1?3:e===-1&&l===i?4:0))}function mR(e,t){let n=Date.now(),r=0;return(o,i,l,s,a,u)=>{let c=Date.now();if(u.has("historic"))return r=0,n=c,2;let d=gR(o,i,s,a,e.isComposing()),f=(()=>{var h=l===null||l.editor===e,m=u.has("history-push");if(!m&&h&&u.has("history-merge"))return 0;if(o===null)return 1;var g=i._selection;if(!(0<s.size||0<a.size))return g!==null?0:2;if(m===!1&&d!==0&&d===r&&c<n+t&&h)return 0;if(s.size===1){{m=Array.from(s)[0],h=o._nodeMap.get(m),m=i._nodeMap.get(m),g=o._selection;let S=i._selection,v=!1;ze.$isRangeSelection(g)&&ze.$isRangeSelection(S)&&(v=g.anchor.type==="element"&&g.focus.type==="element"&&S.anchor.type==="text"&&S.focus.type==="text"),h=!v&&ze.$isTextNode(h)&&ze.$isTextNode(m)?h.__type===m.__type&&h.__text===m.__text&&h.__mode===m.__mode&&h.__detail===m.__detail&&h.__style===m.__style&&h.__format===m.__format&&h.__parent===m.__parent:!1}if(h)return 0}return 1})();return n=c,r=d,f}}gm.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}};gm.registerHistory=function(e,t,n){let r=mR(e,n);n=({editorState:l,prevEditorState:s,dirtyLeaves:a,dirtyElements:u,tags:c})=>{const d=t.current,f=t.redoStack,h=t.undoStack,m=d===null?null:d.editorState;if(d===null||l!==m){if(s=r(s,l,d,a,u,c),s===1)f.length!==0&&(t.redoStack=[],e.dispatchCommand(ze.CAN_REDO_COMMAND,!1)),d!==null&&(h.push({...d}),e.dispatchCommand(ze.CAN_UNDO_COMMAND,!0));else if(s===2)return;t.current={editor:e,editorState:l}}};let o=pR.mergeRegister(e.registerCommand(ze.UNDO_COMMAND,()=>{let l=t.redoStack,s=t.undoStack;if(s.length!==0){let a=t.current,u=s.pop();a!==null&&(l.push(a),e.dispatchCommand(ze.CAN_REDO_COMMAND,!0)),s.length===0&&e.dispatchCommand(ze.CAN_UNDO_COMMAND,!1),t.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:"historic"})}return!0},ze.COMMAND_PRIORITY_EDITOR),e.registerCommand(ze.REDO_COMMAND,()=>{let l=t.redoStack;var s=t.undoStack;if(l.length!==0){let a=t.current;a!==null&&(s.push(a),e.dispatchCommand(ze.CAN_UNDO_COMMAND,!0)),s=l.pop(),l.length===0&&e.dispatchCommand(ze.CAN_REDO_COMMAND,!1),t.current=s||null,s&&s.editor.setEditorState(s.editorState,{tag:"historic"})}return!0},ze.COMMAND_PRIORITY_EDITOR),e.registerCommand(ze.CLEAR_EDITOR_COMMAND,()=>(t.undoStack=[],t.redoStack=[],t.current=null,!1),ze.COMMAND_PRIORITY_EDITOR),e.registerCommand(ze.CLEAR_HISTORY_COMMAND,()=>(t.undoStack=[],t.redoStack=[],t.current=null,e.dispatchCommand(ze.CAN_REDO_COMMAND,!1),e.dispatchCommand(ze.CAN_UNDO_COMMAND,!1),!0),ze.COMMAND_PRIORITY_EDITOR),e.registerUpdateListener(n)),i=e.registerUpdateListener(n);return()=>{o(),i()}};const vR=gm;var yR=vR,xR=ir,vp=yR,r0=p;function wR(e,t,n=1e3){let r=r0.useMemo(()=>t||vp.createEmptyHistoryState(),[t]);r0.useEffect(()=>vp.registerHistory(e,r,n),[n,e,r])}pm.createEmptyHistoryState=vp.createEmptyHistoryState;pm.HistoryPlugin=function({externalHistoryState:e}){let[t]=xR.useLexicalComposerContext();return wR(t,e),null};const _R=pm;var SR=_R,$S={},ER=ir,Vs=p,CR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Vs.useLayoutEffect:Vs.useEffect;function $R(e){let[t]=ER.useLexicalComposerContext(),n=Vs.useMemo(()=>e(t),[t,e]),r=Vs.useRef(n.initialValueFn()),[o,i]=Vs.useState(r.current);return CR(()=>{let{initialValueFn:l,subscribe:s}=n,a=l();return r.current!==a&&(r.current=a,i(a)),s(u=>{r.current=u,i(u)})},[n,e]),o}function kR(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}var TR=function(){return $R(kR)};const bR=TR;var NR=bR,Wo={},Zt=me;function mm(e,t=!0){return e?!1:(e=kS(),t&&(e=e.trim()),e==="")}function kS(){return Zt.$getRoot().getTextContent()}function TS(e){if(!mm(e,!1))return!1;e=Zt.$getRoot().getChildren();let t=e.length;if(1<t)return!1;for(let r=0;r<t;r++){var n=e[r];if(Zt.$isDecoratorNode(n))return!1;if(Zt.$isElementNode(n)){if(!Zt.$isParagraphNode(n)||n.__indent!==0)return!1;n=n.getChildren();let o=n.length;for(let i=0;i<o;i++)if(!Zt.$isTextNode(n[r]))return!1}}return!0}Wo.$canShowPlaceholder=TS;Wo.$canShowPlaceholderCurry=function(e){return()=>TS(e)};Wo.$findTextIntersectionFromCharacters=function(e,t){var n=e.getFirstChild();e=0;e:for(;n!==null;){if(Zt.$isElementNode(n)){var r=n.getFirstChild();if(r!==null){n=r;continue}}else if(Zt.$isTextNode(n)){if(r=n.getTextContentSize(),e+r>t)return{node:n,offset:t-e};e+=r}if(r=n.getNextSibling(),r!==null)n=r;else{for(n=n.getParent();n!==null;){if(r=n.getNextSibling(),r!==null){n=r;continue e}n=n.getParent()}break}}return null};Wo.$isRootTextContentEmpty=mm;Wo.$isRootTextContentEmptyCurry=function(e,t){return()=>mm(e,t)};Wo.$rootTextContent=kS;Wo.registerLexicalTextEntity=function(e,t,n,r){let o=l=>{const s=Zt.$createTextNode(l.getTextContent());s.setFormat(l.getFormat()),l.replace(s)},i=e.registerNodeTransform(Zt.TextNode,l=>{if(l.isSimpleText()){var s=l.getPreviousSibling(),a=l.getTextContent(),u=l;if(Zt.$isTextNode(s)){var c=s.getTextContent(),d=t(c+a);if(s instanceof n){if(d===null||s.getLatest().__mode!==0){o(s);return}if(d=d.end-c.length,0<d){u=a.slice(0,d),u=c+u,s.select(),s.setTextContent(u),d===a.length?l.remove():(s=a.slice(d),l.setTextContent(s));return}}else if(d===null||d.start<c.length)return}for(;;){if(l=t(a),a=d=l===null?"":a.slice(l.end),d===""){if(c=u.getNextSibling(),Zt.$isTextNode(c)){if(d=u.getTextContent()+c.getTextContent(),d=t(d),d===null){c instanceof n?o(c):c.markDirty();break}else if(d.start!==0)break}}else if(c=t(d),c!==null&&c.start===0)break;if(l===null)break;if(l.start===0&&Zt.$isTextNode(s)&&s.isTextEntity())continue;let f;if(l.start===0?[f,u]=u.splitText(l.end):[,f,u]=u.splitText(l.start,l.end),l=r(f),l.setFormat(f.getFormat()),f.replace(l),u==null)break}}});return e=e.registerNodeTransform(n,l=>{var s=l.getTextContent();const a=t(s);a===null||a.start!==0?o(l):s.length>a.end?l.splitText(a.end):(s=l.getPreviousSibling(),Zt.$isTextNode(s)&&s.isTextEntity()&&(o(s),o(l)),s=l.getNextSibling(),Zt.$isTextNode(s)&&s.isTextEntity()&&(o(s),l instanceof n&&o(l)))}),[i,e]};const RR=Wo;var PR=RR,bS={},vu=me;bS.registerDragonSupport=function(e){let t=window.location.origin,n=r=>{if(r.origin===t){var o=e.getRootElement();if(document.activeElement===o&&(o=r.data,typeof o=="string")){try{var i=JSON.parse(o)}catch{return}if(i&&i.protocol==="nuanria_messaging"&&i.type==="request"&&(i=i.payload)&&i.functionId==="makeChanges"&&(i=i.args)){const[l,s,a,u,c]=i;e.update(()=>{const d=vu.$getSelection();if(vu.$isRangeSelection(d)){var f=d.anchor;let h=f.getNode(),m=0,g=0;vu.$isTextNode(h)&&0<=l&&0<=s&&(m=l,g=l+s,d.setTextNodeRange(h,m,h,g)),(m!==g||a!=="")&&(d.insertRawText(a),h=f.getNode()),vu.$isTextNode(h)&&(m=u,g=u+c,f=h.getTextContentSize(),m=m>f?f:m,g=g>f?f:g,d.setTextNodeRange(h,m,h,g)),r.stopImmediatePropagation()}})}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}};const OR=bS;var AR=OR,Tr={},Qr={},vm={},o0=Mo,MR=Nt,ol=me;function NS(e,t,n,r=null){let o=r!=null?t.isSelected(r):!0,i=ol.$isElementNode(t)&&t.excludeFromCopy("html");var l=t;r!==null&&(l=o0.$cloneWithProperties(t),l=ol.$isTextNode(l)&&r!=null?o0.$sliceSelectedTextNodeContent(r,l):l);let s=ol.$isElementNode(l)?l.getChildren():[],{element:a,after:u}=l.exportDOM(e);if(!a)return!1;let c=document.createDocumentFragment();for(let d=0;d<s.length;d++){let f=s[d],h=NS(e,f,c,r);!o&&ol.$isElementNode(t)&&h&&t.extractWithChild(f,r,"html")&&(o=!0)}return o&&!i?(MR.isHTMLElement(a)&&a.append(c),n.append(a),u&&(e=u.call(l,a))&&a.replaceWith(e)):n.append(c),o}let RS=new Set(["STYLE","SCRIPT"]);function PS(e,t,n=new Map,r){let o=[];if(RS.has(e.nodeName))return o;let i=null;var l,{nodeName:s}=e,a=t._htmlConversions.get(s.toLowerCase());if(s=null,a!==void 0)for(l of a)a=l(e),a!==null&&(s===null||s.priority<a.priority)&&(s=a);if(s=(l=s!==null?s.conversion:null)?l(e):null,l=null,s!==null){if(l=s.after,a=s.node,i=Array.isArray(a)?a[a.length-1]:a,i!==null){for(var[,u]of n)if(i=u(i,r),!i)break;i&&o.push(...Array.isArray(a)?a:[i])}s.forChild!=null&&n.set(e.nodeName,s.forChild)}for(e=e.childNodes,r=[],u=0;u<e.length;u++)r.push(...PS(e[u],t,new Map(n),i));return l!=null&&(r=l(r)),i==null?o=o.concat(r):ol.$isElementNode(i)&&i.append(...r),o}vm.$generateHtmlFromNodes=function(e,t){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let n=document.createElement("div"),r=ol.$getRoot().getChildren();for(let o=0;o<r.length;o++)NS(e,r[o],n,t);return n.innerHTML};vm.$generateNodesFromDOM=function(e,t){t=t.body?t.body.childNodes:[];let n=[];for(let o=0;o<t.length;o++){var r=t[o];RS.has(r.nodeName)||(r=PS(r,e),r!==null&&(n=n.concat(r)))}return n};const LR=vm;var DR=LR,OS=DR,yp=Mo,ml=Nt,de=me;function Lr(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let AS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function MS(e){let t=de.$getSelection();if(t==null)throw Error("Expected valid LexicalSelection");return de.$isRangeSelection(t)&&t.isCollapsed()||t.getNodes().length===0?"":OS.$generateHtmlFromNodes(e,t)}function LS(e){let t=de.$getSelection();if(t==null)throw Error("Expected valid LexicalSelection");return de.$isRangeSelection(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(IS(e,t))}function xp(e,t,n){(de.DEPRECATED_$isGridSelection(n)||ml.$findMatchingParent(n.anchor.getNode(),r=>de.DEPRECATED_$isGridCellNode(r))!==null&&ml.$findMatchingParent(n.focus.getNode(),r=>de.DEPRECATED_$isGridCellNode(r))!==null)&&t.length===1&&de.DEPRECATED_$isGridNode(t[0])?jR(t,n,!1,e):IR(t,n)}function IR(e,t){let n=[],r=null;for(let o=0;o<e.length;o++){let i=e[o],l=de.$isLineBreakNode(i);if(l||de.$isDecoratorNode(i)&&i.isInline()||de.$isElementNode(i)&&i.isInline()||de.$isTextNode(i)||i.isParentRequired()){if(r===null&&(r=i.createParentElementNode(),n.push(r),l))continue;r!==null&&r.append(i)}else n.push(i),r=null}de.$isRangeSelection(t)?t.insertNodes(n):de.DEPRECATED_$isGridSelection(t)&&(e=t.anchor.getNode(),de.DEPRECATED_$isGridCellNode(e)||Lr(41),e.append(...n))}function jR(e,t,n,r){e.length===1&&de.DEPRECATED_$isGridNode(e[0])||Lr(42);var o=e[0];e=o.getChildren(),n=o.getFirstChildOrThrow().getChildrenSize();var i=o.getChildrenSize(),l=ml.$findMatchingParent(t.anchor.getNode(),h=>de.DEPRECATED_$isGridCellNode(h));t=(o=l&&ml.$findMatchingParent(l,h=>de.DEPRECATED_$isGridRowNode(h)))&&ml.$findMatchingParent(o,h=>de.DEPRECATED_$isGridNode(h)),de.DEPRECATED_$isGridCellNode(l)&&de.DEPRECATED_$isGridRowNode(o)&&de.DEPRECATED_$isGridNode(t)||Lr(43);var s=o.getIndexWithinParent(),a=Math.min(t.getChildrenSize()-1,s+i-1);i=l.getIndexWithinParent(),l=Math.min(o.getChildrenSize()-1,i+n-1),n=Math.min(i,l),o=Math.min(s,a),i=Math.max(i,l),s=Math.max(s,a),a=t.getChildren(),l=0;let u,c;for(let h=o;h<=s;h++){var d=a[h];de.DEPRECATED_$isGridRowNode(d)||Lr(24);var f=e[l];de.DEPRECATED_$isGridRowNode(f)||Lr(24),d=d.getChildren(),f=f.getChildren();let m=0;for(let g=n;g<=i;g++){let S=d[g];de.DEPRECATED_$isGridCellNode(S)||Lr(25);let v=f[m];de.DEPRECATED_$isGridCellNode(v)||Lr(25),h===o&&g===n?u=S.getKey():h===s&&g===i&&(c=S.getKey());let y=S.getChildren();v.getChildren().forEach(x=>{de.$isTextNode(x)&&de.$createParagraphNode().append(x),S.append(x)}),y.forEach(x=>x.remove()),m++}l++}u&&c&&(e=de.DEPRECATED_$createGridSelection(),e.set(t.getKey(),u,c),de.$setSelection(e),r.dispatchCommand(de.SELECTION_CHANGE_COMMAND,void 0))}function DS(e,t,n,r=[]){let o=t!=null?n.isSelected(t):!0,i=de.$isElementNode(n)&&n.excludeFromCopy("html");var l=n;if(t!==null){var s=yp.$cloneWithProperties(n);l=s=de.$isTextNode(s)&&t!=null?yp.$sliceSelectedTextNodeContent(t,s):s}let a=de.$isElementNode(l)?l.getChildren():[];var u=l;s=u.exportJSON();var c=u.constructor;s.type!==c.getType()&&Lr(58,c.name);let d=s.children;for(de.$isElementNode(u)&&(Array.isArray(d)||Lr(59,c.name)),de.$isTextNode(l)&&(l=l.__text,0<l.length?s.text=l:o=!1),l=0;l<a.length;l++)u=a[l],c=DS(e,t,u,s.children),!o&&de.$isElementNode(n)&&c&&n.extractWithChild(u,t,"clone")&&(o=!0);if(o&&!i)r.push(s);else if(Array.isArray(s.children))for(e=0;e<s.children.length;e++)r.push(s.children[e]);return o}function IS(e,t){let n=[],r=de.$getRoot().getChildren();for(let o=0;o<r.length;o++)DS(e,t,r[o],n);return{namespace:e._config.namespace,nodes:n}}function jS(e){let t=[];for(let n=0;n<e.length;n++){let r=de.$parseSerializedNode(e[n]);de.$isTextNode(r)&&yp.$addNodeStyle(r),t.push(r)}return t}let Ii=null;function i0(e,t){var n=AS?(e._window||window).getSelection():null;if(!n)return!1;var r=n.anchorNode;if(n=n.focusNode,r!==null&&n!==null&&!de.isSelectionWithinEditor(e,r,n)||(t.preventDefault(),t=t.clipboardData,r=de.$getSelection(),t===null||r===null))return!1;n=MS(e),e=LS(e);let o="";return r!==null&&(o=r.getTextContent()),n!==null&&t.setData("text/html",n),e!==null&&t.setData("application/x-lexical-editor",e),t.setData("text/plain",o),!0}Qr.$generateJSONFromSelectedNodes=IS;Qr.$generateNodesFromSerializedNodes=jS;Qr.$getHtmlContent=MS;Qr.$getLexicalContent=LS;Qr.$insertDataTransferForPlainText=function(e,t){e=e.getData("text/plain")||e.getData("text/uri-list"),e!=null&&t.insertRawText(e)};Qr.$insertDataTransferForRichText=function(e,t,n){var r=e.getData("application/x-lexical-editor");if(r)try{let l=JSON.parse(r);if(l.namespace===n._config.namespace&&Array.isArray(l.nodes)){let s=jS(l.nodes);return xp(n,s,t)}}catch{}if(r=e.getData("text/html"))try{var o=new DOMParser().parseFromString(r,"text/html"),i=OS.$generateNodesFromDOM(n,o);return xp(n,i,t)}catch{}if(e=e.getData("text/plain")||e.getData("text/uri-list"),e!=null)if(de.$isRangeSelection(t))for(e=e.split(/(\r?\n|\t)/),n=e.length,o=0;o<n;o++)i=e[o],i===`
127
+ `||i===`\r
128
+ `?t.insertParagraph():i===" "?t.insertNodes([de.$createTabNode()]):t.insertText(i);else t.insertRawText(e)};Qr.$insertGeneratedNodes=xp;Qr.copyToClipboard=async function(e,t){if(Ii!==null)return!1;if(t!==null)return new Promise(l=>{e.update(()=>{l(i0(e,t))})});var n=e.getRootElement();let r=e._window==null?window.document:e._window.document,o=AS?(e._window||window).getSelection():null;if(n===null||o===null)return!1;let i=r.createElement("span");return i.style.cssText="position: fixed; top: -1000px;",i.append(r.createTextNode("#")),n.append(i),n=new Range,n.setStart(i,0),n.setEnd(i,1),o.removeAllRanges(),o.addRange(n),new Promise(l=>{let s=e.registerCommand(de.COPY_COMMAND,a=>(ml.objectKlassEquals(a,ClipboardEvent)&&(s(),Ii!==null&&(window.clearTimeout(Ii),Ii=null),l(i0(e,a))),!0),de.COMMAND_PRIORITY_CRITICAL);Ii=window.setTimeout(()=>{s(),Ii=null,l(!1)},50),r.execCommand("copy"),i.remove()})};const zR=Qr;var FR=zR,Ic=FR,yu=Mo,gr=Nt,M=me;function l0(e,t){return typeof document.caretRangeFromPoint<"u"?(e=document.caretRangeFromPoint(e,t),e===null?null:{node:e.startContainer,offset:e.startOffset}):document.caretPositionFromPoint!=="undefined"?(e=document.caretPositionFromPoint(e,t),e===null?null:{node:e.offsetNode,offset:e.offset}):null}let Xl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",BR=Xl&&"documentMode"in document?document.documentMode:null,WR=Xl&&"InputEvent"in window&&!BR?"getTargetRanges"in new window.InputEvent("input"):!1,UR=Xl&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),VR=Xl&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,HR=Xl&&/^(?=.*Chrome).*/i.test(navigator.userAgent),KR=Xl&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!HR,wp=M.createCommand("DRAG_DROP_PASTE_FILE"),ym=class zS extends M.ElementNode{static getType(){return"quote"}static clone(t){return new zS(t.__key)}constructor(t){super(t)}createDOM(t){let n=document.createElement("blockquote");return gr.addClassNamesToElement(n,t.theme.quote),n}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:GR,priority:0})}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&gr.isHTMLElement(t)){this.isEmpty()&&t.append(document.createElement("br"));var n=this.getFormatType();t.style.textAlign=n,(n=this.getDirection())&&(t.dir=n)}return{element:t}}static importJSON(t){let n=xm();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(t,n){t=M.$createParagraphNode();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=M.$createParagraphNode();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}};function xm(){return M.$applyNodeReplacement(new ym)}let wm=class FS extends M.ElementNode{static getType(){return"heading"}static clone(t){return new FS(t.__tag,t.__key)}constructor(t,n){super(n),this.__tag=t}getTag(){return this.__tag}createDOM(t){let n=this.__tag,r=document.createElement(n);return t=t.theme.heading,t!==void 0&&gr.addClassNamesToElement(r,t[n]),r}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:ji,priority:0}),h2:()=>({conversion:ji,priority:0}),h3:()=>({conversion:ji,priority:0}),h4:()=>({conversion:ji,priority:0}),h5:()=>({conversion:ji,priority:0}),h6:()=>({conversion:ji,priority:0}),p:t=>(t=t.firstChild,t!==null&&s0(t)?{conversion:()=>({node:null}),priority:3}:null),span:t=>s0(t)?{conversion:()=>({node:il("h1")}),priority:3}:null}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&gr.isHTMLElement(t)){this.isEmpty()&&t.append(document.createElement("br"));var n=this.getFormatType();t.style.textAlign=n,(n=this.getDirection())&&(t.dir=n)}return{element:t}}static importJSON(t){let n=il(t.tag);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(t,n=!0){t=t?t.anchor.offset:0,t=0<t&&t<this.getTextContentSize()?il(this.getTag()):M.$createParagraphNode();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=this.isEmpty()?M.$createParagraphNode():il(this.getTag());return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}extractWithChild(){return!0}};function s0(e){return e.nodeName.toLowerCase()==="span"?e.style.fontSize==="26pt":!1}function ji(e){let t=e.nodeName.toLowerCase(),n=null;return(t==="h1"||t==="h2"||t==="h3"||t==="h4"||t==="h5"||t==="h6")&&(n=il(t),e.style!==null&&n.setFormat(e.style.textAlign)),{node:n}}function GR(e){let t=xm();return e.style!==null&&t.setFormat(e.style.textAlign),{node:t}}function il(e){return M.$applyNodeReplacement(new wm(e))}function YR(e,t){e.preventDefault(),t.update(()=>{let n=M.$getSelection(),r=e instanceof InputEvent||e instanceof KeyboardEvent?null:e.clipboardData;r!=null&&(M.$isRangeSelection(n)||M.DEPRECATED_$isGridSelection(n))&&Ic.$insertDataTransferForRichText(r,n,t)},{tag:"paste"})}async function XR(e,t){await Ic.copyToClipboard(t,gr.objectKlassEquals(e,ClipboardEvent)?e:null),t.update(()=>{let n=M.$getSelection();M.$isRangeSelection(n)?n.removeText():M.$isNodeSelection(n)&&n.getNodes().forEach(r=>r.remove())})}function $s(e){let t=null;if(e instanceof DragEvent?t=e.dataTransfer:e instanceof ClipboardEvent&&(t=e.clipboardData),t===null)return[!1,[],!1];var n=t.types;return e=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[e,Array.from(t.files),n]}function a0(e){var t=M.$getSelection();if(!M.$isRangeSelection(t))return!1;let n=new Set;t=t.getNodes();for(let i=0;i<t.length;i++){var r=t[i],o=r.getKey();n.has(o)||(r=gr.$getNearestBlockElementAncestorOrThrow(r),o=r.getKey(),r.canIndent()&&!n.has(o)&&(n.add(o),e(r)))}return 0<n.size}function xu(e){return e=M.$getNearestNodeFromDOMNode(e),M.$isDecoratorNode(e)}Tr.$createHeadingNode=il;Tr.$createQuoteNode=xm;Tr.$isHeadingNode=function(e){return e instanceof wm};Tr.$isQuoteNode=function(e){return e instanceof ym};Tr.DRAG_DROP_PASTE=wp;Tr.HeadingNode=wm;Tr.QuoteNode=ym;Tr.eventFiles=$s;Tr.registerRichText=function(e){return gr.mergeRegister(e.registerCommand(M.CLICK_COMMAND,()=>{const t=M.$getSelection();return M.$isNodeSelection(t)?(t.clear(),!0):!1},0),e.registerCommand(M.DELETE_CHARACTER_COMMAND,t=>{const n=M.$getSelection();return M.$isRangeSelection(n)?(n.deleteCharacter(t),!0):!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.DELETE_WORD_COMMAND,t=>{const n=M.$getSelection();return M.$isRangeSelection(n)?(n.deleteWord(t),!0):!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.DELETE_LINE_COMMAND,t=>{const n=M.$getSelection();return M.$isRangeSelection(n)?(n.deleteLine(t),!0):!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.CONTROLLED_TEXT_INSERTION_COMMAND,t=>{const n=M.$getSelection();if(typeof t=="string")M.$isRangeSelection(n)?n.insertText(t):M.DEPRECATED_$isGridSelection(n);else{if(!M.$isRangeSelection(n)&&!M.DEPRECATED_$isGridSelection(n))return!1;const r=t.dataTransfer;r!=null?Ic.$insertDataTransferForRichText(r,n,e):M.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.REMOVE_TEXT_COMMAND,()=>{const t=M.$getSelection();return M.$isRangeSelection(t)?(t.removeText(),!0):!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.FORMAT_TEXT_COMMAND,t=>{const n=M.$getSelection();return M.$isRangeSelection(n)?(n.formatText(t),!0):!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.FORMAT_ELEMENT_COMMAND,t=>{var n=M.$getSelection();if(!M.$isRangeSelection(n)&&!M.$isNodeSelection(n))return!1;n=n.getNodes();for(const r of n)n=gr.$findMatchingParent(r,o=>M.$isElementNode(o)&&!o.isInline()),n!==null&&n.setFormat(t);return!0},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.INSERT_LINE_BREAK_COMMAND,t=>{const n=M.$getSelection();return M.$isRangeSelection(n)?(n.insertLineBreak(t),!0):!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.INSERT_PARAGRAPH_COMMAND,()=>{const t=M.$getSelection();return M.$isRangeSelection(t)?(t.insertParagraph(),!0):!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.INSERT_TAB_COMMAND,()=>(M.$insertNodes([M.$createTabNode()]),!0),M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.INDENT_CONTENT_COMMAND,()=>a0(t=>{const n=t.getIndent();t.setIndent(n+1)}),M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.OUTDENT_CONTENT_COMMAND,()=>a0(t=>{const n=t.getIndent();0<n&&t.setIndent(n-1)}),M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.KEY_ARROW_UP_COMMAND,t=>{var n=M.$getSelection();if(M.$isNodeSelection(n)&&!xu(t.target)){if(t=n.getNodes(),0<t.length)return t[0].selectPrevious(),!0}else if(M.$isRangeSelection(n)&&(n=M.$getAdjacentNode(n.focus,!0),!t.shiftKey&&M.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline()))return n.selectPrevious(),t.preventDefault(),!0;return!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.KEY_ARROW_DOWN_COMMAND,t=>{var n=M.$getSelection();if(M.$isNodeSelection(n)){if(t=n.getNodes(),0<t.length)return t[0].selectNext(0,0),!0}else if(M.$isRangeSelection(n)){let r=n.focus;if(r.key==="root"&&r.offset===M.$getRoot().getChildrenSize())return t.preventDefault(),!0;if(n=M.$getAdjacentNode(n.focus,!1),!t.shiftKey&&M.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),t.preventDefault(),!0}return!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.KEY_ARROW_LEFT_COMMAND,t=>{const n=M.$getSelection();if(M.$isNodeSelection(n)){var r=n.getNodes();if(0<r.length)return t.preventDefault(),r[0].selectPrevious(),!0}return M.$isRangeSelection(n)&&yu.$shouldOverrideDefaultCharacterSelection(n,!0)?(r=t.shiftKey,t.preventDefault(),yu.$moveCharacter(n,r,!0),!0):!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.KEY_ARROW_RIGHT_COMMAND,t=>{const n=M.$getSelection();if(M.$isNodeSelection(n)&&!xu(t.target)){var r=n.getNodes();if(0<r.length)return t.preventDefault(),r[0].selectNext(0,0),!0}return M.$isRangeSelection(n)?(r=t.shiftKey,yu.$shouldOverrideDefaultCharacterSelection(n,!1)?(t.preventDefault(),yu.$moveCharacter(n,r,!1),!0):!1):!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.KEY_BACKSPACE_COMMAND,t=>{if(xu(t.target))return!1;const n=M.$getSelection();if(!M.$isRangeSelection(n))return!1;t.preventDefault(),{anchor:t}=n;const r=t.getNode();return n.isCollapsed()&&t.offset===0&&!M.$isRootNode(r)&&0<gr.$getNearestBlockElementAncestorOrThrow(r).getIndent()?e.dispatchCommand(M.OUTDENT_CONTENT_COMMAND,void 0):e.dispatchCommand(M.DELETE_CHARACTER_COMMAND,!0)},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.KEY_DELETE_COMMAND,t=>{if(xu(t.target))return!1;const n=M.$getSelection();return M.$isRangeSelection(n)?(t.preventDefault(),e.dispatchCommand(M.DELETE_CHARACTER_COMMAND,!1)):!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.KEY_ENTER_COMMAND,t=>{const n=M.$getSelection();if(!M.$isRangeSelection(n))return!1;if(t!==null){if((VR||UR||KR)&&WR)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(M.INSERT_LINE_BREAK_COMMAND,!1)}return e.dispatchCommand(M.INSERT_PARAGRAPH_COMMAND,void 0)},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.KEY_ESCAPE_COMMAND,()=>{const t=M.$getSelection();return M.$isRangeSelection(t)?(e.blur(),!0):!1},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.DROP_COMMAND,t=>{const[,n]=$s(t);if(0<n.length){var r=l0(t.clientX,t.clientY);if(r!==null){const{offset:i,node:l}=r;var o=M.$getNearestNodeFromDOMNode(l);if(o!==null){if(r=M.$createRangeSelection(),M.$isTextNode(o))r.anchor.set(o.getKey(),i,"text"),r.focus.set(o.getKey(),i,"text");else{const s=o.getParentOrThrow().getKey();o=o.getIndexWithinParent()+1,r.anchor.set(s,o,"element"),r.focus.set(s,o,"element")}r=M.$normalizeSelection__EXPERIMENTAL(r),M.$setSelection(r)}e.dispatchCommand(wp,n)}return t.preventDefault(),!0}return t=M.$getSelection(),!!M.$isRangeSelection(t)},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.DRAGSTART_COMMAND,t=>{[t]=$s(t);const n=M.$getSelection();return!(t&&!M.$isRangeSelection(n))},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.DRAGOVER_COMMAND,t=>{var[n]=$s(t);const r=M.$getSelection();return n&&!M.$isRangeSelection(r)?!1:(n=l0(t.clientX,t.clientY),n!==null&&(n=M.$getNearestNodeFromDOMNode(n.node),M.$isDecoratorNode(n)&&t.preventDefault()),!0)},M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.SELECT_ALL_COMMAND,()=>(M.$selectAll(),!0),M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.COPY_COMMAND,t=>(Ic.copyToClipboard(e,gr.objectKlassEquals(t,ClipboardEvent)?t:null),!0),M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.CUT_COMMAND,t=>(XR(t,e),!0),M.COMMAND_PRIORITY_EDITOR),e.registerCommand(M.PASTE_COMMAND,t=>{const[,n,r]=$s(t);if(0<n.length&&!r)return e.dispatchCommand(wp,n),!0;if(M.isSelectionCapturedInDecoratorInput(t.target))return!1;const o=M.$getSelection();return M.$isRangeSelection(o)||M.DEPRECATED_$isGridSelection(o)?(YR(t,e),!0):!1},M.COMMAND_PRIORITY_EDITOR))};const QR=Tr;var Hs=QR,BS=ir,JR=NR,In=p,ZR=PR,WS=Nt,u0=Gr,qR=AR,eP=Hs,_m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?In.useLayoutEffect:In.useEffect;function c0(e){return e.getEditorState().read(ZR.$canShowPlaceholderCurry(e.isComposing()))}function tP(e){let[t,n]=In.useState(()=>c0(e));return _m(()=>{function r(){let o=c0(e);n(o)}return r(),WS.mergeRegister(e.registerUpdateListener(()=>{r()}),e.registerEditableListener(()=>{r()}))},[e]),t}function nP(e,t){let[n,r]=In.useState(()=>e.getDecorators());return _m(()=>e.registerDecoratorListener(o=>{u0.flushSync(()=>{r(o)})}),[e]),In.useEffect(()=>{r(e.getDecorators())},[e]),In.useMemo(()=>{let o=[],i=Object.keys(n);for(let l=0;l<i.length;l++){let s=i[l],a=In.createElement(t,{onError:c=>e._onError(c)},In.createElement(In.Suspense,{fallback:null},n[s])),u=e.getElementByKey(s);u!==null&&o.push(u0.createPortal(a,u,s))}return o},[t,n,e])}function rP(e){_m(()=>WS.mergeRegister(eP.registerRichText(e),qR.registerDragonSupport(e)),[e])}function oP({content:e}){var[t]=BS.useLexicalComposerContext();t=tP(t);let n=JR();return t?typeof e=="function"?e(n):e:null}$S.RichTextPlugin=function({contentEditable:e,placeholder:t,ErrorBoundary:n}){let[r]=BS.useLexicalComposerContext();return n=nP(r,n),rP(r),In.createElement(In.Fragment,null,e,In.createElement(oP,{content:t}),n)};const iP=$S;var lP=iP,US={},Pr=po,sP=ir,VS=p,aP=Nt,hs=me;function uP(e){VS.useEffect(()=>aP.mergeRegister(e.registerCommand(Pr.INSERT_ORDERED_LIST_COMMAND,()=>(Pr.insertList(e,"number"),!0),hs.COMMAND_PRIORITY_LOW),e.registerCommand(Pr.INSERT_UNORDERED_LIST_COMMAND,()=>(Pr.insertList(e,"bullet"),!0),hs.COMMAND_PRIORITY_LOW),e.registerCommand(Pr.REMOVE_LIST_COMMAND,()=>(Pr.removeList(e),!0),hs.COMMAND_PRIORITY_LOW),e.registerCommand(hs.INSERT_PARAGRAPH_COMMAND,()=>!!Pr.$handleListInsertParagraph(),hs.COMMAND_PRIORITY_LOW)),[e])}US.ListPlugin=function(){let[e]=sP.useLexicalComposerContext();return VS.useEffect(()=>{if(!e.hasNodes([Pr.ListNode,Pr.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[e]),uP(e),null};const cP=US;var dP=cP,HS={},Jr={},KS=Nt,yr=me;let fP=new Set(["http:","https:","mailto:","sms:","tel:"]);class Ql extends yr.ElementNode{static getType(){return"link"}static clone(t){return new Ql(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t,n={},r){super(r);let{target:o=null,rel:i=null,title:l=null}=n;this.__url=t,this.__target=o,this.__rel=i,this.__title=l}createDOM(t){let n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),this.__target!==null&&(n.target=this.__target),this.__rel!==null&&(n.rel=this.__rel),this.__title!==null&&(n.title=this.__title),KS.addClassNamesToElement(n,t.theme.link),n}updateDOM(t,n){let r=this.__url,o=this.__target,i=this.__rel,l=this.__title;return r!==t.__url&&(n.href=r),o!==t.__target&&(o?n.target=o:n.removeAttribute("target")),i!==t.__rel&&(i?n.rel=i:n.removeAttribute("rel")),l!==t.__title&&(l?n.title=l:n.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:hP,priority:1})}}static importJSON(t){let n=Sa(t.url,{rel:t.rel,target:t.target,title:t.title});return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}sanitizeUrl(t){try{let n=new URL(t);if(!fP.has(n.protocol))return"about:blank"}catch{}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(t){this.getWritable().__url=t}getTarget(){return this.getLatest().__target}setTarget(t){this.getWritable().__target=t}getRel(){return this.getLatest().__rel}setRel(t){this.getWritable().__rel=t}getTitle(){return this.getLatest().__title}setTitle(t){this.getWritable().__title=t}insertNewAfter(t,n=!0){return t=this.getParentOrThrow().insertNewAfter(t,n),yr.$isElementNode(t)?(n=Sa(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),t.append(n),n):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,n){if(!yr.$isRangeSelection(n))return!1;t=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(t)&&this.isParentOf(r)&&0<n.getTextContent().length}}function hP(e){let t=null;if(KS.isHTMLAnchorElement(e)){let n=e.textContent;n!==null&&n!==""&&(t=Sa(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function Sa(e,t){return yr.$applyNodeReplacement(new Ql(e,t))}function Qo(e){return e instanceof Ql}class Fa extends Ql{static getType(){return"autolink"}static clone(t){return new Fa(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}static importJSON(t){let n=_p(t.url,{rel:t.rel,target:t.target,title:t.title});return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(t,n=!0){return t=this.getParentOrThrow().insertNewAfter(t,n),yr.$isElementNode(t)?(n=_p(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),t.append(n),n):null}}function _p(e,t){return yr.$applyNodeReplacement(new Fa(e,t))}let pP=yr.createCommand("TOGGLE_LINK_COMMAND");function gP(e,t){for(;e!==null&&(e=e.getParent())!==null&&!t(e););return e}Jr.$createAutoLinkNode=_p;Jr.$createLinkNode=Sa;Jr.$isAutoLinkNode=function(e){return e instanceof Fa};Jr.$isLinkNode=Qo;Jr.AutoLinkNode=Fa;Jr.LinkNode=Ql;Jr.TOGGLE_LINK_COMMAND=pP;Jr.toggleLink=function(e,t={}){let{target:n,title:r}=t,o=t.rel===void 0?"noreferrer":t.rel;if(t=yr.$getSelection(),yr.$isRangeSelection(t))if(t=t.extract(),e===null)t.forEach(l=>{if(l=l.getParent(),Qo(l)){let s=l.getChildren();for(let a=0;a<s.length;a++)l.insertBefore(s[a]);l.remove()}});else{if(t.length===1){var i=t[0];if(i=Qo(i)?i:gP(i,Qo),i!==null){i.setURL(e),n!==void 0&&i.setTarget(n),o!==null&&i.setRel(o),r!==void 0&&i.setTitle(r);return}}let l=null,s=null;t.forEach(a=>{var u=a.getParent();if(u!==s&&u!==null&&(!yr.$isElementNode(a)||a.isInline()))if(Qo(u))s=u,u.setURL(e),n!==void 0&&u.setTarget(n),o!==null&&s.setRel(o),r!==void 0&&s.setTitle(r);else if(u.is(l)||(l=u,s=Sa(e,{rel:o,target:n}),Qo(u)?a.getPreviousSibling()===null?u.insertBefore(s):u.insertAfter(s):a.insertBefore(s)),Qo(a)){if(!a.is(s)){if(s!==null){u=a.getChildren();for(let c=0;c<u.length;c++)s.append(u[c])}a.remove()}}else s!==null&&s.append(a)})}};const mP=Jr;var Pl=mP,zi=Pl,vP=ir,yP=Nt,Fi=me,xP=p;HS.LinkPlugin=function({validateUrl:e}){let[t]=vP.useLexicalComposerContext();return xP.useEffect(()=>{if(!t.hasNodes([zi.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return yP.mergeRegister(t.registerCommand(zi.TOGGLE_LINK_COMMAND,n=>{if(n===null)return zi.toggleLink(n),!0;if(typeof n=="string")return e===void 0||e(n)?(zi.toggleLink(n),!0):!1;let{url:r,target:o,rel:i,title:l}=n;return zi.toggleLink(r,{rel:i,target:o,title:l}),!0},Fi.COMMAND_PRIORITY_LOW),e!==void 0?t.registerCommand(Fi.PASTE_COMMAND,n=>{let r=Fi.$getSelection();if(!Fi.$isRangeSelection(r)||r.isCollapsed()||!(n instanceof ClipboardEvent)||n.clipboardData==null)return!1;let o=n.clipboardData.getData("text");return e(o)?r.getNodes().some(i=>Fi.$isElementNode(i))?!1:(t.dispatchCommand(zi.TOGGLE_LINK_COMMAND,o),n.preventDefault(),!0):!1},Fi.COMMAND_PRIORITY_LOW):()=>{})},[t,e]),null};const wP=HS;var _P=wP;function SP({ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:n,ariaDescribedBy:r,ariaExpanded:o,ariaLabel:i,ariaLabelledBy:l,ariaMultiline:s,ariaOwns:a,ariaRequired:u,autoCapitalize:c,className:d,id:f,role:h="textbox",spellCheck:m=!0,style:g,tabIndex:S,"data-testid":v,...y}){const[x]=ir.useLexicalComposerContext(),[w,k]=p.useState(!1),b=p.useCallback(T=>{var D;x.setRootElement(T);const N=(D=document.getElementById("val-ui"))==null?void 0:D.shadowRoot;if(N&&"getSelection"in N){x._window=N;return}},[x]);return p.useLayoutEffect(()=>(k(x.isEditable()),x.registerEditableListener(T=>{k(T)})),[x]),_.jsx("div",{...y,"aria-activedescendant":w?e:void 0,"aria-autocomplete":w?t:"none","aria-controls":w?n:void 0,"aria-describedby":r,"aria-expanded":w&&h==="combobox"?!!o:void 0,"aria-label":i,"aria-labelledby":l,"aria-multiline":s,"aria-owns":w?a:void 0,"aria-readonly":w?void 0:!0,"aria-required":u,autoCapitalize:c,className:d,contentEditable:w,"data-testid":v,id:f,ref:b,role:h,spellCheck:m,style:g,tabIndex:S})}function EP({className:e}){return _.jsx(SP,{className:e})}class Ba extends me.DecoratorNode{constructor(t,n){super(n),this.__src=t.src,this.__altText=t.altText,this.__width=t.width,this.__height=t.height}static getType(){return"image"}static clone(t){return new Ba({src:t.__src,altText:t.__altText,width:t.__width,height:t.__height})}exportJSON(){return{altText:this.__altText,height:this.__width,src:this.__src,type:"image",version:1,width:this.__width}}static importJSON(t){return GS(t)}createDOM(){return document.createElement("div")}updateDOM(){return!1}decorate(){return _.jsx(CP,{src:this.__src,altText:this.__altText,empty:this.__empty,height:this.__height,nodeKey:this.getKey()})}}function CP(e){return _.jsx("img",{src:e.src})}function GS(e){return new Ba(e)}function $P(){const[e]=ir.useLexicalComposerContext();return p.useEffect(()=>{e.focus()},[e]),null}const YS=me.createCommand("INSERT_IMAGE_COMMAND");function kP(){const[e]=ir.useLexicalComposerContext();return p.useEffect(()=>{if(!e.hasNodes([Ba]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return Nt.mergeRegister(e.registerCommand(YS,t=>{const n=GS(t);return me.$insertNodes([n]),me.$isRootOrShadowRoot(n.getParentOrThrow())&&Nt.$wrapNodeInElement(n,me.$createParagraphNode).selectEnd(),!0},me.COMMAND_PRIORITY_EDITOR))},[e]),null}const TP=({className:e})=>_.jsxs("svg",{height:12,width:12,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[_.jsx("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),_.jsx("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]}),bP=TP,NP=({className:e})=>_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,width:12,height:12,children:[_.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),_.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),_.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]}),RP=NP,PP=({className:e})=>_.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",className:e,width:12,height:12,children:_.jsx("path",{fillRule:"evenodd",d:"M13,15 L13,21 C13,21.5522847 12.5522847,22 12,22 C11.4477153,22 11,21.5522847 11,21 L11,15 L13,15 Z M3,13 C2.44771525,13 2,12.5522847 2,12 C2,11.4477153 2.44771525,11 3,11 L21,11 C21.5522847,11 22,11.4477153 22,12 C22,12.5522847 21.5522847,13 21,13 L3,13 Z M19,2 C19.5522847,2 20,2.44771525 20,3 C20,3.55228475 19.5522847,4 19,4 L13,4 L13,9 L11,9 L11,4 L5,4 C4.44771525,4 4,3.55228475 4,3 C4,2.44771525 4.44771525,2 5,2 L19,2 Z"})}),OP=PP,AP=({variant:e="primary",onClick:t,children:n,icon:r,disabled:o=!1})=>_.jsx("button",{disabled:o,className:ad("font-sans font-[12px] tracking-[0.04em] py-1 px-2 rounded whitespace-nowrap group relative text-primary",{"font-bold":e==="primary","bg-background hover:bg-background text-fill disabled:bg-fill disabled:text-background":e==="primary","bg-transparent border border-primary text-primary hover:border-highlight hover:text-highlight disabled:bg-fill disabled:text-background":e!=="primary"}),onClick:t,children:_.jsxs("span",{className:"flex flex-row items-center justify-center gap-2",children:[r&&r,n]})}),Jo=AP,MP=({className:e})=>_.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",className:e,children:[_.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.70733 1.00015L8.7784 6.07121L8.07129 6.77832L3.00022 1.70725L3.70733 1.00015Z",fill:"currentColor"}),_.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.00015 10.4709L8.07121 5.39983L8.77832 6.10693L3.70725 11.178L3.00015 10.4709Z",fill:"currentColor"})]}),LP=MP,XS=ee.createContext({get api(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get session(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get theme(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setTheme(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get editMode(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setEditMode(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get highlight(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setHighlight(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setWindowSize(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get windowSize(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")}});function Sm(){return ee.useContext(XS)}const DP=({options:e,onChange:t,label:n,icon:r})=>{const[o,i]=p.useState(!1),l=p.useRef(null),[s,a]=p.useState(0),{windowSize:u}=Sm(),c=()=>{i(!o)},d=(f,h)=>{a(h),t(f),i(!1)};return p.useEffect(()=>{const f=h=>{o&&l.current&&!l.current.contains(h.target)&&i(!1)};return document.addEventListener("click",f),()=>{document.removeEventListener("click",f)}},[]),_.jsx("div",{className:"text-[12px]",ref:l,children:_.jsx(Jo,{onClick:f=>{f.preventDefault(),c()},icon:_.jsx(LP,{className:`rotate-[-90deg] transition-transform duration-150 ease-in-out ${o?"":"rotate-[90deg]"}`}),children:_.jsxs("div",{className:"relative",children:[_.jsxs("span",{className:"flex flex-row items-center justify-center gap-1",children:[n,r&&r]}),o&&_.jsx("div",{className:"absolute -top-[4px] overflow-scroll shadow-lg -left-2 text-primary bg-border w-fit z-overlay",style:{maxHeight:u==null?void 0:u.innerHeight},children:_.jsx("div",{className:"flex flex-col ",children:e==null?void 0:e.map((f,h)=>_.jsx("button",{onClick:m=>{m.preventDefault(),d(f,h)},className:`text-left px-2 py-1 hover:bg-background hover:text-highlight ${h===s&&"font-bold bg-background hover:bg-background truncate"}`,children:f},f))})})]})})})},IP=DP,jP=new TextEncoder;function QS(e){return new Promise((t,n)=>{var i;const r=(i=e.currentTarget.files)==null?void 0:i[0],o=new FileReader;o.addEventListener("load",()=>{const l=o.result;if(typeof l=="string"){const s=new Image;s.addEventListener("load",async()=>{const a=await En.getSHA256Hash(jP.encode(l));if(s.naturalWidth&&s.naturalHeight){const u=Ug(l);t({src:l,width:s.naturalWidth,height:s.naturalHeight,filename:r==null?void 0:r.name,sha256:a,mimeType:u,fileExt:u&&Vg(u)})}else t({src:l,filename:r==null?void 0:r.name,sha256:a})}),s.src=l}else n(l?{message:"Unexpected image result type",result:l}:{message:"Empty result"})}),r&&o.readAsDataURL(r)})}function JS(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),o=e.focus.getNode();return r===o?r:e.isBackward()?Mo.$isAtNodeEnd(n)?r:o:Mo.$isAtNodeEnd(t)?r:o}function zP(){const[e]=ir.useLexicalComposerContext();return p.useEffect(()=>Nt.mergeRegister(e.registerCommand(me.CLICK_COMMAND,t=>{const n=me.$getSelection();if(me.$isRangeSelection(n)){const r=JS(n),o=Nt.$findMatchingParent(r,Pl.$isLinkNode);if(Pl.$isLinkNode(o)&&(t.metaKey||t.ctrlKey))return window.open(o.getURL(),"_blank"),!0}return!1},me.COMMAND_PRIORITY_LOW)),[]),null}var ZS={exports:{}},FP="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",BP=FP,WP=BP;function qS(){}function eE(){}eE.resetWarningCache=qS;var UP=function(){function e(r,o,i,l,s,a){if(a!==WP){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:eE,resetWarningCache:qS};return n.PropTypes=n,n};ZS.exports=UP();var VP=ZS.exports;const zn=ba(VP);function Sp(){return Sp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sp.apply(this,arguments)}function HP(e,t){if(e==null)return{};var n=KP(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KP(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Em=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,l=HP(e,["color","size"]);return ee.createElement("svg",Sp({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),ee.createElement("polyline",{points:"20 6 9 17 4 12"}))});Em.propTypes={color:zn.string,size:zn.oneOfType([zn.string,zn.number])};Em.displayName="Check";const GP=Em;function Ep(){return Ep=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ep.apply(this,arguments)}function YP(e,t){if(e==null)return{};var n=XP(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XP(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Cm=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,l=YP(e,["color","size"]);return ee.createElement("svg",Ep({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),ee.createElement("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),ee.createElement("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}))});Cm.propTypes={color:zn.string,size:zn.oneOfType([zn.string,zn.number])};Cm.displayName="Link";const QP=Cm;function Cp(){return Cp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cp.apply(this,arguments)}function JP(e,t){if(e==null)return{};var n=ZP(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZP(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var $m=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,l=JP(e,["color","size"]);return ee.createElement("svg",Cp({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});$m.propTypes={color:zn.string,size:zn.oneOfType([zn.string,zn.number])};$m.displayName="X";const qP=$m,eO=({fontSizes:e,fontsFamilies:t,onEditor:n,colors:r})=>{const[o]=ir.useLexicalComposerContext();p.useEffect(()=>{n&&n(o)},[o]);const[i,l]=p.useState(o),[s,a]=p.useState(null),[u,c]=p.useState(!1),[d,f]=p.useState(!1),[h,m]=p.useState(!1),[g,S]=p.useState(!1);p.useState("15px"),p.useState("#000"),p.useState("Sans");const[v,y]=p.useState("paragraph");p.useState(!1),p.useState(!1),p.useState("url"),p.useState(null);const[x,w]=p.useState(null),k=O=>{o.dispatchCommand(Pl.TOGGLE_LINK_COMMAND,O)},b={paragraph:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",number:"Numbered List",bullet:"Bulleted List"},T={};for(const O in b)T[b[O]]=O;const N=p.useCallback(()=>{const O=me.$getSelection();if(me.$isRangeSelection(O)){const j=O.anchor.getNode();let B=j.getKey()==="root"?j:Nt.$findMatchingParent(j,$=>{const E=$.getParent();return E!==null&&me.$isRootOrShadowRoot(E)});B===null&&(B=j.getTopLevelElementOrThrow());const ae=JS(O),H=Nt.$findMatchingParent(ae,Pl.$isLinkNode);if(H!==null){const $=H.getURL();w($)}else w(null);const G=B.getKey(),C=i.getElementByKey(G);if(c(O.hasFormat("bold")),f(O.hasFormat("italic")),m(O.hasFormat("strikethrough")),S(O.hasFormat("underline")),C!==null)if(a(G),po.$isListNode(B)){const $=Nt.$getNearestNodeOfType(j,po.ListNode),E=$?$.getListType():B.getListType();y(E)}else{const $=Hs.$isHeadingNode(B)?B.getTag():B.getType();$ in b&&y($)}}},[i]);p.useEffect(()=>Nt.mergeRegister(o.registerUpdateListener(({editorState:O})=>{O.read(()=>{N()})})),[N,i,o]),p.useEffect(()=>o.registerCommand(me.SELECTION_CHANGE_COMMAND,(O,j)=>(N(),l(j),!1),me.COMMAND_PRIORITY_CRITICAL),[o,N]);const D=O=>{["h1","h2","h3","h4","h5","h6"].includes(O)?v!==O&&o.update(()=>{const j=me.$getSelection();me.$isRangeSelection(j)&&Mo.$setBlocksType(j,()=>Hs.$createHeadingNode(O))}):O==="paragraph"&&v!=="paragraph"?o.update(()=>{const j=me.$getSelection();(me.$isRangeSelection(j)||me.DEPRECATED_$isGridSelection(j))&&Mo.$setBlocksType(j,()=>me.$createParagraphNode())}):O==="number"&&v!=="number"?o.dispatchCommand(po.INSERT_ORDERED_LIST_COMMAND,void 0):O==="bullet"&&v!=="bullet"?o.dispatchCommand(po.INSERT_UNORDERED_LIST_COMMAND,void 0):o.dispatchCommand(po.REMOVE_LIST_COMMAND,void 0)};return p.useCallback(()=>{o.update(()=>{const O=me.$getSelection();if(me.$isRangeSelection(O)){const j=O.anchor,B=O.focus,ae=O.getNodes();if(j.key===B.key&&j.offset===B.offset)return;ae.forEach((H,G)=>{me.$isTextNode(H)?(G===0&&j.offset!==0&&(H=H.splitText(j.offset)[1]||H),G===ae.length-1&&(H=H.splitText(B.offset)[0]||H),H.__style!==""&&H.setStyle(""),H.__format!==0&&(H.setFormat(0),Nt.$getNearestBlockElementAncestorOrThrow(H).setFormat(""))):Hs.$isHeadingNode(H)&&H.replace(me.$createParagraphNode(),!0)})}})},[i]),_.jsxs("div",{className:"sticky top-0 border-b bg-background border-highlight flex flex-col",children:[_.jsxs("div",{className:"flex flex-row gap-1",children:[_.jsx(IP,{options:Object.values(b),label:b[v]??v+" (not supported)",onChange:O=>{D(T[O])}}),_.jsx(Jo,{variant:"primary",onClick:O=>{O.preventDefault(),o.dispatchCommand(me.FORMAT_TEXT_COMMAND,"bold")},active:u,icon:_.jsx(bP,{className:`${u&&"stroke-[3px]"}`})}),_.jsx(Jo,{active:h,onClick:O=>{O.preventDefault(),o.dispatchCommand(me.FORMAT_TEXT_COMMAND,"strikethrough")},icon:_.jsx(OP,{className:`${h&&"stroke-[2px]"}`})}),_.jsx(Jo,{active:d,onClick:O=>{O.preventDefault(),o.dispatchCommand(me.FORMAT_TEXT_COMMAND,"italic")},icon:_.jsx(RP,{className:`${d&&"stroke-[3px]"}`})}),_.jsx(Jo,{active:x!==null,onClick:O=>{O.preventDefault(),w(""),k("")},icon:_.jsx(QP,{width:12,height:12,className:`${x!==null&&"stroke-[3px]"}`})}),_.jsxs("label",{className:"flex items-center justify-center cursor-pointer",children:[_.jsx(Hw,{}),_.jsx("input",{type:"file",hidden:!0,onChange:O=>{O.preventDefault(),QS(O).then(j=>{o.dispatchCommand(YS,{...j})}).catch(j=>{console.error("Error reading image",j)})}})]})]}),x!==null&&_.jsxs("div",{className:"flex flex-row p-2",children:[_.jsx("input",{type:"text",placeholder:"Enter URL",className:"w-1/3 text-primary bg-background px-2",value:x,onChange:O=>{O.preventDefault(),w(O.target.value)}}),_.jsx(Jo,{variant:"primary",onClick:O=>{O.preventDefault(),k(x||null)},icon:_.jsx(GP,{size:14})}),_.jsx(Jo,{variant:"primary",onClick:O=>{O.preventDefault(),k(null)},icon:_.jsx(qP,{size:14})})]})]})},tO=eO;function nO(e){console.error(e)}const rO=28,oO=({richtext:e,onEditor:t})=>{const{windowSize:n}=Sm(),o={namespace:"val",editorState:i=>{i.setEditorState(i.parseEditorState({root:GN(n_(e))}))},nodes:[Hs.HeadingNode,Ba,po.ListNode,po.ListItemNode,Pl.LinkNode],theme:{text:{bold:"font-semibold",underline:"underline",italic:"italic",strikethrough:"line-through",underlineStrikethrough:"underline line-through"},list:{listitem:"ml-[20px]",ol:"list-decimal",ul:"list-disc"},heading:{h1:"text-4xl font-bold",h2:"text-3xl font-bold",h3:"text-2xl font-bold",h4:"text-xl font-bold",h5:"text-lg font-bold",h6:"text-md font-bold"},link:"text-highlight underline"},onError:nO};return _.jsxs(lR.LexicalComposer,{initialConfig:o,children:[_.jsx($P,{}),_.jsx(tO,{onEditor:t}),_.jsx(lP.RichTextPlugin,{contentEditable:_.jsx("div",{className:"font-sans border-b text-primary border-highlight",style:{minHeight:n!=null&&n.innerHeight?(n==null?void 0:n.innerHeight)-rO:void 0},children:_.jsx(EP,{className:"p-4 outline-none bg-fill"})}),placeholder:_.jsx("div",{className:"",children:"Enter some text..."}),ErrorBoundary:hR}),_.jsx(_P.LinkPlugin,{}),_.jsx(zP,{}),_.jsx(dP.ListPlugin,{}),_.jsx(kP,{}),_.jsx(SR.HistoryPlugin,{})]})};var iO={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const lO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Pn=(e,t)=>{const n=p.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:l,children:s,...a},u)=>p.createElement("svg",{ref:u,...iO,width:o,height:o,stroke:r,strokeWidth:l?Number(i)*24/Number(o):i,className:`lucide lucide-${lO(e)}`,...a},[...t.map(([c,d])=>p.createElement(c,d)),...(Array.isArray(s)?s:[s])||[]]));return n.displayName=`${e}`,n},sO=Pn("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),tE=Pn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),aO=Pn("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),uO=Pn("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]),cO=Pn("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]),dO=Pn("Minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]),fO=Pn("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),hO=Pn("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]),pO=Pn("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]),gO=Pn("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]),mO=Pn("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),vO=Pn("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),yO=Pn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),$p="p-1 border rounded-full shadow border-accent",d0="valbuild:urlBeforeNavigation";function xO({api:e}){const{theme:t,setTheme:n,editMode:r,setEditMode:o,session:i}=Sm();if(i.status==="success"&&i.data==="not-authenticated")return _.jsx("div",{className:"flex flex-row items-center justify-center w-full h-full font-sans border-2 rounded-full gap-x-3 text-primary bg-background border-fill",children:_.jsx("a",{className:$p,href:e.getLoginUrl(window.location.href),children:_.jsxs("div",{className:"flex items-center justify-center px-2 gap-x-2",children:[_.jsx("span",{children:"Login"}),_.jsx(uO,{size:18})]})})});const[l,s]=p.useState();return p.useEffect(()=>{i.status==="success"&&i.data!=="not-authenticated"&&e.getPatches({}).then(a=>{if(hl.isOk(a)){let u=0;for(const c in a.value)u+=a.value[c].length;s(u)}else console.error("Could not load patches",a.error)})},[i]),_.jsxs(wO,{children:[_.jsx(wu,{active:r==="hover",onClick:()=>{o(a=>a==="hover"?"off":"hover")},children:_.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:r==="hover"?_.jsx(hO,{size:18}):_.jsx(pO,{size:18})})}),_.jsx(wu,{onClick:()=>{n(t==="dark"?"light":"dark")},children:_.jsxs("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:[t==="dark"&&_.jsx(vO,{size:15}),t==="light"&&_.jsx(fO,{size:15})]})}),_.jsx(wu,{active:r==="full",onClick:()=>{if(r!=="full")localStorage.setItem(d0,window.location.href),window.location.href=e.getEditUrl();else if(r==="full"){const a=localStorage.getItem(d0);window.location.href=a||"/"}},children:_.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:r==="full"?_.jsx(dO,{size:15}):_.jsx(cO,{size:15})})}),l&&_.jsx(wu,{onClick:()=>{},children:_.jsxs("div",{className:"relative h-[24px] w-[24px] flex justify-center items-center",children:[_.jsx("div",{className:"absolute -right-[10px] -top-[10px] border border-border rounded-full px-1 font-sans text-xs bg-card text-accent",children:l}),_.jsx(mO,{size:18})]})}),_.jsx("a",{className:$p,href:e.getDisableUrl(),children:_.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:_.jsx(gO,{size:18})})})]})}function wO({children:e}){return _.jsx("div",{className:"flex flex-row items-center justify-center w-full h-full px-2 py-2 font-sans border-2 rounded-full gap-x-3 text-primary bg-background border-fill",children:e})}function wu({active:e,onClick:t,children:n}){return _.jsx("button",{className:ad($p,{"bg-accent drop-shadow-[0px_0px_12px_rgba(56,205,152,0.60)]":e}),onClick:t,children:n})}function nE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=nE(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function _O(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=nE(e))&&(r&&(r+=" "),r+=t);return r}const f0=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,h0=_O,SO=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return h0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,l=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const f=f0(c)||f0(d);return o[u][f]}),s=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(m=>{let[g,S]=m;return Array.isArray(S)?S.includes({...i,...s}[g]):{...i,...s}[g]===S})?[...u,d,f]:u},[]);return h0(e,l,a,n==null?void 0:n.class,n==null?void 0:n.className)},EO=SO("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Jl=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const l=r?Tl:"button";return _.jsx(l,{className:it(EO({variant:t,size:n,className:e})),ref:i,...o})});Jl.displayName="Button";function CO(e="dark"){const[t,n]=p.useState(e);return p.useEffect(()=>{localStorage.getItem("val-theme")==="light"?n("light"):localStorage.getItem("val-theme")==="dark"||window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?n("dark"):window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches&&n("light");const r=o=>{localStorage.getItem("val-theme")||n(o.matches?"dark":"light")};return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r),()=>{window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",r)}},[]),[t,r=>{localStorage.setItem("val-theme",r),n(r)}]}const km=p.forwardRef(({className:e,type:t,...n},r)=>_.jsx("input",{type:t,className:it("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));km.displayName="Input";function rE(e){const t=e+"CollectionProvider",[n,r]=Ti(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=h=>{const{scope:m,children:g}=h,S=ee.useRef(null),v=ee.useRef(new Map).current;return ee.createElement(o,{scope:m,itemMap:v,collectionRef:S},g)},s=e+"CollectionSlot",a=ee.forwardRef((h,m)=>{const{scope:g,children:S}=h,v=i(s,g),y=Qe(m,v.collectionRef);return ee.createElement(Tl,{ref:y},S)}),u=e+"CollectionItemSlot",c="data-radix-collection-item",d=ee.forwardRef((h,m)=>{const{scope:g,children:S,...v}=h,y=ee.useRef(null),x=Qe(m,y),w=i(u,g);return ee.useEffect(()=>(w.itemMap.set(y,{ref:y,...v}),()=>void w.itemMap.delete(y))),ee.createElement(Tl,{[c]:"",ref:x},S)});function f(h){const m=i(e+"CollectionConsumer",h);return ee.useCallback(()=>{const S=m.collectionRef.current;if(!S)return[];const v=Array.from(S.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((w,k)=>v.indexOf(w.ref.current)-v.indexOf(k.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:l,Slot:a,ItemSlot:d},f,r]}function $O(e,t=globalThis==null?void 0:globalThis.document){const n=Kt(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const kp="dismissableLayer.update",kO="dismissableLayer.pointerDownOutside",TO="dismissableLayer.focusOutside";let p0;const bO=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),NO=p.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:s,onDismiss:a,...u}=e,c=p.useContext(bO),[d,f]=p.useState(null),h=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,m]=p.useState({}),g=Qe(t,N=>f(N)),S=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=S.indexOf(v),x=d?S.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,k=x>=y,b=RO(N=>{const D=N.target,O=[...c.branches].some(j=>j.contains(D));!k||O||(i==null||i(N),s==null||s(N),N.defaultPrevented||a==null||a())},h),T=PO(N=>{const D=N.target;[...c.branches].some(j=>j.contains(D))||(l==null||l(N),s==null||s(N),N.defaultPrevented||a==null||a())},h);return $O(N=>{x===c.layers.size-1&&(o==null||o(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},h),p.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(p0=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),g0(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=p0)}},[d,h,r,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),g0())},[d,c]),p.useEffect(()=>{const N=()=>m({});return document.addEventListener(kp,N),()=>document.removeEventListener(kp,N)},[]),p.createElement(Le.div,te({},u,{ref:g,style:{pointerEvents:w?k?"auto":"none":void 0,...e.style},onFocusCapture:He(e.onFocusCapture,T.onFocusCapture),onBlurCapture:He(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:He(e.onPointerDownCapture,b.onPointerDownCapture)}))});function RO(e,t=globalThis==null?void 0:globalThis.document){const n=Kt(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){oE(kO,n,u,{discrete:!0})};var a=c;const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function PO(e,t=globalThis==null?void 0:globalThis.document){const n=Kt(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&oE(TO,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function g0(){const e=new CustomEvent(kp);document.dispatchEvent(e)}function oE(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ab(o,i):o.dispatchEvent(i)}let bf=0;function OO(){p.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:m0()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:m0()),bf++,()=>{bf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),bf--}},[])}function m0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Nf="focusScope.autoFocusOnMount",Rf="focusScope.autoFocusOnUnmount",v0={bubbles:!1,cancelable:!0},AO=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[s,a]=p.useState(null),u=Kt(o),c=Kt(i),d=p.useRef(null),f=Qe(t,g=>a(g)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let y=function(b){if(h.paused||!s)return;const T=b.target;s.contains(T)?d.current=T:lo(d.current,{select:!0})},x=function(b){if(h.paused||!s)return;const T=b.relatedTarget;T!==null&&(s.contains(T)||lo(d.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const N of b)N.removedNodes.length>0&&lo(s)};var g=y,S=x,v=w;document.addEventListener("focusin",y),document.addEventListener("focusout",x);const k=new MutationObserver(w);return s&&k.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),k.disconnect()}}},[r,s,h.paused]),p.useEffect(()=>{if(s){x0.add(h);const g=document.activeElement;if(!s.contains(g)){const v=new CustomEvent(Nf,v0);s.addEventListener(Nf,u),s.dispatchEvent(v),v.defaultPrevented||(MO(zO(iE(s)),{select:!0}),document.activeElement===g&&lo(s))}return()=>{s.removeEventListener(Nf,u),setTimeout(()=>{const v=new CustomEvent(Rf,v0);s.addEventListener(Rf,c),s.dispatchEvent(v),v.defaultPrevented||lo(g??document.body,{select:!0}),s.removeEventListener(Rf,c),x0.remove(h)},0)}}},[s,u,c,h]);const m=p.useCallback(g=>{if(!n&&!r||h.paused)return;const S=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(S&&v){const y=g.currentTarget,[x,w]=LO(y);x&&w?!g.shiftKey&&v===w?(g.preventDefault(),n&&lo(x,{select:!0})):g.shiftKey&&v===x&&(g.preventDefault(),n&&lo(w,{select:!0})):v===y&&g.preventDefault()}},[n,r,h.paused]);return p.createElement(Le.div,te({tabIndex:-1},l,{ref:f,onKeyDown:m}))});function MO(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(lo(r,{select:t}),document.activeElement!==n)return}function LO(e){const t=iE(e),n=y0(t,e),r=y0(t.reverse(),e);return[n,r]}function iE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function y0(e,t){for(const n of e)if(!DO(n,{upTo:t}))return n}function DO(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function IO(e){return e instanceof HTMLInputElement&&"select"in e}function lo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&IO(e)&&t&&e.select()}}const x0=jO();function jO(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=w0(e,t),e.unshift(t)},remove(t){var n;e=w0(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function w0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function zO(e){return e.filter(t=>t.tagName!=="A")}const FO=f1["useId".toString()]||(()=>{});let BO=0;function Cd(e){const[t,n]=p.useState(FO());return Tn(()=>{e||n(r=>r??String(BO++))},[e]),e||(t?`radix-${t}`:"")}const WO=["top","right","bottom","left"],Do=Math.min,wn=Math.max,jc=Math.round,_u=Math.floor,Io=e=>({x:e,y:e}),UO={left:"right",right:"left",bottom:"top",top:"bottom"},VO={start:"end",end:"start"};function Tp(e,t,n){return wn(e,Do(t,n))}function Ur(e,t){return typeof e=="function"?e(t):e}function Vr(e){return e.split("-")[0]}function Zl(e){return e.split("-")[1]}function Tm(e){return e==="x"?"y":"x"}function bm(e){return e==="y"?"height":"width"}function ql(e){return["top","bottom"].includes(Vr(e))?"y":"x"}function Nm(e){return Tm(ql(e))}function HO(e,t,n){n===void 0&&(n=!1);const r=Zl(e),o=Nm(e),i=bm(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=zc(l)),[l,zc(l)]}function KO(e){const t=zc(e);return[bp(e),t,bp(t)]}function bp(e){return e.replace(/start|end/g,t=>VO[t])}function GO(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}function YO(e,t,n,r){const o=Zl(e);let i=GO(Vr(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(bp)))),i}function zc(e){return e.replace(/left|right|bottom|top/g,t=>UO[t])}function XO(e){return{top:0,right:0,bottom:0,left:0,...e}}function lE(e){return typeof e!="number"?XO(e):{top:e,right:e,bottom:e,left:e}}function Fc(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function _0(e,t,n){let{reference:r,floating:o}=e;const i=ql(t),l=Nm(t),s=bm(l),a=Vr(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let h;switch(a){case"top":h={x:c,y:r.y-o.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Zl(t)){case"start":h[l]-=f*(n&&u?-1:1);break;case"end":h[l]+=f*(n&&u?-1:1);break}return h}const QO=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=_0(u,r,a),f=r,h={},m=0;for(let g=0;g<s.length;g++){const{name:S,fn:v}=s[g],{x:y,y:x,data:w,reset:k}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:u,platform:l,elements:{reference:e,floating:t}});if(c=y??c,d=x??d,h={...h,[S]:{...h[S],...w}},k&&m<=50){m++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(u=k.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:c,y:d}=_0(u,f,a)),g=-1;continue}}return{x:c,y:d,placement:f,strategy:o,middlewareData:h}};async function Ea(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Ur(t,e),m=lE(h),S=s[f?d==="floating"?"reference":"floating":d],v=Fc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(S)))==null||n?S:S.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:a})),y=d==="floating"?{...l.floating,x:r,y:o}:l.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),w=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},k=Fc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:x,strategy:a}):y);return{top:(v.top-k.top+m.top)/w.y,bottom:(k.bottom-v.bottom+m.bottom)/w.y,left:(v.left-k.left+m.left)/w.x,right:(k.right-v.right+m.right)/w.x}}const S0=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:s,middlewareData:a}=t,{element:u,padding:c=0}=Ur(e,t)||{};if(u==null)return{};const d=lE(c),f={x:n,y:r},h=Nm(o),m=bm(h),g=await l.getDimensions(u),S=h==="y",v=S?"top":"left",y=S?"bottom":"right",x=S?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[h]-f[h]-i.floating[m],k=f[h]-i.reference[h],b=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let T=b?b[x]:0;(!T||!await(l.isElement==null?void 0:l.isElement(b)))&&(T=s.floating[x]||i.floating[m]);const N=w/2-k/2,D=T/2-g[m]/2-1,O=Do(d[v],D),j=Do(d[y],D),B=O,ae=T-g[m]-j,H=T/2-g[m]/2+N,G=Tp(B,H,ae),C=!a.arrow&&Zl(o)!=null&&H!=G&&i.reference[m]/2-(H<B?O:j)-g[m]/2<0,$=C?H<B?H-B:H-ae:0;return{[h]:f[h]+$,data:{[h]:G,centerOffset:H-G-$,...C&&{alignmentOffset:$}},reset:C}}}),JO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...S}=Ur(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Vr(o),y=Vr(s)===s,x=await(a.isRTL==null?void 0:a.isRTL(u.floating)),w=f||(y||!g?[zc(s)]:KO(s));!f&&m!=="none"&&w.push(...YO(s,g,m,x));const k=[s,...w],b=await Ea(t,S),T=[];let N=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&T.push(b[v]),d){const B=HO(o,l,x);T.push(b[B[0]],b[B[1]])}if(N=[...N,{placement:o,overflows:T}],!T.every(B=>B<=0)){var D,O;const B=(((D=i.flip)==null?void 0:D.index)||0)+1,ae=k[B];if(ae)return{data:{index:B,overflows:N},reset:{placement:ae}};let H=(O=N.filter(G=>G.overflows[0]<=0).sort((G,C)=>G.overflows[1]-C.overflows[1])[0])==null?void 0:O.placement;if(!H)switch(h){case"bestFit":{var j;const G=(j=N.map(C=>[C.placement,C.overflows.filter($=>$>0).reduce(($,E)=>$+E,0)]).sort((C,$)=>C[1]-$[1])[0])==null?void 0:j[0];G&&(H=G);break}case"initialPlacement":H=s;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function E0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function C0(e){return WO.some(t=>e[t]>=0)}const ZO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ur(e,t);switch(r){case"referenceHidden":{const i=await Ea(t,{...o,elementContext:"reference"}),l=E0(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:C0(l)}}}case"escaped":{const i=await Ea(t,{...o,altBoundary:!0}),l=E0(i,n.floating);return{data:{escapedOffsets:l,escaped:C0(l)}}}default:return{}}}}};async function qO(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Vr(n),s=Zl(n),a=ql(n)==="y",u=["left","top"].includes(l)?-1:1,c=i&&a?-1:1,d=Ur(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(h=s==="end"?m*-1:m),a?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const e5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await qO(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},t5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:S=>{let{x:v,y}=S;return{x:v,y}}},...a}=Ur(e,t),u={x:n,y:r},c=await Ea(t,a),d=ql(Vr(o)),f=Tm(d);let h=u[f],m=u[d];if(i){const S=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+c[S],x=h-c[v];h=Tp(y,h,x)}if(l){const S=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+c[S],x=m-c[v];m=Tp(y,m,x)}const g=s.fn({...t,[f]:h,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},n5=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:s=0,mainAxis:a=!0,crossAxis:u=!0}=Ur(e,t),c={x:n,y:r},d=ql(o),f=Tm(d);let h=c[f],m=c[d];const g=Ur(s,t),S=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){const x=f==="y"?"height":"width",w=i.reference[f]-i.floating[x]+S.mainAxis,k=i.reference[f]+i.reference[x]-S.mainAxis;h<w?h=w:h>k&&(h=k)}if(u){var v,y;const x=f==="y"?"width":"height",w=["top","left"].includes(Vr(o)),k=i.reference[d]-i.floating[x]+(w&&((v=l.offset)==null?void 0:v[d])||0)+(w?0:S.crossAxis),b=i.reference[d]+i.reference[x]+(w?0:((y=l.offset)==null?void 0:y[d])||0)-(w?S.crossAxis:0);m<k?m=k:m>b&&(m=b)}return{[f]:h,[d]:m}}}},r5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:l=()=>{},...s}=Ur(e,t),a=await Ea(t,s),u=Vr(n),c=Zl(n),d=ql(n)==="y",{width:f,height:h}=r.floating;let m,g;u==="top"||u==="bottom"?(m=u,g=c===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=u,m=c==="end"?"top":"bottom");const S=h-a[m],v=f-a[g],y=!t.middlewareData.shift;let x=S,w=v;if(d){const b=f-a.left-a.right;w=c||y?Do(v,b):b}else{const b=h-a.top-a.bottom;x=c||y?Do(S,b):b}if(y&&!c){const b=wn(a.left,0),T=wn(a.right,0),N=wn(a.top,0),D=wn(a.bottom,0);d?w=f-2*(b!==0||T!==0?b+T:wn(a.left,a.right)):x=h-2*(N!==0||D!==0?N+D:wn(a.top,a.bottom))}await l({...t,availableWidth:w,availableHeight:x});const k=await o.getDimensions(i.floating);return f!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function jo(e){return sE(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zr(e){var t;return(t=(sE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sE(e){return e instanceof Node||e instanceof $n(e).Node}function Hr(e){return e instanceof Element||e instanceof $n(e).Element}function _r(e){return e instanceof HTMLElement||e instanceof $n(e).HTMLElement}function $0(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function Wa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Un(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function o5(e){return["table","td","th"].includes(jo(e))}function Rm(e){const t=Pm(),n=Un(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function i5(e){let t=Ol(e);for(;_r(t)&&!$d(t);){if(Rm(t))return t;t=Ol(t)}return null}function Pm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $d(e){return["html","body","#document"].includes(jo(e))}function Un(e){return $n(e).getComputedStyle(e)}function kd(e){return Hr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ol(e){if(jo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$0(e)&&e.host||Zr(e);return $0(t)?t.host:t}function aE(e){const t=Ol(e);return $d(t)?e.ownerDocument?e.ownerDocument.body:e.body:_r(t)&&Wa(t)?t:aE(t)}function Ca(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=aE(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=$n(o);return i?t.concat(l,l.visualViewport||[],Wa(o)?o:[],l.frameElement&&n?Ca(l.frameElement):[]):t.concat(o,Ca(o,[],n))}function uE(e){const t=Un(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_r(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=jc(n)!==i||jc(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function Om(e){return Hr(e)?e:e.contextElement}function vl(e){const t=Om(e);if(!_r(t))return Io(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=uE(t);let l=(i?jc(n.width):n.width)/r,s=(i?jc(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const l5=Io(0);function cE(e){const t=$n(e);return!Pm()||!t.visualViewport?l5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function s5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function xi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Om(e);let l=Io(1);t&&(r?Hr(r)&&(l=vl(r)):l=vl(e));const s=s5(i,n,r)?cE(i):Io(0);let a=(o.left+s.x)/l.x,u=(o.top+s.y)/l.y,c=o.width/l.x,d=o.height/l.y;if(i){const f=$n(i),h=r&&Hr(r)?$n(r):r;let m=f.frameElement;for(;m&&r&&h!==f;){const g=vl(m),S=m.getBoundingClientRect(),v=Un(m),y=S.left+(m.clientLeft+parseFloat(v.paddingLeft))*g.x,x=S.top+(m.clientTop+parseFloat(v.paddingTop))*g.y;a*=g.x,u*=g.y,c*=g.x,d*=g.y,a+=y,u+=x,m=$n(m).frameElement}}return Fc({width:c,height:d,x:a,y:u})}function a5(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=_r(n),i=Zr(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},s=Io(1);const a=Io(0);if((o||!o&&r!=="fixed")&&((jo(n)!=="body"||Wa(i))&&(l=kd(n)),_r(n))){const u=xi(n);s=vl(n),a.x=u.x+n.clientLeft,a.y=u.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-l.scrollLeft*s.x+a.x,y:t.y*s.y-l.scrollTop*s.y+a.y}}function u5(e){return Array.from(e.getClientRects())}function dE(e){return xi(Zr(e)).left+kd(e).scrollLeft}function c5(e){const t=Zr(e),n=kd(e),r=e.ownerDocument.body,o=wn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=wn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+dE(e);const s=-n.scrollTop;return Un(r).direction==="rtl"&&(l+=wn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}function d5(e,t){const n=$n(e),r=Zr(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const u=Pm();(!u||u&&t==="fixed")&&(s=o.offsetLeft,a=o.offsetTop)}return{width:i,height:l,x:s,y:a}}function f5(e,t){const n=xi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=_r(e)?vl(e):Io(1),l=e.clientWidth*i.x,s=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:l,height:s,x:a,y:u}}function k0(e,t,n){let r;if(t==="viewport")r=d5(e,n);else if(t==="document")r=c5(Zr(e));else if(Hr(t))r=f5(t,n);else{const o=cE(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Fc(r)}function fE(e,t){const n=Ol(e);return n===t||!Hr(n)||$d(n)?!1:Un(n).position==="fixed"||fE(n,t)}function h5(e,t){const n=t.get(e);if(n)return n;let r=Ca(e,[],!1).filter(s=>Hr(s)&&jo(s)!=="body"),o=null;const i=Un(e).position==="fixed";let l=i?Ol(e):e;for(;Hr(l)&&!$d(l);){const s=Un(l),a=Rm(l);!a&&s.position==="fixed"&&(o=null),(i?!a&&!o:!a&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Wa(l)&&!a&&fE(e,l))?r=r.filter(c=>c!==l):o=s,l=Ol(l)}return t.set(e,r),r}function p5(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?h5(t,this._c):[].concat(n),r],s=l[0],a=l.reduce((u,c)=>{const d=k0(t,c,o);return u.top=wn(d.top,u.top),u.right=Do(d.right,u.right),u.bottom=Do(d.bottom,u.bottom),u.left=wn(d.left,u.left),u},k0(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function g5(e){return uE(e)}function m5(e,t,n){const r=_r(t),o=Zr(t),i=n==="fixed",l=xi(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=Io(0);if(r||!r&&!i)if((jo(t)!=="body"||Wa(o))&&(s=kd(t)),r){const u=xi(t,!0,i,t);a.x=u.x+t.clientLeft,a.y=u.y+t.clientTop}else o&&(a.x=dE(o));return{x:l.left+s.scrollLeft-a.x,y:l.top+s.scrollTop-a.y,width:l.width,height:l.height}}function T0(e,t){return!_r(e)||Un(e).position==="fixed"?null:t?t(e):e.offsetParent}function hE(e,t){const n=$n(e);if(!_r(e))return n;let r=T0(e,t);for(;r&&o5(r)&&Un(r).position==="static";)r=T0(r,t);return r&&(jo(r)==="html"||jo(r)==="body"&&Un(r).position==="static"&&!Rm(r))?n:r||i5(e)||n}const v5=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||hE,i=this.getDimensions;return{reference:m5(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function y5(e){return Un(e).direction==="rtl"}const x5={convertOffsetParentRelativeRectToViewportRelativeRect:a5,getDocumentElement:Zr,getClippingRect:p5,getOffsetParent:hE,getElementRects:v5,getClientRects:u5,getDimensions:g5,getScale:vl,isElement:Hr,isRTL:y5};function w5(e,t){let n=null,r;const o=Zr(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function l(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const h=_u(c),m=_u(o.clientWidth-(u+d)),g=_u(o.clientHeight-(c+f)),S=_u(u),y={rootMargin:-h+"px "+-m+"px "+-g+"px "+-S+"px",threshold:wn(0,Do(1,a))||1};let x=!0;function w(k){const b=k[0].intersectionRatio;if(b!==a){if(!x)return l();b?l(!1,b):r=setTimeout(()=>{l(!1,1e-7)},100)}x=!1}try{n=new IntersectionObserver(w,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return l(!0),i}function _5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=Om(e),c=o||i?[...u?Ca(u):[],...Ca(t)]:[];c.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=u&&s?w5(u,n):null;let f=-1,h=null;l&&(h=new ResizeObserver(v=>{let[y]=v;y&&y.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),u&&!a&&h.observe(u),h.observe(t));let m,g=a?xi(e):null;a&&S();function S(){const v=xi(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(S)}return n(),()=>{c.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,a&&cancelAnimationFrame(m)}}const S5=(e,t,n)=>{const r=new Map,o={platform:x5,...n},i={...o.platform,_c:r};return QO(e,t,{...o,platform:i})},E5=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?S0({element:r.current,padding:o}).fn(n):{}:r?S0({element:r,padding:o}).fn(n):{}}}};var Vu=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Bc(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(!Bc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Bc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function pE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function b0(e,t){const n=pE(e);return Math.round(t*n)/n}function N0(e){const t=p.useRef(e);return Vu(()=>{t.current=e}),t}function C5(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:s=!0,whileElementsMounted:a,open:u}=e,[c,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=p.useState(r);Bc(f,r)||h(r);const[m,g]=p.useState(null),[S,v]=p.useState(null),y=p.useCallback(C=>{C!=b.current&&(b.current=C,g(C))},[g]),x=p.useCallback(C=>{C!==T.current&&(T.current=C,v(C))},[v]),w=i||m,k=l||S,b=p.useRef(null),T=p.useRef(null),N=p.useRef(c),D=N0(a),O=N0(o),j=p.useCallback(()=>{if(!b.current||!T.current)return;const C={placement:t,strategy:n,middleware:f};O.current&&(C.platform=O.current),S5(b.current,T.current,C).then($=>{const E={...$,isPositioned:!0};B.current&&!Bc(N.current,E)&&(N.current=E,Gr.flushSync(()=>{d(E)}))})},[f,t,n,O]);Vu(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[u]);const B=p.useRef(!1);Vu(()=>(B.current=!0,()=>{B.current=!1}),[]),Vu(()=>{if(w&&(b.current=w),k&&(T.current=k),w&&k){if(D.current)return D.current(w,k,j);j()}},[w,k,j,D]);const ae=p.useMemo(()=>({reference:b,floating:T,setReference:y,setFloating:x}),[y,x]),H=p.useMemo(()=>({reference:w,floating:k}),[w,k]),G=p.useMemo(()=>{const C={position:n,left:0,top:0};if(!H.floating)return C;const $=b0(H.floating,c.x),E=b0(H.floating,c.y);return s?{...C,transform:"translate("+$+"px, "+E+"px)",...pE(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:E}},[n,s,H.floating,c.x,c.y]);return p.useMemo(()=>({...c,update:j,refs:ae,elements:H,floatingStyles:G}),[c,j,ae,H,G])}function gE(e){const[t,n]=p.useState(void 0);return Tn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let l,s;if("borderBoxSize"in i){const a=i.borderBoxSize,u=Array.isArray(a)?a[0]:a;l=u.inlineSize,s=u.blockSize}else l=e.offsetWidth,s=e.offsetHeight;n({width:l,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const mE="Popper",[vE,yE]=Ti(mE),[$5,xE]=vE(mE),k5=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return p.createElement($5,{scope:t,anchor:r,onAnchorChange:o},n)},T5="PopperAnchor",b5=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=xE(T5,n),l=p.useRef(null),s=Qe(t,l);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:p.createElement(Le.div,te({},o,{ref:s}))}),wE="PopperContent",[N5,F4]=vE(wE),R5=p.forwardRef((e,t)=>{var n,r,o,i,l,s,a,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:S=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:x="partial",hideWhenDetached:w=!1,updatePositionStrategy:k="optimized",onPlaced:b,...T}=e,N=xE(wE,c),[D,O]=p.useState(null),j=Qe(t,un=>O(un)),[B,ae]=p.useState(null),H=gE(B),G=(n=H==null?void 0:H.width)!==null&&n!==void 0?n:0,C=(r=H==null?void 0:H.height)!==null&&r!==void 0?r:0,$=d+(h!=="center"?"-"+h:""),E=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},A=Array.isArray(v)?v:[v],R=A.length>0,z={padding:E,boundary:A.filter(P5),altBoundary:R},{refs:V,floatingStyles:ie,placement:ne,isPositioned:Ce,middlewareData:we}=C5({strategy:"fixed",placement:$,whileElementsMounted:(...un)=>_5(...un,{animationFrame:k==="always"}),elements:{reference:N.anchor},middleware:[e5({mainAxis:f+C,alignmentAxis:m}),S&&t5({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?n5():void 0,...z}),S&&JO({...z}),r5({...z,apply:({elements:un,rects:On,availableWidth:Ne,availableHeight:ht})=>{const{width:pt,height:_t}=On.reference,vn=un.floating.style;vn.setProperty("--radix-popper-available-width",`${Ne}px`),vn.setProperty("--radix-popper-available-height",`${ht}px`),vn.setProperty("--radix-popper-anchor-width",`${pt}px`),vn.setProperty("--radix-popper-anchor-height",`${_t}px`)}}),B&&E5({element:B,padding:g}),O5({arrowWidth:G,arrowHeight:C}),w&&ZO({strategy:"referenceHidden",...z})]}),[X,be]=_E(ne),fe=Kt(b);Tn(()=>{Ce&&(fe==null||fe())},[Ce,fe]);const _e=(o=we.arrow)===null||o===void 0?void 0:o.x,ve=(i=we.arrow)===null||i===void 0?void 0:i.y,Te=((l=we.arrow)===null||l===void 0?void 0:l.centerOffset)!==0,[Be,Ot]=p.useState();return Tn(()=>{D&&Ot(window.getComputedStyle(D).zIndex)},[D]),p.createElement("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:Ce?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Be,"--radix-popper-transform-origin":[(s=we.transformOrigin)===null||s===void 0?void 0:s.x,(a=we.transformOrigin)===null||a===void 0?void 0:a.y].join(" ")},dir:e.dir},p.createElement(N5,{scope:c,placedSide:X,onArrowChange:ae,arrowX:_e,arrowY:ve,shouldHideArrow:Te},p.createElement(Le.div,te({"data-side":X,"data-align":be},T,{ref:j,style:{...T.style,animation:Ce?void 0:"none",opacity:(u=we.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function P5(e){return e!==null}const O5=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;const{placement:s,rects:a,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,f=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[m,g]=_E(s),S={start:"0%",center:"50%",end:"100%"}[g],v=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+f/2,y=((i=(l=u.arrow)===null||l===void 0?void 0:l.y)!==null&&i!==void 0?i:0)+h/2;let x="",w="";return m==="bottom"?(x=d?S:`${v}px`,w=`${-h}px`):m==="top"?(x=d?S:`${v}px`,w=`${a.floating.height+h}px`):m==="right"?(x=`${-h}px`,w=d?S:`${y}px`):m==="left"&&(x=`${a.floating.width+h}px`,w=d?S:`${y}px`),{data:{x,y:w}}}});function _E(e){const[t,n="center"]=e.split("-");return[t,n]}const A5=k5,M5=b5,L5=R5,D5=p.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?oT.createPortal(p.createElement(Le.div,te({},o,{ref:t})),r):null});function Al({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=I5({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,s=Kt(n),a=p.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[l,a]}function I5({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),i=Kt(t);return p.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function SE(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const j5=p.forwardRef((e,t)=>p.createElement(Le.span,te({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));var z5=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Bi=new WeakMap,Su=new WeakMap,Eu={},Pf=0,EE=function(e){return e&&(e.host||EE(e.parentNode))},F5=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=EE(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},B5=function(e,t,n,r){var o=F5(t,Array.isArray(e)?e:[e]);Eu[n]||(Eu[n]=new WeakMap);var i=Eu[n],l=[],s=new Set,a=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||a.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else{var h=f.getAttribute(r),m=h!==null&&h!=="false",g=(Bi.get(f)||0)+1,S=(i.get(f)||0)+1;Bi.set(f,g),i.set(f,S),l.push(f),g===1&&m&&Su.set(f,!0),S===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}})};return c(t),s.clear(),Pf++,function(){l.forEach(function(d){var f=Bi.get(d)-1,h=i.get(d)-1;Bi.set(d,f),i.set(d,h),f||(Su.has(d)||d.removeAttribute(r),Su.delete(d)),h||d.removeAttribute(n)}),Pf--,Pf||(Bi=new WeakMap,Bi=new WeakMap,Su=new WeakMap,Eu={})}},W5=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||z5(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),B5(r,o,n,"aria-hidden")):function(){return null}},fr=function(){return fr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},fr.apply(this,arguments)};function CE(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function U5(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Hu="right-scroll-bar-position",Ku="width-before-scroll-bar",V5="with-scroll-bars-hidden",H5="--removed-body-scroll-bar-size";function K5(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function G5(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function Y5(e,t){return G5(t||null,function(n){return e.forEach(function(r){return K5(r,n)})})}function X5(e){return e}function Q5(e,t){t===void 0&&(t=X5);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(s){return s!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var s=n;n=[],s.forEach(i),l=n}var a=function(){var c=l;l=[],c.forEach(i)},u=function(){return Promise.resolve().then(a)};u(),n={push:function(c){l.push(c),u()},filter:function(c){return l=l.filter(c),n}}}};return o}function J5(e){e===void 0&&(e={});var t=Q5(null);return t.options=fr({async:!0,ssr:!1},e),t}var $E=function(e){var t=e.sideCar,n=CE(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,fr({},n))};$E.isSideCarExport=!0;function Z5(e,t){return e.useMedium(t),$E}var kE=J5(),Of=function(){},Td=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:Of,onWheelCapture:Of,onTouchMoveCapture:Of}),o=r[0],i=r[1],l=e.forwardProps,s=e.children,a=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,S=e.as,v=S===void 0?"div":S,y=CE(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=f,w=Y5([n,t]),k=fr(fr({},y),o);return p.createElement(p.Fragment,null,c&&p.createElement(x,{sideCar:kE,removeScrollBar:u,shards:d,noIsolation:h,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:n}),l?p.cloneElement(p.Children.only(s),fr(fr({},k),{ref:w})):p.createElement(v,fr({},k,{className:a,ref:w}),s))});Td.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Td.classNames={fullWidth:Ku,zeroRight:Hu};var R0,q5=function(){if(R0)return R0;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=q5();return t&&e.setAttribute("nonce",t),e}function tA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=eA())&&(tA(t,n),nA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},oA=function(){var e=rA();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},TE=function(){var e=oA(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},iA={left:0,top:0,right:0,gap:0},Af=function(e){return parseInt(e||"",10)||0},lA=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Af(n),Af(r),Af(o)]},sA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return iA;var t=lA(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},aA=TE(),uA=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,s=e.gap;return n===void 0&&(n="margin"),`
129
+ .`.concat(V5,` {
130
+ overflow: hidden `).concat(r,`;
131
+ padding-right: `).concat(s,"px ").concat(r,`;
132
+ }
133
+ body {
134
+ overflow: hidden `).concat(r,`;
135
+ overscroll-behavior: contain;
136
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
137
+ padding-left: `.concat(o,`px;
138
+ padding-top: `).concat(i,`px;
139
+ padding-right: `).concat(l,`px;
140
+ margin-left:0;
141
+ margin-top:0;
142
+ margin-right: `).concat(s,"px ").concat(r,`;
143
+ `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
144
+ }
145
+
146
+ .`).concat(Hu,` {
147
+ right: `).concat(s,"px ").concat(r,`;
148
+ }
149
+
150
+ .`).concat(Ku,` {
151
+ margin-right: `).concat(s,"px ").concat(r,`;
152
+ }
153
+
154
+ .`).concat(Hu," .").concat(Hu,` {
155
+ right: 0 `).concat(r,`;
156
+ }
157
+
158
+ .`).concat(Ku," .").concat(Ku,` {
159
+ margin-right: 0 `).concat(r,`;
160
+ }
161
+
162
+ body {
163
+ `).concat(H5,": ").concat(s,`px;
164
+ }
165
+ `)},cA=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=p.useMemo(function(){return sA(o)},[o]);return p.createElement(aA,{styles:uA(i,!t,o,n?"":"!important")})},Np=!1;if(typeof window<"u")try{var Cu=Object.defineProperty({},"passive",{get:function(){return Np=!0,!0}});window.addEventListener("test",Cu,Cu),window.removeEventListener("test",Cu,Cu)}catch{Np=!1}var Wi=Np?{passive:!1}:!1,dA=function(e){return e.tagName==="TEXTAREA"},bE=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!dA(e)&&n[t]==="visible")},fA=function(e){return bE(e,"overflowY")},hA=function(e){return bE(e,"overflowX")},P0=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=NE(e,n);if(r){var o=RE(e,n),i=o[1],l=o[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},pA=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},gA=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},NE=function(e,t){return e==="v"?fA(t):hA(t)},RE=function(e,t){return e==="v"?pA(t):gA(t)},mA=function(e,t){return e==="h"&&t==="rtl"?-1:1},vA=function(e,t,n,r,o){var i=mA(e,window.getComputedStyle(t).direction),l=i*r,s=n.target,a=t.contains(s),u=!1,c=l>0,d=0,f=0;do{var h=RE(e,s),m=h[0],g=h[1],S=h[2],v=g-S-i*m;(m||v)&&NE(e,s)&&(d+=v,f+=m),s=s.parentNode}while(!a&&s!==document.body||a&&(t.contains(s)||t===s));return(c&&(o&&d===0||!o&&l>d)||!c&&(o&&f===0||!o&&-l>f))&&(u=!0),u},$u=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},O0=function(e){return[e.deltaX,e.deltaY]},A0=function(e){return e&&"current"in e?e.current:e},yA=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xA=function(e){return`
166
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
167
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
168
+ `)},wA=0,Ui=[];function _A(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(wA++)[0],i=p.useState(function(){return TE()})[0],l=p.useRef(e);p.useEffect(function(){l.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=U5([e.lockRef.current],(e.shards||[]).map(A0),!0).filter(Boolean);return g.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(g,S){if("touches"in g&&g.touches.length===2)return!l.current.allowPinchZoom;var v=$u(g),y=n.current,x="deltaX"in g?g.deltaX:y[0]-v[0],w="deltaY"in g?g.deltaY:y[1]-v[1],k,b=g.target,T=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in g&&T==="h"&&b.type==="range")return!1;var N=P0(T,b);if(!N)return!0;if(N?k=T:(k=T==="v"?"h":"v",N=P0(T,b)),!N)return!1;if(!r.current&&"changedTouches"in g&&(x||w)&&(r.current=k),!k)return!0;var D=r.current||k;return vA(D,S,g,D==="h"?x:w,!0)},[]),a=p.useCallback(function(g){var S=g;if(!(!Ui.length||Ui[Ui.length-1]!==i)){var v="deltaY"in S?O0(S):$u(S),y=t.current.filter(function(k){return k.name===S.type&&k.target===S.target&&yA(k.delta,v)})[0];if(y&&y.should){S.cancelable&&S.preventDefault();return}if(!y){var x=(l.current.shards||[]).map(A0).filter(Boolean).filter(function(k){return k.contains(S.target)}),w=x.length>0?s(S,x[0]):!l.current.noIsolation;w&&S.cancelable&&S.preventDefault()}}},[]),u=p.useCallback(function(g,S,v,y){var x={name:g,delta:S,target:v,should:y};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),c=p.useCallback(function(g){n.current=$u(g),r.current=void 0},[]),d=p.useCallback(function(g){u(g.type,O0(g),g.target,s(g,e.lockRef.current))},[]),f=p.useCallback(function(g){u(g.type,$u(g),g.target,s(g,e.lockRef.current))},[]);p.useEffect(function(){return Ui.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",a,Wi),document.addEventListener("touchmove",a,Wi),document.addEventListener("touchstart",c,Wi),function(){Ui=Ui.filter(function(g){return g!==i}),document.removeEventListener("wheel",a,Wi),document.removeEventListener("touchmove",a,Wi),document.removeEventListener("touchstart",c,Wi)}},[]);var h=e.removeScrollBar,m=e.inert;return p.createElement(p.Fragment,null,m?p.createElement(i,{styles:xA(o)}):null,h?p.createElement(cA,{gapMode:"margin"}):null)}const SA=Z5(kE,_A);var PE=p.forwardRef(function(e,t){return p.createElement(Td,fr({},e,{ref:t,sideCar:SA}))});PE.classNames=Td.classNames;const EA=PE,CA=[" ","Enter","ArrowUp","ArrowDown"],$A=[" ","Enter"],bd="Select",[Nd,Am,kA]=rE(bd),[es,B4]=Ti(bd,[kA,yE]),Mm=yE(),[TA,Oi]=es(bd),[bA,NA]=es(bd),RA=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:l,defaultValue:s,onValueChange:a,dir:u,name:c,autoComplete:d,disabled:f,required:h}=e,m=Mm(t),[g,S]=p.useState(null),[v,y]=p.useState(null),[x,w]=p.useState(!1),k=Ig(u),[b=!1,T]=Al({prop:r,defaultProp:o,onChange:i}),[N,D]=Al({prop:l,defaultProp:s,onChange:a}),O=p.useRef(null),j=g?!!g.closest("form"):!0,[B,ae]=p.useState(new Set),H=Array.from(B).map(G=>G.props.value).join(";");return p.createElement(A5,m,p.createElement(TA,{required:h,scope:t,trigger:g,onTriggerChange:S,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:x,onValueNodeHasChildrenChange:w,contentId:Cd(),value:N,onValueChange:D,open:b,onOpenChange:T,dir:k,triggerPointerDownPosRef:O,disabled:f},p.createElement(Nd.Provider,{scope:t},p.createElement(bA,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(G=>{ae(C=>new Set(C).add(G))},[]),onNativeOptionRemove:p.useCallback(G=>{ae(C=>{const $=new Set(C);return $.delete(G),$})},[])},n)),j?p.createElement(LE,{key:H,"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:N,onChange:G=>D(G.target.value),disabled:f},N===void 0?p.createElement("option",{value:""}):null,Array.from(B)):null))},PA="SelectTrigger",OA=p.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Mm(n),l=Oi(PA,n),s=l.disabled||r,a=Qe(t,l.onTriggerChange),u=Am(n),[c,d,f]=DE(m=>{const g=u().filter(y=>!y.disabled),S=g.find(y=>y.value===l.value),v=IE(g,m,S);v!==void 0&&l.onValueChange(v.value)}),h=()=>{s||(l.onOpenChange(!0),f())};return p.createElement(M5,te({asChild:!0},i),p.createElement(Le.button,te({type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":ME(l.value)?"":void 0},o,{ref:a,onClick:He(o.onClick,m=>{m.currentTarget.focus()}),onPointerDown:He(o.onPointerDown,m=>{const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(h(),l.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)},m.preventDefault())}),onKeyDown:He(o.onKeyDown,m=>{const g=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&d(m.key),!(g&&m.key===" ")&&CA.includes(m.key)&&(h(),m.preventDefault())})})))}),AA="SelectValue",MA=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:l="",...s}=e,a=Oi(AA,n),{onValueNodeHasChildrenChange:u}=a,c=i!==void 0,d=Qe(t,a.onValueNodeChange);return Tn(()=>{u(c)},[u,c]),p.createElement(Le.span,te({},s,{ref:d,style:{pointerEvents:"none"}}),ME(a.value)?p.createElement(p.Fragment,null,l):i)}),LA=p.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.createElement(Le.span,te({"aria-hidden":!0},o,{ref:t}),r||"▼")}),DA=e=>p.createElement(D5,te({asChild:!0},e)),Ml="SelectContent",IA=p.forwardRef((e,t)=>{const n=Oi(Ml,e.__scopeSelect),[r,o]=p.useState();if(Tn(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Gr.createPortal(p.createElement(OE,{scope:e.__scopeSelect},p.createElement(Nd.Slot,{scope:e.__scopeSelect},p.createElement("div",null,e.children))),i):null}return p.createElement(jA,te({},e,{ref:t}))}),Or=10,[OE,Rd]=es(Ml),jA=p.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:l,side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:m,hideWhenDetached:g,avoidCollisions:S,...v}=e,y=Oi(Ml,n),[x,w]=p.useState(null),[k,b]=p.useState(null),T=Qe(t,X=>w(X)),[N,D]=p.useState(null),[O,j]=p.useState(null),B=Am(n),[ae,H]=p.useState(!1),G=p.useRef(!1);p.useEffect(()=>{if(x)return W5(x)},[x]),OO();const C=p.useCallback(X=>{const[be,...fe]=B().map(Te=>Te.ref.current),[_e]=fe.slice(-1),ve=document.activeElement;for(const Te of X)if(Te===ve||(Te==null||Te.scrollIntoView({block:"nearest"}),Te===be&&k&&(k.scrollTop=0),Te===_e&&k&&(k.scrollTop=k.scrollHeight),Te==null||Te.focus(),document.activeElement!==ve))return},[B,k]),$=p.useCallback(()=>C([N,x]),[C,N,x]);p.useEffect(()=>{ae&&$()},[ae,$]);const{onOpenChange:E,triggerPointerDownPosRef:A}=y;p.useEffect(()=>{if(x){let X={x:0,y:0};const be=_e=>{var ve,Te,Be,Ot;X={x:Math.abs(Math.round(_e.pageX)-((ve=(Te=A.current)===null||Te===void 0?void 0:Te.x)!==null&&ve!==void 0?ve:0)),y:Math.abs(Math.round(_e.pageY)-((Be=(Ot=A.current)===null||Ot===void 0?void 0:Ot.y)!==null&&Be!==void 0?Be:0))}},fe=_e=>{X.x<=10&&X.y<=10?_e.preventDefault():x.contains(_e.target)||E(!1),document.removeEventListener("pointermove",be),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",be),document.addEventListener("pointerup",fe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",be),document.removeEventListener("pointerup",fe,{capture:!0})}}},[x,E,A]),p.useEffect(()=>{const X=()=>E(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[E]);const[R,z]=DE(X=>{const be=B().filter(ve=>!ve.disabled),fe=be.find(ve=>ve.ref.current===document.activeElement),_e=IE(be,X,fe);_e&&setTimeout(()=>_e.ref.current.focus())}),V=p.useCallback((X,be,fe)=>{const _e=!G.current&&!fe;(y.value!==void 0&&y.value===be||_e)&&(D(X),_e&&(G.current=!0))},[y.value]),ie=p.useCallback(()=>x==null?void 0:x.focus(),[x]),ne=p.useCallback((X,be,fe)=>{const _e=!G.current&&!fe;(y.value!==void 0&&y.value===be||_e)&&j(X)},[y.value]),Ce=r==="popper"?M0:zA,we=Ce===M0?{side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:m,hideWhenDetached:g,avoidCollisions:S}:{};return p.createElement(OE,{scope:n,content:x,viewport:k,onViewportChange:b,itemRefCallback:V,selectedItem:N,onItemLeave:ie,itemTextRefCallback:ne,focusSelectedItem:$,selectedItemText:O,position:r,isPositioned:ae,searchRef:R},p.createElement(EA,{as:Tl,allowPinchZoom:!0},p.createElement(AO,{asChild:!0,trapped:y.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:He(o,X=>{var be;(be=y.trigger)===null||be===void 0||be.focus({preventScroll:!0}),X.preventDefault()})},p.createElement(NO,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},p.createElement(Ce,te({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:X=>X.preventDefault()},v,we,{onPlaced:()=>H(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:He(v.onKeyDown,X=>{const be=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!be&&X.key.length===1&&z(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let _e=B().filter(ve=>!ve.disabled).map(ve=>ve.ref.current);if(["ArrowUp","End"].includes(X.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const ve=X.target,Te=_e.indexOf(ve);_e=_e.slice(Te+1)}setTimeout(()=>C(_e)),X.preventDefault()}})}))))))}),zA=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Oi(Ml,n),l=Rd(Ml,n),[s,a]=p.useState(null),[u,c]=p.useState(null),d=Qe(t,T=>c(T)),f=Am(n),h=p.useRef(!1),m=p.useRef(!0),{viewport:g,selectedItem:S,selectedItemText:v,focusSelectedItem:y}=l,x=p.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&g&&S&&v){const T=i.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),O=v.getBoundingClientRect();if(i.dir!=="rtl"){const ve=O.left-N.left,Te=D.left-ve,Be=T.left-Te,Ot=T.width+Be,un=Math.max(Ot,N.width),On=window.innerWidth-Or,Ne=Dh(Te,[Or,On-un]);s.style.minWidth=Ot+"px",s.style.left=Ne+"px"}else{const ve=N.right-O.right,Te=window.innerWidth-D.right-ve,Be=window.innerWidth-T.right-Te,Ot=T.width+Be,un=Math.max(Ot,N.width),On=window.innerWidth-Or,Ne=Dh(Te,[Or,On-un]);s.style.minWidth=Ot+"px",s.style.right=Ne+"px"}const j=f(),B=window.innerHeight-Or*2,ae=g.scrollHeight,H=window.getComputedStyle(u),G=parseInt(H.borderTopWidth,10),C=parseInt(H.paddingTop,10),$=parseInt(H.borderBottomWidth,10),E=parseInt(H.paddingBottom,10),A=G+C+ae+E+$,R=Math.min(S.offsetHeight*5,A),z=window.getComputedStyle(g),V=parseInt(z.paddingTop,10),ie=parseInt(z.paddingBottom,10),ne=T.top+T.height/2-Or,Ce=B-ne,we=S.offsetHeight/2,X=S.offsetTop+we,be=G+C+X,fe=A-be;if(be<=ne){const ve=S===j[j.length-1].ref.current;s.style.bottom="0px";const Te=u.clientHeight-g.offsetTop-g.offsetHeight,Be=Math.max(Ce,we+(ve?ie:0)+Te+$),Ot=be+Be;s.style.height=Ot+"px"}else{const ve=S===j[0].ref.current;s.style.top="0px";const Be=Math.max(ne,G+g.offsetTop+(ve?V:0)+we)+fe;s.style.height=Be+"px",g.scrollTop=be-ne+g.offsetTop}s.style.margin=`${Or}px 0`,s.style.minHeight=R+"px",s.style.maxHeight=B+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,i.trigger,i.valueNode,s,u,g,S,v,i.dir,r]);Tn(()=>x(),[x]);const[w,k]=p.useState();Tn(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const b=p.useCallback(T=>{T&&m.current===!0&&(x(),y==null||y(),m.current=!1)},[x,y]);return p.createElement(FA,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:b},p.createElement("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},p.createElement(Le.div,te({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),M0=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Or,...i}=e,l=Mm(n);return p.createElement(L5,te({},l,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[FA,BA]=es(Ml,{}),L0="SelectViewport",WA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Rd(L0,n),i=BA(L0,n),l=Qe(t,o.onViewportChange),s=p.useRef(0);return p.createElement(p.Fragment,null,p.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),p.createElement(Nd.Slot,{scope:n},p.createElement(Le.div,te({"data-radix-select-viewport":"",role:"presentation"},r,{ref:l,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:He(r.onScroll,a=>{const u=a.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:d}=i;if(d!=null&&d.current&&c){const f=Math.abs(s.current-u.scrollTop);if(f>0){const h=window.innerHeight-Or*2,m=parseFloat(c.style.minHeight),g=parseFloat(c.style.height),S=Math.max(m,g);if(S<h){const v=S+f,y=Math.min(h,v),x=v-y;c.style.height=y+"px",c.style.bottom==="0px"&&(u.scrollTop=x>0?x:0,c.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),UA="SelectGroup",[W4,VA]=es(UA),HA="SelectLabel",KA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=VA(HA,n);return p.createElement(Le.div,te({id:o.id},r,{ref:t}))}),Rp="SelectItem",[GA,AE]=es(Rp),YA=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...l}=e,s=Oi(Rp,n),a=Rd(Rp,n),u=s.value===r,[c,d]=p.useState(i??""),[f,h]=p.useState(!1),m=Qe(t,v=>{var y;return(y=a.itemRefCallback)===null||y===void 0?void 0:y.call(a,v,r,o)}),g=Cd(),S=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.createElement(GA,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:p.useCallback(v=>{d(y=>{var x;return y||((x=v==null?void 0:v.textContent)!==null&&x!==void 0?x:"").trim()})},[])},p.createElement(Nd.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},p.createElement(Le.div,te({role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},l,{ref:m,onFocus:He(l.onFocus,()=>h(!0)),onBlur:He(l.onBlur,()=>h(!1)),onPointerUp:He(l.onPointerUp,S),onPointerMove:He(l.onPointerMove,v=>{if(o){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}else v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:He(l.onPointerLeave,v=>{if(v.currentTarget===document.activeElement){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}}),onKeyDown:He(l.onKeyDown,v=>{var y;((y=a.searchRef)===null||y===void 0?void 0:y.current)!==""&&v.key===" "||($A.includes(v.key)&&S(),v.key===" "&&v.preventDefault())})}))))}),ku="SelectItemText",XA=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,l=Oi(ku,n),s=Rd(ku,n),a=AE(ku,n),u=NA(ku,n),[c,d]=p.useState(null),f=Qe(t,v=>d(v),a.onItemTextChange,v=>{var y;return(y=s.itemTextRefCallback)===null||y===void 0?void 0:y.call(s,v,a.value,a.disabled)}),h=c==null?void 0:c.textContent,m=p.useMemo(()=>p.createElement("option",{key:a.value,value:a.value,disabled:a.disabled},h),[a.disabled,a.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:S}=u;return Tn(()=>(g(m),()=>S(m)),[g,S,m]),p.createElement(p.Fragment,null,p.createElement(Le.span,te({id:a.textId},i,{ref:f})),a.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Gr.createPortal(i.children,l.valueNode):null)}),QA="SelectItemIndicator",JA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return AE(QA,n).isSelected?p.createElement(Le.span,te({"aria-hidden":!0},r,{ref:t})):null}),ZA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.createElement(Le.div,te({"aria-hidden":!0},r,{ref:t}))});function ME(e){return e===""||e===void 0}const LE=p.forwardRef((e,t)=>{const{value:n,...r}=e,o=p.useRef(null),i=Qe(t,o),l=SE(n);return p.useEffect(()=>{const s=o.current,a=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(l!==n&&c){const d=new Event("change",{bubbles:!0});c.call(s,n),s.dispatchEvent(d)}},[l,n]),p.createElement(j5,{asChild:!0},p.createElement("select",te({},r,{ref:i,defaultValue:n})))});LE.displayName="BubbleSelect";function DE(e){const t=Kt(e),n=p.useRef(""),r=p.useRef(0),o=p.useCallback(l=>{const s=n.current+l;t(s),function a(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>a(""),1e3))}(s)},[t]),i=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function IE(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=qA(e,Math.max(i,0));o.length===1&&(l=l.filter(u=>u!==n));const a=l.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}function qA(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const e3=RA,jE=OA,t3=MA,n3=LA,r3=DA,zE=IA,o3=WA,FE=KA,BE=YA,i3=XA,l3=JA,WE=ZA,s3=e3,a3=t3,UE=p.forwardRef(({className:e,children:t,...n},r)=>_.jsxs(jE,{ref:r,className:it("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:[t,_.jsx(n3,{asChild:!0,children:_.jsx(tE,{className:"w-4 h-4 opacity-50"})})]}));UE.displayName=jE.displayName;const VE=p.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>_.jsx(r3,{children:_.jsx(zE,{ref:o,className:it("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:_.jsx(o3,{className:it("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));VE.displayName=zE.displayName;const u3=p.forwardRef(({className:e,...t},n)=>_.jsx(FE,{ref:n,className:it("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));u3.displayName=FE.displayName;const HE=p.forwardRef(({className:e,children:t,...n},r)=>_.jsxs(BE,{ref:r,className:it("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[_.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:_.jsx(l3,{children:_.jsx(sO,{className:"w-4 h-4"})})}),_.jsx(i3,{children:t})]}));HE.displayName=BE.displayName;const c3=p.forwardRef(({className:e,...t},n)=>_.jsx(WE,{ref:n,className:it("-mx-1 my-1 h-px bg-muted",e),...t}));c3.displayName=WE.displayName;function KE({path:e,disabled:t,source:n,schema:r,registerPatchCallback:o,onSubmit:i}){return(typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="string"?_.jsx(g3,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i}):(typeof n=="number"||n===null)&&(r==null?void 0:r.type)==="number"?_.jsx(p3,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i}):(typeof n=="number"||typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="keyOf"?_.jsx(h3,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i,selector:r.selector}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="richtext"?_.jsx(f3,{registerPatchCallback:o,onSubmit:i,defaultValue:n}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="image"?_.jsx(d3,{path:e,registerPatchCallback:o,onSubmit:i,defaultValue:n}):_.jsxs("div",{children:["Unsupported schema: ",r.type]})}function D0(e,t,n,r){if(!t||!r)return[];const o=r.sha256.slice(0,5),i=function(){const l=Ug(t)??"unknown",s=Vg(l);return n?`/public/${n.split(".").slice(0,-1).join(".")||n}_${o}.${s}`:`/public/${r.sha256}.${s}`}();return[{value:{[gn]:i,[Yt]:"file",metadata:r},op:"replace",path:e},{value:t,op:"file",path:e,filePath:i}]}function d3({path:e,defaultValue:t,onSubmit:n,registerPatchCallback:r}){const[o,i]=p.useState(null),[l,s]=p.useState(!1),[a,u]=p.useState(),[c,d]=p.useState();return p.useEffect(()=>{d(t&&En.convertFileSource(t).url)},[t]),p.useEffect(()=>{r&&r(async f=>D0(f,(o==null?void 0:o.src)??null,(o==null?void 0:o.filename)??null,a))},[o,t]),_.jsxs("div",{className:"max-w-4xl p-4",children:[_.jsxs("label",{htmlFor:`img_input:${e}`,className:"",children:[o||c?_.jsx("img",{src:(o==null?void 0:o.src)||c}):_.jsx("div",{children:"Empty"}),_.jsx("input",{id:`img_input:${e}`,type:"file",hidden:!0,onChange:f=>{QS(f).then(h=>{i({src:h.src,filename:h.filename}),h.width&&h.height?u({sha256:h.sha256,width:h.width,height:h.height}):u(void 0)}).catch(h=>{console.error(h.message),i(null),u(void 0)})}})]}),n&&_.jsx("div",{children:o&&_.jsx(Jl,{disabled:l,onClick:()=>{s(!0),n(f=>Promise.resolve(D0(f,o.src,o.filename??null,a))).finally(()=>{s(!1),i(null),u(void 0)})},children:l?"Saving...":"Submit"})})]},e)}async function I0(e,t){const{templateStrings:n,exprs:r,files:o}=t?await DN(t.getEditorState().toJSON().root):{[Yt]:"richtext",templateStrings:[""],exprs:[],files:{}};return[{op:"replace",path:e,value:{templateStrings:n,exprs:r,[Yt]:"richtext"}},...Object.entries(o).map(([i,l])=>({op:"file",path:e,filePath:i,value:l}))]}function f3({defaultValue:e,onSubmit:t,registerPatchCallback:n}){const[r,o]=p.useState(null),[i,l]=p.useState(!1),[s,a]=p.useState(!1);return p.useEffect(()=>{r&&(l(!1),r.registerTextContentListener(()=>{l(!0)}),r.registerDecoratorListener(()=>{l(!0)}))},[r]),p.useEffect(()=>{r&&n&&n(u=>I0(u,r))},[r]),_.jsxs("div",{className:"p-4 border rounded border-card",children:[_.jsx(oO,{onEditor:u=>{o(u)},richtext:e||{children:[],[Yt]:"root"}}),t&&_.jsx("div",{children:i&&_.jsx(Jl,{disabled:s||!r,onClick:()=>{r&&(a(!0),t(u=>I0(u,r)).finally(()=>{a(!1),l(!1)}))},children:s?"Saving...":"Submit"})})]})}function h3({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r,selector:o}){const i=DM(o),s=(h=>Array.isArray(h.moduleSource)?{type:"number",values:Object.keys(h.moduleSource).map(m=>parseInt(m))}:{type:"string",values:Object.keys(h.moduleSource??["ERROR fetching source"])})(i),[a,u]=p.useState(t??s.values[0]),[c,d]=p.useState(!1);p.useEffect(()=>{d(e)},[e]);const f=h=>{if(s.type==="number"){if(h==="")throw new Error("Value cannot be empty");if(Number.isNaN(Number(h)))throw new Error("Value was not a number: "+JSON.stringify(h));return Number(h)}return h};return p.useEffect(()=>{n&&n(async h=>[{op:"replace",path:h,value:a}])},[a]),_.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[_.jsxs(s3,{defaultValue:a.toString(),disabled:c,onValueChange:h=>{u(f(h))},children:[_.jsx(UE,{children:_.jsx(a3,{placeholder:"Select a value"})}),_.jsx(VE,{children:s.values.map(h=>_.jsx(HE,{value:h.toString(),children:h.toString()},h))})]}),r&&_.jsx("div",{children:t!==a&&_.jsx(Jl,{disabled:c,onClick:()=>{d(!0),r(async h=>[{op:"replace",path:h,value:a}]).finally(()=>{d(!1)})},children:c?"Saving...":"Submit"})})]})}function p3({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r}){const[o,i]=p.useState(t||0),[l,s]=p.useState(!1);p.useEffect(()=>{s(e)},[e]);const a=p.useRef(null);return p.useEffect(()=>{n&&n(async u=>{var c;return[{op:"replace",path:u,value:Number((c=a.current)==null?void 0:c.value)||0}]})},[]),_.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[_.jsx(km,{ref:a,disabled:l,defaultValue:o??0,onChange:u=>i(Number(u.target.value)),type:"number"}),r&&_.jsx("div",{children:t!==o&&_.jsx(Jl,{disabled:l,onClick:()=>{s(!0),r(async u=>{var c;return[{op:"replace",path:u,value:Number((c=a.current)==null?void 0:c.value)||0}]}).finally(()=>{s(!1)})},children:l?"Saving...":"Submit"})})]})}function g3({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r}){const[o,i]=p.useState(t||""),[l,s]=p.useState(!1);p.useEffect(()=>{s(e)},[e]);const a=p.useRef(null);return p.useEffect(()=>{n&&n(async u=>{var c;return[{op:"replace",path:u,value:((c=a.current)==null?void 0:c.value)||""}]})},[]),_.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[_.jsx(km,{ref:a,disabled:l,defaultValue:o??"",onChange:u=>i(u.target.value)}),r&&_.jsx("div",{children:t!==o&&_.jsx(Jl,{disabled:l,onClick:()=>{s(!0),r(async u=>{var c;return[{op:"replace",path:u,value:((c=a.current)==null?void 0:c.value)||""}]}).finally(()=>{s(!1)})},children:l?"Saving...":"Submit"})})]})}const m3=({className:e})=>_.jsxs("svg",{width:"58",height:"34",viewBox:"0 0 58 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[_.jsx("g",{filter:"url(#filter0_d_21_1677)",children:_.jsx("path",{d:"M5 5.36426C5 5.16309 5.16309 5 5.36426 5H17.6581C17.8593 5 18.0223 5.16309 18.0223 5.36426V28.4949C18.0223 28.696 17.8593 28.8591 17.6581 28.8591H5.36426C5.16309 28.8591 5 28.696 5 28.4949V5.36426Z",fill:"#38CD98"})}),_.jsx("g",{filter:"url(#filter1_i_21_1677)",children:_.jsx("circle",{cx:"11.4656",cy:"23.7595",r:"2.18557",fill:"currentColor"})}),_.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M52.8588 23.839H48.7257H48.537H48.1128C47.6715 23.839 47.4508 23.5942 47.4508 23.1044V13.7293C47.4508 13.5784 47.3285 13.4561 47.1777 13.4561H45.8118C45.6609 13.4561 45.5386 13.5784 45.5386 13.7293V15.1836C45.5386 15.2844 45.4569 15.3661 45.3561 15.3661C45.2876 15.3661 45.225 15.3275 45.1924 15.2672C44.805 14.5503 44.283 14.02 43.6264 13.6765C42.9563 13.301 42.2045 13.1132 41.3709 13.1132C40.6028 13.1132 39.8755 13.252 39.189 13.5295C38.5026 13.8071 37.8979 14.2152 37.3748 14.7539C36.8682 15.2764 36.4678 15.9212 36.1736 16.6885C35.8794 17.4558 35.7323 18.3374 35.7323 19.3332V19.725C35.7323 20.7372 35.8794 21.627 36.1736 22.3942C36.4678 23.1615 36.8682 23.8146 37.3748 24.3533C37.8979 24.8757 38.5026 25.2757 39.189 25.5532C39.8755 25.8144 40.6191 25.945 41.42 25.945C42.1881 25.945 42.9154 25.7491 43.6019 25.3573C44.2751 24.982 44.8058 24.4119 45.1941 23.6471C45.2255 23.5852 45.2886 23.5452 45.358 23.5452H45.3917C45.4728 23.5452 45.5386 23.611 45.5386 23.6921C45.5386 23.7904 45.544 23.8856 45.5547 23.9777V25.1392C45.5547 25.3904 45.7584 25.5941 46.0096 25.5941H47.2261C47.2914 25.5995 47.3581 25.6022 47.4263 25.6022H48.537H48.7257H57.7268C57.8777 25.6022 58 25.4799 58 25.329V24.1122C58 23.9614 57.8777 23.839 57.7268 23.839H55.3174C55.1665 23.839 55.0442 23.7167 55.0442 23.5659V8.73368C55.0442 8.58279 54.9219 8.46048 54.771 8.46048H50.5054C50.3545 8.46048 50.2322 8.58279 50.2322 8.73368V9.95043C50.2322 10.1013 50.3545 10.2236 50.5054 10.2236H52.8588C53.0097 10.2236 53.132 10.3459 53.132 10.4968V23.5659C53.132 23.7167 53.0097 23.839 52.8588 23.839ZM41.6161 24.1329C42.1881 24.1329 42.7111 24.0268 43.1851 23.8146C43.6754 23.6023 44.0922 23.3003 44.4354 22.9085C44.7786 22.5167 45.0483 22.0514 45.2444 21.5127C45.4406 20.9576 45.5386 20.3454 45.5386 19.6761V19.3822C45.5386 18.7292 45.4406 18.1333 45.2444 17.5946C45.0483 17.0395 44.7705 16.5661 44.4109 16.1743C44.0677 15.7824 43.6509 15.4804 43.1606 15.2682C42.6866 15.0396 42.1718 14.9254 41.6161 14.9254C41.044 14.9254 40.521 15.0315 40.0471 15.2437C39.5731 15.4559 39.1563 15.758 38.7968 16.1498C38.4535 16.5252 38.1839 16.9905 37.9877 17.5456C37.7916 18.0843 37.6936 18.6802 37.6936 19.3332V19.725C37.6936 21.1127 38.0531 22.1983 38.7722 22.982C39.5077 23.7493 40.4557 24.1329 41.6161 24.1329ZM31.1115 25.4191C31.0732 25.5287 30.9698 25.6022 30.8536 25.6022H27.4661C27.35 25.6022 27.2465 25.5287 27.2082 25.4191L23.1578 13.8193C23.0958 13.6417 23.2276 13.4561 23.4157 13.4561H25.089C25.2068 13.4561 25.3114 13.5316 25.3484 13.6435L28.9666 24.581C28.9942 24.6643 29.0721 24.7206 29.1599 24.7206C29.2477 24.7206 29.3256 24.6643 29.3532 24.581L32.9714 13.6435C33.0084 13.5316 33.1129 13.4561 33.2308 13.4561H34.9041C35.0922 13.4561 35.224 13.6417 35.162 13.8193L31.1115 25.4191Z",fill:"currentColor"}),_.jsxs("defs",{children:[_.jsxs("filter",{id:"filter0_d_21_1677",x:"0.124722",y:"0.124722",width:"22.7729",height:"33.6097",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[_.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),_.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),_.jsx("feOffset",{}),_.jsx("feGaussianBlur",{stdDeviation:"2.43764"}),_.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),_.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.219608 0 0 0 0 0.803922 0 0 0 0 0.501961 0 0 0 0.3 0"}),_.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_21_1677"}),_.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_21_1677",result:"shape"})]}),_.jsxs("filter",{id:"filter1_i_21_1677",x:"9.28003",y:"21.5739",width:"4.37112",height:"4.37112",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[_.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),_.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),_.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),_.jsx("feOffset",{}),_.jsx("feGaussianBlur",{stdDeviation:"0.546392"}),_.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),_.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.219608 0 0 0 0 0.803922 0 0 0 0 0.501961 0 0 0 0.3 0"}),_.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_21_1677"})]})]})]}),GE=m3,YE="Switch",[v3,U4]=Ti(YE),[y3,x3]=v3(YE),w3=p.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:l,disabled:s,value:a="on",onCheckedChange:u,...c}=e,[d,f]=p.useState(null),h=Qe(t,y=>f(y)),m=p.useRef(!1),g=d?!!d.closest("form"):!0,[S=!1,v]=Al({prop:o,defaultProp:i,onChange:u});return p.createElement(y3,{scope:n,checked:S,disabled:s},p.createElement(Le.button,te({type:"button",role:"switch","aria-checked":S,"aria-required":l,"data-state":XE(S),"data-disabled":s?"":void 0,disabled:s,value:a},c,{ref:h,onClick:He(e.onClick,y=>{v(x=>!x),g&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})),g&&p.createElement(E3,{control:d,bubbles:!m.current,name:r,value:a,checked:S,required:l,disabled:s,style:{transform:"translateX(-100%)"}}))}),_3="SwitchThumb",S3=p.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=x3(_3,n);return p.createElement(Le.span,te({"data-state":XE(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),E3=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=p.useRef(null),l=SE(n),s=gE(t);return p.useEffect(()=>{const a=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(l!==n&&d){const f=new Event("click",{bubbles:r});d.call(a,n),a.dispatchEvent(f)}},[l,n,r]),p.createElement("input",te({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function XE(e){return e?"checked":"unchecked"}const QE=w3,C3=S3,Pp=p.forwardRef(({className:e,...t},n)=>_.jsx(QE,{className:it("peer inline-flex h-[22px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=unchecked]:bg-primary",e),...t,ref:n,children:_.jsx(C3,{className:it("pointer-events-none block h-[18px] w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Pp.displayName=QE.displayName;const Lm=p.forwardRef(({className:e,...t},n)=>_.jsx("div",{ref:n,className:it("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Lm.displayName="Card";const $3=p.forwardRef(({className:e,...t},n)=>_.jsx("div",{ref:n,className:it("flex flex-col space-y-1.5 p-6",e),...t}));$3.displayName="CardHeader";const k3=p.forwardRef(({className:e,...t},n)=>_.jsx("h3",{ref:n,className:it("text-2xl font-semibold leading-none tracking-tight",e),...t}));k3.displayName="CardTitle";const T3=p.forwardRef(({className:e,...t},n)=>_.jsx("p",{ref:n,className:it("text-sm text-muted-foreground",e),...t}));T3.displayName="CardDescription";const b3=p.forwardRef(({className:e,...t},n)=>_.jsx("div",{ref:n,className:it("p-6 pt-0",e),...t}));b3.displayName="CardContent";const N3=p.forwardRef(({className:e,...t},n)=>_.jsx("div",{ref:n,className:it("flex items-center p-6 pt-0",e),...t}));N3.displayName="CardFooter";/**
169
+ * @remix-run/router v1.11.0
170
+ *
171
+ * Copyright (c) Remix Software Inc.
172
+ *
173
+ * This source code is licensed under the MIT license found in the
174
+ * LICENSE.md file in the root directory of this source tree.
175
+ *
176
+ * @license MIT
177
+ */function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ot.apply(this,arguments)}var st;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(st||(st={}));const j0="popstate";function R3(e){e===void 0&&(e={});function t(r,o){let{pathname:i,search:l,hash:s}=r.location;return $a("",{pathname:i,search:l,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Ua(o)}return O3(t,n,null,e)}function Se(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function P3(){return Math.random().toString(36).substr(2,8)}function z0(e,t){return{usr:e.state,key:e.key,idx:t}}function $a(e,t,n,r){return n===void 0&&(n=null),ot({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?qr(t):t,{state:n,key:t&&t.key||r||P3()})}function Ua(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function qr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function O3(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,l=o.history,s=st.Pop,a=null,u=c();u==null&&(u=0,l.replaceState(ot({},l.state,{idx:u}),""));function c(){return(l.state||{idx:null}).idx}function d(){s=st.Pop;let S=c(),v=S==null?null:S-u;u=S,a&&a({action:s,location:g.location,delta:v})}function f(S,v){s=st.Push;let y=$a(g.location,S,v);n&&n(y,S),u=c()+1;let x=z0(y,u),w=g.createHref(y);try{l.pushState(x,"",w)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(w)}i&&a&&a({action:s,location:g.location,delta:1})}function h(S,v){s=st.Replace;let y=$a(g.location,S,v);n&&n(y,S),u=c();let x=z0(y,u),w=g.createHref(y);l.replaceState(x,"",w),i&&a&&a({action:s,location:g.location,delta:0})}function m(S){let v=o.location.origin!=="null"?o.location.origin:o.location.href,y=typeof S=="string"?S:Ua(S);return Se(v,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,v)}let g={get action(){return s},get location(){return e(o,l)},listen(S){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(j0,d),a=S,()=>{o.removeEventListener(j0,d),a=null}},createHref(S){return t(o,S)},createURL:m,encodeLocation(S){let v=m(S);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(S){return l.go(S)}};return g}var at;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(at||(at={}));const A3=new Set(["lazy","caseSensitive","path","id","index","children"]);function M3(e){return e.index===!0}function Op(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,i)=>{let l=[...n,i],s=typeof o.id=="string"?o.id:l.join("-");if(Se(o.index!==!0||!o.children,"Cannot specify children on an index route"),Se(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),M3(o)){let a=ot({},o,t(o),{id:s});return r[s]=a,a}else{let a=ot({},o,t(o),{id:s,children:void 0});return r[s]=a,o.children&&(a.children=Op(o.children,t,l,r)),a}})}function ll(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?qr(t):t,o=Va(r.pathname||"/",n);if(o==null)return null;let i=JE(e);D3(i);let l=null;for(let s=0;l==null&&s<i.length;++s)l=H3(i[s],Y3(o));return l}function L3(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function JE(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,l,s)=>{let a={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};a.relativePath.startsWith("/")&&(Se(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=bo([r,a.relativePath]),c=n.concat(a);i.children&&i.children.length>0&&(Se(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),JE(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:U3(u,i.index),routesMeta:c})};return e.forEach((i,l)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,l);else for(let a of ZE(i.path))o(i,l,a)}),t}function ZE(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let l=ZE(r.join("/")),s=[];return s.push(...l.map(a=>a===""?i:[i,a].join("/"))),o&&s.push(...l),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function D3(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:V3(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const I3=/^:\w+$/,j3=3,z3=2,F3=1,B3=10,W3=-2,F0=e=>e==="*";function U3(e,t){let n=e.split("/"),r=n.length;return n.some(F0)&&(r+=W3),t&&(r+=z3),n.filter(o=>!F0(o)).reduce((o,i)=>o+(I3.test(i)?j3:i===""?F3:B3),r)}function V3(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function H3(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let l=0;l<n.length;++l){let s=n[l],a=l===n.length-1,u=o==="/"?t:t.slice(o.length)||"/",c=K3({path:s.relativePath,caseSensitive:s.caseSensitive,end:a},u);if(!c)return null;Object.assign(r,c.params);let d=s.route;i.push({params:r,pathname:bo([o,c.pathname]),pathnameBase:Z3(bo([o,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(o=bo([o,c.pathnameBase]))}return i}function K3(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=G3(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],l=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let g=s[d]||"";l=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[d];return h&&!m?u[f]=void 0:u[f]=X3(m||"",f),u},{}),pathname:i,pathnameBase:l,pattern:e}}function G3(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),wi(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(l,s,a)=>(r.push({paramName:s,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Y3(e){try{return decodeURI(e)}catch(t){return wi(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function X3(e,t){try{return decodeURIComponent(e)}catch(n){return wi(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Va(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Q3(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?qr(e):e;return{pathname:n?n.startsWith("/")?n:J3(n,t):t,search:q3(r),hash:eM(o)}}function J3(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Mf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Dm(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function qE(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=qr(e):(o=ot({},e),Se(!o.pathname||!o.pathname.includes("?"),Mf("?","pathname","search",o)),Se(!o.pathname||!o.pathname.includes("#"),Mf("#","pathname","hash",o)),Se(!o.search||!o.search.includes("#"),Mf("#","search","hash",o)));let i=e===""||o.pathname==="",l=i?"/":o.pathname,s;if(r||l==null)s=n;else{let d=t.length-1;if(l.startsWith("..")){let f=l.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}s=d>=0?t[d]:"/"}let a=Q3(o,s),u=l&&l!=="/"&&l.endsWith("/"),c=(i||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const bo=e=>e.join("/").replace(/\/\/+/g,"/"),Z3=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),q3=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,eM=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Im{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function eC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const tC=["post","put","patch","delete"],tM=new Set(tC),nM=["get",...tC],rM=new Set(nM),oM=new Set([301,302,303,307,308]),iM=new Set([307,308]),Lf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},lM={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ps={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},nC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sM=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),rC="remix-router-transitions";function aM(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Se(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let P=e.detectErrorBoundary;o=L=>({hasErrorBoundary:P(L)})}else o=sM;let i={},l=Op(e.routes,o,void 0,i),s,a=e.basename||"/",u=ot({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,d=new Set,f=null,h=null,m=null,g=e.hydrationData!=null,S=ll(l,e.history.location,a),v=null;if(S==null){let P=An(404,{pathname:e.history.location.pathname}),{matches:L,route:F}=Y0(l);S=L,v={[F.id]:P}}let y=!S.some(P=>P.route.lazy)&&(!S.some(P=>P.route.loader)||e.hydrationData!=null),x,w={historyAction:e.history.action,location:e.history.location,matches:S,initialized:y,navigation:Lf,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||v,fetchers:new Map,blockers:new Map},k=st.Pop,b=!1,T,N=!1,D=new Map,O=null,j=!1,B=!1,ae=[],H=[],G=new Map,C=0,$=-1,E=new Map,A=new Set,R=new Map,z=new Map,V=new Set,ie=new Map,ne=new Map,Ce=!1;function we(){if(c=e.history.listen(P=>{let{action:L,location:F,delta:Q}=P;if(Ce){Ce=!1;return}wi(ne.size===0||Q!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let se=Gm({currentLocation:w.location,nextLocation:F,historyAction:L});if(se&&Q!=null){Ce=!0,e.history.go(Q*-1),Ka(se,{state:"blocked",location:F,proceed(){Ka(se,{state:"proceeding",proceed:void 0,reset:void 0,location:F}),e.history.go(Q)},reset(){let ue=new Map(w.blockers);ue.set(se,ps),fe({blockers:ue})}});return}return Be(L,F)}),n){xM(t,D);let P=()=>wM(t,D);t.addEventListener("pagehide",P),O=()=>t.removeEventListener("pagehide",P)}return w.initialized||Be(st.Pop,w.location),x}function X(){c&&c(),O&&O(),d.clear(),T&&T.abort(),w.fetchers.forEach((P,L)=>At(L)),w.blockers.forEach((P,L)=>Km(L))}function be(P){return d.add(P),()=>d.delete(P)}function fe(P,L){w=ot({},w,P);let F=[],Q=[];u.v7_fetcherPersist&&w.fetchers.forEach((se,ue)=>{se.state==="idle"&&(V.has(ue)?Q.push(ue):F.push(ue))}),d.forEach(se=>se(w,{deletedFetchers:Q,unstable_viewTransitionOpts:L})),u.v7_fetcherPersist&&(F.forEach(se=>w.fetchers.delete(se)),Q.forEach(se=>At(se)))}function _e(P,L){var F,Q;let se=w.actionData!=null&&w.navigation.formMethod!=null&&Jn(w.navigation.formMethod)&&w.navigation.state==="loading"&&((F=P.state)==null?void 0:F._isRedirect)!==!0,ue;L.actionData?Object.keys(L.actionData).length>0?ue=L.actionData:ue=null:se?ue=w.actionData:ue=null;let pe=L.loaderData?G0(w.loaderData,L.loaderData,L.matches||[],L.errors):w.loaderData,ce=w.blockers;ce.size>0&&(ce=new Map(ce),ce.forEach((Je,$e)=>ce.set($e,ps)));let le=b===!0||w.navigation.formMethod!=null&&Jn(w.navigation.formMethod)&&((Q=P.state)==null?void 0:Q._isRedirect)!==!0;s&&(l=s,s=void 0),j||k===st.Pop||(k===st.Push?e.history.push(P,P.state):k===st.Replace&&e.history.replace(P,P.state));let De;if(k===st.Pop){let Je=D.get(w.location.pathname);Je&&Je.has(P.pathname)?De={currentLocation:w.location,nextLocation:P}:D.has(P.pathname)&&(De={currentLocation:P,nextLocation:w.location})}else if(N){let Je=D.get(w.location.pathname);Je?Je.add(P.pathname):(Je=new Set([P.pathname]),D.set(w.location.pathname,Je)),De={currentLocation:w.location,nextLocation:P}}fe(ot({},L,{actionData:ue,loaderData:pe,historyAction:k,location:P,initialized:!0,navigation:Lf,revalidation:"idle",restoreScrollPosition:Xm(P,L.matches||w.matches),preventScrollReset:le,blockers:ce}),De),k=st.Pop,b=!1,N=!1,j=!1,B=!1,ae=[],H=[]}async function ve(P,L){if(typeof P=="number"){e.history.go(P);return}let F=Ap(w.location,w.matches,a,u.v7_prependBasename,P,L==null?void 0:L.fromRouteId,L==null?void 0:L.relative),{path:Q,submission:se,error:ue}=B0(u.v7_normalizeFormMethod,!1,F,L),pe=w.location,ce=$a(w.location,Q,L&&L.state);ce=ot({},ce,e.history.encodeLocation(ce));let le=L&&L.replace!=null?L.replace:void 0,De=st.Push;le===!0?De=st.Replace:le===!1||se!=null&&Jn(se.formMethod)&&se.formAction===w.location.pathname+w.location.search&&(De=st.Replace);let Je=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,$e=Gm({currentLocation:pe,nextLocation:ce,historyAction:De});if($e){Ka($e,{state:"blocked",location:ce,proceed(){Ka($e,{state:"proceeding",proceed:void 0,reset:void 0,location:ce}),ve(P,L)},reset(){let Ie=new Map(w.blockers);Ie.set($e,ps),fe({blockers:Ie})}});return}return await Be(De,ce,{submission:se,pendingError:ue,preventScrollReset:Je,replace:L&&L.replace,enableViewTransition:L&&L.unstable_viewTransition})}function Te(){if(jt(),fe({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Be(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Be(k||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation})}}async function Be(P,L,F){T&&T.abort(),T=null,k=P,j=(F&&F.startUninterruptedRevalidation)===!0,AC(w.location,w.matches),b=(F&&F.preventScrollReset)===!0,N=(F&&F.enableViewTransition)===!0;let Q=s||l,se=F&&F.overrideNavigation,ue=ll(Q,L,a);if(!ue){let Ie=An(404,{pathname:L.pathname}),{matches:gt,route:Ho}=Y0(Q);Id(),_e(L,{matches:gt,loaderData:{},errors:{[Ho.id]:Ie}});return}if(w.initialized&&!B&&hM(w.location,L)&&!(F&&F.submission&&Jn(F.submission.formMethod))){_e(L,{matches:ue});return}T=new AbortController;let pe=ms(e.history,L,T.signal,F&&F.submission),ce,le;if(F&&F.pendingError)le={[Ks(ue).route.id]:F.pendingError};else if(F&&F.submission&&Jn(F.submission.formMethod)){let Ie=await Ot(pe,L,F.submission,ue,{replace:F.replace});if(Ie.shortCircuited)return;ce=Ie.pendingActionData,le=Ie.pendingActionError,se=Df(L,F.submission),pe=new Request(pe.url,{signal:pe.signal})}let{shortCircuited:De,loaderData:Je,errors:$e}=await un(pe,L,ue,se,F&&F.submission,F&&F.fetcherSubmission,F&&F.replace,ce,le);De||(T=null,_e(L,ot({matches:ue},ce?{actionData:ce}:{},{loaderData:Je,errors:$e})))}async function Ot(P,L,F,Q,se){se===void 0&&(se={}),jt();let ue=vM(L,F);fe({navigation:ue});let pe,ce=Lp(Q,L);if(!ce.route.action&&!ce.route.lazy)pe={type:at.error,error:An(405,{method:P.method,pathname:L.pathname,routeId:ce.route.id})};else if(pe=await gs("action",P,ce,Q,i,o,a),P.signal.aborted)return{shortCircuited:!0};if(yl(pe)){let le;return se&&se.replace!=null?le=se.replace:le=pe.location===w.location.pathname+w.location.search,await _t(w,pe,{submission:F,replace:le}),{shortCircuited:!0}}if(Gs(pe)){let le=Ks(Q,ce.route.id);return(se&&se.replace)!==!0&&(k=st.Push),{pendingActionData:{},pendingActionError:{[le.route.id]:pe.error}}}if(ni(pe))throw An(400,{type:"defer-action"});return{pendingActionData:{[ce.route.id]:pe.data}}}async function un(P,L,F,Q,se,ue,pe,ce,le){let De=Q||Df(L,se),Je=se||ue||J0(De),$e=s||l,[Ie,gt]=W0(e.history,w,F,Je,L,B,ae,H,R,A,$e,a,ce,le);if(Id(Ae=>!(F&&F.some(Hn=>Hn.route.id===Ae))||Ie&&Ie.some(Hn=>Hn.route.id===Ae)),$=++C,Ie.length===0&&gt.length===0){let Ae=sr();return _e(L,ot({matches:F,loaderData:{},errors:le||null},ce?{actionData:ce}:{},Ae?{fetchers:new Map(w.fetchers)}:{})),{shortCircuited:!0}}if(!j){gt.forEach(Hn=>{let to=w.fetchers.get(Hn.key),lt=vs(void 0,to?to.data:void 0);w.fetchers.set(Hn.key,lt)});let Ae=ce||w.actionData;fe(ot({navigation:De},Ae?Object.keys(Ae).length===0?{actionData:null}:{actionData:Ae}:{},gt.length>0?{fetchers:new Map(w.fetchers)}:{}))}gt.forEach(Ae=>{G.has(Ae.key)&&zt(Ae.key),Ae.controller&&G.set(Ae.key,Ae.controller)});let Ho=()=>gt.forEach(Ae=>zt(Ae.key));T&&T.signal.addEventListener("abort",Ho);let{results:Ko,loaderResults:ts,fetcherResults:jd}=await vn(w.matches,F,Ie,gt,P);if(P.signal.aborted)return{shortCircuited:!0};T&&T.signal.removeEventListener("abort",Ho),gt.forEach(Ae=>G.delete(Ae.key));let br=X0(Ko);if(br){if(br.idx>=Ie.length){let Ae=gt[br.idx-Ie.length].key;A.add(Ae)}return await _t(w,br.result,{replace:pe}),{shortCircuited:!0}}let{loaderData:eo,errors:Ga}=K0(w,F,Ie,ts,le,gt,jd,ie);ie.forEach((Ae,Hn)=>{Ae.subscribe(to=>{(to||Ae.done)&&ie.delete(Hn)})});let zd=sr(),Fd=Vo($),Bd=zd||Fd||gt.length>0;return ot({loaderData:eo,errors:Ga},Bd?{fetchers:new Map(w.fetchers)}:{})}function On(P){return u.v7_fetcherPersist&&(z.set(P,(z.get(P)||0)+1),V.has(P)&&V.delete(P)),w.fetchers.get(P)||lM}function Ne(P,L,F,Q){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");G.has(P)&&zt(P);let se=s||l,ue=Ap(w.location,w.matches,a,u.v7_prependBasename,F,L,Q==null?void 0:Q.relative),pe=ll(se,ue,a);if(!pe){St(P,L,An(404,{pathname:ue}));return}let{path:ce,submission:le,error:De}=B0(u.v7_normalizeFormMethod,!0,ue,Q);if(De){St(P,L,De);return}let Je=Lp(pe,ce);if(b=(Q&&Q.preventScrollReset)===!0,le&&Jn(le.formMethod)){ht(P,L,ce,Je,pe,le);return}R.set(P,{routeId:L,path:ce}),pt(P,L,ce,Je,pe,le)}async function ht(P,L,F,Q,se,ue){if(jt(),R.delete(P),!Q.route.action&&!Q.route.lazy){let lt=An(405,{method:ue.formMethod,pathname:F,routeId:L});St(P,L,lt);return}let pe=w.fetchers.get(P),ce=yM(ue,pe);w.fetchers.set(P,ce),fe({fetchers:new Map(w.fetchers)});let le=new AbortController,De=ms(e.history,F,le.signal,ue);G.set(P,le);let Je=C,$e=await gs("action",De,Q,se,i,o,a);if(De.signal.aborted){G.get(P)===le&&G.delete(P);return}if(V.has(P)){w.fetchers.set(P,so(void 0)),fe({fetchers:new Map(w.fetchers)});return}if(yl($e))if(G.delete(P),$>Je){let lt=so(void 0);w.fetchers.set(P,lt),fe({fetchers:new Map(w.fetchers)});return}else{A.add(P);let lt=vs(ue);return w.fetchers.set(P,lt),fe({fetchers:new Map(w.fetchers)}),_t(w,$e,{fetcherSubmission:ue})}if(Gs($e)){St(P,L,$e.error);return}if(ni($e))throw An(400,{type:"defer-action"});let Ie=w.navigation.location||w.location,gt=ms(e.history,Ie,le.signal),Ho=s||l,Ko=w.navigation.state!=="idle"?ll(Ho,w.navigation.location,a):w.matches;Se(Ko,"Didn't find any matches after fetcher action");let ts=++C;E.set(P,ts);let jd=vs(ue,$e.data);w.fetchers.set(P,jd);let[br,eo]=W0(e.history,w,Ko,ue,Ie,B,ae,H,R,A,Ho,a,{[Q.route.id]:$e.data},void 0);eo.filter(lt=>lt.key!==P).forEach(lt=>{let ns=lt.key,Qm=w.fetchers.get(ns),LC=vs(void 0,Qm?Qm.data:void 0);w.fetchers.set(ns,LC),G.has(ns)&&zt(ns),lt.controller&&G.set(ns,lt.controller)}),fe({fetchers:new Map(w.fetchers)});let Ga=()=>eo.forEach(lt=>zt(lt.key));le.signal.addEventListener("abort",Ga);let{results:zd,loaderResults:Fd,fetcherResults:Bd}=await vn(w.matches,Ko,br,eo,gt);if(le.signal.aborted)return;le.signal.removeEventListener("abort",Ga),E.delete(P),G.delete(P),eo.forEach(lt=>G.delete(lt.key));let Ae=X0(zd);if(Ae){if(Ae.idx>=br.length){let lt=eo[Ae.idx-br.length].key;A.add(lt)}return _t(w,Ae.result)}let{loaderData:Hn,errors:to}=K0(w,w.matches,br,Fd,void 0,eo,Bd,ie);if(w.fetchers.has(P)){let lt=so($e.data);w.fetchers.set(P,lt)}Vo(ts),w.navigation.state==="loading"&&ts>$?(Se(k,"Expected pending action"),T&&T.abort(),_e(w.navigation.location,{matches:Ko,loaderData:Hn,errors:to,fetchers:new Map(w.fetchers)})):(fe({errors:to,loaderData:G0(w.loaderData,Hn,Ko,to),fetchers:new Map(w.fetchers)}),B=!1)}async function pt(P,L,F,Q,se,ue){let pe=w.fetchers.get(P),ce=vs(ue,pe?pe.data:void 0);w.fetchers.set(P,ce),fe({fetchers:new Map(w.fetchers)});let le=new AbortController,De=ms(e.history,F,le.signal);G.set(P,le);let Je=C,$e=await gs("loader",De,Q,se,i,o,a);if(ni($e)&&($e=await lC($e,De.signal,!0)||$e),G.get(P)===le&&G.delete(P),De.signal.aborted)return;if(V.has(P)){w.fetchers.set(P,so(void 0)),fe({fetchers:new Map(w.fetchers)});return}if(yl($e))if($>Je){let gt=so(void 0);w.fetchers.set(P,gt),fe({fetchers:new Map(w.fetchers)});return}else{A.add(P),await _t(w,$e);return}if(Gs($e)){St(P,L,$e.error);return}Se(!ni($e),"Unhandled fetcher deferred data");let Ie=so($e.data);w.fetchers.set(P,Ie),fe({fetchers:new Map(w.fetchers)})}async function _t(P,L,F){let{submission:Q,fetcherSubmission:se,replace:ue}=F===void 0?{}:F;L.revalidate&&(B=!0);let pe=$a(P.location,L.location,{_isRedirect:!0});if(Se(pe,"Expected a location on the redirect navigation"),n){let Ie=!1;if(L.reloadDocument)Ie=!0;else if(nC.test(L.location)){const gt=e.history.createURL(L.location);Ie=gt.origin!==t.location.origin||Va(gt.pathname,a)==null}if(Ie){ue?t.location.replace(L.location):t.location.assign(L.location);return}}T=null;let ce=ue===!0?st.Replace:st.Push,{formMethod:le,formAction:De,formEncType:Je}=P.navigation;!Q&&!se&&le&&De&&Je&&(Q=J0(P.navigation));let $e=Q||se;if(iM.has(L.status)&&$e&&Jn($e.formMethod))await Be(ce,pe,{submission:ot({},$e,{formAction:L.location}),preventScrollReset:b});else{let Ie=Df(pe,Q);await Be(ce,pe,{overrideNavigation:Ie,fetcherSubmission:se,preventScrollReset:b})}}async function vn(P,L,F,Q,se){let ue=await Promise.all([...F.map(le=>gs("loader",se,le,L,i,o,a)),...Q.map(le=>le.matches&&le.match&&le.controller?gs("loader",ms(e.history,le.path,le.controller.signal),le.match,le.matches,i,o,a):{type:at.error,error:An(404,{pathname:le.path})})]),pe=ue.slice(0,F.length),ce=ue.slice(F.length);return await Promise.all([Q0(P,F,pe,pe.map(()=>se.signal),!1,w.loaderData),Q0(P,Q.map(le=>le.match),ce,Q.map(le=>le.controller?le.controller.signal:null),!0)]),{results:ue,loaderResults:pe,fetcherResults:ce}}function jt(){B=!0,ae.push(...Id()),R.forEach((P,L)=>{G.has(L)&&(H.push(L),zt(L))})}function St(P,L,F){let Q=Ks(w.matches,L);At(P),fe({errors:{[Q.route.id]:F},fetchers:new Map(w.fetchers)})}function At(P){let L=w.fetchers.get(P);G.has(P)&&!(L&&L.state==="loading"&&E.has(P))&&zt(P),R.delete(P),E.delete(P),A.delete(P),V.delete(P),w.fetchers.delete(P)}function lr(P){if(u.v7_fetcherPersist){let L=(z.get(P)||0)-1;L<=0?(z.delete(P),V.add(P)):z.set(P,L)}else At(P);fe({fetchers:new Map(w.fetchers)})}function zt(P){let L=G.get(P);Se(L,"Expected fetch controller: "+P),L.abort(),G.delete(P)}function Ft(P){for(let L of P){let F=On(L),Q=so(F.data);w.fetchers.set(L,Q)}}function sr(){let P=[],L=!1;for(let F of A){let Q=w.fetchers.get(F);Se(Q,"Expected fetcher: "+F),Q.state==="loading"&&(A.delete(F),P.push(F),L=!0)}return Ft(P),L}function Vo(P){let L=[];for(let[F,Q]of E)if(Q<P){let se=w.fetchers.get(F);Se(se,"Expected fetcher: "+F),se.state==="loading"&&(zt(F),E.delete(F),L.push(F))}return Ft(L),L.length>0}function Ha(P,L){let F=w.blockers.get(P)||ps;return ne.get(P)!==L&&ne.set(P,L),F}function Km(P){w.blockers.delete(P),ne.delete(P)}function Ka(P,L){let F=w.blockers.get(P)||ps;Se(F.state==="unblocked"&&L.state==="blocked"||F.state==="blocked"&&L.state==="blocked"||F.state==="blocked"&&L.state==="proceeding"||F.state==="blocked"&&L.state==="unblocked"||F.state==="proceeding"&&L.state==="unblocked","Invalid blocker state transition: "+F.state+" -> "+L.state);let Q=new Map(w.blockers);Q.set(P,L),fe({blockers:Q})}function Gm(P){let{currentLocation:L,nextLocation:F,historyAction:Q}=P;if(ne.size===0)return;ne.size>1&&wi(!1,"A router only supports one blocker at a time");let se=Array.from(ne.entries()),[ue,pe]=se[se.length-1],ce=w.blockers.get(ue);if(!(ce&&ce.state==="proceeding")&&pe({currentLocation:L,nextLocation:F,historyAction:Q}))return ue}function Id(P){let L=[];return ie.forEach((F,Q)=>{(!P||P(Q))&&(F.cancel(),L.push(Q),ie.delete(Q))}),L}function OC(P,L,F){if(f=P,m=L,h=F||null,!g&&w.navigation===Lf){g=!0;let Q=Xm(w.location,w.matches);Q!=null&&fe({restoreScrollPosition:Q})}return()=>{f=null,m=null,h=null}}function Ym(P,L){return h&&h(P,L.map(Q=>L3(Q,w.loaderData)))||P.key}function AC(P,L){if(f&&m){let F=Ym(P,L);f[F]=m()}}function Xm(P,L){if(f){let F=Ym(P,L),Q=f[F];if(typeof Q=="number")return Q}return null}function MC(P){i={},s=Op(P,o,void 0,i)}return x={get basename(){return a},get state(){return w},get routes(){return l},get window(){return t},initialize:we,subscribe:be,enableScrollRestoration:OC,navigate:ve,fetch:Ne,revalidate:Te,createHref:P=>e.history.createHref(P),encodeLocation:P=>e.history.encodeLocation(P),getFetcher:On,deleteFetcher:lr,dispose:X,getBlocker:Ha,deleteBlocker:Km,_internalFetchControllers:G,_internalActiveDeferreds:ie,_internalSetRoutes:MC},x}function uM(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ap(e,t,n,r,o,i,l){let s,a;if(i!=null&&l!=="path"){s=[];for(let c of t)if(s.push(c),c.route.id===i){a=c;break}}else s=t,a=t[t.length-1];let u=qE(o||".",Dm(s).map(c=>c.pathnameBase),Va(e.pathname,n)||e.pathname,l==="path");return o==null&&(u.search=e.search,u.hash=e.hash),(o==null||o===""||o===".")&&a&&a.route.index&&!jm(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:bo([n,u.pathname])),Ua(u)}function B0(e,t,n,r){if(!r||!uM(r))return{path:n};if(r.formMethod&&!mM(r.formMethod))return{path:n,error:An(405,{method:r.formMethod})};let o=()=>({path:n,error:An(400,{type:"invalid-body"})}),i=r.formMethod||"get",l=e?i.toUpperCase():i.toLowerCase(),s=iC(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Jn(l))return o();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((h,m)=>{let[g,S]=m;return""+h+g+"="+S+`
178
+ `},""):String(r.body);return{path:n,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!Jn(l))return o();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return o()}}}Se(typeof FormData=="function","FormData is not available in this environment");let a,u;if(r.formData)a=Mp(r.formData),u=r.formData;else if(r.body instanceof FormData)a=Mp(r.body),u=r.body;else if(r.body instanceof URLSearchParams)a=r.body,u=H0(a);else if(r.body==null)a=new URLSearchParams,u=new FormData;else try{a=new URLSearchParams(r.body),u=H0(a)}catch{return o()}let c={formMethod:l,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Jn(c.formMethod))return{path:n,submission:c};let d=qr(n);return t&&d.search&&jm(d.search)&&a.append("index",""),d.search="?"+a,{path:Ua(d),submission:c}}function cM(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function W0(e,t,n,r,o,i,l,s,a,u,c,d,f,h){let m=h?Object.values(h)[0]:f?Object.values(f)[0]:void 0,g=e.createURL(t.location),S=e.createURL(o),v=h?Object.keys(h)[0]:void 0,x=cM(n,v).filter((k,b)=>{if(k.route.lazy)return!0;if(k.route.loader==null)return!1;if(dM(t.loaderData,t.matches[b],k)||l.some(D=>D===k.route.id))return!0;let T=t.matches[b],N=k;return U0(k,ot({currentUrl:g,currentParams:T.params,nextUrl:S,nextParams:N.params},r,{actionResult:m,defaultShouldRevalidate:i||g.pathname+g.search===S.pathname+S.search||g.search!==S.search||oC(T,N)}))}),w=[];return a.forEach((k,b)=>{if(!n.some(j=>j.route.id===k.routeId))return;let T=ll(c,k.path,d);if(!T){w.push({key:b,routeId:k.routeId,path:k.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(b),D=Lp(T,k.path),O=!1;u.has(b)?O=!1:s.includes(b)?O=!0:N&&N.state!=="idle"&&N.data===void 0?O=i:O=U0(D,ot({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:S,nextParams:n[n.length-1].params},r,{actionResult:m,defaultShouldRevalidate:i})),O&&w.push({key:b,routeId:k.routeId,path:k.path,matches:T,match:D,controller:new AbortController})}),[x,w]}function dM(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function oC(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function U0(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function V0(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];Se(o,"No route found in manifest");let i={};for(let l in r){let a=o[l]!==void 0&&l!=="hasErrorBoundary";wi(!a,'Route "'+o.id+'" has a static property "'+l+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+l+'" will be ignored.')),!a&&!A3.has(l)&&(i[l]=r[l])}Object.assign(o,i),Object.assign(o,ot({},t(o),{lazy:void 0}))}async function gs(e,t,n,r,o,i,l,s){s===void 0&&(s={});let a,u,c,d=m=>{let g,S=new Promise((v,y)=>g=y);return c=()=>g(),t.signal.addEventListener("abort",c),Promise.race([m({request:t,params:n.params,context:s.requestContext}),S])};try{let m=n.route[e];if(n.route.lazy)if(m){let g,S=await Promise.all([d(m).catch(v=>{g=v}),V0(n.route,i,o)]);if(g)throw g;u=S[0]}else if(await V0(n.route,i,o),m=n.route[e],m)u=await d(m);else if(e==="action"){let g=new URL(t.url),S=g.pathname+g.search;throw An(405,{method:t.method,pathname:S,routeId:n.route.id})}else return{type:at.data,data:void 0};else if(m)u=await d(m);else{let g=new URL(t.url),S=g.pathname+g.search;throw An(404,{pathname:S})}Se(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(m){a=at.error,u=m}finally{c&&t.signal.removeEventListener("abort",c)}if(gM(u)){let m=u.status;if(oM.has(m)){let v=u.headers.get("Location");if(Se(v,"Redirects returned/thrown from loaders/actions must have a Location header"),!nC.test(v))v=Ap(new URL(t.url),r.slice(0,r.indexOf(n)+1),l,!0,v);else if(!s.isStaticRequest){let y=new URL(t.url),x=v.startsWith("//")?new URL(y.protocol+v):new URL(v),w=Va(x.pathname,l)!=null;x.origin===y.origin&&w&&(v=x.pathname+x.search+x.hash)}if(s.isStaticRequest)throw u.headers.set("Location",v),u;return{type:at.redirect,status:m,location:v,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:a===at.error?at.error:at.data,response:u};let g,S=u.headers.get("Content-Type");return S&&/\bapplication\/json\b/.test(S)?g=await u.json():g=await u.text(),a===at.error?{type:a,error:new Im(m,u.statusText,g),headers:u.headers}:{type:at.data,data:g,statusCode:u.status,headers:u.headers}}if(a===at.error)return{type:a,error:u};if(pM(u)){var f,h;return{type:at.deferred,deferredData:u,statusCode:(f=u.init)==null?void 0:f.status,headers:((h=u.init)==null?void 0:h.headers)&&new Headers(u.init.headers)}}return{type:at.data,data:u}}function ms(e,t,n,r){let o=e.createURL(iC(t)).toString(),i={signal:n};if(r&&Jn(r.formMethod)){let{formMethod:l,formEncType:s}=r;i.method=l.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(r.json)):s==="text/plain"?i.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?i.body=Mp(r.formData):i.body=r.formData}return new Request(o,i)}function Mp(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function H0(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function fM(e,t,n,r,o){let i={},l=null,s,a=!1,u={};return n.forEach((c,d)=>{let f=t[d].route.id;if(Se(!yl(c),"Cannot handle redirect results in processLoaderData"),Gs(c)){let h=Ks(e,f),m=c.error;r&&(m=Object.values(r)[0],r=void 0),l=l||{},l[h.route.id]==null&&(l[h.route.id]=m),i[f]=void 0,a||(a=!0,s=eC(c.error)?c.error.status:500),c.headers&&(u[f]=c.headers)}else ni(c)?(o.set(f,c.deferredData),i[f]=c.deferredData.data):i[f]=c.data,c.statusCode!=null&&c.statusCode!==200&&!a&&(s=c.statusCode),c.headers&&(u[f]=c.headers)}),r&&(l=r,i[Object.keys(r)[0]]=void 0),{loaderData:i,errors:l,statusCode:s||200,loaderHeaders:u}}function K0(e,t,n,r,o,i,l,s){let{loaderData:a,errors:u}=fM(t,n,r,o,s);for(let c=0;c<i.length;c++){let{key:d,match:f,controller:h}=i[c];Se(l!==void 0&&l[c]!==void 0,"Did not find corresponding fetcher result");let m=l[c];if(!(h&&h.signal.aborted))if(Gs(m)){let g=Ks(e.matches,f==null?void 0:f.route.id);u&&u[g.route.id]||(u=ot({},u,{[g.route.id]:m.error})),e.fetchers.delete(d)}else if(yl(m))Se(!1,"Unhandled fetcher revalidation redirect");else if(ni(m))Se(!1,"Unhandled fetcher deferred data");else{let g=so(m.data);e.fetchers.set(d,g)}}return{loaderData:a,errors:u}}function G0(e,t,n,r){let o=ot({},t);for(let i of n){let l=i.route.id;if(t.hasOwnProperty(l)?t[l]!==void 0&&(o[l]=t[l]):e[l]!==void 0&&i.route.loader&&(o[l]=e[l]),r&&r.hasOwnProperty(l))break}return o}function Ks(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Y0(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function An(e,t){let{pathname:n,routeId:r,method:o,type:i}=t===void 0?{}:t,l="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(l="Bad Request",o&&n&&r?s="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(l="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",s='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",o&&n&&r?s="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new Im(e||500,l,new Error(s),!0)}function X0(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(yl(n))return{result:n,idx:t}}}function iC(e){let t=typeof e=="string"?qr(e):e;return Ua(ot({},t,{hash:""}))}function hM(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ni(e){return e.type===at.deferred}function Gs(e){return e.type===at.error}function yl(e){return(e&&e.type)===at.redirect}function pM(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function gM(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function mM(e){return rM.has(e.toLowerCase())}function Jn(e){return tM.has(e.toLowerCase())}async function Q0(e,t,n,r,o,i){for(let l=0;l<n.length;l++){let s=n[l],a=t[l];if(!a)continue;let u=e.find(d=>d.route.id===a.route.id),c=u!=null&&!oC(u,a)&&(i&&i[a.route.id])!==void 0;if(ni(s)&&(o||c)){let d=r[l];Se(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await lC(s,d,o).then(f=>{f&&(n[l]=f||n[l])})}}}async function lC(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:at.data,data:e.deferredData.unwrappedData}}catch(o){return{type:at.error,error:o}}return{type:at.data,data:e.deferredData.data}}}function jm(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Lp(e,t){let n=typeof t=="string"?qr(t).search:t.search;if(e[e.length-1].route.index&&jm(n||""))return e[e.length-1];let r=Dm(e);return r[r.length-1]}function J0(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:l}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:l,text:void 0}}}function Df(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function vM(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function vs(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function yM(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function so(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function xM(e,t){try{let n=e.sessionStorage.getItem(rC);if(n){let r=JSON.parse(n);for(let[o,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function wM(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(rC,JSON.stringify(n))}catch(r){wi(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
179
+ * React Router v6.18.0
180
+ *
181
+ * Copyright (c) Remix Software Inc.
182
+ *
183
+ * This source code is licensed under the MIT license found in the
184
+ * LICENSE.md file in the root directory of this source tree.
185
+ *
186
+ * @license MIT
187
+ */function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wc.apply(this,arguments)}const Pd=p.createContext(null),sC=p.createContext(null),Od=p.createContext(null),Ad=p.createContext(null),Ai=p.createContext({outlet:null,matches:[],isDataRoute:!1}),aC=p.createContext(null);function Md(){return p.useContext(Ad)!=null}function uC(){return Md()||Se(!1),p.useContext(Ad).location}function cC(e){p.useContext(Od).static||p.useLayoutEffect(e)}function zm(){let{isDataRoute:e}=p.useContext(Ai);return e?AM():_M()}function _M(){Md()||Se(!1);let e=p.useContext(Pd),{basename:t,navigator:n}=p.useContext(Od),{matches:r}=p.useContext(Ai),{pathname:o}=uC(),i=JSON.stringify(Dm(r).map(a=>a.pathnameBase)),l=p.useRef(!1);return cC(()=>{l.current=!0}),p.useCallback(function(a,u){if(u===void 0&&(u={}),!l.current)return;if(typeof a=="number"){n.go(a);return}let c=qE(a,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:bo([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}function SM(){let{matches:e}=p.useContext(Ai),t=e[e.length-1];return t?t.params:{}}function EM(e,t,n){Md()||Se(!1);let{navigator:r}=p.useContext(Od),{matches:o}=p.useContext(Ai),i=o[o.length-1],l=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let a=uC(),u;if(t){var c;let g=typeof t=="string"?qr(t):t;s==="/"||(c=g.pathname)!=null&&c.startsWith(s)||Se(!1),u=g}else u=a;let d=u.pathname||"/",f=s==="/"?d:d.slice(s.length)||"/",h=ll(e,{pathname:f}),m=bM(h&&h.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:bo([s,r.encodeLocation?r.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?s:bo([s,r.encodeLocation?r.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n);return t&&m?p.createElement(Ad.Provider,{value:{location:Wc({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:st.Pop}},m):m}function CM(){let e=OM(),t=eC(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:o},n):null,i)}const $M=p.createElement(CM,null);class kM extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?p.createElement(Ai.Provider,{value:this.props.routeContext},p.createElement(aC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function TM(e){let{routeContext:t,match:n,children:r}=e,o=p.useContext(Pd);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(Ai.Provider,{value:t},r)}function bM(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,l=(r=n)==null?void 0:r.errors;if(l!=null){let s=i.findIndex(a=>a.route.id&&(l==null?void 0:l[a.route.id]));s>=0||Se(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,a,u)=>{let c=a.route.id?l==null?void 0:l[a.route.id]:null,d=null;n&&(d=a.route.errorElement||$M);let f=t.concat(i.slice(0,u+1)),h=()=>{let m;return c?m=d:a.route.Component?m=p.createElement(a.route.Component,null):a.route.element?m=a.route.element:m=s,p.createElement(TM,{match:a,routeContext:{outlet:s,matches:f,isDataRoute:n!=null},children:m})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?p.createElement(kM,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:h(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):h()},null)}var dC=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(dC||{}),Uc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Uc||{});function NM(e){let t=p.useContext(Pd);return t||Se(!1),t}function RM(e){let t=p.useContext(sC);return t||Se(!1),t}function PM(e){let t=p.useContext(Ai);return t||Se(!1),t}function fC(e){let t=PM(),n=t.matches[t.matches.length-1];return n.route.id||Se(!1),n.route.id}function OM(){var e;let t=p.useContext(aC),n=RM(Uc.UseRouteError),r=fC(Uc.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function AM(){let{router:e}=NM(dC.UseNavigateStable),t=fC(Uc.UseNavigateStable),n=p.useRef(!1);return cC(()=>{n.current=!0}),p.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Wc({fromRouteId:t},i)))},[e,t])}function MM(e){let{basename:t="/",children:n=null,location:r,navigationType:o=st.Pop,navigator:i,static:l=!1}=e;Md()&&Se(!1);let s=t.replace(/^\/*/,"/"),a=p.useMemo(()=>({basename:s,navigator:i,static:l}),[s,i,l]);typeof r=="string"&&(r=qr(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:h="default"}=r,m=p.useMemo(()=>{let g=Va(u,s);return g==null?null:{location:{pathname:g,search:c,hash:d,state:f,key:h},navigationType:o}},[s,u,c,d,f,h,o]);return m==null?null:p.createElement(Od.Provider,{value:a},p.createElement(Ad.Provider,{children:n,value:m}))}new Promise(()=>{});function LM(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:p.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}const hC=ee.createContext(null),DM=e=>{var s,a;const t=ee.useContext(hC),[n,r]=En.splitModuleIdAndModulePath(e),o=(s=t==null?void 0:t[n])==null?void 0:s.source,i=(a=t==null?void 0:t[n])==null?void 0:a.schema;if(!o||!i)throw Error("Could not find module: "+n);const l=En.resolvePath(r,o,i);return{moduleId:n,moduleSource:l.source,moduleSchema:l.schema}},IM=({valApi:e})=>{var w,k;const{"*":t}=SM(),[n,r]=p.useState(null),[o,i]=p.useState(null),[l,s]=p.useState(),[a]=l?En.splitModuleIdAndModulePath(l):[void 0,void 0],u=a&&((w=n==null?void 0:n[a])==null?void 0:w.source),c=a&&((k=n==null?void 0:n[a])==null?void 0:k.schema),d=Object.entries(n||{}).flatMap(([,b])=>b.errors?b.errors.fatal?b.errors.fatal:[]:[]),f=Object.entries(n||{}).flatMap(([,b])=>b.errors&&b.errors.validation?[b.errors.validation]:[]);if(d&&d.length>0){const b=d.length===1?d[0].message:`Multiple errors detected:
188
+ ${d.map((N,D)=>`${D+1}. ${N.message}`).join(`
189
+ `)}
190
+
191
+ Showing stack trace of: 0. ${d[0].message}`,T=new Error(b);throw T.stack=d[0].stack,T}f&&f.length>0&&console.warn("Val encountered validation errors:",f),p.useEffect(()=>{s(t?`/${t}`:l)},[t]);const[h,m]=p.useState(null);p.useEffect(()=>{try{new WebSocket(`${window.location.origin.replace("http://","ws://")}/_next/webpack-hmr`).addEventListener("message",T=>{let N;try{N=JSON.parse(T.data)}catch{console.error("Failed to parse HMR")}typeof(N==null?void 0:N.hash)=="string"&&(N==null?void 0:N.action)==="built"&&m(N.hash)})}catch(b){console.warn("Failed to initialize HMR",b)}},[]),p.useEffect(()=>{console.log("(Re)-fetching modules"),e.getModules({patch:!0,includeSchema:!0,includeSource:!0}).then(b=>{hl.isOk(b)?r(b.value.modules):(i("Could not load modules: "+b.error.message),console.error(b.error))})},[h]);const g=zm(),[S,v]=CO();p.useEffect(()=>{const b=T=>{console.log("popstate",T)};return window.addEventListener("popstate",b),()=>{window.removeEventListener("popstate",b)}},[]);const y=ee.useRef(null),x=p.useCallback(b=>async T=>{const[N,D]=En.splitModuleIdAndModulePath(b),O=await T(En.createPatchJSONPath(D));return e.postPatches(N,O).then(j=>{if(hl.isErr(j))throw j.error;if(console.log("submitted",O),!h)return e.getModules({patch:!0,includeSchema:!0,includeSource:!0}).then(B=>{hl.isOk(B)?r(B.value.modules):(i("Could not load modules: "+B.error.message),console.error(B.error))})}).catch(j=>{console.error(j)})},[]);return _.jsx(XS.Provider,{value:{theme:S,setTheme:v,api:e,editMode:"full",session:{status:"not-asked"},highlight:!1,setHighlight:()=>{},setEditMode:()=>{},setWindowSize:()=>{}},children:_.jsxs("div",{id:"val-fullscreen-container",className:"relative font-serif antialiased","data-mode":S,children:[_.jsx("div",{className:"fixed -translate-x-1/2 z-overlay left-1/2 bottom-4",children:_.jsx(xO,{api:e})}),_.jsx("div",{id:"val-fullscreen-hover",ref:y}),_.jsx(pC.Provider,{value:{hoverElem:y==null?void 0:y.current},children:_.jsx("div",{className:"text-primary bg-background",children:_.jsxs(Ds,{children:[_.jsx("div",{className:"px-4 h-[50px] flex items-center justify-center",children:_.jsx(GE,{})}),_.jsx(Ls,{className:"px-4",children:n?_.jsx(KM,{paths:Object.keys(n),setSelectedModuleId:b=>{g(b)}}):!o&&_.jsx("div",{className:"py-4",children:"Loading..."})}),_.jsxs("div",{className:"flex items-center justify-start w-full h-[50px] gap-2 font-serif text-xs",children:[_.jsx("button",{onClick:()=>{history.back()},children:_.jsx(aO,{})}),_.jsx("p",{children:l||"/"})]}),_.jsxs("div",{className:"p-4",children:[o&&_.jsxs("div",{className:"text-lg text-destructive-foreground",children:["ERROR: ",o]}),n&&l&&a&&u!==void 0&&c!==void 0&&_.jsx(hC.Provider,{value:n,children:_.jsx(zM,{path:l,source:u,schema:c,setSelectedPath:s,initOnSubmit:x})})]})]})})})]})})},pC=ee.createContext({hoverElem:null}),jM=()=>ee.useContext(pC);function zM({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:o}){const[,i]=En.splitModuleIdAndModulePath(e),l=En.resolvePath(i,t,n);if(!l)throw Error("Could not resolve module: "+e);return _.jsx(gC,{path:e,source:l.source,schema:l.schema,setSelectedPath:r,initOnSubmit:o,top:!0})}function gC({path:e,source:t,schema:n,setSelectedPath:r,field:o,initOnSubmit:i,top:l}){return t===null||n.opt?_.jsx(UM,{path:e,source:t,schema:n,field:o,initOnSubmit:i,setSelectedPath:r}):n.type==="object"?typeof t!="object"||Ys(t)?_.jsxs("div",{children:["ERROR: expected object, but found ",typeof t]}):_.jsx(mC,{source:t,path:e,schema:n,initOnSubmit:i,setSelectedPath:r,top:l}):n.type==="array"?typeof t!="object"||!Ys(t)?_.jsxs("div",{children:["ERROR: expected array, but found ",typeof t]}):_.jsx(vC,{source:t,path:e,schema:n,setSelectedPath:r}):n.type==="record"?typeof t!="object"?_.jsxs("div",{children:["ERROR: expected object for ",n.type,", but found ",typeof t]}):Ys(t)?_.jsxs("div",{children:["ERROR: did not expect array for ",n.type]}):_.jsx(FM,{source:t,path:e,schema:n,setSelectedPath:r}):_.jsxs("div",{className:"py-2 gap-y-4",children:[_.jsx("div",{className:"text-left",children:o||e}),_.jsx(KE,{path:e,disabled:!1,source:t,schema:n,onSubmit:i(e)})]})}function mC({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:o,top:i}){return _.jsx("div",{className:ad("flex flex-col gap-y-8",{"border-l-2 border-border pl-6":!i}),children:Object.entries(n.items).map(([l,s])=>{const a=ka(e,l);return _.jsx(gC,{path:a,source:t[l],schema:s,setSelectedPath:r,field:l,initOnSubmit:o},a)})},e)}function FM({path:e,source:t,schema:n,setSelectedPath:r}){const o=zm();return _.jsx("div",{className:"flex flex-col gap-4 p-2",children:Object.entries(t).map(([i,l])=>{const s=ka(e,i);return _.jsx("button",{onClick:()=>{r(s),o(s)},children:_.jsx(BM,{recordKey:i,path:s,source:l,schema:n.item})},s)})},e)}const Dp=170;function BM({recordKey:e,path:t,source:n,schema:r}){const o=ee.useRef(null),[i,l]=p.useState(!1);return p.useEffect(()=>{o.current&&o.current.getBoundingClientRect().height>=Dp&&l(!0)},[]),_.jsxs(Lm,{ref:o,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:Dp},children:[_.jsx("div",{className:"pb-4 font-serif text-left text-accent",children:e}),_.jsx("div",{className:"text-xs",children:_.jsx(Fm,{path:t,source:n,schema:r})}),i&&_.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]},t)}function vC({path:e,source:t,schema:n,setSelectedPath:r}){const o=zm();return _.jsx("div",{className:"flex flex-col gap-4 p-2",children:t.map((i,l)=>{const s=ka(e,l);return _.jsx("button",{onClick:()=>{r(s),o(s)},children:_.jsx(WM,{index:l,path:s,source:i,schema:n.item},s)},s)})},e)}const Z0=Dp;function WM({index:e,path:t,source:n,schema:r}){const o=ee.useRef(null),[i,l]=p.useState(!1);return p.useEffect(()=>{o.current&&o.current.getBoundingClientRect().height>=Z0&&l(!0)},[]),_.jsxs(Lm,{ref:o,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:Z0},children:[_.jsx("div",{className:"pb-4 font-serif text-left uppercase text-accent",children:e+1<10?`0${e+1}`:e+1}),_.jsx("div",{className:"text-xs",children:_.jsx(Fm,{path:t,source:n,schema:r})}),i&&_.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]})}function ka(e,t){const n=En.createValPathOfItem(e,t);if(!n)throw Error(`Could not create val path: ${e} of ${t==null?void 0:t.toString()}`);return n}function Fm({path:e,source:t,schema:n}){const[r,o]=p.useState(null),{hoverElem:i}=jM();if(n.type==="object")return _.jsx("div",{className:"grid grid-cols-[min-content_1fr] gap-2 text-left",children:Object.entries(n.items).map(([l])=>_.jsxs(p.Fragment,{children:[_.jsxs("span",{className:"text-muted",children:[l,":"]}),_.jsx("span",{children:_.jsx(Fm,{source:(t==null?void 0:t[l])??null,schema:n.items[l],path:ka(e,l)})})]},ka(e,l)))},e);if(n.type==="array")return t===null?_.jsx("span",{className:"text-accent",children:"Empty"},e):Array.isArray(t)?_.jsxs("span",{children:[_.jsx("span",{className:"text-accent",children:t.length}),_.jsx("span",{children:t.length===1?" item":" items"})]},e):_.jsx("span",{className:"px-2 bg-destructive text-destructive-foreground",children:"Unknown length"},e);if(n.type==="richtext")return t===null?_.jsx("span",{className:"text-accent",children:"Empty"},e):typeof t!="object"?_.jsxs("div",{className:"p-4 text-destructive-foreground bg-destructive",children:["ERROR: ",typeof t," not an object"]},e):!(Yt in t)||t[Yt]!=="richtext"?_.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not richtext"},e):_.jsx(GM,{children:n_(t)},e);if(n.type==="string")return t===null?_.jsx("span",{className:"text-accent",children:"Empty"},e):_.jsx("span",{children:t});if(n.type==="image"){if(t===null)return _.jsx("span",{className:"text-accent",children:"Empty"},e);if(typeof t!="object")return _.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: not an object"},e);if(!(gn in t)||typeof t[gn]!="string")return _.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not an image"},e);const l=En.convertFileSource(t).url;return _.jsxs("span",{onMouseOver:s=>{o({x:s.clientX,y:s.clientY})},onMouseLeave:()=>{o(null)},className:"relative flex items-center justify-start gap-1",children:[_.jsx("a",{href:l,className:"overflow-hidden underline truncate ",children:t[gn]}),r&&i&&Gr.createPortal(_.jsx("img",{className:"absolute z-[5] max-w-[10vw]",style:{left:r.x+10,top:r.y+10},src:l}),i)]},e)}else{if(n.type==="boolean")return t===null?_.jsx("span",{className:"text-accent",children:"Empty"},e):_.jsx("span",{className:"text-accent",children:t?"true":"false"},e);if(n.type==="number")return t===null?_.jsx("span",{className:"text-accent",children:"Empty"},e):_.jsx("span",{className:"text-accent",children:t.toString()});if(n.type==="keyOf")return t===null?_.jsx("span",{className:"text-accent",children:"Empty"},e):_.jsx("span",{className:"text-accent",children:t.toString()},e)}return _.jsxs("div",{children:["TODO: ",n.type]},e)}function UM({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:o,field:i}){const[l,s]=p.useState(t!==null);return _.jsxs("div",{className:"flex flex-col gap-y-6",children:[i?_.jsxs("div",{className:"flex items-center justify-start gap-x-4",children:[_.jsx(Pp,{checked:l,onClick:()=>{s(a=>!a)}}),_.jsx("span",{children:i})]}):_.jsx(Pp,{checked:l,onClick:()=>{s(a=>!a)}}),l&&_.jsx(VM,{source:t,schema:n,path:e,setSelectedPath:r,initOnSubmit:o})]},e)}function VM({source:e,path:t,schema:n,setSelectedPath:r,initOnSubmit:o}){if(n.type==="array"){if(typeof e=="object"&&(e===null||Ys(e)))return _.jsx(vC,{source:e===null?[]:e,path:t,schema:n,setSelectedPath:r})}else if(n.type==="object"){if(typeof e=="object"&&(e===null||!Ys(e)))return _.jsx(mC,{source:e,path:t,schema:n,setSelectedPath:r,initOnSubmit:o})}else if(n.type==="richtext"||n.type==="string"||n.type==="image"||n.type==="number"||n.type==="keyOf")return _.jsx(KE,{path:t,disabled:!1,source:e,schema:n,onSubmit:o(t)},t);return _.jsxs("div",{className:"p-4 bg-destructive text-destructive-foreground",children:["ERROR: unexpected source type ",typeof e," for schema type"," ",n.type]})}function Ys(e){return Array.isArray(e)}function HM(e){const t={};return e.forEach(n=>{const r=n.split("/").filter(i=>i!=="");let o=t;r.forEach(i=>{o[i]||(o[i]={}),o=o[i]})}),t}function KM({paths:e,setSelectedModuleId:t}){const n=HM(e);return _.jsx(Kw,{children:Object.entries(n).map(([r,o])=>_.jsx("div",{className:"px-4 py-2",children:_.jsx(yC,{name:r,tree:o,moduleId:`/${r}`,setSelectedModuleId:t})},`/${r}`))})}function yC({name:e,tree:t,moduleId:n,setSelectedModuleId:r}){return _.jsxs("div",{children:[_.jsx("button",{onClick:()=>{r(n)},children:e}),Object.entries(t).map(([o,i])=>_.jsx("div",{className:"px-4 py-1",children:_.jsx(yC,{name:o,tree:i,moduleId:`${n}/${o}`,setSelectedModuleId:r})},`${n}/${o}`))]})}const q0={tags:{h1:"font-bold",h2:"font-bold",h3:"font-bold",h4:"font-bold",h5:"font-bold",h6:"font-bold",p:""},classes:{bold:"font-bold",italic:"italic",lineThrough:"line-through"}};function GM({children:e}){const t=e;function n(i,l){const s=q0.tags[i];return s&&l?[l,s].join(" "):s||l}function r(i,l){const s=q0.classes[i];return s&&l?[l,s].join(" "):s||l}function o(i,l){var u,c;if(typeof i=="string")return i;if(i.tag==="p")return _.jsx("p",{className:n("p"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="img")return _.jsx("img",{className:n("img"),src:i.src},l);if(i.tag==="ul")return _.jsx("ul",{className:n("ul"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="ol")return _.jsx("ol",{className:n("ol"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="li")return _.jsx("li",{className:n("li"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="span")return _.jsx("span",{className:i.classes.map(d=>{switch(d){case"bold":return r("bold");case"line-through":return r("lineThrough");case"italic":return r("italic")}}).join(" "),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h1")return _.jsx("h1",{className:n("h1"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h2")return _.jsx("h2",{className:n("h2"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h3")return _.jsx("h3",{className:n("h3"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h4")return _.jsx("h4",{className:n("h4"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h5")return _.jsx("h5",{className:n("h5"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h6")return _.jsx("h6",{className:n("h6"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="br")return _.jsx("br",{},l);if(i.tag==="a")return _.jsx("a",{href:i.href,children:i.children.map((d,f)=>o(d,f))},l);console.error("Unknown tag",i.tag);const a=i.tag;return a!=null&&a.tag?ee.createElement(a.tag,{key:l,className:(u=a.class)==null?void 0:u.join(" "),children:(c=a.children)==null?void 0:c.map(o)}):null}return _.jsx("span",{"data-val-path":t.valPath,children:t.children.map((i,l)=>o(i,l))})}const YM=p.createContext(null),If={didCatch:!1,error:null};class XM extends p.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=If}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),l=0;l<o;l++)i[l]=arguments[l];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(If)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&QM(t.resetKeys,o)){var i,l;(i=(l=this.props).onReset)===null||i===void 0||i.call(l,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(If)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:l}=this.state;let s=t;if(i){const a={error:l,resetErrorBoundary:this.resetErrorBoundary};if(p.isValidElement(o))s=o;else if(typeof n=="function")s=n(a);else if(r)s=p.createElement(r,a);else throw l}return p.createElement(YM.Provider,{value:{didCatch:i,error:l,resetErrorBoundary:this.resetErrorBoundary}},s)}}function QM(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}const xC="Collapsible",[JM,wC]=Ti(xC),[ZM,Bm]=JM(xC),qM=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:l,...s}=e,[a=!1,u]=Al({prop:r,defaultProp:o,onChange:l});return p.createElement(ZM,{scope:n,disabled:i,contentId:Cd(),open:a,onOpenToggle:p.useCallback(()=>u(c=>!c),[u])},p.createElement(Le.div,te({"data-state":Wm(a),"data-disabled":i?"":void 0},s,{ref:t})))}),e4="CollapsibleTrigger",t4=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Bm(e4,n);return p.createElement(Le.button,te({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Wm(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:He(e.onClick,o.onOpenToggle)}))}),_C="CollapsibleContent",n4=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bm(_C,e.__scopeCollapsible);return p.createElement(zl,{present:n||o.open},({present:i})=>p.createElement(r4,te({},r,{ref:t,present:i})))}),r4=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,l=Bm(_C,n),[s,a]=p.useState(r),u=p.useRef(null),c=Qe(t,u),d=p.useRef(0),f=d.current,h=p.useRef(0),m=h.current,g=l.open||s,S=p.useRef(g),v=p.useRef();return p.useEffect(()=>{const y=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(y)},[]),Tn(()=>{const y=u.current;if(y){v.current=v.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();d.current=x.height,h.current=x.width,S.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),a(r)}},[l.open,r]),p.createElement(Le.div,te({"data-state":Wm(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!g},i,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style}}),g&&o)});function Wm(e){return e?"open":"closed"}const o4=qM,i4=t4,l4=n4,Uo="Accordion",s4=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Um,a4,u4]=rE(Uo),[Ld,V4]=Ti(Uo,[u4,wC]),Vm=wC(),SC=ee.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return ee.createElement(Um.Provider,{scope:e.__scopeAccordion},n==="multiple"?ee.createElement(h4,te({},i,{ref:t})):ee.createElement(f4,te({},o,{ref:t})))});SC.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[EC,c4]=Ld(Uo),[CC,d4]=Ld(Uo,{collapsible:!1}),f4=ee.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...l}=e,[s,a]=Al({prop:n,defaultProp:r,onChange:o});return ee.createElement(EC,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:a,onItemClose:ee.useCallback(()=>i&&a(""),[i,a])},ee.createElement(CC,{scope:e.__scopeAccordion,collapsible:i},ee.createElement($C,te({},l,{ref:t}))))}),h4=ee.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[l=[],s]=Al({prop:n,defaultProp:r,onChange:o}),a=ee.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=ee.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return ee.createElement(EC,{scope:e.__scopeAccordion,value:l,onItemOpen:a,onItemClose:u},ee.createElement(CC,{scope:e.__scopeAccordion,collapsible:!0},ee.createElement($C,te({},i,{ref:t}))))}),[p4,Dd]=Ld(Uo),$C=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...l}=e,s=ee.useRef(null),a=Qe(s,t),u=a4(n),d=Ig(o)==="ltr",f=He(e.onKeyDown,h=>{var m;if(!s4.includes(h.key))return;const g=h.target,S=u().filter(D=>{var O;return!((O=D.ref.current)!==null&&O!==void 0&&O.disabled)}),v=S.findIndex(D=>D.ref.current===g),y=S.length;if(v===-1)return;h.preventDefault();let x=v;const w=0,k=y-1,b=()=>{x=v+1,x>k&&(x=w)},T=()=>{x=v-1,x<w&&(x=k)};switch(h.key){case"Home":x=w;break;case"End":x=k;break;case"ArrowRight":i==="horizontal"&&(d?b():T());break;case"ArrowDown":i==="vertical"&&b();break;case"ArrowLeft":i==="horizontal"&&(d?T():b());break;case"ArrowUp":i==="vertical"&&T();break}const N=x%y;(m=S[N].ref.current)===null||m===void 0||m.focus()});return ee.createElement(p4,{scope:n,disabled:r,direction:o,orientation:i},ee.createElement(Um.Slot,{scope:n},ee.createElement(Le.div,te({},l,{"data-orientation":i,ref:a,onKeyDown:r?void 0:f}))))}),Ip="AccordionItem",[g4,Hm]=Ld(Ip),m4=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=Dd(Ip,n),l=c4(Ip,n),s=Vm(n),a=Cd(),u=r&&l.value.includes(r)||!1,c=i.disabled||e.disabled;return ee.createElement(g4,{scope:n,open:u,disabled:c,triggerId:a},ee.createElement(o4,te({"data-orientation":i.orientation,"data-state":kC(u)},s,o,{ref:t,disabled:c,open:u,onOpenChange:d=>{d?l.onItemOpen(r):l.onItemClose(r)}})))}),v4="AccordionHeader",y4=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Dd(Uo,n),i=Hm(v4,n);return ee.createElement(Le.h3,te({"data-orientation":o.orientation,"data-state":kC(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),e1="AccordionTrigger",x4=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Dd(Uo,n),i=Hm(e1,n),l=d4(e1,n),s=Vm(n);return ee.createElement(Um.ItemSlot,{scope:n},ee.createElement(i4,te({"aria-disabled":i.open&&!l.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},s,r,{ref:t})))}),w4="AccordionContent",_4=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Dd(Uo,n),i=Hm(w4,n),l=Vm(n);return ee.createElement(l4,te({role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation},l,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function kC(e){return e?"open":"closed"}const S4=SC,E4=m4,C4=y4,TC=x4,bC=_4,$4=S4,NC=p.forwardRef(({className:e,...t},n)=>_.jsx(E4,{ref:n,className:it("border-b",e),...t}));NC.displayName="AccordionItem";const RC=p.forwardRef(({className:e,children:t,...n},r)=>_.jsx(C4,{className:"flex",children:_.jsxs(TC,{ref:r,className:it("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,_.jsx(tE,{className:"w-4 h-4 transition-transform duration-200 shrink-0"})]})}));RC.displayName=TC.displayName;const PC=p.forwardRef(({className:e,children:t,...n},r)=>_.jsx(bC,{ref:r,className:it("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...n,children:_.jsx("div",{className:"pt-0 pb-4",children:t})}));PC.displayName=bC.displayName;/**
192
+ * React Router DOM v6.18.0
193
+ *
194
+ * Copyright (c) Remix Software Inc.
195
+ *
196
+ * This source code is licensed under the MIT license found in the
197
+ * LICENSE.md file in the root directory of this source tree.
198
+ *
199
+ * @license MIT
200
+ */function Vc(){return Vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vc.apply(this,arguments)}function k4(e,t){return aM({basename:t==null?void 0:t.basename,future:Vc({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:R3({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||T4(),routes:e,mapRouteProperties:LM,window:t==null?void 0:t.window}).initialize()}function T4(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Vc({},t,{errors:b4(t.errors)})),t}function b4(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new Im(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let l=new i(o.message);l.stack="",n[r]=l}catch{}}if(n[r]==null){let i=new Error(o.message);i.stack="",n[r]=i}}else n[r]=o;return n}const N4=p.createContext({isTransitioning:!1}),R4=p.createContext(new Map),P4="startTransition",t1=f1[P4];function O4(e){t1?t1(e):e()}class A4{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function M4(e){let{fallbackElement:t,router:n,future:r}=e,[o,i]=p.useState(n.state),[l,s]=p.useState(),[a,u]=p.useState({isTransitioning:!1}),[c,d]=p.useState(),[f,h]=p.useState(),[m,g]=p.useState(),S=p.useRef(new Map),{v7_startTransition:v}=r||{},y=p.useCallback(T=>{v?O4(T):T()},[v]),x=p.useCallback((T,N)=>{let{deletedFetchers:D,unstable_viewTransitionOpts:O}=N;D.forEach(j=>S.current.delete(j)),T.fetchers.forEach((j,B)=>{j.data!==void 0&&S.current.set(B,j.data)}),!O||n.window==null||typeof n.window.document.startViewTransition!="function"?y(()=>i(T)):f&&c?(c.resolve(),f.skipTransition(),g({state:T,currentLocation:O.currentLocation,nextLocation:O.nextLocation})):(s(T),u({isTransitioning:!0,currentLocation:O.currentLocation,nextLocation:O.nextLocation}))},[n.window,f,c,S,y]);p.useLayoutEffect(()=>n.subscribe(x),[n,x]),p.useEffect(()=>{a.isTransitioning&&d(new A4)},[a.isTransitioning]),p.useEffect(()=>{if(c&&l&&n.window){let T=l,N=c.promise,D=n.window.document.startViewTransition(async()=>{y(()=>i(T)),await N});D.finished.finally(()=>{d(void 0),h(void 0),s(void 0),u({isTransitioning:!1})}),h(D)}},[y,l,c,n.window]),p.useEffect(()=>{c&&l&&o.location.key===l.location.key&&c.resolve()},[c,f,o.location,l]),p.useEffect(()=>{!a.isTransitioning&&m&&(s(m.state),u({isTransitioning:!0,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),g(void 0))},[a.isTransitioning,m]);let w=p.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:T=>n.navigate(T),push:(T,N,D)=>n.navigate(T,{state:N,preventScrollReset:D==null?void 0:D.preventScrollReset}),replace:(T,N,D)=>n.navigate(T,{replace:!0,state:N,preventScrollReset:D==null?void 0:D.preventScrollReset})}),[n]),k=n.basename||"/",b=p.useMemo(()=>({router:n,navigator:w,static:!1,basename:k}),[n,w,k]);return p.createElement(p.Fragment,null,p.createElement(Pd.Provider,{value:b},p.createElement(sC.Provider,{value:o},p.createElement(R4.Provider,{value:S.current},p.createElement(N4.Provider,{value:a},p.createElement(MM,{basename:k,location:o.location,navigationType:o.historyAction,navigator:w},o.initialized?p.createElement(L4,{routes:n.routes,state:o}):t))))),null)}function L4(e){let{routes:t,state:n}=e;return EM(t,void 0,n)}var n1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(n1||(n1={}));var r1;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(r1||(r1={}));function D4({error:e,resetErrorBoundary:t}){return console.error(e),_.jsx("div",{className:"absolute top-0 left-0 flex items-center justify-center w-screen h-screen bg-card-foreground",children:_.jsx("div",{className:"w-full h-full p-10",children:_.jsxs("div",{className:"w-full h-full p-10 bg-card text-primary",children:[_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsxs("div",{className:"flex items-center gap-[0.5em] text-lg font-bold text-center py-2",children:[_.jsx(GE,{})," encountered an error"]}),_.jsx("button",{onClick:t,children:_.jsx(yO,{})})]}),_.jsx("div",{className:"text-4xl font-normal ",children:"Message:"}),_.jsx("pre",{children:e.message}),e.stack&&_.jsx($4,{type:"single",className:"font-serif",collapsible:!0,defaultValue:"error",children:_.jsxs(NC,{value:"error",children:[_.jsx(RC,{children:"Stack trace:"}),_.jsx(PC,{className:"p-4 bg-popover text-popover-foreground",children:e.stack&&_.jsx("pre",{children:e.stack})})]})})]})})})}function I4(){const e=k4([{path:"/*",element:_.jsx(XM,{fallbackRender:D4,children:_.jsx(IM,{valApi:new tb("/api/val")})})}],{basename:"/api/val/static/edit"});return _.jsx(M4,{router:e})}jf.createRoot(document.getElementById("root")).render(ee.createElement(ee.StrictMode,null,ee.createElement(I4,null)));