@valbuild/ui 0.44.0 → 0.45.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.
- package/dist/valbuild-ui.cjs.js +208 -111
- package/dist/valbuild-ui.esm.js +208 -111
- package/package.json +3 -3
- package/server/.tmp/assets/{index-ktSR2XYf.js → index-C9FCHcaG.js} +68 -68
- package/server/.tmp/assets/index-Ol9liWWf.css +1 -0
- package/server/.tmp/index.html +2 -2
- package/server/dist/valbuild-ui-main.cjs.js +14830 -14742
- package/server/dist/valbuild-ui-main.esm.js +14830 -14742
- package/server/dist/valbuild-ui-server.cjs.js +1 -1
- package/server/dist/valbuild-ui-server.esm.js +1 -1
- package/server/.tmp/assets/index-q5ozHWoP.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var v$=Object.defineProperty;var y$=(e,t,n)=>t in e?v$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Je=(e,t,n)=>(y$(e,typeof t!="symbol"?t+"":t,n),n),x$=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var nh=(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 Gu=(e,t,n)=>(x$(e,t,"access private method"),n);function E_(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function
|
|
1
|
+
var v$=Object.defineProperty;var y$=(e,t,n)=>t in e?v$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Je=(e,t,n)=>(y$(e,typeof t!="symbol"?t+"":t,n),n),x$=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var nh=(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 Gu=(e,t,n)=>(x$(e,t,"access private method"),n);function E_(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Tu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C_={exports:{}},Pe={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var v$=Object.defineProperty;var y$=(e,t,n)=>t in e?v$(e,t,{enumerable:!0,config
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Nu=Symbol.for("react.element"),_$=Symbol.for("react.portal"),w$=Symbol.for("react.fragment"),S$=Symbol.for("react.strict_mode"),E$=Symbol.for("react.profiler"),C$=Symbol.for("react.provider"),k$=Symbol.for("react.context"),$$=Symbol.for("react.forward_ref"),b$=Symbol.for("react.suspense"),T$=Symbol.for("react.memo"),N$=Symbol.for("react.lazy"),ay=Symbol.iterator;function R$(e){return e===null||typeof e!="object"?null:(e=ay&&e[ay]||e["@@iterator"],typeof e=="function"?e:null)}var k_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$_=Object.assign,b_={};function xs(e,t,n){this.props=e,this.context=t,this.refs=b_,this.updater=n||k_}xs.prototype.isReactComponent={};xs.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")};xs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function T_(){}T_.prototype=xs.prototype;function Qm(e,t,n){this.props=e,this.context=t,this.refs=b_,this.updater=n||k_}var Jm=Qm.prototype=new T_;Jm.constructor=Qm;$_(Jm,xs.prototype);Jm.isPureReactComponent=!0;var uy=Array.isArray,N_=Object.prototype.hasOwnProperty,qm={current:null},R_={key:!0,ref:!0,__self:!0,__source:!0};function O_(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)N_.call(t,r)&&!R_.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var a=Array(s),u=0;u<s;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:Nu,type:e,key:o,ref:l,props:i,_owner:qm.current}}function O$(e,t){return{$$typeof:Nu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function eg(e){return typeof e=="object"&&e!==null&&e.$$typeof===Nu}function P$(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var cy=/\/+/g;function rh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?P$(""+e.key):t.toString(36)}function Tc(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Nu:case _$:l=!0}}if(l)return l=e,i=i(l),e=r===""?"."+rh(l,0):r,uy(i)?(n="",e!=null&&(n=e.replace(cy,"$&/")+"/"),Tc(i,t,n,"",function(u){return u})):i!=null&&(eg(i)&&(i=O$(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(cy,"$&/")+"/")+e)),t.push(i)),1;if(l=0,r=r===""?".":r+":",uy(e))for(var s=0;s<e.length;s++){o=e[s];var a=r+rh(o,s);l+=Tc(o,t,n,a,i)}else if(a=R$(e),typeof a=="function")for(e=a.call(e),s=0;!(o=e.next()).done;)o=o.value,a=r+rh(o,s++),l+=Tc(o,t,n,a,i);else if(o==="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 Yu(e,t,n){if(e==null)return e;var r=[],i=0;return Tc(e,r,"","",function(o){return t.call(n,o,i++)}),r}function A$(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 xn={current:null},Nc={transition:null},M$={ReactCurrentDispatcher:xn,ReactCurrentBatchConfig:Nc,ReactCurrentOwner:qm};Pe.Children={map:Yu,forEach:function(e,t,n){Yu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Yu(e,function(){t++}),t},toArray:function(e){return Yu(e,function(t){return t})||[]},only:function(e){if(!eg(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Pe.Component=xs;Pe.Fragment=w$;Pe.Profiler=E$;Pe.PureComponent=Qm;Pe.StrictMode=S$;Pe.Suspense=b$;Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M$;Pe.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=$_({},e.props),i=e.key,o=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,l=qm.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(a in t)N_.call(t,a)&&!R_.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:Nu,type:e.type,key:i,ref:o,props:r,_owner:l}};Pe.createContext=function(e){return e={$$typeof:k$,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:C$,_context:e},e.Consumer=e};Pe.createElement=O_;Pe.createFactory=function(e){var t=O_.bind(null,e);return t.type=e,t};Pe.createRef=function(){return{current:null}};Pe.forwardRef=function(e){return{$$typeof:$$,render:e}};Pe.isValidElement=eg;Pe.lazy=function(e){return{$$typeof:N$,_payload:{_status:-1,_result:e},_init:A$}};Pe.memo=function(e,t){return{$$typeof:T$,type:e,compare:t===void 0?null:t}};Pe.startTransition=function(e){var t=Nc.transition;Nc.transition={};try{e()}finally{Nc.transition=t}};Pe.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Pe.useCallback=function(e,t){return xn.current.useCallback(e,t)};Pe.useContext=function(e){return xn.current.useContext(e)};Pe.useDebugValue=function(){};Pe.useDeferredValue=function(e){return xn.current.useDeferredValue(e)};Pe.useEffect=function(e,t){return xn.current.useEffect(e,t)};Pe.useId=function(){return xn.current.useId()};Pe.useImperativeHandle=function(e,t,n){return xn.current.useImperativeHandle(e,t,n)};Pe.useInsertionEffect=function(e,t){return xn.current.useInsertionEffect(e,t)};Pe.useLayoutEffect=function(e,t){return xn.current.useLayoutEffect(e,t)};Pe.useMemo=function(e,t){return xn.current.useMemo(e,t)};Pe.useReducer=function(e,t,n){return xn.current.useReducer(e,t,n)};Pe.useRef=function(e){return xn.current.useRef(e)};Pe.useState=function(e){return xn.current.useState(e)};Pe.useSyncExternalStore=function(e,t,n){return xn.current.useSyncExternalStore(e,t,n)};Pe.useTransition=function(){return xn.current.useTransition()};Pe.version="18.2.0";C_.exports=Pe;var p=C_.exports;const re=Tu(p),P_=E_({__proto__:null,default:re},[p]);var Qh={},A_={exports:{}},Vn={},M_={exports:{}},D_={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* scheduler.production.min.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var v$=Object.defineProperty;var y$=(e,t,n)=>t in e?v$(e,t,{enumerable:!0,config
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/(function(e){function t(k,j){var
|
|
17
|
+
*/(function(e){function t(k,j){var I=k.length;k.push(j);e:for(;0<I;){var Z=I-1>>>1,ne=k[Z];if(0<i(ne,j))k[Z]=j,k[I]=ne,I=Z;else break e}}function n(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var j=k[0],I=k.pop();if(I!==j){k[0]=I;e:for(var Z=0,ne=k.length,ke=ne>>>1;Z<ke;){var ve=2*(Z+1)-1,We=k[ve],Fe=ve+1,te=k[Fe];if(0>i(We,I))Fe<ne&&0>i(te,We)?(k[Z]=te,k[Fe]=I,Z=Fe):(k[Z]=We,k[ve]=I,Z=ve);else if(Fe<ne&&0>i(te,I))k[Z]=te,k[Fe]=I,Z=Fe;else break e}}return j}function i(k,j){var I=k.sortIndex-j.sortIndex;return I!==0?I:k.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.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,w=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 _(k){for(var j=n(u);j!==null;){if(j.callback===null)r(u);else if(j.startTime<=k)r(u),j.sortIndex=j.expirationTime,t(a,j);else break;j=n(u)}}function S(k){if(g=!1,_(k),!m)if(n(a)!==null)m=!0,O(E);else{var j=n(u);j!==null&&A(S,j.startTime-k)}}function E(k,j){m=!1,g&&(g=!1,v(T),T=-1),h=!0;var I=f;try{for(_(j),d=n(a);d!==null&&(!(d.expirationTime>j)||k&&!D());){var Z=d.callback;if(typeof Z=="function"){d.callback=null,f=d.priorityLevel;var ne=Z(d.expirationTime<=j);j=e.unstable_now(),typeof ne=="function"?d.callback=ne:d===n(a)&&r(a),_(j)}else r(a);d=n(a)}if(d!==null)var ke=!0;else{var ve=n(u);ve!==null&&A(S,ve.startTime-j),ke=!1}return ke}finally{d=null,f=I,h=!1}}var $=!1,C=null,T=-1,N=5,R=-1;function D(){return!(e.unstable_now()-R<N)}function F(){if(C!==null){var k=e.unstable_now();R=k;var j=!0;try{j=C(!0,k)}finally{j?se():($=!1,C=null)}}else $=!1}var se;if(typeof y=="function")se=function(){y(F)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,K=V.port2;V.port1.onmessage=F,se=function(){K.postMessage(null)}}else se=function(){w(F,0)};function O(k){C=k,$||($=!0,se())}function A(k,j){T=w(function(){k(e.unstable_now())},j)}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(k){k.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,O(E))},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(k){switch(f){case 1:case 2:case 3:var j=3;break;default:j=f}var I=f;f=j;try{return k()}finally{f=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(k,j){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var I=f;f=k;try{return j()}finally{f=I}},e.unstable_scheduleCallback=function(k,j,I){var Z=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?Z+I:Z):I=Z,k){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=I+ne,k={id:c++,callback:j,priorityLevel:k,startTime:I,expirationTime:ne,sortIndex:-1},I>Z?(k.sortIndex=I,t(u,k),n(a)===null&&k===n(u)&&(g?(v(T),T=-1):g=!0,A(S,I-Z))):(k.sortIndex=ne,t(a,k),m||h||(m=!0,O(E))),k},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(k){var j=f;return function(){var I=f;f=j;try{return k.apply(this,arguments)}finally{f=I}}}})(D_);M_.exports=D_;var D$=M_.exports;/**
|
|
18
18
|
* @license React
|
|
19
19
|
* react-dom.production.min.js
|
|
20
20
|
*
|
|
@@ -22,14 +22,14 @@ var v$=Object.defineProperty;var y$=(e,t,n)=>t in e?v$(e,t,{enumerable:!0,config
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var
|
|
25
|
+
*/var L_=p,Bn=D$;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 I_=new Set,Ia={};function il(e,t){ts(e,t),ts(e+"Capture",t)}function ts(e,t){for(Ia[e]=t,e=0;e<t.length;e++)I_.add(t[e])}var di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jh=Object.prototype.hasOwnProperty,L$=/^[: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]*$/,dy={},fy={};function I$(e){return Jh.call(fy,e)?!0:Jh.call(dy,e)?!1:L$.test(e)?fy[e]=!0:(dy[e]=!0,!1)}function j$(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 z$(e,t,n,r){if(t===null||typeof t>"u"||j$(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 _n(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var Gt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Gt[e]=new _n(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Gt[t]=new _n(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Gt[e]=new _n(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Gt[e]=new _n(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){Gt[e]=new _n(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Gt[e]=new _n(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Gt[e]=new _n(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Gt[e]=new _n(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Gt[e]=new _n(e,5,!1,e.toLowerCase(),null,!1,!1)});var tg=/[\-:]([a-z])/g;function ng(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(tg,ng);Gt[t]=new _n(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(tg,ng);Gt[t]=new _n(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(tg,ng);Gt[t]=new _n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Gt[e]=new _n(e,1,!1,e.toLowerCase(),null,!1,!1)});Gt.xlinkHref=new _n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Gt[e]=new _n(e,1,!1,e.toLowerCase(),null,!0,!0)});function rg(e,t,n,r){var i=Gt.hasOwnProperty(t)?Gt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(z$(t,n,i,r)&&(n=null),r||i===null?I$(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var xi=L_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xu=Symbol.for("react.element"),bl=Symbol.for("react.portal"),Tl=Symbol.for("react.fragment"),ig=Symbol.for("react.strict_mode"),qh=Symbol.for("react.profiler"),j_=Symbol.for("react.provider"),z_=Symbol.for("react.context"),og=Symbol.for("react.forward_ref"),ep=Symbol.for("react.suspense"),tp=Symbol.for("react.suspense_list"),lg=Symbol.for("react.memo"),Ai=Symbol.for("react.lazy"),F_=Symbol.for("react.offscreen"),hy=Symbol.iterator;function Bs(e){return e===null||typeof e!="object"?null:(e=hy&&e[hy]||e["@@iterator"],typeof e=="function"?e:null)}var mt=Object.assign,ih;function la(e){if(ih===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ih=t&&t[1]||""}return`
|
|
26
26
|
`+ih+e}var oh=!1;function lh(e,t){if(!e||oh)return"";oh=!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 i=u.stack.split(`
|
|
27
27
|
`),o=r.stack.split(`
|
|
28
28
|
`),l=i.length-1,s=o.length-1;1<=l&&0<=s&&i[l]!==o[s];)s--;for(;1<=l&&0<=s;l--,s--)if(i[l]!==o[s]){if(l!==1||s!==1)do if(l--,s--,0>s||i[l]!==o[s]){var a=`
|
|
29
|
-
`+i[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{oh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ia(e):""}function F$(e){switch(e.tag){case 5:return ia(e.type);case 16:return ia("Lazy");case 13:return ia("Suspense");case 19:return ia("SuspenseList");case 0:case 2:case 15:return e=lh(e.type,!1),e;case 11:return e=lh(e.type.render,!1),e;case 1:return e=lh(e.type,!0),e;default:return""}}function np(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 bl:return"Fragment";case $l:return"Portal";case qh:return"Profiler";case ig:return"StrictMode";case ep:return"Suspense";case tp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case z_:return(e.displayName||"Context")+".Consumer";case j_:return(e._context.displayName||"Context")+".Provider";case og:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lg:return t=e.displayName||null,t!==null?t:np(e.type)||"Memo";case Ai:t=e._payload,e=e._init;try{return np(e(t))}catch{}}return null}function B$(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 np(t);case 8:return t===ig?"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 to(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function B_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function U$(e){var t=B_(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 i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.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 Qu(e){e._valueTracker||(e._valueTracker=U$(e))}function U_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=B_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Yc(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 rp(e,t){var n=t.checked;return mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function py(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=to(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 W_(e,t){t=t.checked,t!=null&&rg(e,"checked",t,!1)}function ip(e,t){W_(e,t);var n=to(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")?op(e,t.type,n):t.hasOwnProperty("defaultValue")&&op(e,t.type,to(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function my(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 op(e,t,n){(t!=="number"||Yc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var oa=Array.isArray;function Ul(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+to(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function lp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function gy(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(oa(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:to(n)}}function V_(e,t){var n=to(t.value),r=to(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 vy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function H_(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 sp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?H_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ju,K_=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ju=Ju||document.createElement("div"),Ju.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ju.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ia(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fa={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},W$=["Webkit","ms","Moz","O"];Object.keys(fa).forEach(function(e){W$.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fa[t]=fa[e]})});function Z_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fa.hasOwnProperty(e)&&fa[e]?(""+t).trim():t+"px"}function G_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Z_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var V$=mt({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 ap(e,t){if(t){if(V$[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 up(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 cp=null;function sg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dp=null,Wl=null,Vl=null;function yy(e){if(e=Ru(e)){if(typeof dp!="function")throw Error(U(280));var t=e.stateNode;t&&(t=af(t),dp(e.stateNode,e.type,t))}}function Y_(e){Wl?Vl?Vl.push(e):Vl=[e]:Wl=e}function X_(){if(Wl){var e=Wl,t=Vl;if(Vl=Wl=null,yy(e),t)for(e=0;e<t.length;e++)yy(t[e])}}function Q_(e,t){return e(t)}function J_(){}var sh=!1;function q_(e,t,n){if(sh)return e(t,n);sh=!0;try{return Q_(e,t,n)}finally{sh=!1,(Wl!==null||Vl!==null)&&(J_(),X_())}}function La(e,t){var n=e.stateNode;if(n===null)return null;var r=af(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 fp=!1;if(di)try{var Fs={};Object.defineProperty(Fs,"passive",{get:function(){fp=!0}}),window.addEventListener("test",Fs,Fs),window.removeEventListener("test",Fs,Fs)}catch{fp=!1}function H$(e,t,n,r,i,o,l,s,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ha=!1,Xc=null,Qc=!1,hp=null,K$={onError:function(e){ha=!0,Xc=e}};function Z$(e,t,n,r,i,o,l,s,a){ha=!1,Xc=null,H$.apply(K$,arguments)}function G$(e,t,n,r,i,o,l,s,a){if(Z$.apply(this,arguments),ha){if(ha){var u=Xc;ha=!1,Xc=null}else throw Error(U(198));Qc||(Qc=!0,hp=u)}}function il(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 e1(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 xy(e){if(il(e)!==e)throw Error(U(188))}function Y$(e){var t=e.alternate;if(!t){if(t=il(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return xy(i),e;if(o===r)return xy(i),t;o=o.sibling}throw Error(U(188))}if(n.return!==r.return)n=i,r=o;else{for(var l=!1,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){for(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)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 t1(e){return e=Y$(e),e!==null?n1(e):null}function n1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=n1(e);if(t!==null)return t;e=e.sibling}return null}var r1=Bn.unstable_scheduleCallback,_y=Bn.unstable_cancelCallback,X$=Bn.unstable_shouldYield,Q$=Bn.unstable_requestPaint,Ct=Bn.unstable_now,J$=Bn.unstable_getCurrentPriorityLevel,ag=Bn.unstable_ImmediatePriority,i1=Bn.unstable_UserBlockingPriority,Jc=Bn.unstable_NormalPriority,q$=Bn.unstable_LowPriority,o1=Bn.unstable_IdlePriority,rf=null,zr=null;function eb(e){if(zr&&typeof zr.onCommitFiberRoot=="function")try{zr.onCommitFiberRoot(rf,e,void 0,(e.current.flags&128)===128)}catch{}}var wr=Math.clz32?Math.clz32:rb,tb=Math.log,nb=Math.LN2;function rb(e){return e>>>=0,e===0?32:31-(tb(e)/nb|0)|0}var qu=64,ec=4194304;function la(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 qc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~i;s!==0?r=la(s):(o&=l,o!==0&&(r=la(o)))}else l=n&~i,l!==0?r=la(l):o!==0&&(r=la(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&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-wr(t),i=1<<n,r|=e[n],t&=~i;return r}function ib(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 ob(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var l=31-wr(o),s=1<<l,a=i[l];a===-1?(!(s&n)||s&r)&&(i[l]=ib(s,t)):a<=t&&(e.expiredLanes|=s),o&=~s}}function pp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function l1(){var e=qu;return qu<<=1,!(qu&4194240)&&(qu=64),e}function ah(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Tu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wr(t),e[t]=n}function lb(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 i=31-wr(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function ug(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-wr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ue=0;function s1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var a1,cg,u1,c1,d1,mp=!1,tc=[],Vi=null,Hi=null,Ki=null,ja=new Map,za=new Map,Ii=[],sb="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 wy(e,t){switch(e){case"focusin":case"focusout":Vi=null;break;case"dragenter":case"dragleave":Hi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":ja.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":za.delete(t.pointerId)}}function Bs(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Ru(t),t!==null&&cg(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ab(e,t,n,r,i){switch(t){case"focusin":return Vi=Bs(Vi,e,t,n,r,i),!0;case"dragenter":return Hi=Bs(Hi,e,t,n,r,i),!0;case"mouseover":return Ki=Bs(Ki,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return ja.set(o,Bs(ja.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,za.set(o,Bs(za.get(o)||null,e,t,n,r,i)),!0}return!1}function f1(e){var t=Oo(e.target);if(t!==null){var n=il(t);if(n!==null){if(t=n.tag,t===13){if(t=e1(n),t!==null){e.blockedOn=t,d1(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 Rc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);cp=r,n.target.dispatchEvent(r),cp=null}else return t=Ru(n),t!==null&&cg(t),e.blockedOn=n,!1;t.shift()}return!0}function Sy(e,t,n){Rc(e)&&n.delete(t)}function ub(){mp=!1,Vi!==null&&Rc(Vi)&&(Vi=null),Hi!==null&&Rc(Hi)&&(Hi=null),Ki!==null&&Rc(Ki)&&(Ki=null),ja.forEach(Sy),za.forEach(Sy)}function Us(e,t){e.blockedOn===t&&(e.blockedOn=null,mp||(mp=!0,Bn.unstable_scheduleCallback(Bn.unstable_NormalPriority,ub)))}function Fa(e){function t(i){return Us(i,e)}if(0<tc.length){Us(tc[0],e);for(var n=1;n<tc.length;n++){var r=tc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Vi!==null&&Us(Vi,e),Hi!==null&&Us(Hi,e),Ki!==null&&Us(Ki,e),ja.forEach(t),za.forEach(t),n=0;n<Ii.length;n++)r=Ii[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ii.length&&(n=Ii[0],n.blockedOn===null);)f1(n),n.blockedOn===null&&Ii.shift()}var Hl=xi.ReactCurrentBatchConfig,ed=!0;function cb(e,t,n,r){var i=Ue,o=Hl.transition;Hl.transition=null;try{Ue=1,dg(e,t,n,r)}finally{Ue=i,Hl.transition=o}}function db(e,t,n,r){var i=Ue,o=Hl.transition;Hl.transition=null;try{Ue=4,dg(e,t,n,r)}finally{Ue=i,Hl.transition=o}}function dg(e,t,n,r){if(ed){var i=gp(e,t,n,r);if(i===null)yh(e,t,r,td,n),wy(e,r);else if(ab(i,e,t,n,r))r.stopPropagation();else if(wy(e,r),t&4&&-1<sb.indexOf(e)){for(;i!==null;){var o=Ru(i);if(o!==null&&a1(o),o=gp(e,t,n,r),o===null&&yh(e,t,r,td,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else yh(e,t,r,null,n)}}var td=null;function gp(e,t,n,r){if(td=null,e=sg(r),e=Oo(e),e!==null)if(t=il(e),t===null)e=null;else if(n=t.tag,n===13){if(e=e1(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 td=e,null}function h1(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(J$()){case ag:return 1;case i1:return 4;case Jc:case q$:return 16;case o1:return 536870912;default:return 16}default:return 16}}var Fi=null,fg=null,Oc=null;function p1(){if(Oc)return Oc;var e,t=fg,n=t.length,r,i="value"in Fi?Fi.value:Fi.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===i[o-r];r++);return Oc=i.slice(e,1<r?1-r:void 0)}function Pc(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 nc(){return!0}function Ey(){return!1}function Hn(e){function t(n,r,i,o,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?nc:Ey,this.isPropagationStopped=Ey,this}return mt(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=nc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=nc)},persist:function(){},isPersistent:nc}),t}var xs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hg=Hn(xs),Nu=mt({},xs,{view:0,detail:0}),fb=Hn(Nu),uh,ch,Ws,of=mt({},Nu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pg,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!==Ws&&(Ws&&e.type==="mousemove"?(uh=e.screenX-Ws.screenX,ch=e.screenY-Ws.screenY):ch=uh=0,Ws=e),uh)},movementY:function(e){return"movementY"in e?e.movementY:ch}}),Cy=Hn(of),hb=mt({},of,{dataTransfer:0}),pb=Hn(hb),mb=mt({},Nu,{relatedTarget:0}),dh=Hn(mb),gb=mt({},xs,{animationName:0,elapsedTime:0,pseudoElement:0}),vb=Hn(gb),yb=mt({},xs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xb=Hn(yb),_b=mt({},xs,{data:0}),ky=Hn(_b),wb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sb={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"},Eb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Eb[e])?!!t[e]:!1}function pg(){return Cb}var kb=mt({},Nu,{key:function(e){if(e.key){var t=wb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Pc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pg,charCode:function(e){return e.type==="keypress"?Pc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Pc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$b=Hn(kb),bb=mt({},of,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$y=Hn(bb),Tb=mt({},Nu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pg}),Nb=Hn(Tb),Rb=mt({},xs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ob=Hn(Rb),Pb=mt({},of,{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}),Ab=Hn(Pb),Mb=[9,13,27,32],mg=di&&"CompositionEvent"in window,pa=null;di&&"documentMode"in document&&(pa=document.documentMode);var Db=di&&"TextEvent"in window&&!pa,m1=di&&(!mg||pa&&8<pa&&11>=pa),by=" ",Ty=!1;function g1(e,t){switch(e){case"keyup":return Mb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tl=!1;function Ib(e,t){switch(e){case"compositionend":return v1(t);case"keypress":return t.which!==32?null:(Ty=!0,by);case"textInput":return e=t.data,e===by&&Ty?null:e;default:return null}}function Lb(e,t){if(Tl)return e==="compositionend"||!mg&&g1(e,t)?(e=p1(),Oc=fg=Fi=null,Tl=!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 m1&&t.locale!=="ko"?null:t.data;default:return null}}var jb={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 Ny(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!jb[e.type]:t==="textarea"}function y1(e,t,n,r){Y_(r),t=nd(t,"onChange"),0<t.length&&(n=new hg("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ma=null,Ba=null;function zb(e){N1(e,0)}function lf(e){var t=Ol(e);if(U_(t))return e}function Fb(e,t){if(e==="change")return t}var x1=!1;if(di){var fh;if(di){var hh="oninput"in document;if(!hh){var Ry=document.createElement("div");Ry.setAttribute("oninput","return;"),hh=typeof Ry.oninput=="function"}fh=hh}else fh=!1;x1=fh&&(!document.documentMode||9<document.documentMode)}function Oy(){ma&&(ma.detachEvent("onpropertychange",_1),Ba=ma=null)}function _1(e){if(e.propertyName==="value"&&lf(Ba)){var t=[];y1(t,Ba,e,sg(e)),q_(zb,t)}}function Bb(e,t,n){e==="focusin"?(Oy(),ma=t,Ba=n,ma.attachEvent("onpropertychange",_1)):e==="focusout"&&Oy()}function Ub(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lf(Ba)}function Wb(e,t){if(e==="click")return lf(t)}function Vb(e,t){if(e==="input"||e==="change")return lf(t)}function Hb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kr=typeof Object.is=="function"?Object.is:Hb;function Ua(e,t){if(kr(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 i=n[r];if(!Jh.call(t,i)||!kr(e[i],t[i]))return!1}return!0}function Py(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ay(e,t){var n=Py(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=Py(n)}}function w1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?w1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S1(){for(var e=window,t=Yc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yc(e.document)}return t}function gg(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 Kb(e){var t=S1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&w1(n.ownerDocument.documentElement,n)){if(r!==null&&gg(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 i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Ay(n,o);var l=Ay(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>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 Zb=di&&"documentMode"in document&&11>=document.documentMode,Nl=null,vp=null,ga=null,yp=!1;function My(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yp||Nl==null||Nl!==Yc(r)||(r=Nl,"selectionStart"in r&&gg(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}),ga&&Ua(ga,r)||(ga=r,r=nd(vp,"onSelect"),0<r.length&&(t=new hg("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Nl)))}function rc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Rl={animationend:rc("Animation","AnimationEnd"),animationiteration:rc("Animation","AnimationIteration"),animationstart:rc("Animation","AnimationStart"),transitionend:rc("Transition","TransitionEnd")},ph={},E1={};di&&(E1=document.createElement("div").style,"AnimationEvent"in window||(delete Rl.animationend.animation,delete Rl.animationiteration.animation,delete Rl.animationstart.animation),"TransitionEvent"in window||delete Rl.transitionend.transition);function sf(e){if(ph[e])return ph[e];if(!Rl[e])return e;var t=Rl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in E1)return ph[e]=t[n];return e}var C1=sf("animationend"),k1=sf("animationiteration"),$1=sf("animationstart"),b1=sf("transitionend"),T1=new Map,Dy="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 mo(e,t){T1.set(e,t),rl(t,[e])}for(var mh=0;mh<Dy.length;mh++){var gh=Dy[mh],Gb=gh.toLowerCase(),Yb=gh[0].toUpperCase()+gh.slice(1);mo(Gb,"on"+Yb)}mo(C1,"onAnimationEnd");mo(k1,"onAnimationIteration");mo($1,"onAnimationStart");mo("dblclick","onDoubleClick");mo("focusin","onFocus");mo("focusout","onBlur");mo(b1,"onTransitionEnd");es("onMouseEnter",["mouseout","mouseover"]);es("onMouseLeave",["mouseout","mouseover"]);es("onPointerEnter",["pointerout","pointerover"]);es("onPointerLeave",["pointerout","pointerover"]);rl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));rl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));rl("onBeforeInput",["compositionend","keypress","textInput","paste"]);rl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));rl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));rl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sa="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(" "),Xb=new Set("cancel close invalid load scroll toggle".split(" ").concat(sa));function Iy(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,G$(r,t,void 0,e),e.currentTarget=null}function N1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=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!==o&&i.isPropagationStopped())break e;Iy(i,s,u),o=a}else for(l=0;l<r.length;l++){if(s=r[l],a=s.instance,u=s.currentTarget,s=s.listener,a!==o&&i.isPropagationStopped())break e;Iy(i,s,u),o=a}}}if(Qc)throw e=hp,Qc=!1,hp=null,e}function et(e,t){var n=t[Ep];n===void 0&&(n=t[Ep]=new Set);var r=e+"__bubble";n.has(r)||(R1(t,e,2,!1),n.add(r))}function vh(e,t,n){var r=0;t&&(r|=4),R1(n,e,r,t)}var ic="_reactListening"+Math.random().toString(36).slice(2);function Wa(e){if(!e[ic]){e[ic]=!0,L_.forEach(function(n){n!=="selectionchange"&&(Xb.has(n)||vh(n,!1,e),vh(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ic]||(t[ic]=!0,vh("selectionchange",!1,t))}}function R1(e,t,n,r){switch(h1(t)){case 1:var i=cb;break;case 4:i=db;break;default:i=dg}n=i.bind(null,t,n,e),i=void 0,!fp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function yh(e,t,n,r,i){var o=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===i||s.nodeType===8&&s.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&&(a=l.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;l=l.return}for(;s!==null;){if(l=Oo(s),l===null)return;if(a=l.tag,a===5||a===6){r=o=l;continue e}s=s.parentNode}}r=r.return}q_(function(){var u=o,c=sg(n),d=[];e:{var f=T1.get(e);if(f!==void 0){var h=hg,m=e;switch(e){case"keypress":if(Pc(n)===0)break e;case"keydown":case"keyup":h=$b;break;case"focusin":m="focus",h=dh;break;case"focusout":m="blur",h=dh;break;case"beforeblur":case"afterblur":h=dh;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=Cy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=pb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Nb;break;case C1:case k1:case $1:h=vb;break;case b1:h=Ob;break;case"scroll":h=fb;break;case"wheel":h=Ab;break;case"copy":case"cut":case"paste":h=xb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=$y}var g=(t&4)!==0,S=!g&&e==="scroll",v=g?f!==null?f+"Capture":null:f;g=[];for(var y=u,_;y!==null;){_=y;var w=_.stateNode;if(_.tag===5&&w!==null&&(_=w,v!==null&&(w=La(y,v),w!=null&&g.push(Va(y,w,_)))),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!==cp&&(m=n.relatedTarget||n.fromElement)&&(Oo(m)||m[fi]))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?Oo(m):null,m!==null&&(S=il(m),m!==S||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(g=Cy,w="onMouseLeave",v="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=$y,w="onPointerLeave",v="onPointerEnter",y="pointer"),S=h==null?f:Ol(h),_=m==null?f:Ol(m),f=new g(w,y+"leave",h,n,c),f.target=S,f.relatedTarget=_,w=null,Oo(c)===u&&(g=new g(v,y+"enter",m,n,c),g.target=_,g.relatedTarget=S,w=g),S=w,h&&m)t:{for(g=h,v=m,y=0,_=g;_;_=pl(_))y++;for(_=0,w=v;w;w=pl(w))_++;for(;0<y-_;)g=pl(g),y--;for(;0<_-y;)v=pl(v),_--;for(;y--;){if(g===v||v!==null&&g===v.alternate)break t;g=pl(g),v=pl(v)}g=null}else g=null;h!==null&&Ly(d,f,h,g,!1),m!==null&&S!==null&&Ly(d,S,m,g,!0)}}e:{if(f=u?Ol(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var E=Fb;else if(Ny(f))if(x1)E=Vb;else{E=Ub;var $=Bb}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=Wb);if(E&&(E=E(e,u))){y1(d,E,n,c);break e}$&&$(e,f,u),e==="focusout"&&($=f._wrapperState)&&$.controlled&&f.type==="number"&&op(f,"number",f.value)}switch($=u?Ol(u):window,e){case"focusin":(Ny($)||$.contentEditable==="true")&&(Nl=$,vp=u,ga=null);break;case"focusout":ga=vp=Nl=null;break;case"mousedown":yp=!0;break;case"contextmenu":case"mouseup":case"dragend":yp=!1,My(d,n,c);break;case"selectionchange":if(Zb)break;case"keydown":case"keyup":My(d,n,c)}var C;if(mg)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Tl?g1(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(m1&&n.locale!=="ko"&&(Tl||T!=="onCompositionStart"?T==="onCompositionEnd"&&Tl&&(C=p1()):(Fi=c,fg="value"in Fi?Fi.value:Fi.textContent,Tl=!0)),$=nd(u,T),0<$.length&&(T=new ky(T,e,null,n,c),d.push({event:T,listeners:$}),C?T.data=C:(C=v1(n),C!==null&&(T.data=C)))),(C=Db?Ib(e,n):Lb(e,n))&&(u=nd(u,"onBeforeInput"),0<u.length&&(c=new ky("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=C))}N1(d,t)})}function Va(e,t,n){return{instance:e,listener:t,currentTarget:n}}function nd(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=La(e,n),o!=null&&r.unshift(Va(e,o,i)),o=La(e,t),o!=null&&r.push(Va(e,o,i))),e=e.return}return r}function pl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ly(e,t,n,r,i){for(var o=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,i?(a=La(n,o),a!=null&&l.unshift(Va(n,a,s))):i||(a=La(n,o),a!=null&&l.push(Va(n,a,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var Qb=/\r\n?/g,Jb=/\u0000|\uFFFD/g;function jy(e){return(typeof e=="string"?e:""+e).replace(Qb,`
|
|
30
|
-
`).replace(Jb,"")}function oc(e,t,n){if(t=jy(t),jy(e)!==t&&n)throw Error(U(425))}function rd(){}var xp=null,_p=null;function wp(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 Sp=typeof setTimeout=="function"?setTimeout:void 0,qb=typeof clearTimeout=="function"?clearTimeout:void 0,zy=typeof Promise=="function"?Promise:void 0,eT=typeof queueMicrotask=="function"?queueMicrotask:typeof zy<"u"?function(e){return zy.resolve(null).then(e).catch(tT)}:Sp;function tT(e){setTimeout(function(){throw e})}function xh(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Fa(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Fa(t)}function Zi(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 Fy(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 _s=Math.random().toString(36).slice(2),Mr="__reactFiber$"+_s,Ha="__reactProps$"+_s,fi="__reactContainer$"+_s,Ep="__reactEvents$"+_s,nT="__reactListeners$"+_s,rT="__reactHandles$"+_s;function Oo(e){var t=e[Mr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fi]||n[Mr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Fy(e);e!==null;){if(n=e[Mr])return n;e=Fy(e)}return t}e=n,n=e.parentNode}return null}function Ru(e){return e=e[Mr]||e[fi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ol(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function af(e){return e[Ha]||null}var Cp=[],Pl=-1;function go(e){return{current:e}}function it(e){0>Pl||(e.current=Cp[Pl],Cp[Pl]=null,Pl--)}function Xe(e,t){Pl++,Cp[Pl]=e.current,e.current=t}var no={},rn=go(no),bn=go(!1),Wo=no;function ts(e,t){var n=e.type.contextTypes;if(!n)return no;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Tn(e){return e=e.childContextTypes,e!=null}function id(){it(bn),it(rn)}function By(e,t,n){if(rn.current!==no)throw Error(U(168));Xe(rn,t),Xe(bn,n)}function O1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(U(108,B$(e)||"Unknown",i));return mt({},n,r)}function od(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||no,Wo=rn.current,Xe(rn,e),Xe(bn,bn.current),!0}function Uy(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=O1(e,t,Wo),r.__reactInternalMemoizedMergedChildContext=e,it(bn),it(rn),Xe(rn,e)):it(bn),Xe(bn,n)}var ii=null,uf=!1,_h=!1;function P1(e){ii===null?ii=[e]:ii.push(e)}function iT(e){uf=!0,P1(e)}function vo(){if(!_h&&ii!==null){_h=!0;var e=0,t=Ue;try{var n=ii;for(Ue=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ii=null,uf=!1}catch(i){throw ii!==null&&(ii=ii.slice(e+1)),r1(ag,vo),i}finally{Ue=t,_h=!1}}return null}var Al=[],Ml=0,ld=null,sd=0,Yn=[],Xn=0,Vo=null,si=1,ai="";function bo(e,t){Al[Ml++]=sd,Al[Ml++]=ld,ld=e,sd=t}function A1(e,t,n){Yn[Xn++]=si,Yn[Xn++]=ai,Yn[Xn++]=Vo,Vo=e;var r=si;e=ai;var i=32-wr(r)-1;r&=~(1<<i),n+=1;var o=32-wr(t)+i;if(30<o){var l=i-i%5;o=(r&(1<<l)-1).toString(32),r>>=l,i-=l,si=1<<32-wr(t)+i|n<<i|r,ai=o+e}else si=1<<o|n<<i|r,ai=e}function vg(e){e.return!==null&&(bo(e,1),A1(e,1,0))}function yg(e){for(;e===ld;)ld=Al[--Ml],Al[Ml]=null,sd=Al[--Ml],Al[Ml]=null;for(;e===Vo;)Vo=Yn[--Xn],Yn[Xn]=null,ai=Yn[--Xn],Yn[Xn]=null,si=Yn[--Xn],Yn[Xn]=null}var Ln=null,In=null,ot=!1,yr=null;function M1(e,t){var n=qn(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 Wy(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,Ln=e,In=Zi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ln=e,In=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Vo!==null?{id:si,overflow:ai}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=qn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ln=e,In=null,!0):!1;default:return!1}}function kp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function $p(e){if(ot){var t=In;if(t){var n=t;if(!Wy(e,t)){if(kp(e))throw Error(U(418));t=Zi(n.nextSibling);var r=Ln;t&&Wy(e,t)?M1(r,n):(e.flags=e.flags&-4097|2,ot=!1,Ln=e)}}else{if(kp(e))throw Error(U(418));e.flags=e.flags&-4097|2,ot=!1,Ln=e}}}function Vy(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ln=e}function lc(e){if(e!==Ln)return!1;if(!ot)return Vy(e),ot=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!wp(e.type,e.memoizedProps)),t&&(t=In)){if(kp(e))throw D1(),Error(U(418));for(;t;)M1(e,t),t=Zi(t.nextSibling)}if(Vy(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){In=Zi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}In=null}}else In=Ln?Zi(e.stateNode.nextSibling):null;return!0}function D1(){for(var e=In;e;)e=Zi(e.nextSibling)}function ns(){In=Ln=null,ot=!1}function xg(e){yr===null?yr=[e]:yr.push(e)}var oT=xi.ReactCurrentBatchConfig;function mr(e,t){if(e&&e.defaultProps){t=mt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var ad=go(null),ud=null,Dl=null,_g=null;function wg(){_g=Dl=ud=null}function Sg(e){var t=ad.current;it(ad),e._currentValue=t}function bp(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 Kl(e,t){ud=e,_g=Dl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&($n=!0),e.firstContext=null)}function rr(e){var t=e._currentValue;if(_g!==e)if(e={context:e,memoizedValue:t,next:null},Dl===null){if(ud===null)throw Error(U(308));Dl=e,ud.dependencies={lanes:0,firstContext:e}}else Dl=Dl.next=e;return t}var Po=null;function Eg(e){Po===null?Po=[e]:Po.push(e)}function I1(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Eg(t)):(n.next=i.next,i.next=n),t.interleaved=n,hi(e,r)}function hi(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 Mi=!1;function Cg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function L1(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 ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Gi(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Me&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,hi(e,n)}return i=r.interleaved,i===null?(t.next=t,Eg(r)):(t.next=i.next,i.next=t),r.interleaved=t,hi(e,n)}function Ac(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,ug(e,n)}}function Hy(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=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};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,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 cd(e,t,n,r){var i=e.updateQueue;Mi=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var a=s,u=a.next;a.next=null,l===null?o=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(o!==null){var d=i.baseState;l=0,c=u=a=null,s=o;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=mt({},d,f);break e;case 2:Mi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.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=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ko|=l,e.lanes=l,e.memoizedState=d}}function Ky(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(U(191,i));i.call(r)}}}var j1=new I_.Component().refs;function Tp(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:mt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var cf={isMounted:function(e){return(e=e._reactInternals)?il(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=vn(),i=Xi(e),o=ui(r,i);o.payload=t,n!=null&&(o.callback=n),t=Gi(e,o,i),t!==null&&(Sr(t,e,i,r),Ac(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=vn(),i=Xi(e),o=ui(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Gi(e,o,i),t!==null&&(Sr(t,e,i,r),Ac(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vn(),r=Xi(e),i=ui(n,r);i.tag=2,t!=null&&(i.callback=t),t=Gi(e,i,r),t!==null&&(Sr(t,e,r,n),Ac(t,e,r))}};function Zy(e,t,n,r,i,o,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,l):t.prototype&&t.prototype.isPureReactComponent?!Ua(n,r)||!Ua(i,o):!0}function z1(e,t,n){var r=!1,i=no,o=t.contextType;return typeof o=="object"&&o!==null?o=rr(o):(i=Tn(t)?Wo:rn.current,r=t.contextTypes,o=(r=r!=null)?ts(e,i):no),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=cf,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Gy(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&&cf.enqueueReplaceState(t,t.state,null)}function Np(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=j1,Cg(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=rr(o):(o=Tn(t)?Wo:rn.current,i.context=ts(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Tp(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&cf.enqueueReplaceState(i,i.state,null),cd(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Vs(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 i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(l){var s=i.refs;s===j1&&(s=i.refs={}),l===null?delete s[o]:s[o]=l},t._stringRef=o,t)}if(typeof e!="string")throw Error(U(284));if(!n._owner)throw Error(U(290,e))}return e}function sc(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Yy(e){var t=e._init;return t(e._payload)}function F1(e){function t(v,y){if(e){var _=v.deletions;_===null?(v.deletions=[y],v.flags|=16):_.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 i(v,y){return v=Qi(v,y),v.index=0,v.sibling=null,v}function o(v,y,_){return v.index=_,e?(_=v.alternate,_!==null?(_=_.index,_<y?(v.flags|=2,y):_):(v.flags|=2,y)):(v.flags|=1048576,y)}function l(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,y,_,w){return y===null||y.tag!==6?(y=bh(_,v.mode,w),y.return=v,y):(y=i(y,_),y.return=v,y)}function a(v,y,_,w){var E=_.type;return E===bl?c(v,y,_.props.children,w,_.key):y!==null&&(y.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ai&&Yy(E)===y.type)?(w=i(y,_.props),w.ref=Vs(v,y,_),w.return=v,w):(w=zc(_.type,_.key,_.props,null,v.mode,w),w.ref=Vs(v,y,_),w.return=v,w)}function u(v,y,_,w){return y===null||y.tag!==4||y.stateNode.containerInfo!==_.containerInfo||y.stateNode.implementation!==_.implementation?(y=Th(_,v.mode,w),y.return=v,y):(y=i(y,_.children||[]),y.return=v,y)}function c(v,y,_,w,E){return y===null||y.tag!==7?(y=Lo(_,v.mode,w,E),y.return=v,y):(y=i(y,_),y.return=v,y)}function d(v,y,_){if(typeof y=="string"&&y!==""||typeof y=="number")return y=bh(""+y,v.mode,_),y.return=v,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Xu:return _=zc(y.type,y.key,y.props,null,v.mode,_),_.ref=Vs(v,null,y),_.return=v,_;case $l:return y=Th(y,v.mode,_),y.return=v,y;case Ai:var w=y._init;return d(v,w(y._payload),_)}if(oa(y)||zs(y))return y=Lo(y,v.mode,_,null),y.return=v,y;sc(v,y)}return null}function f(v,y,_,w){var E=y!==null?y.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return E!==null?null:s(v,y,""+_,w);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Xu:return _.key===E?a(v,y,_,w):null;case $l:return _.key===E?u(v,y,_,w):null;case Ai:return E=_._init,f(v,y,E(_._payload),w)}if(oa(_)||zs(_))return E!==null?null:c(v,y,_,w,null);sc(v,_)}return null}function h(v,y,_,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return v=v.get(_)||null,s(y,v,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Xu:return v=v.get(w.key===null?_:w.key)||null,a(y,v,w,E);case $l:return v=v.get(w.key===null?_:w.key)||null,u(y,v,w,E);case Ai:var $=w._init;return h(v,y,_,$(w._payload),E)}if(oa(w)||zs(w))return v=v.get(_)||null,c(y,v,w,E,null);sc(y,w)}return null}function m(v,y,_,w){for(var E=null,$=null,C=y,T=y=0,N=null;C!==null&&T<_.length;T++){C.index>T?(N=C,C=null):N=C.sibling;var R=f(v,C,_[T],w);if(R===null){C===null&&(C=N);break}e&&C&&R.alternate===null&&t(v,C),y=o(R,y,T),$===null?E=R:$.sibling=R,$=R,C=N}if(T===_.length)return n(v,C),ot&&bo(v,T),E;if(C===null){for(;T<_.length;T++)C=d(v,_[T],w),C!==null&&(y=o(C,y,T),$===null?E=C:$.sibling=C,$=C);return ot&&bo(v,T),E}for(C=r(v,C);T<_.length;T++)N=h(C,v,T,_[T],w),N!==null&&(e&&N.alternate!==null&&C.delete(N.key===null?T:N.key),y=o(N,y,T),$===null?E=N:$.sibling=N,$=N);return e&&C.forEach(function(D){return t(v,D)}),ot&&bo(v,T),E}function g(v,y,_,w){var E=zs(_);if(typeof E!="function")throw Error(U(150));if(_=E.call(_),_==null)throw Error(U(151));for(var $=E=null,C=y,T=y=0,N=null,R=_.next();C!==null&&!R.done;T++,R=_.next()){C.index>T?(N=C,C=null):N=C.sibling;var D=f(v,C,R.value,w);if(D===null){C===null&&(C=N);break}e&&C&&D.alternate===null&&t(v,C),y=o(D,y,T),$===null?E=D:$.sibling=D,$=D,C=N}if(R.done)return n(v,C),ot&&bo(v,T),E;if(C===null){for(;!R.done;T++,R=_.next())R=d(v,R.value,w),R!==null&&(y=o(R,y,T),$===null?E=R:$.sibling=R,$=R);return ot&&bo(v,T),E}for(C=r(v,C);!R.done;T++,R=_.next())R=h(C,v,T,R.value,w),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?T:R.key),y=o(R,y,T),$===null?E=R:$.sibling=R,$=R);return e&&C.forEach(function(F){return t(v,F)}),ot&&bo(v,T),E}function S(v,y,_,w){if(typeof _=="object"&&_!==null&&_.type===bl&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Xu:e:{for(var E=_.key,$=y;$!==null;){if($.key===E){if(E=_.type,E===bl){if($.tag===7){n(v,$.sibling),y=i($,_.props.children),y.return=v,v=y;break e}}else if($.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ai&&Yy(E)===$.type){n(v,$.sibling),y=i($,_.props),y.ref=Vs(v,$,_),y.return=v,v=y;break e}n(v,$);break}else t(v,$);$=$.sibling}_.type===bl?(y=Lo(_.props.children,v.mode,w,_.key),y.return=v,v=y):(w=zc(_.type,_.key,_.props,null,v.mode,w),w.ref=Vs(v,y,_),w.return=v,v=w)}return l(v);case $l:e:{for($=_.key;y!==null;){if(y.key===$)if(y.tag===4&&y.stateNode.containerInfo===_.containerInfo&&y.stateNode.implementation===_.implementation){n(v,y.sibling),y=i(y,_.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else t(v,y);y=y.sibling}y=Th(_,v.mode,w),y.return=v,v=y}return l(v);case Ai:return $=_._init,S(v,y,$(_._payload),w)}if(oa(_))return m(v,y,_,w);if(zs(_))return g(v,y,_,w);sc(v,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,y!==null&&y.tag===6?(n(v,y.sibling),y=i(y,_),y.return=v,v=y):(n(v,y),y=bh(_,v.mode,w),y.return=v,v=y),l(v)):n(v,y)}return S}var rs=F1(!0),B1=F1(!1),Ou={},Fr=go(Ou),Ka=go(Ou),Za=go(Ou);function Ao(e){if(e===Ou)throw Error(U(174));return e}function kg(e,t){switch(Xe(Za,t),Xe(Ka,e),Xe(Fr,Ou),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:sp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=sp(t,e)}it(Fr),Xe(Fr,t)}function is(){it(Fr),it(Ka),it(Za)}function U1(e){Ao(Za.current);var t=Ao(Fr.current),n=sp(t,e.type);t!==n&&(Xe(Ka,e),Xe(Fr,n))}function $g(e){Ka.current===e&&(it(Fr),it(Ka))}var dt=go(0);function dd(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 wh=[];function bg(){for(var e=0;e<wh.length;e++)wh[e]._workInProgressVersionPrimary=null;wh.length=0}var Mc=xi.ReactCurrentDispatcher,Sh=xi.ReactCurrentBatchConfig,Ho=0,ht=null,Rt=null,It=null,fd=!1,va=!1,Ga=0,lT=0;function Yt(){throw Error(U(321))}function Tg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!kr(e[n],t[n]))return!1;return!0}function Ng(e,t,n,r,i,o){if(Ho=o,ht=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Mc.current=e===null||e.memoizedState===null?cT:dT,e=n(r,i),va){o=0;do{if(va=!1,Ga=0,25<=o)throw Error(U(301));o+=1,It=Rt=null,t.updateQueue=null,Mc.current=fT,e=n(r,i)}while(va)}if(Mc.current=hd,t=Rt!==null&&Rt.next!==null,Ho=0,It=Rt=ht=null,fd=!1,t)throw Error(U(300));return e}function Rg(){var e=Ga!==0;return Ga=0,e}function Pr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return It===null?ht.memoizedState=It=e:It=It.next=e,It}function ir(){if(Rt===null){var e=ht.alternate;e=e!==null?e.memoizedState:null}else e=Rt.next;var t=It===null?ht.memoizedState:It.next;if(t!==null)It=t,Rt=e;else{if(e===null)throw Error(U(310));Rt=e,e={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},It===null?ht.memoizedState=It=e:It=It.next=e}return It}function Ya(e,t){return typeof t=="function"?t(e):t}function Eh(e){var t=ir(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=Rt,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var l=i.next;i.next=o.next,o.next=l}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=l=null,a=null,u=o;do{var c=u.lane;if((Ho&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,ht.lanes|=c,Ko|=c}u=u.next}while(u!==null&&u!==o);a===null?l=r:a.next=s,kr(r,t.memoizedState)||($n=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,ht.lanes|=o,Ko|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ch(e){var t=ir(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do o=e(o,l.action),l=l.next;while(l!==i);kr(o,t.memoizedState)||($n=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function W1(){}function V1(e,t){var n=ht,r=ir(),i=t(),o=!kr(r.memoizedState,i);if(o&&(r.memoizedState=i,$n=!0),r=r.queue,Og(Z1.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||It!==null&&It.memoizedState.tag&1){if(n.flags|=2048,Xa(9,K1.bind(null,n,r,i,t),void 0,null),Bt===null)throw Error(U(349));Ho&30||H1(n,t,i)}return i}function H1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ht.updateQueue,t===null?(t={lastEffect:null,stores:null},ht.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function K1(e,t,n,r){t.value=n,t.getSnapshot=r,G1(t)&&Y1(e)}function Z1(e,t,n){return n(function(){G1(t)&&Y1(e)})}function G1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kr(e,n)}catch{return!0}}function Y1(e){var t=hi(e,1);t!==null&&Sr(t,e,1,-1)}function Xy(e){var t=Pr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ya,lastRenderedState:e},t.queue=e,e=e.dispatch=uT.bind(null,ht,e),[t.memoizedState,e]}function Xa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ht.updateQueue,t===null?(t={lastEffect:null,stores:null},ht.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 X1(){return ir().memoizedState}function Dc(e,t,n,r){var i=Pr();ht.flags|=e,i.memoizedState=Xa(1|t,n,void 0,r===void 0?null:r)}function df(e,t,n,r){var i=ir();r=r===void 0?null:r;var o=void 0;if(Rt!==null){var l=Rt.memoizedState;if(o=l.destroy,r!==null&&Tg(r,l.deps)){i.memoizedState=Xa(t,n,o,r);return}}ht.flags|=e,i.memoizedState=Xa(1|t,n,o,r)}function Qy(e,t){return Dc(8390656,8,e,t)}function Og(e,t){return df(2048,8,e,t)}function Q1(e,t){return df(4,2,e,t)}function J1(e,t){return df(4,4,e,t)}function q1(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 ew(e,t,n){return n=n!=null?n.concat([e]):null,df(4,4,q1.bind(null,t,e),n)}function Pg(){}function tw(e,t){var n=ir();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function nw(e,t){var n=ir();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function rw(e,t,n){return Ho&21?(kr(n,t)||(n=l1(),ht.lanes|=n,Ko|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,$n=!0),e.memoizedState=n)}function sT(e,t){var n=Ue;Ue=n!==0&&4>n?n:4,e(!0);var r=Sh.transition;Sh.transition={};try{e(!1),t()}finally{Ue=n,Sh.transition=r}}function iw(){return ir().memoizedState}function aT(e,t,n){var r=Xi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ow(e))lw(t,n);else if(n=I1(e,t,n,r),n!==null){var i=vn();Sr(n,e,r,i),sw(n,t,r)}}function uT(e,t,n){var r=Xi(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ow(e))lw(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,s=o(l,n);if(i.hasEagerState=!0,i.eagerState=s,kr(s,l)){var a=t.interleaved;a===null?(i.next=i,Eg(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=I1(e,t,i,r),n!==null&&(i=vn(),Sr(n,e,r,i),sw(n,t,r))}}function ow(e){var t=e.alternate;return e===ht||t!==null&&t===ht}function lw(e,t){va=fd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ug(e,n)}}var hd={readContext:rr,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useInsertionEffect:Yt,useLayoutEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useMutableSource:Yt,useSyncExternalStore:Yt,useId:Yt,unstable_isNewReconciler:!1},cT={readContext:rr,useCallback:function(e,t){return Pr().memoizedState=[e,t===void 0?null:t],e},useContext:rr,useEffect:Qy,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Dc(4194308,4,q1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dc(4,2,e,t)},useMemo:function(e,t){var n=Pr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Pr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=aT.bind(null,ht,e),[r.memoizedState,e]},useRef:function(e){var t=Pr();return e={current:e},t.memoizedState=e},useState:Xy,useDebugValue:Pg,useDeferredValue:function(e){return Pr().memoizedState=e},useTransition:function(){var e=Xy(!1),t=e[0];return e=sT.bind(null,e[1]),Pr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ht,i=Pr();if(ot){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Bt===null)throw Error(U(349));Ho&30||H1(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Qy(Z1.bind(null,r,o,e),[e]),r.flags|=2048,Xa(9,K1.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Pr(),t=Bt.identifierPrefix;if(ot){var n=ai,r=si;n=(r&~(1<<32-wr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ga++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=lT++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},dT={readContext:rr,useCallback:tw,useContext:rr,useEffect:Og,useImperativeHandle:ew,useInsertionEffect:Q1,useLayoutEffect:J1,useMemo:nw,useReducer:Eh,useRef:X1,useState:function(){return Eh(Ya)},useDebugValue:Pg,useDeferredValue:function(e){var t=ir();return rw(t,Rt.memoizedState,e)},useTransition:function(){var e=Eh(Ya)[0],t=ir().memoizedState;return[e,t]},useMutableSource:W1,useSyncExternalStore:V1,useId:iw,unstable_isNewReconciler:!1},fT={readContext:rr,useCallback:tw,useContext:rr,useEffect:Og,useImperativeHandle:ew,useInsertionEffect:Q1,useLayoutEffect:J1,useMemo:nw,useReducer:Ch,useRef:X1,useState:function(){return Ch(Ya)},useDebugValue:Pg,useDeferredValue:function(e){var t=ir();return Rt===null?t.memoizedState=e:rw(t,Rt.memoizedState,e)},useTransition:function(){var e=Ch(Ya)[0],t=ir().memoizedState;return[e,t]},useMutableSource:W1,useSyncExternalStore:V1,useId:iw,unstable_isNewReconciler:!1};function os(e,t){try{var n="",r=t;do n+=F$(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
29
|
+
`+i[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{oh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?la(e):""}function F$(e){switch(e.tag){case 5:return la(e.type);case 16:return la("Lazy");case 13:return la("Suspense");case 19:return la("SuspenseList");case 0:case 2:case 15:return e=lh(e.type,!1),e;case 11:return e=lh(e.type.render,!1),e;case 1:return e=lh(e.type,!0),e;default:return""}}function np(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 Tl:return"Fragment";case bl:return"Portal";case qh:return"Profiler";case ig:return"StrictMode";case ep:return"Suspense";case tp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case z_:return(e.displayName||"Context")+".Consumer";case j_:return(e._context.displayName||"Context")+".Provider";case og:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lg:return t=e.displayName||null,t!==null?t:np(e.type)||"Memo";case Ai:t=e._payload,e=e._init;try{return np(e(t))}catch{}}return null}function B$(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 np(t);case 8:return t===ig?"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 to(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function B_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function U$(e){var t=B_(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 i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.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 Qu(e){e._valueTracker||(e._valueTracker=U$(e))}function U_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=B_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Yc(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 rp(e,t){var n=t.checked;return mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function py(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=to(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 W_(e,t){t=t.checked,t!=null&&rg(e,"checked",t,!1)}function ip(e,t){W_(e,t);var n=to(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")?op(e,t.type,n):t.hasOwnProperty("defaultValue")&&op(e,t.type,to(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function my(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 op(e,t,n){(t!=="number"||Yc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var sa=Array.isArray;function Wl(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+to(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function lp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function gy(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(sa(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:to(n)}}function V_(e,t){var n=to(t.value),r=to(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 vy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function H_(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 sp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?H_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ju,K_=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ju=Ju||document.createElement("div"),Ju.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ju.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ja(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pa={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},W$=["Webkit","ms","Moz","O"];Object.keys(pa).forEach(function(e){W$.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pa[t]=pa[e]})});function Z_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pa.hasOwnProperty(e)&&pa[e]?(""+t).trim():t+"px"}function G_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Z_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var V$=mt({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 ap(e,t){if(t){if(V$[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 up(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 cp=null;function sg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dp=null,Vl=null,Hl=null;function yy(e){if(e=Pu(e)){if(typeof dp!="function")throw Error(U(280));var t=e.stateNode;t&&(t=af(t),dp(e.stateNode,e.type,t))}}function Y_(e){Vl?Hl?Hl.push(e):Hl=[e]:Vl=e}function X_(){if(Vl){var e=Vl,t=Hl;if(Hl=Vl=null,yy(e),t)for(e=0;e<t.length;e++)yy(t[e])}}function Q_(e,t){return e(t)}function J_(){}var sh=!1;function q_(e,t,n){if(sh)return e(t,n);sh=!0;try{return Q_(e,t,n)}finally{sh=!1,(Vl!==null||Hl!==null)&&(J_(),X_())}}function za(e,t){var n=e.stateNode;if(n===null)return null;var r=af(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 fp=!1;if(di)try{var Us={};Object.defineProperty(Us,"passive",{get:function(){fp=!0}}),window.addEventListener("test",Us,Us),window.removeEventListener("test",Us,Us)}catch{fp=!1}function H$(e,t,n,r,i,o,l,s,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ma=!1,Xc=null,Qc=!1,hp=null,K$={onError:function(e){ma=!0,Xc=e}};function Z$(e,t,n,r,i,o,l,s,a){ma=!1,Xc=null,H$.apply(K$,arguments)}function G$(e,t,n,r,i,o,l,s,a){if(Z$.apply(this,arguments),ma){if(ma){var u=Xc;ma=!1,Xc=null}else throw Error(U(198));Qc||(Qc=!0,hp=u)}}function ol(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 e1(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 xy(e){if(ol(e)!==e)throw Error(U(188))}function Y$(e){var t=e.alternate;if(!t){if(t=ol(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return xy(i),e;if(o===r)return xy(i),t;o=o.sibling}throw Error(U(188))}if(n.return!==r.return)n=i,r=o;else{for(var l=!1,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){for(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)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 t1(e){return e=Y$(e),e!==null?n1(e):null}function n1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=n1(e);if(t!==null)return t;e=e.sibling}return null}var r1=Bn.unstable_scheduleCallback,_y=Bn.unstable_cancelCallback,X$=Bn.unstable_shouldYield,Q$=Bn.unstable_requestPaint,Ct=Bn.unstable_now,J$=Bn.unstable_getCurrentPriorityLevel,ag=Bn.unstable_ImmediatePriority,i1=Bn.unstable_UserBlockingPriority,Jc=Bn.unstable_NormalPriority,q$=Bn.unstable_LowPriority,o1=Bn.unstable_IdlePriority,rf=null,zr=null;function eb(e){if(zr&&typeof zr.onCommitFiberRoot=="function")try{zr.onCommitFiberRoot(rf,e,void 0,(e.current.flags&128)===128)}catch{}}var wr=Math.clz32?Math.clz32:rb,tb=Math.log,nb=Math.LN2;function rb(e){return e>>>=0,e===0?32:31-(tb(e)/nb|0)|0}var qu=64,ec=4194304;function aa(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 qc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~i;s!==0?r=aa(s):(o&=l,o!==0&&(r=aa(o)))}else l=n&~i,l!==0?r=aa(l):o!==0&&(r=aa(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&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-wr(t),i=1<<n,r|=e[n],t&=~i;return r}function ib(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 ob(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var l=31-wr(o),s=1<<l,a=i[l];a===-1?(!(s&n)||s&r)&&(i[l]=ib(s,t)):a<=t&&(e.expiredLanes|=s),o&=~s}}function pp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function l1(){var e=qu;return qu<<=1,!(qu&4194240)&&(qu=64),e}function ah(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ru(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wr(t),e[t]=n}function lb(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 i=31-wr(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function ug(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-wr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ue=0;function s1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var a1,cg,u1,c1,d1,mp=!1,tc=[],Vi=null,Hi=null,Ki=null,Fa=new Map,Ba=new Map,Li=[],sb="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 wy(e,t){switch(e){case"focusin":case"focusout":Vi=null;break;case"dragenter":case"dragleave":Hi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":Fa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ba.delete(t.pointerId)}}function Ws(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Pu(t),t!==null&&cg(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ab(e,t,n,r,i){switch(t){case"focusin":return Vi=Ws(Vi,e,t,n,r,i),!0;case"dragenter":return Hi=Ws(Hi,e,t,n,r,i),!0;case"mouseover":return Ki=Ws(Ki,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Fa.set(o,Ws(Fa.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Ba.set(o,Ws(Ba.get(o)||null,e,t,n,r,i)),!0}return!1}function f1(e){var t=Oo(e.target);if(t!==null){var n=ol(t);if(n!==null){if(t=n.tag,t===13){if(t=e1(n),t!==null){e.blockedOn=t,d1(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 Rc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);cp=r,n.target.dispatchEvent(r),cp=null}else return t=Pu(n),t!==null&&cg(t),e.blockedOn=n,!1;t.shift()}return!0}function Sy(e,t,n){Rc(e)&&n.delete(t)}function ub(){mp=!1,Vi!==null&&Rc(Vi)&&(Vi=null),Hi!==null&&Rc(Hi)&&(Hi=null),Ki!==null&&Rc(Ki)&&(Ki=null),Fa.forEach(Sy),Ba.forEach(Sy)}function Vs(e,t){e.blockedOn===t&&(e.blockedOn=null,mp||(mp=!0,Bn.unstable_scheduleCallback(Bn.unstable_NormalPriority,ub)))}function Ua(e){function t(i){return Vs(i,e)}if(0<tc.length){Vs(tc[0],e);for(var n=1;n<tc.length;n++){var r=tc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Vi!==null&&Vs(Vi,e),Hi!==null&&Vs(Hi,e),Ki!==null&&Vs(Ki,e),Fa.forEach(t),Ba.forEach(t),n=0;n<Li.length;n++)r=Li[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Li.length&&(n=Li[0],n.blockedOn===null);)f1(n),n.blockedOn===null&&Li.shift()}var Kl=xi.ReactCurrentBatchConfig,ed=!0;function cb(e,t,n,r){var i=Ue,o=Kl.transition;Kl.transition=null;try{Ue=1,dg(e,t,n,r)}finally{Ue=i,Kl.transition=o}}function db(e,t,n,r){var i=Ue,o=Kl.transition;Kl.transition=null;try{Ue=4,dg(e,t,n,r)}finally{Ue=i,Kl.transition=o}}function dg(e,t,n,r){if(ed){var i=gp(e,t,n,r);if(i===null)yh(e,t,r,td,n),wy(e,r);else if(ab(i,e,t,n,r))r.stopPropagation();else if(wy(e,r),t&4&&-1<sb.indexOf(e)){for(;i!==null;){var o=Pu(i);if(o!==null&&a1(o),o=gp(e,t,n,r),o===null&&yh(e,t,r,td,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else yh(e,t,r,null,n)}}var td=null;function gp(e,t,n,r){if(td=null,e=sg(r),e=Oo(e),e!==null)if(t=ol(e),t===null)e=null;else if(n=t.tag,n===13){if(e=e1(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 td=e,null}function h1(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(J$()){case ag:return 1;case i1:return 4;case Jc:case q$:return 16;case o1:return 536870912;default:return 16}default:return 16}}var Fi=null,fg=null,Oc=null;function p1(){if(Oc)return Oc;var e,t=fg,n=t.length,r,i="value"in Fi?Fi.value:Fi.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===i[o-r];r++);return Oc=i.slice(e,1<r?1-r:void 0)}function Pc(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 nc(){return!0}function Ey(){return!1}function Hn(e){function t(n,r,i,o,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?nc:Ey,this.isPropagationStopped=Ey,this}return mt(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=nc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=nc)},persist:function(){},isPersistent:nc}),t}var _s={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hg=Hn(_s),Ou=mt({},_s,{view:0,detail:0}),fb=Hn(Ou),uh,ch,Hs,of=mt({},Ou,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pg,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!==Hs&&(Hs&&e.type==="mousemove"?(uh=e.screenX-Hs.screenX,ch=e.screenY-Hs.screenY):ch=uh=0,Hs=e),uh)},movementY:function(e){return"movementY"in e?e.movementY:ch}}),Cy=Hn(of),hb=mt({},of,{dataTransfer:0}),pb=Hn(hb),mb=mt({},Ou,{relatedTarget:0}),dh=Hn(mb),gb=mt({},_s,{animationName:0,elapsedTime:0,pseudoElement:0}),vb=Hn(gb),yb=mt({},_s,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xb=Hn(yb),_b=mt({},_s,{data:0}),ky=Hn(_b),wb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sb={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"},Eb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Eb[e])?!!t[e]:!1}function pg(){return Cb}var kb=mt({},Ou,{key:function(e){if(e.key){var t=wb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Pc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pg,charCode:function(e){return e.type==="keypress"?Pc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Pc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$b=Hn(kb),bb=mt({},of,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$y=Hn(bb),Tb=mt({},Ou,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pg}),Nb=Hn(Tb),Rb=mt({},_s,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ob=Hn(Rb),Pb=mt({},of,{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}),Ab=Hn(Pb),Mb=[9,13,27,32],mg=di&&"CompositionEvent"in window,ga=null;di&&"documentMode"in document&&(ga=document.documentMode);var Db=di&&"TextEvent"in window&&!ga,m1=di&&(!mg||ga&&8<ga&&11>=ga),by=" ",Ty=!1;function g1(e,t){switch(e){case"keyup":return Mb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Nl=!1;function Lb(e,t){switch(e){case"compositionend":return v1(t);case"keypress":return t.which!==32?null:(Ty=!0,by);case"textInput":return e=t.data,e===by&&Ty?null:e;default:return null}}function Ib(e,t){if(Nl)return e==="compositionend"||!mg&&g1(e,t)?(e=p1(),Oc=fg=Fi=null,Nl=!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 m1&&t.locale!=="ko"?null:t.data;default:return null}}var jb={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 Ny(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!jb[e.type]:t==="textarea"}function y1(e,t,n,r){Y_(r),t=nd(t,"onChange"),0<t.length&&(n=new hg("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var va=null,Wa=null;function zb(e){N1(e,0)}function lf(e){var t=Pl(e);if(U_(t))return e}function Fb(e,t){if(e==="change")return t}var x1=!1;if(di){var fh;if(di){var hh="oninput"in document;if(!hh){var Ry=document.createElement("div");Ry.setAttribute("oninput","return;"),hh=typeof Ry.oninput=="function"}fh=hh}else fh=!1;x1=fh&&(!document.documentMode||9<document.documentMode)}function Oy(){va&&(va.detachEvent("onpropertychange",_1),Wa=va=null)}function _1(e){if(e.propertyName==="value"&&lf(Wa)){var t=[];y1(t,Wa,e,sg(e)),q_(zb,t)}}function Bb(e,t,n){e==="focusin"?(Oy(),va=t,Wa=n,va.attachEvent("onpropertychange",_1)):e==="focusout"&&Oy()}function Ub(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lf(Wa)}function Wb(e,t){if(e==="click")return lf(t)}function Vb(e,t){if(e==="input"||e==="change")return lf(t)}function Hb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kr=typeof Object.is=="function"?Object.is:Hb;function Va(e,t){if(kr(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 i=n[r];if(!Jh.call(t,i)||!kr(e[i],t[i]))return!1}return!0}function Py(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ay(e,t){var n=Py(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=Py(n)}}function w1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?w1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S1(){for(var e=window,t=Yc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yc(e.document)}return t}function gg(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 Kb(e){var t=S1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&w1(n.ownerDocument.documentElement,n)){if(r!==null&&gg(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 i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Ay(n,o);var l=Ay(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>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 Zb=di&&"documentMode"in document&&11>=document.documentMode,Rl=null,vp=null,ya=null,yp=!1;function My(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yp||Rl==null||Rl!==Yc(r)||(r=Rl,"selectionStart"in r&&gg(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}),ya&&Va(ya,r)||(ya=r,r=nd(vp,"onSelect"),0<r.length&&(t=new hg("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Rl)))}function rc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ol={animationend:rc("Animation","AnimationEnd"),animationiteration:rc("Animation","AnimationIteration"),animationstart:rc("Animation","AnimationStart"),transitionend:rc("Transition","TransitionEnd")},ph={},E1={};di&&(E1=document.createElement("div").style,"AnimationEvent"in window||(delete Ol.animationend.animation,delete Ol.animationiteration.animation,delete Ol.animationstart.animation),"TransitionEvent"in window||delete Ol.transitionend.transition);function sf(e){if(ph[e])return ph[e];if(!Ol[e])return e;var t=Ol[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in E1)return ph[e]=t[n];return e}var C1=sf("animationend"),k1=sf("animationiteration"),$1=sf("animationstart"),b1=sf("transitionend"),T1=new Map,Dy="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 mo(e,t){T1.set(e,t),il(t,[e])}for(var mh=0;mh<Dy.length;mh++){var gh=Dy[mh],Gb=gh.toLowerCase(),Yb=gh[0].toUpperCase()+gh.slice(1);mo(Gb,"on"+Yb)}mo(C1,"onAnimationEnd");mo(k1,"onAnimationIteration");mo($1,"onAnimationStart");mo("dblclick","onDoubleClick");mo("focusin","onFocus");mo("focusout","onBlur");mo(b1,"onTransitionEnd");ts("onMouseEnter",["mouseout","mouseover"]);ts("onMouseLeave",["mouseout","mouseover"]);ts("onPointerEnter",["pointerout","pointerover"]);ts("onPointerLeave",["pointerout","pointerover"]);il("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));il("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));il("onBeforeInput",["compositionend","keypress","textInput","paste"]);il("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));il("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));il("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ua="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(" "),Xb=new Set("cancel close invalid load scroll toggle".split(" ").concat(ua));function Ly(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,G$(r,t,void 0,e),e.currentTarget=null}function N1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=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!==o&&i.isPropagationStopped())break e;Ly(i,s,u),o=a}else for(l=0;l<r.length;l++){if(s=r[l],a=s.instance,u=s.currentTarget,s=s.listener,a!==o&&i.isPropagationStopped())break e;Ly(i,s,u),o=a}}}if(Qc)throw e=hp,Qc=!1,hp=null,e}function et(e,t){var n=t[Ep];n===void 0&&(n=t[Ep]=new Set);var r=e+"__bubble";n.has(r)||(R1(t,e,2,!1),n.add(r))}function vh(e,t,n){var r=0;t&&(r|=4),R1(n,e,r,t)}var ic="_reactListening"+Math.random().toString(36).slice(2);function Ha(e){if(!e[ic]){e[ic]=!0,I_.forEach(function(n){n!=="selectionchange"&&(Xb.has(n)||vh(n,!1,e),vh(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ic]||(t[ic]=!0,vh("selectionchange",!1,t))}}function R1(e,t,n,r){switch(h1(t)){case 1:var i=cb;break;case 4:i=db;break;default:i=dg}n=i.bind(null,t,n,e),i=void 0,!fp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function yh(e,t,n,r,i){var o=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===i||s.nodeType===8&&s.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&&(a=l.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;l=l.return}for(;s!==null;){if(l=Oo(s),l===null)return;if(a=l.tag,a===5||a===6){r=o=l;continue e}s=s.parentNode}}r=r.return}q_(function(){var u=o,c=sg(n),d=[];e:{var f=T1.get(e);if(f!==void 0){var h=hg,m=e;switch(e){case"keypress":if(Pc(n)===0)break e;case"keydown":case"keyup":h=$b;break;case"focusin":m="focus",h=dh;break;case"focusout":m="blur",h=dh;break;case"beforeblur":case"afterblur":h=dh;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=Cy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=pb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Nb;break;case C1:case k1:case $1:h=vb;break;case b1:h=Ob;break;case"scroll":h=fb;break;case"wheel":h=Ab;break;case"copy":case"cut":case"paste":h=xb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=$y}var g=(t&4)!==0,w=!g&&e==="scroll",v=g?f!==null?f+"Capture":null:f;g=[];for(var y=u,_;y!==null;){_=y;var S=_.stateNode;if(_.tag===5&&S!==null&&(_=S,v!==null&&(S=za(y,v),S!=null&&g.push(Ka(y,S,_)))),w)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!==cp&&(m=n.relatedTarget||n.fromElement)&&(Oo(m)||m[fi]))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?Oo(m):null,m!==null&&(w=ol(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(g=Cy,S="onMouseLeave",v="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=$y,S="onPointerLeave",v="onPointerEnter",y="pointer"),w=h==null?f:Pl(h),_=m==null?f:Pl(m),f=new g(S,y+"leave",h,n,c),f.target=w,f.relatedTarget=_,S=null,Oo(c)===u&&(g=new g(v,y+"enter",m,n,c),g.target=_,g.relatedTarget=w,S=g),w=S,h&&m)t:{for(g=h,v=m,y=0,_=g;_;_=ml(_))y++;for(_=0,S=v;S;S=ml(S))_++;for(;0<y-_;)g=ml(g),y--;for(;0<_-y;)v=ml(v),_--;for(;y--;){if(g===v||v!==null&&g===v.alternate)break t;g=ml(g),v=ml(v)}g=null}else g=null;h!==null&&Iy(d,f,h,g,!1),m!==null&&w!==null&&Iy(d,w,m,g,!0)}}e:{if(f=u?Pl(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var E=Fb;else if(Ny(f))if(x1)E=Vb;else{E=Ub;var $=Bb}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=Wb);if(E&&(E=E(e,u))){y1(d,E,n,c);break e}$&&$(e,f,u),e==="focusout"&&($=f._wrapperState)&&$.controlled&&f.type==="number"&&op(f,"number",f.value)}switch($=u?Pl(u):window,e){case"focusin":(Ny($)||$.contentEditable==="true")&&(Rl=$,vp=u,ya=null);break;case"focusout":ya=vp=Rl=null;break;case"mousedown":yp=!0;break;case"contextmenu":case"mouseup":case"dragend":yp=!1,My(d,n,c);break;case"selectionchange":if(Zb)break;case"keydown":case"keyup":My(d,n,c)}var C;if(mg)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Nl?g1(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(m1&&n.locale!=="ko"&&(Nl||T!=="onCompositionStart"?T==="onCompositionEnd"&&Nl&&(C=p1()):(Fi=c,fg="value"in Fi?Fi.value:Fi.textContent,Nl=!0)),$=nd(u,T),0<$.length&&(T=new ky(T,e,null,n,c),d.push({event:T,listeners:$}),C?T.data=C:(C=v1(n),C!==null&&(T.data=C)))),(C=Db?Lb(e,n):Ib(e,n))&&(u=nd(u,"onBeforeInput"),0<u.length&&(c=new ky("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=C))}N1(d,t)})}function Ka(e,t,n){return{instance:e,listener:t,currentTarget:n}}function nd(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=za(e,n),o!=null&&r.unshift(Ka(e,o,i)),o=za(e,t),o!=null&&r.push(Ka(e,o,i))),e=e.return}return r}function ml(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Iy(e,t,n,r,i){for(var o=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,i?(a=za(n,o),a!=null&&l.unshift(Ka(n,a,s))):i||(a=za(n,o),a!=null&&l.push(Ka(n,a,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var Qb=/\r\n?/g,Jb=/\u0000|\uFFFD/g;function jy(e){return(typeof e=="string"?e:""+e).replace(Qb,`
|
|
30
|
+
`).replace(Jb,"")}function oc(e,t,n){if(t=jy(t),jy(e)!==t&&n)throw Error(U(425))}function rd(){}var xp=null,_p=null;function wp(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 Sp=typeof setTimeout=="function"?setTimeout:void 0,qb=typeof clearTimeout=="function"?clearTimeout:void 0,zy=typeof Promise=="function"?Promise:void 0,eT=typeof queueMicrotask=="function"?queueMicrotask:typeof zy<"u"?function(e){return zy.resolve(null).then(e).catch(tT)}:Sp;function tT(e){setTimeout(function(){throw e})}function xh(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Ua(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ua(t)}function Zi(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 Fy(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 ws=Math.random().toString(36).slice(2),Mr="__reactFiber$"+ws,Za="__reactProps$"+ws,fi="__reactContainer$"+ws,Ep="__reactEvents$"+ws,nT="__reactListeners$"+ws,rT="__reactHandles$"+ws;function Oo(e){var t=e[Mr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fi]||n[Mr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Fy(e);e!==null;){if(n=e[Mr])return n;e=Fy(e)}return t}e=n,n=e.parentNode}return null}function Pu(e){return e=e[Mr]||e[fi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Pl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function af(e){return e[Za]||null}var Cp=[],Al=-1;function go(e){return{current:e}}function it(e){0>Al||(e.current=Cp[Al],Cp[Al]=null,Al--)}function Xe(e,t){Al++,Cp[Al]=e.current,e.current=t}var no={},rn=go(no),bn=go(!1),Wo=no;function ns(e,t){var n=e.type.contextTypes;if(!n)return no;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Tn(e){return e=e.childContextTypes,e!=null}function id(){it(bn),it(rn)}function By(e,t,n){if(rn.current!==no)throw Error(U(168));Xe(rn,t),Xe(bn,n)}function O1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(U(108,B$(e)||"Unknown",i));return mt({},n,r)}function od(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||no,Wo=rn.current,Xe(rn,e),Xe(bn,bn.current),!0}function Uy(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=O1(e,t,Wo),r.__reactInternalMemoizedMergedChildContext=e,it(bn),it(rn),Xe(rn,e)):it(bn),Xe(bn,n)}var ii=null,uf=!1,_h=!1;function P1(e){ii===null?ii=[e]:ii.push(e)}function iT(e){uf=!0,P1(e)}function vo(){if(!_h&&ii!==null){_h=!0;var e=0,t=Ue;try{var n=ii;for(Ue=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ii=null,uf=!1}catch(i){throw ii!==null&&(ii=ii.slice(e+1)),r1(ag,vo),i}finally{Ue=t,_h=!1}}return null}var Ml=[],Dl=0,ld=null,sd=0,Yn=[],Xn=0,Vo=null,si=1,ai="";function bo(e,t){Ml[Dl++]=sd,Ml[Dl++]=ld,ld=e,sd=t}function A1(e,t,n){Yn[Xn++]=si,Yn[Xn++]=ai,Yn[Xn++]=Vo,Vo=e;var r=si;e=ai;var i=32-wr(r)-1;r&=~(1<<i),n+=1;var o=32-wr(t)+i;if(30<o){var l=i-i%5;o=(r&(1<<l)-1).toString(32),r>>=l,i-=l,si=1<<32-wr(t)+i|n<<i|r,ai=o+e}else si=1<<o|n<<i|r,ai=e}function vg(e){e.return!==null&&(bo(e,1),A1(e,1,0))}function yg(e){for(;e===ld;)ld=Ml[--Dl],Ml[Dl]=null,sd=Ml[--Dl],Ml[Dl]=null;for(;e===Vo;)Vo=Yn[--Xn],Yn[Xn]=null,ai=Yn[--Xn],Yn[Xn]=null,si=Yn[--Xn],Yn[Xn]=null}var In=null,Ln=null,ot=!1,yr=null;function M1(e,t){var n=qn(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 Wy(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,In=e,Ln=Zi(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,In=e,Ln=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Vo!==null?{id:si,overflow:ai}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=qn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,In=e,Ln=null,!0):!1;default:return!1}}function kp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function $p(e){if(ot){var t=Ln;if(t){var n=t;if(!Wy(e,t)){if(kp(e))throw Error(U(418));t=Zi(n.nextSibling);var r=In;t&&Wy(e,t)?M1(r,n):(e.flags=e.flags&-4097|2,ot=!1,In=e)}}else{if(kp(e))throw Error(U(418));e.flags=e.flags&-4097|2,ot=!1,In=e}}}function Vy(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;In=e}function lc(e){if(e!==In)return!1;if(!ot)return Vy(e),ot=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!wp(e.type,e.memoizedProps)),t&&(t=Ln)){if(kp(e))throw D1(),Error(U(418));for(;t;)M1(e,t),t=Zi(t.nextSibling)}if(Vy(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){Ln=Zi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ln=null}}else Ln=In?Zi(e.stateNode.nextSibling):null;return!0}function D1(){for(var e=Ln;e;)e=Zi(e.nextSibling)}function rs(){Ln=In=null,ot=!1}function xg(e){yr===null?yr=[e]:yr.push(e)}var oT=xi.ReactCurrentBatchConfig;function mr(e,t){if(e&&e.defaultProps){t=mt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var ad=go(null),ud=null,Ll=null,_g=null;function wg(){_g=Ll=ud=null}function Sg(e){var t=ad.current;it(ad),e._currentValue=t}function bp(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 Zl(e,t){ud=e,_g=Ll=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&($n=!0),e.firstContext=null)}function rr(e){var t=e._currentValue;if(_g!==e)if(e={context:e,memoizedValue:t,next:null},Ll===null){if(ud===null)throw Error(U(308));Ll=e,ud.dependencies={lanes:0,firstContext:e}}else Ll=Ll.next=e;return t}var Po=null;function Eg(e){Po===null?Po=[e]:Po.push(e)}function L1(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Eg(t)):(n.next=i.next,i.next=n),t.interleaved=n,hi(e,r)}function hi(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 Mi=!1;function Cg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function I1(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 ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Gi(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Me&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,hi(e,n)}return i=r.interleaved,i===null?(t.next=t,Eg(r)):(t.next=i.next,i.next=t),r.interleaved=t,hi(e,n)}function Ac(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,ug(e,n)}}function Hy(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=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};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,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 cd(e,t,n,r){var i=e.updateQueue;Mi=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var a=s,u=a.next;a.next=null,l===null?o=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(o!==null){var d=i.baseState;l=0,c=u=a=null,s=o;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=mt({},d,f);break e;case 2:Mi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.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=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ko|=l,e.lanes=l,e.memoizedState=d}}function Ky(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(U(191,i));i.call(r)}}}var j1=new L_.Component().refs;function Tp(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:mt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var cf={isMounted:function(e){return(e=e._reactInternals)?ol(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=vn(),i=Xi(e),o=ui(r,i);o.payload=t,n!=null&&(o.callback=n),t=Gi(e,o,i),t!==null&&(Sr(t,e,i,r),Ac(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=vn(),i=Xi(e),o=ui(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Gi(e,o,i),t!==null&&(Sr(t,e,i,r),Ac(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vn(),r=Xi(e),i=ui(n,r);i.tag=2,t!=null&&(i.callback=t),t=Gi(e,i,r),t!==null&&(Sr(t,e,r,n),Ac(t,e,r))}};function Zy(e,t,n,r,i,o,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,l):t.prototype&&t.prototype.isPureReactComponent?!Va(n,r)||!Va(i,o):!0}function z1(e,t,n){var r=!1,i=no,o=t.contextType;return typeof o=="object"&&o!==null?o=rr(o):(i=Tn(t)?Wo:rn.current,r=t.contextTypes,o=(r=r!=null)?ns(e,i):no),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=cf,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Gy(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&&cf.enqueueReplaceState(t,t.state,null)}function Np(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=j1,Cg(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=rr(o):(o=Tn(t)?Wo:rn.current,i.context=ns(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Tp(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&cf.enqueueReplaceState(i,i.state,null),cd(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ks(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 i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(l){var s=i.refs;s===j1&&(s=i.refs={}),l===null?delete s[o]:s[o]=l},t._stringRef=o,t)}if(typeof e!="string")throw Error(U(284));if(!n._owner)throw Error(U(290,e))}return e}function sc(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Yy(e){var t=e._init;return t(e._payload)}function F1(e){function t(v,y){if(e){var _=v.deletions;_===null?(v.deletions=[y],v.flags|=16):_.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 i(v,y){return v=Qi(v,y),v.index=0,v.sibling=null,v}function o(v,y,_){return v.index=_,e?(_=v.alternate,_!==null?(_=_.index,_<y?(v.flags|=2,y):_):(v.flags|=2,y)):(v.flags|=1048576,y)}function l(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,y,_,S){return y===null||y.tag!==6?(y=bh(_,v.mode,S),y.return=v,y):(y=i(y,_),y.return=v,y)}function a(v,y,_,S){var E=_.type;return E===Tl?c(v,y,_.props.children,S,_.key):y!==null&&(y.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ai&&Yy(E)===y.type)?(S=i(y,_.props),S.ref=Ks(v,y,_),S.return=v,S):(S=zc(_.type,_.key,_.props,null,v.mode,S),S.ref=Ks(v,y,_),S.return=v,S)}function u(v,y,_,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==_.containerInfo||y.stateNode.implementation!==_.implementation?(y=Th(_,v.mode,S),y.return=v,y):(y=i(y,_.children||[]),y.return=v,y)}function c(v,y,_,S,E){return y===null||y.tag!==7?(y=Io(_,v.mode,S,E),y.return=v,y):(y=i(y,_),y.return=v,y)}function d(v,y,_){if(typeof y=="string"&&y!==""||typeof y=="number")return y=bh(""+y,v.mode,_),y.return=v,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Xu:return _=zc(y.type,y.key,y.props,null,v.mode,_),_.ref=Ks(v,null,y),_.return=v,_;case bl:return y=Th(y,v.mode,_),y.return=v,y;case Ai:var S=y._init;return d(v,S(y._payload),_)}if(sa(y)||Bs(y))return y=Io(y,v.mode,_,null),y.return=v,y;sc(v,y)}return null}function f(v,y,_,S){var E=y!==null?y.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return E!==null?null:s(v,y,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Xu:return _.key===E?a(v,y,_,S):null;case bl:return _.key===E?u(v,y,_,S):null;case Ai:return E=_._init,f(v,y,E(_._payload),S)}if(sa(_)||Bs(_))return E!==null?null:c(v,y,_,S,null);sc(v,_)}return null}function h(v,y,_,S,E){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(_)||null,s(y,v,""+S,E);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Xu:return v=v.get(S.key===null?_:S.key)||null,a(y,v,S,E);case bl:return v=v.get(S.key===null?_:S.key)||null,u(y,v,S,E);case Ai:var $=S._init;return h(v,y,_,$(S._payload),E)}if(sa(S)||Bs(S))return v=v.get(_)||null,c(y,v,S,E,null);sc(y,S)}return null}function m(v,y,_,S){for(var E=null,$=null,C=y,T=y=0,N=null;C!==null&&T<_.length;T++){C.index>T?(N=C,C=null):N=C.sibling;var R=f(v,C,_[T],S);if(R===null){C===null&&(C=N);break}e&&C&&R.alternate===null&&t(v,C),y=o(R,y,T),$===null?E=R:$.sibling=R,$=R,C=N}if(T===_.length)return n(v,C),ot&&bo(v,T),E;if(C===null){for(;T<_.length;T++)C=d(v,_[T],S),C!==null&&(y=o(C,y,T),$===null?E=C:$.sibling=C,$=C);return ot&&bo(v,T),E}for(C=r(v,C);T<_.length;T++)N=h(C,v,T,_[T],S),N!==null&&(e&&N.alternate!==null&&C.delete(N.key===null?T:N.key),y=o(N,y,T),$===null?E=N:$.sibling=N,$=N);return e&&C.forEach(function(D){return t(v,D)}),ot&&bo(v,T),E}function g(v,y,_,S){var E=Bs(_);if(typeof E!="function")throw Error(U(150));if(_=E.call(_),_==null)throw Error(U(151));for(var $=E=null,C=y,T=y=0,N=null,R=_.next();C!==null&&!R.done;T++,R=_.next()){C.index>T?(N=C,C=null):N=C.sibling;var D=f(v,C,R.value,S);if(D===null){C===null&&(C=N);break}e&&C&&D.alternate===null&&t(v,C),y=o(D,y,T),$===null?E=D:$.sibling=D,$=D,C=N}if(R.done)return n(v,C),ot&&bo(v,T),E;if(C===null){for(;!R.done;T++,R=_.next())R=d(v,R.value,S),R!==null&&(y=o(R,y,T),$===null?E=R:$.sibling=R,$=R);return ot&&bo(v,T),E}for(C=r(v,C);!R.done;T++,R=_.next())R=h(C,v,T,R.value,S),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?T:R.key),y=o(R,y,T),$===null?E=R:$.sibling=R,$=R);return e&&C.forEach(function(F){return t(v,F)}),ot&&bo(v,T),E}function w(v,y,_,S){if(typeof _=="object"&&_!==null&&_.type===Tl&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Xu:e:{for(var E=_.key,$=y;$!==null;){if($.key===E){if(E=_.type,E===Tl){if($.tag===7){n(v,$.sibling),y=i($,_.props.children),y.return=v,v=y;break e}}else if($.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ai&&Yy(E)===$.type){n(v,$.sibling),y=i($,_.props),y.ref=Ks(v,$,_),y.return=v,v=y;break e}n(v,$);break}else t(v,$);$=$.sibling}_.type===Tl?(y=Io(_.props.children,v.mode,S,_.key),y.return=v,v=y):(S=zc(_.type,_.key,_.props,null,v.mode,S),S.ref=Ks(v,y,_),S.return=v,v=S)}return l(v);case bl:e:{for($=_.key;y!==null;){if(y.key===$)if(y.tag===4&&y.stateNode.containerInfo===_.containerInfo&&y.stateNode.implementation===_.implementation){n(v,y.sibling),y=i(y,_.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else t(v,y);y=y.sibling}y=Th(_,v.mode,S),y.return=v,v=y}return l(v);case Ai:return $=_._init,w(v,y,$(_._payload),S)}if(sa(_))return m(v,y,_,S);if(Bs(_))return g(v,y,_,S);sc(v,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,y!==null&&y.tag===6?(n(v,y.sibling),y=i(y,_),y.return=v,v=y):(n(v,y),y=bh(_,v.mode,S),y.return=v,v=y),l(v)):n(v,y)}return w}var is=F1(!0),B1=F1(!1),Au={},Fr=go(Au),Ga=go(Au),Ya=go(Au);function Ao(e){if(e===Au)throw Error(U(174));return e}function kg(e,t){switch(Xe(Ya,t),Xe(Ga,e),Xe(Fr,Au),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:sp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=sp(t,e)}it(Fr),Xe(Fr,t)}function os(){it(Fr),it(Ga),it(Ya)}function U1(e){Ao(Ya.current);var t=Ao(Fr.current),n=sp(t,e.type);t!==n&&(Xe(Ga,e),Xe(Fr,n))}function $g(e){Ga.current===e&&(it(Fr),it(Ga))}var dt=go(0);function dd(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 wh=[];function bg(){for(var e=0;e<wh.length;e++)wh[e]._workInProgressVersionPrimary=null;wh.length=0}var Mc=xi.ReactCurrentDispatcher,Sh=xi.ReactCurrentBatchConfig,Ho=0,ht=null,Rt=null,Lt=null,fd=!1,xa=!1,Xa=0,lT=0;function Yt(){throw Error(U(321))}function Tg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!kr(e[n],t[n]))return!1;return!0}function Ng(e,t,n,r,i,o){if(Ho=o,ht=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Mc.current=e===null||e.memoizedState===null?cT:dT,e=n(r,i),xa){o=0;do{if(xa=!1,Xa=0,25<=o)throw Error(U(301));o+=1,Lt=Rt=null,t.updateQueue=null,Mc.current=fT,e=n(r,i)}while(xa)}if(Mc.current=hd,t=Rt!==null&&Rt.next!==null,Ho=0,Lt=Rt=ht=null,fd=!1,t)throw Error(U(300));return e}function Rg(){var e=Xa!==0;return Xa=0,e}function Pr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?ht.memoizedState=Lt=e:Lt=Lt.next=e,Lt}function ir(){if(Rt===null){var e=ht.alternate;e=e!==null?e.memoizedState:null}else e=Rt.next;var t=Lt===null?ht.memoizedState:Lt.next;if(t!==null)Lt=t,Rt=e;else{if(e===null)throw Error(U(310));Rt=e,e={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},Lt===null?ht.memoizedState=Lt=e:Lt=Lt.next=e}return Lt}function Qa(e,t){return typeof t=="function"?t(e):t}function Eh(e){var t=ir(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=Rt,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var l=i.next;i.next=o.next,o.next=l}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=l=null,a=null,u=o;do{var c=u.lane;if((Ho&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,ht.lanes|=c,Ko|=c}u=u.next}while(u!==null&&u!==o);a===null?l=r:a.next=s,kr(r,t.memoizedState)||($n=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,ht.lanes|=o,Ko|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ch(e){var t=ir(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do o=e(o,l.action),l=l.next;while(l!==i);kr(o,t.memoizedState)||($n=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function W1(){}function V1(e,t){var n=ht,r=ir(),i=t(),o=!kr(r.memoizedState,i);if(o&&(r.memoizedState=i,$n=!0),r=r.queue,Og(Z1.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Lt!==null&&Lt.memoizedState.tag&1){if(n.flags|=2048,Ja(9,K1.bind(null,n,r,i,t),void 0,null),Bt===null)throw Error(U(349));Ho&30||H1(n,t,i)}return i}function H1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ht.updateQueue,t===null?(t={lastEffect:null,stores:null},ht.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function K1(e,t,n,r){t.value=n,t.getSnapshot=r,G1(t)&&Y1(e)}function Z1(e,t,n){return n(function(){G1(t)&&Y1(e)})}function G1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kr(e,n)}catch{return!0}}function Y1(e){var t=hi(e,1);t!==null&&Sr(t,e,1,-1)}function Xy(e){var t=Pr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:e},t.queue=e,e=e.dispatch=uT.bind(null,ht,e),[t.memoizedState,e]}function Ja(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ht.updateQueue,t===null?(t={lastEffect:null,stores:null},ht.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 X1(){return ir().memoizedState}function Dc(e,t,n,r){var i=Pr();ht.flags|=e,i.memoizedState=Ja(1|t,n,void 0,r===void 0?null:r)}function df(e,t,n,r){var i=ir();r=r===void 0?null:r;var o=void 0;if(Rt!==null){var l=Rt.memoizedState;if(o=l.destroy,r!==null&&Tg(r,l.deps)){i.memoizedState=Ja(t,n,o,r);return}}ht.flags|=e,i.memoizedState=Ja(1|t,n,o,r)}function Qy(e,t){return Dc(8390656,8,e,t)}function Og(e,t){return df(2048,8,e,t)}function Q1(e,t){return df(4,2,e,t)}function J1(e,t){return df(4,4,e,t)}function q1(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 ew(e,t,n){return n=n!=null?n.concat([e]):null,df(4,4,q1.bind(null,t,e),n)}function Pg(){}function tw(e,t){var n=ir();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function nw(e,t){var n=ir();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function rw(e,t,n){return Ho&21?(kr(n,t)||(n=l1(),ht.lanes|=n,Ko|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,$n=!0),e.memoizedState=n)}function sT(e,t){var n=Ue;Ue=n!==0&&4>n?n:4,e(!0);var r=Sh.transition;Sh.transition={};try{e(!1),t()}finally{Ue=n,Sh.transition=r}}function iw(){return ir().memoizedState}function aT(e,t,n){var r=Xi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ow(e))lw(t,n);else if(n=L1(e,t,n,r),n!==null){var i=vn();Sr(n,e,r,i),sw(n,t,r)}}function uT(e,t,n){var r=Xi(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ow(e))lw(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,s=o(l,n);if(i.hasEagerState=!0,i.eagerState=s,kr(s,l)){var a=t.interleaved;a===null?(i.next=i,Eg(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=L1(e,t,i,r),n!==null&&(i=vn(),Sr(n,e,r,i),sw(n,t,r))}}function ow(e){var t=e.alternate;return e===ht||t!==null&&t===ht}function lw(e,t){xa=fd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ug(e,n)}}var hd={readContext:rr,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useInsertionEffect:Yt,useLayoutEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useMutableSource:Yt,useSyncExternalStore:Yt,useId:Yt,unstable_isNewReconciler:!1},cT={readContext:rr,useCallback:function(e,t){return Pr().memoizedState=[e,t===void 0?null:t],e},useContext:rr,useEffect:Qy,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Dc(4194308,4,q1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dc(4,2,e,t)},useMemo:function(e,t){var n=Pr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Pr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=aT.bind(null,ht,e),[r.memoizedState,e]},useRef:function(e){var t=Pr();return e={current:e},t.memoizedState=e},useState:Xy,useDebugValue:Pg,useDeferredValue:function(e){return Pr().memoizedState=e},useTransition:function(){var e=Xy(!1),t=e[0];return e=sT.bind(null,e[1]),Pr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ht,i=Pr();if(ot){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Bt===null)throw Error(U(349));Ho&30||H1(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Qy(Z1.bind(null,r,o,e),[e]),r.flags|=2048,Ja(9,K1.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Pr(),t=Bt.identifierPrefix;if(ot){var n=ai,r=si;n=(r&~(1<<32-wr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=lT++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},dT={readContext:rr,useCallback:tw,useContext:rr,useEffect:Og,useImperativeHandle:ew,useInsertionEffect:Q1,useLayoutEffect:J1,useMemo:nw,useReducer:Eh,useRef:X1,useState:function(){return Eh(Qa)},useDebugValue:Pg,useDeferredValue:function(e){var t=ir();return rw(t,Rt.memoizedState,e)},useTransition:function(){var e=Eh(Qa)[0],t=ir().memoizedState;return[e,t]},useMutableSource:W1,useSyncExternalStore:V1,useId:iw,unstable_isNewReconciler:!1},fT={readContext:rr,useCallback:tw,useContext:rr,useEffect:Og,useImperativeHandle:ew,useInsertionEffect:Q1,useLayoutEffect:J1,useMemo:nw,useReducer:Ch,useRef:X1,useState:function(){return Ch(Qa)},useDebugValue:Pg,useDeferredValue:function(e){var t=ir();return Rt===null?t.memoizedState=e:rw(t,Rt.memoizedState,e)},useTransition:function(){var e=Ch(Qa)[0],t=ir().memoizedState;return[e,t]},useMutableSource:W1,useSyncExternalStore:V1,useId:iw,unstable_isNewReconciler:!1};function ls(e,t){try{var n="",r=t;do n+=F$(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
31
31
|
Error generating stack: `+o.message+`
|
|
32
|
-
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function kh(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Rp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var hT=typeof WeakMap=="function"?WeakMap:Map;function aw(e,t,n){n=ui(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){md||(md=!0,Fp=r),Rp(e,t)},n}function uw(e,t,n){n=ui(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Rp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Rp(e,t),typeof r!="function"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Jy(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new hT;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=bT.bind(null,e,t,n),t.then(e,e))}function qy(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 e0(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,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=ui(-1,1),t.tag=2,Gi(n,t,1))),n.lanes|=1),e)}var pT=xi.ReactCurrentOwner,$n=!1;function un(e,t,n,r){t.child=e===null?B1(t,null,n,r):rs(t,e.child,n,r)}function t0(e,t,n,r,i){n=n.render;var o=t.ref;return Kl(t,i),r=Ng(e,t,n,r,o,i),n=Rg(),e!==null&&!$n?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pi(e,t,i)):(ot&&n&&vg(t),t.flags|=1,un(e,t,r,i),t.child)}function n0(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Fg(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,cw(e,t,o,r,i)):(e=zc(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ua,n(l,r)&&e.ref===t.ref)return pi(e,t,i)}return t.flags|=1,e=Qi(o,r),e.ref=t.ref,e.return=t,t.child=e}function cw(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Ua(o,r)&&e.ref===t.ref)if($n=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&($n=!0);else return t.lanes=e.lanes,pi(e,t,i)}return Op(e,t,n,r,i)}function dw(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xe(Ll,An),An|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Xe(Ll,An),An|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Xe(Ll,An),An|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Xe(Ll,An),An|=r;return un(e,t,i,n),t.child}function fw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Op(e,t,n,r,i){var o=Tn(n)?Wo:rn.current;return o=ts(t,o),Kl(t,i),n=Ng(e,t,n,r,o,i),r=Rg(),e!==null&&!$n?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pi(e,t,i)):(ot&&r&&vg(t),t.flags|=1,un(e,t,n,i),t.child)}function r0(e,t,n,r,i){if(Tn(n)){var o=!0;od(t)}else o=!1;if(Kl(t,i),t.stateNode===null)Ic(e,t),z1(t,n,r),Np(t,n,r,i),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=rr(u):(u=Tn(n)?Wo:rn.current,u=ts(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)&&Gy(t,l,r,u),Mi=!1;var f=t.memoizedState;l.state=f,cd(t,r,l,i),a=t.memoizedState,s!==r||f!==a||bn.current||Mi?(typeof c=="function"&&(Tp(t,n,c,r),a=t.memoizedState),(s=Mi||Zy(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,L1(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:mr(t.type,s),l.props=u,d=t.pendingProps,f=l.context,a=n.contextType,typeof a=="object"&&a!==null?a=rr(a):(a=Tn(n)?Wo:rn.current,a=ts(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)&&Gy(t,l,r,a),Mi=!1,f=t.memoizedState,l.state=f,cd(t,r,l,i);var m=t.memoizedState;s!==d||f!==m||bn.current||Mi?(typeof h=="function"&&(Tp(t,n,h,r),m=t.memoizedState),(u=Mi||Zy(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 Pp(e,t,n,r,o,i)}function Pp(e,t,n,r,i,o){fw(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&Uy(t,n,!1),pi(e,t,o);r=t.stateNode,pT.current=t;var s=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=rs(t,e.child,null,o),t.child=rs(t,null,s,o)):un(e,t,s,o),t.memoizedState=r.state,i&&Uy(t,n,!0),t.child}function hw(e){var t=e.stateNode;t.pendingContext?By(e,t.pendingContext,t.pendingContext!==t.context):t.context&&By(e,t.context,!1),kg(e,t.containerInfo)}function i0(e,t,n,r,i){return ns(),xg(i),t.flags|=256,un(e,t,n,r),t.child}var Ap={dehydrated:null,treeContext:null,retryLane:0};function Mp(e){return{baseLanes:e,cachePool:null,transitions:null}}function pw(e,t,n){var r=t.pendingProps,i=dt.current,o=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Xe(dt,i&1),e===null)return $p(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,o?(r=t.mode,o=t.child,l={mode:"hidden",children:l},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=pf(l,r,0,null),e=Lo(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Mp(n),t.memoizedState=Ap,e):Ag(t,l));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return mT(e,t,l,r,s,i,n);if(o){o=r.fallback,l=t.mode,i=e.child,s=i.sibling;var a={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Qi(i,a),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Qi(s,o):(o=Lo(o,l,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,l=e.child.memoizedState,l=l===null?Mp(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Ap,r}return o=e.child,e=o.sibling,r=Qi(o,{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 Ag(e,t){return t=pf({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ac(e,t,n,r){return r!==null&&xg(r),rs(t,e.child,null,n),e=Ag(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mT(e,t,n,r,i,o,l){if(n)return t.flags&256?(t.flags&=-257,r=kh(Error(U(422))),ac(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=pf({mode:"visible",children:r.children},i,0,null),o=Lo(o,i,l,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&rs(t,e.child,null,l),t.child.memoizedState=Mp(l),t.memoizedState=Ap,o);if(!(t.mode&1))return ac(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(U(419)),r=kh(o,r,void 0),ac(e,t,l,r)}if(s=(l&e.childLanes)!==0,$n||s){if(r=Bt,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,hi(e,i),Sr(r,e,i,-1))}return zg(),r=kh(Error(U(421))),ac(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=TT.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,In=Zi(i.nextSibling),Ln=t,ot=!0,yr=null,e!==null&&(Yn[Xn++]=si,Yn[Xn++]=ai,Yn[Xn++]=Vo,si=e.id,ai=e.overflow,Vo=t),t=Ag(t,r.children),t.flags|=4096,t)}function o0(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),bp(e.return,t,n)}function $h(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function mw(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(un(e,t,r.children,n),r=dt.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&&o0(e,n,t);else if(e.tag===19)o0(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(Xe(dt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&dd(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$h(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&dd(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$h(t,!0,n,null,o);break;case"together":$h(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ic(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pi(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ko|=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=Qi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function gT(e,t,n){switch(t.tag){case 3:hw(t),ns();break;case 5:U1(t);break;case 1:Tn(t.type)&&od(t);break;case 4:kg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Xe(ad,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Xe(dt,dt.current&1),t.flags|=128,null):n&t.child.childLanes?pw(e,t,n):(Xe(dt,dt.current&1),e=pi(e,t,n),e!==null?e.sibling:null);Xe(dt,dt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return mw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xe(dt,dt.current),r)break;return null;case 22:case 23:return t.lanes=0,dw(e,t,n)}return pi(e,t,n)}var gw,Dp,vw,yw;gw=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}};Dp=function(){};vw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ao(Fr.current);var o=null;switch(n){case"input":i=rp(e,i),r=rp(e,r),o=[];break;case"select":i=mt({},i,{value:void 0}),r=mt({},r,{value:void 0}),o=[];break;case"textarea":i=lp(e,i),r=lp(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=rd)}ap(n,r);var l;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(l in s)s.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Da.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(s=i!=null?i[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||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Da.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&et("scroll",e),o||s===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};yw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Hs(e,t){if(!ot)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 Xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function vT(e,t,n){var r=t.pendingProps;switch(yg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(t),null;case 1:return Tn(t.type)&&id(),Xt(t),null;case 3:return r=t.stateNode,is(),it(bn),it(rn),bg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(lc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yr!==null&&(Wp(yr),yr=null))),Dp(e,t),Xt(t),null;case 5:$g(t);var i=Ao(Za.current);if(n=t.type,e!==null&&t.stateNode!=null)vw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return Xt(t),null}if(e=Ao(Fr.current),lc(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Mr]=t,r[Ha]=o,e=(t.mode&1)!==0,n){case"dialog":et("cancel",r),et("close",r);break;case"iframe":case"object":case"embed":et("load",r);break;case"video":case"audio":for(i=0;i<sa.length;i++)et(sa[i],r);break;case"source":et("error",r);break;case"img":case"image":case"link":et("error",r),et("load",r);break;case"details":et("toggle",r);break;case"input":py(r,o),et("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},et("invalid",r);break;case"textarea":gy(r,o),et("invalid",r)}ap(n,o),i=null;for(var l in o)if(o.hasOwnProperty(l)){var s=o[l];l==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&oc(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&oc(r.textContent,s,e),i=["children",""+s]):Da.hasOwnProperty(l)&&s!=null&&l==="onScroll"&&et("scroll",r)}switch(n){case"input":Qu(r),my(r,o,!0);break;case"textarea":Qu(r),vy(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=rd)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=H_(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[Mr]=t,e[Ha]=r,gw(e,t,!1,!1),t.stateNode=e;e:{switch(l=up(n,r),n){case"dialog":et("cancel",e),et("close",e),i=r;break;case"iframe":case"object":case"embed":et("load",e),i=r;break;case"video":case"audio":for(i=0;i<sa.length;i++)et(sa[i],e);i=r;break;case"source":et("error",e),i=r;break;case"img":case"image":case"link":et("error",e),et("load",e),i=r;break;case"details":et("toggle",e),i=r;break;case"input":py(e,r),i=rp(e,r),et("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=mt({},r,{value:void 0}),et("invalid",e);break;case"textarea":gy(e,r),i=lp(e,r),et("invalid",e);break;default:i=r}ap(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="style"?G_(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&K_(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Ia(e,a):typeof a=="number"&&Ia(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Da.hasOwnProperty(o)?a!=null&&o==="onScroll"&&et("scroll",e):a!=null&&rg(e,o,a,l))}switch(n){case"input":Qu(e),my(e,r,!1);break;case"textarea":Qu(e),vy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+to(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Ul(e,!!r.multiple,o,!1):r.defaultValue!=null&&Ul(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=rd)}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 Xt(t),null;case 6:if(e&&t.stateNode!=null)yw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=Ao(Za.current),Ao(Fr.current),lc(t)){if(r=t.stateNode,n=t.memoizedProps,r[Mr]=t,(o=r.nodeValue!==n)&&(e=Ln,e!==null))switch(e.tag){case 3:oc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&oc(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Mr]=t,t.stateNode=r}return Xt(t),null;case 13:if(it(dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ot&&In!==null&&t.mode&1&&!(t.flags&128))D1(),ns(),t.flags|=98560,o=!1;else if(o=lc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(U(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(U(317));o[Mr]=t}else ns(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xt(t),o=!1}else yr!==null&&(Wp(yr),yr=null),o=!0;if(!o)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||dt.current&1?Pt===0&&(Pt=3):zg())),t.updateQueue!==null&&(t.flags|=4),Xt(t),null);case 4:return is(),Dp(e,t),e===null&&Wa(t.stateNode.containerInfo),Xt(t),null;case 10:return Sg(t.type._context),Xt(t),null;case 17:return Tn(t.type)&&id(),Xt(t),null;case 19:if(it(dt),o=t.memoizedState,o===null)return Xt(t),null;if(r=(t.flags&128)!==0,l=o.rendering,l===null)if(r)Hs(o,!1);else{if(Pt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=dd(e),l!==null){for(t.flags|=128,Hs(o,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,l=o.alternate,l===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Xe(dt,dt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ct()>ls&&(t.flags|=128,r=!0,Hs(o,!1),t.lanes=4194304)}else{if(!r)if(e=dd(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!ot)return Xt(t),null}else 2*Ct()-o.renderingStartTime>ls&&n!==1073741824&&(t.flags|=128,r=!0,Hs(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ct(),t.sibling=null,n=dt.current,Xe(dt,r?n&1|2:n&1),t):(Xt(t),null);case 22:case 23:return jg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?An&1073741824&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function yT(e,t){switch(yg(t),t.tag){case 1:return Tn(t.type)&&id(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return is(),it(bn),it(rn),bg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return $g(t),null;case 13:if(it(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return it(dt),null;case 4:return is(),null;case 10:return Sg(t.type._context),null;case 22:case 23:return jg(),null;case 24:return null;default:return null}}var uc=!1,Jt=!1,xT=typeof WeakSet=="function"?WeakSet:Set,ee=null;function Il(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){vt(e,t,r)}else n.current=null}function Ip(e,t,n){try{n()}catch(r){vt(e,t,r)}}var l0=!1;function _T(e,t){if(xp=ed,e=S1(),gg(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 i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.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||i!==0&&d.nodeType!==3||(s=l+i),d!==o||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===i&&(s=l),f===o&&++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(_p={focusedElem:e,selectionRange:n},ed=!1,ee=t;ee!==null;)if(t=ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ee=e;else for(;ee!==null;){t=ee;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:mr(t.type,g),S);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(w){vt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ee=e;break}ee=t.return}return m=l0,l0=!1,m}function ya(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Ip(t,n,o)}i=i.next}while(i!==r)}}function ff(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 Lp(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 xw(e){var t=e.alternate;t!==null&&(e.alternate=null,xw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mr],delete t[Ha],delete t[Ep],delete t[nT],delete t[rT])),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 _w(e){return e.tag===5||e.tag===3||e.tag===4}function s0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_w(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 jp(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=rd));else if(r!==4&&(e=e.child,e!==null))for(jp(e,t,n),e=e.sibling;e!==null;)jp(e,t,n),e=e.sibling}function zp(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(zp(e,t,n),e=e.sibling;e!==null;)zp(e,t,n),e=e.sibling}var Ht=null,gr=!1;function $i(e,t,n){for(n=n.child;n!==null;)ww(e,t,n),n=n.sibling}function ww(e,t,n){if(zr&&typeof zr.onCommitFiberUnmount=="function")try{zr.onCommitFiberUnmount(rf,n)}catch{}switch(n.tag){case 5:Jt||Il(n,t);case 6:var r=Ht,i=gr;Ht=null,$i(e,t,n),Ht=r,gr=i,Ht!==null&&(gr?(e=Ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ht.removeChild(n.stateNode));break;case 18:Ht!==null&&(gr?(e=Ht,n=n.stateNode,e.nodeType===8?xh(e.parentNode,n):e.nodeType===1&&xh(e,n),Fa(e)):xh(Ht,n.stateNode));break;case 4:r=Ht,i=gr,Ht=n.stateNode.containerInfo,gr=!0,$i(e,t,n),Ht=r,gr=i;break;case 0:case 11:case 14:case 15:if(!Jt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Ip(n,t,l),i=i.next}while(i!==r)}$i(e,t,n);break;case 1:if(!Jt&&(Il(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){vt(n,t,s)}$i(e,t,n);break;case 21:$i(e,t,n);break;case 22:n.mode&1?(Jt=(r=Jt)||n.memoizedState!==null,$i(e,t,n),Jt=r):$i(e,t,n);break;default:$i(e,t,n)}}function a0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new xT),t.forEach(function(r){var i=NT.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function dr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,l=t,s=l;e:for(;s!==null;){switch(s.tag){case 5:Ht=s.stateNode,gr=!1;break e;case 3:Ht=s.stateNode.containerInfo,gr=!0;break e;case 4:Ht=s.stateNode.containerInfo,gr=!0;break e}s=s.return}if(Ht===null)throw Error(U(160));ww(o,l,i),Ht=null,gr=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){vt(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Sw(t,e),t=t.sibling}function Sw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dr(t,e),Or(e),r&4){try{ya(3,e,e.return),ff(3,e)}catch(g){vt(e,e.return,g)}try{ya(5,e,e.return)}catch(g){vt(e,e.return,g)}}break;case 1:dr(t,e),Or(e),r&512&&n!==null&&Il(n,n.return);break;case 5:if(dr(t,e),Or(e),r&512&&n!==null&&Il(n,n.return),e.flags&32){var i=e.stateNode;try{Ia(i,"")}catch(g){vt(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,l=n!==null?n.memoizedProps:o,s=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&W_(i,o),up(s,l);var u=up(s,o);for(l=0;l<a.length;l+=2){var c=a[l],d=a[l+1];c==="style"?G_(i,d):c==="dangerouslySetInnerHTML"?K_(i,d):c==="children"?Ia(i,d):rg(i,c,d,u)}switch(s){case"input":ip(i,o);break;case"textarea":V_(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?Ul(i,!!o.multiple,h,!1):f!==!!o.multiple&&(o.defaultValue!=null?Ul(i,!!o.multiple,o.defaultValue,!0):Ul(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ha]=o}catch(g){vt(e,e.return,g)}}break;case 6:if(dr(t,e),Or(e),r&4){if(e.stateNode===null)throw Error(U(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(g){vt(e,e.return,g)}}break;case 3:if(dr(t,e),Or(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fa(t.containerInfo)}catch(g){vt(e,e.return,g)}break;case 4:dr(t,e),Or(e);break;case 13:dr(t,e),Or(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Ig=Ct())),r&4&&a0(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Jt=(u=Jt)||c,dr(t,e),Jt=u):dr(t,e),Or(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(ee=e,c=e.child;c!==null;){for(d=ee=c;ee!==null;){switch(f=ee,h=f.child,f.tag){case 0:case 11:case 14:case 15:ya(4,f,f.return);break;case 1:Il(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){vt(r,n,g)}}break;case 5:Il(f,f.return);break;case 22:if(f.memoizedState!==null){c0(d);continue}}h!==null?(h.return=f,ee=h):c0(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=d.stateNode,a=d.memoizedProps.style,l=a!=null&&a.hasOwnProperty("display")?a.display:null,s.style.display=Z_("display",l))}catch(g){vt(e,e.return,g)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){vt(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:dr(t,e),Or(e),r&4&&a0(e);break;case 21:break;default:dr(t,e),Or(e)}}function Or(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(_w(n)){var r=n;break e}n=n.return}throw Error(U(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ia(i,""),r.flags&=-33);var o=s0(e);zp(e,o,i);break;case 3:case 4:var l=r.stateNode.containerInfo,s=s0(e);jp(e,s,l);break;default:throw Error(U(161))}}catch(a){vt(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wT(e,t,n){ee=e,Ew(e)}function Ew(e,t,n){for(var r=(e.mode&1)!==0;ee!==null;){var i=ee,o=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||uc;if(!l){var s=i.alternate,a=s!==null&&s.memoizedState!==null||Jt;s=uc;var u=Jt;if(uc=l,(Jt=a)&&!u)for(ee=i;ee!==null;)l=ee,a=l.child,l.tag===22&&l.memoizedState!==null?d0(i):a!==null?(a.return=l,ee=a):d0(i);for(;o!==null;)ee=o,Ew(o),o=o.sibling;ee=i,uc=s,Jt=u}u0(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,ee=o):u0(e)}}function u0(e){for(;ee!==null;){var t=ee;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Jt||ff(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Jt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:mr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Ky(t,o,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}Ky(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&&Fa(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}Jt||t.flags&512&&Lp(t)}catch(f){vt(t,t.return,f)}}if(t===e){ee=null;break}if(n=t.sibling,n!==null){n.return=t.return,ee=n;break}ee=t.return}}function c0(e){for(;ee!==null;){var t=ee;if(t===e){ee=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ee=n;break}ee=t.return}}function d0(e){for(;ee!==null;){var t=ee;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ff(4,t)}catch(a){vt(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){vt(t,i,a)}}var o=t.return;try{Lp(t)}catch(a){vt(t,o,a)}break;case 5:var l=t.return;try{Lp(t)}catch(a){vt(t,l,a)}}}catch(a){vt(t,t.return,a)}if(t===e){ee=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ee=s;break}ee=t.return}}var ST=Math.ceil,pd=xi.ReactCurrentDispatcher,Mg=xi.ReactCurrentOwner,nr=xi.ReactCurrentBatchConfig,Me=0,Bt=null,$t=null,Zt=0,An=0,Ll=go(0),Pt=0,Qa=null,Ko=0,hf=0,Dg=0,xa=null,kn=null,Ig=0,ls=1/0,ti=null,md=!1,Fp=null,Yi=null,cc=!1,Bi=null,gd=0,_a=0,Bp=null,Lc=-1,jc=0;function vn(){return Me&6?Ct():Lc!==-1?Lc:Lc=Ct()}function Xi(e){return e.mode&1?Me&2&&Zt!==0?Zt&-Zt:oT.transition!==null?(jc===0&&(jc=l1()),jc):(e=Ue,e!==0||(e=window.event,e=e===void 0?16:h1(e.type)),e):1}function Sr(e,t,n,r){if(50<_a)throw _a=0,Bp=null,Error(U(185));Tu(e,n,r),(!(Me&2)||e!==Bt)&&(e===Bt&&(!(Me&2)&&(hf|=n),Pt===4&&Li(e,Zt)),Nn(e,r),n===1&&Me===0&&!(t.mode&1)&&(ls=Ct()+500,uf&&vo()))}function Nn(e,t){var n=e.callbackNode;ob(e,t);var r=qc(e,e===Bt?Zt:0);if(r===0)n!==null&&_y(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&_y(n),t===1)e.tag===0?iT(f0.bind(null,e)):P1(f0.bind(null,e)),eT(function(){!(Me&6)&&vo()}),n=null;else{switch(s1(r)){case 1:n=ag;break;case 4:n=i1;break;case 16:n=Jc;break;case 536870912:n=o1;break;default:n=Jc}n=Ow(n,Cw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Cw(e,t){if(Lc=-1,jc=0,Me&6)throw Error(U(327));var n=e.callbackNode;if(Zl()&&e.callbackNode!==n)return null;var r=qc(e,e===Bt?Zt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=vd(e,r);else{t=r;var i=Me;Me|=2;var o=$w();(Bt!==e||Zt!==t)&&(ti=null,ls=Ct()+500,Io(e,t));do try{kT();break}catch(s){kw(e,s)}while(!0);wg(),pd.current=o,Me=i,$t!==null?t=0:(Bt=null,Zt=0,t=Pt)}if(t!==0){if(t===2&&(i=pp(e),i!==0&&(r=i,t=Up(e,i))),t===1)throw n=Qa,Io(e,0),Li(e,r),Nn(e,Ct()),n;if(t===6)Li(e,r);else{if(i=e.current.alternate,!(r&30)&&!ET(i)&&(t=vd(e,r),t===2&&(o=pp(e),o!==0&&(r=o,t=Up(e,o))),t===1))throw n=Qa,Io(e,0),Li(e,r),Nn(e,Ct()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:To(e,kn,ti);break;case 3:if(Li(e,r),(r&130023424)===r&&(t=Ig+500-Ct(),10<t)){if(qc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){vn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Sp(To.bind(null,e,kn,ti),t);break}To(e,kn,ti);break;case 4:if(Li(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-wr(r);o=1<<l,l=t[l],l>i&&(i=l),r&=~o}if(r=i,r=Ct()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ST(r/1960))-r,10<r){e.timeoutHandle=Sp(To.bind(null,e,kn,ti),r);break}To(e,kn,ti);break;case 5:To(e,kn,ti);break;default:throw Error(U(329))}}}return Nn(e,Ct()),e.callbackNode===n?Cw.bind(null,e):null}function Up(e,t){var n=xa;return e.current.memoizedState.isDehydrated&&(Io(e,t).flags|=256),e=vd(e,t),e!==2&&(t=kn,kn=n,t!==null&&Wp(t)),e}function Wp(e){kn===null?kn=e:kn.push.apply(kn,e)}function ET(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 i=n[r],o=i.getSnapshot;i=i.value;try{if(!kr(o(),i))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 Li(e,t){for(t&=~Dg,t&=~hf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wr(t),r=1<<n;e[n]=-1,t&=~r}}function f0(e){if(Me&6)throw Error(U(327));Zl();var t=qc(e,0);if(!(t&1))return Nn(e,Ct()),null;var n=vd(e,t);if(e.tag!==0&&n===2){var r=pp(e);r!==0&&(t=r,n=Up(e,r))}if(n===1)throw n=Qa,Io(e,0),Li(e,t),Nn(e,Ct()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,To(e,kn,ti),Nn(e,Ct()),null}function Lg(e,t){var n=Me;Me|=1;try{return e(t)}finally{Me=n,Me===0&&(ls=Ct()+500,uf&&vo())}}function Zo(e){Bi!==null&&Bi.tag===0&&!(Me&6)&&Zl();var t=Me;Me|=1;var n=nr.transition,r=Ue;try{if(nr.transition=null,Ue=1,e)return e()}finally{Ue=r,nr.transition=n,Me=t,!(Me&6)&&vo()}}function jg(){An=Ll.current,it(Ll)}function Io(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,qb(n)),$t!==null)for(n=$t.return;n!==null;){var r=n;switch(yg(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&id();break;case 3:is(),it(bn),it(rn),bg();break;case 5:$g(r);break;case 4:is();break;case 13:it(dt);break;case 19:it(dt);break;case 10:Sg(r.type._context);break;case 22:case 23:jg()}n=n.return}if(Bt=e,$t=e=Qi(e.current,null),Zt=An=t,Pt=0,Qa=null,Dg=hf=Ko=0,kn=xa=null,Po!==null){for(t=0;t<Po.length;t++)if(n=Po[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var l=o.next;o.next=i,r.next=l}n.pending=r}Po=null}return e}function kw(e,t){do{var n=$t;try{if(wg(),Mc.current=hd,fd){for(var r=ht.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}fd=!1}if(Ho=0,It=Rt=ht=null,va=!1,Ga=0,Mg.current=null,n===null||n.return===null){Pt=1,Qa=t,$t=null;break}e:{var o=e,l=n.return,s=n,a=t;if(t=Zt,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=qy(l);if(h!==null){h.flags&=-257,e0(h,l,s,o,t),h.mode&1&&Jy(o,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)){Jy(o,u,t),zg();break e}a=Error(U(426))}}else if(ot&&s.mode&1){var S=qy(l);if(S!==null){!(S.flags&65536)&&(S.flags|=256),e0(S,l,s,o,t),xg(os(a,s));break e}}o=a=os(a,s),Pt!==4&&(Pt=2),xa===null?xa=[o]:xa.push(o),o=l;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=aw(o,a,t);Hy(o,v);break e;case 1:s=a;var y=o.type,_=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Yi===null||!Yi.has(_)))){o.flags|=65536,t&=-t,o.lanes|=t;var w=uw(o,s,t);Hy(o,w);break e}}o=o.return}while(o!==null)}Tw(n)}catch(E){t=E,$t===n&&n!==null&&($t=n=n.return);continue}break}while(!0)}function $w(){var e=pd.current;return pd.current=hd,e===null?hd:e}function zg(){(Pt===0||Pt===3||Pt===2)&&(Pt=4),Bt===null||!(Ko&268435455)&&!(hf&268435455)||Li(Bt,Zt)}function vd(e,t){var n=Me;Me|=2;var r=$w();(Bt!==e||Zt!==t)&&(ti=null,Io(e,t));do try{CT();break}catch(i){kw(e,i)}while(!0);if(wg(),Me=n,pd.current=r,$t!==null)throw Error(U(261));return Bt=null,Zt=0,Pt}function CT(){for(;$t!==null;)bw($t)}function kT(){for(;$t!==null&&!X$();)bw($t)}function bw(e){var t=Rw(e.alternate,e,An);e.memoizedProps=e.pendingProps,t===null?Tw(e):$t=t,Mg.current=null}function Tw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=yT(n,t),n!==null){n.flags&=32767,$t=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Pt=6,$t=null;return}}else if(n=vT(n,t,An),n!==null){$t=n;return}if(t=t.sibling,t!==null){$t=t;return}$t=t=e}while(t!==null);Pt===0&&(Pt=5)}function To(e,t,n){var r=Ue,i=nr.transition;try{nr.transition=null,Ue=1,$T(e,t,n,r)}finally{nr.transition=i,Ue=r}return null}function $T(e,t,n,r){do Zl();while(Bi!==null);if(Me&6)throw Error(U(327));n=e.finishedWork;var i=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 o=n.lanes|n.childLanes;if(lb(e,o),e===Bt&&($t=Bt=null,Zt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||cc||(cc=!0,Ow(Jc,function(){return Zl(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=nr.transition,nr.transition=null;var l=Ue;Ue=1;var s=Me;Me|=4,Mg.current=null,_T(e,n),Sw(n,e),Kb(_p),ed=!!xp,_p=xp=null,e.current=n,wT(n),Q$(),Me=s,Ue=l,nr.transition=o}else e.current=n;if(cc&&(cc=!1,Bi=e,gd=i),o=e.pendingLanes,o===0&&(Yi=null),eb(n.stateNode),Nn(e,Ct()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(md)throw md=!1,e=Fp,Fp=null,e;return gd&1&&e.tag!==0&&Zl(),o=e.pendingLanes,o&1?e===Bp?_a++:(_a=0,Bp=e):_a=0,vo(),null}function Zl(){if(Bi!==null){var e=s1(gd),t=nr.transition,n=Ue;try{if(nr.transition=null,Ue=16>e?16:e,Bi===null)var r=!1;else{if(e=Bi,Bi=null,gd=0,Me&6)throw Error(U(331));var i=Me;for(Me|=4,ee=e.current;ee!==null;){var o=ee,l=o.child;if(ee.flags&16){var s=o.deletions;if(s!==null){for(var a=0;a<s.length;a++){var u=s[a];for(ee=u;ee!==null;){var c=ee;switch(c.tag){case 0:case 11:case 15:ya(8,c,o)}var d=c.child;if(d!==null)d.return=c,ee=d;else for(;ee!==null;){c=ee;var f=c.sibling,h=c.return;if(xw(c),c===u){ee=null;break}if(f!==null){f.return=h,ee=f;break}ee=h}}}var m=o.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)}}ee=o}}if(o.subtreeFlags&2064&&l!==null)l.return=o,ee=l;else e:for(;ee!==null;){if(o=ee,o.flags&2048)switch(o.tag){case 0:case 11:case 15:ya(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,ee=v;break e}ee=o.return}}var y=e.current;for(ee=y;ee!==null;){l=ee;var _=l.child;if(l.subtreeFlags&2064&&_!==null)_.return=l,ee=_;else e:for(l=y;ee!==null;){if(s=ee,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:ff(9,s)}}catch(E){vt(s,s.return,E)}if(s===l){ee=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,ee=w;break e}ee=s.return}}if(Me=i,vo(),zr&&typeof zr.onPostCommitFiberRoot=="function")try{zr.onPostCommitFiberRoot(rf,e)}catch{}r=!0}return r}finally{Ue=n,nr.transition=t}}return!1}function h0(e,t,n){t=os(n,t),t=aw(e,t,1),e=Gi(e,t,1),t=vn(),e!==null&&(Tu(e,1,t),Nn(e,t))}function vt(e,t,n){if(e.tag===3)h0(e,e,n);else for(;t!==null;){if(t.tag===3){h0(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yi===null||!Yi.has(r))){e=os(n,e),e=uw(t,e,1),t=Gi(t,e,1),e=vn(),t!==null&&(Tu(t,1,e),Nn(t,e));break}}t=t.return}}function bT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=vn(),e.pingedLanes|=e.suspendedLanes&n,Bt===e&&(Zt&n)===n&&(Pt===4||Pt===3&&(Zt&130023424)===Zt&&500>Ct()-Ig?Io(e,0):Dg|=n),Nn(e,t)}function Nw(e,t){t===0&&(e.mode&1?(t=ec,ec<<=1,!(ec&130023424)&&(ec=4194304)):t=1);var n=vn();e=hi(e,t),e!==null&&(Tu(e,t,n),Nn(e,n))}function TT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Nw(e,n)}function NT(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(U(314))}r!==null&&r.delete(t),Nw(e,n)}var Rw;Rw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||bn.current)$n=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return $n=!1,gT(e,t,n);$n=!!(e.flags&131072)}else $n=!1,ot&&t.flags&1048576&&A1(t,sd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ic(e,t),e=t.pendingProps;var i=ts(t,rn.current);Kl(t,n),i=Ng(null,t,r,e,i,n);var o=Rg();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Tn(r)?(o=!0,od(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Cg(t),i.updater=cf,t.stateNode=i,i._reactInternals=t,Np(t,r,e,n),t=Pp(null,t,r,!0,o,n)):(t.tag=0,ot&&o&&vg(t),un(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ic(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=OT(r),e=mr(r,e),i){case 0:t=Op(null,t,r,e,n);break e;case 1:t=r0(null,t,r,e,n);break e;case 11:t=t0(null,t,r,e,n);break e;case 14:t=n0(null,t,r,mr(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mr(r,i),Op(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mr(r,i),r0(e,t,r,i,n);case 3:e:{if(hw(t),e===null)throw Error(U(387));r=t.pendingProps,o=t.memoizedState,i=o.element,L1(e,t),cd(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=os(Error(U(423)),t),t=i0(e,t,r,n,i);break e}else if(r!==i){i=os(Error(U(424)),t),t=i0(e,t,r,n,i);break e}else for(In=Zi(t.stateNode.containerInfo.firstChild),Ln=t,ot=!0,yr=null,n=B1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ns(),r===i){t=pi(e,t,n);break e}un(e,t,r,n)}t=t.child}return t;case 5:return U1(t),e===null&&$p(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,wp(r,i)?l=null:o!==null&&wp(r,o)&&(t.flags|=32),fw(e,t),un(e,t,l,n),t.child;case 6:return e===null&&$p(t),null;case 13:return pw(e,t,n);case 4:return kg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=rs(t,null,r,n):un(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mr(r,i),t0(e,t,r,i,n);case 7:return un(e,t,t.pendingProps,n),t.child;case 8:return un(e,t,t.pendingProps.children,n),t.child;case 12:return un(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Xe(ad,r._currentValue),r._currentValue=l,o!==null)if(kr(o.value,l)){if(o.children===i.children&&!bn.current){t=pi(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){l=o.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=ui(-1,n&-n),a.tag=2;var u=o.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}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),bp(o.return,n,t),s.lanes|=n;break}a=a.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(U(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),bp(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}un(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Kl(t,n),i=rr(i),r=r(i),t.flags|=1,un(e,t,r,n),t.child;case 14:return r=t.type,i=mr(r,t.pendingProps),i=mr(r.type,i),n0(e,t,r,i,n);case 15:return cw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mr(r,i),Ic(e,t),t.tag=1,Tn(r)?(e=!0,od(t)):e=!1,Kl(t,n),z1(t,r,i),Np(t,r,i,n),Pp(null,t,r,!0,e,n);case 19:return mw(e,t,n);case 22:return dw(e,t,n)}throw Error(U(156,t.tag))};function Ow(e,t){return r1(e,t)}function RT(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 qn(e,t,n,r){return new RT(e,t,n,r)}function Fg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function OT(e){if(typeof e=="function")return Fg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===og)return 11;if(e===lg)return 14}return 2}function Qi(e,t){var n=e.alternate;return n===null?(n=qn(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 zc(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")Fg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case bl:return Lo(n.children,i,o,t);case ig:l=8,i|=8;break;case qh:return e=qn(12,n,t,i|2),e.elementType=qh,e.lanes=o,e;case ep:return e=qn(13,n,t,i),e.elementType=ep,e.lanes=o,e;case tp:return e=qn(19,n,t,i),e.elementType=tp,e.lanes=o,e;case F_:return pf(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j_:l=10;break e;case z_:l=9;break e;case og:l=11;break e;case lg:l=14;break e;case Ai:l=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=qn(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Lo(e,t,n,r){return e=qn(7,e,r,t),e.lanes=n,e}function pf(e,t,n,r){return e=qn(22,e,r,t),e.elementType=F_,e.lanes=n,e.stateNode={isHidden:!1},e}function bh(e,t,n){return e=qn(6,e,null,t),e.lanes=n,e}function Th(e,t,n){return t=qn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function PT(e,t,n,r,i){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=ah(0),this.expirationTimes=ah(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ah(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bg(e,t,n,r,i,o,l,s,a){return e=new PT(e,t,n,s,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cg(o),e}function AT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$l,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Pw(e){if(!e)return no;e=e._reactInternals;e:{if(il(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(Tn(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(Tn(n))return O1(e,n,t)}return t}function Aw(e,t,n,r,i,o,l,s,a){return e=Bg(n,r,!0,e,i,o,l,s,a),e.context=Pw(null),n=e.current,r=vn(),i=Xi(n),o=ui(r,i),o.callback=t??null,Gi(n,o,i),e.current.lanes=i,Tu(e,i,r),Nn(e,r),e}function mf(e,t,n,r){var i=t.current,o=vn(),l=Xi(i);return n=Pw(n),t.context===null?t.context=n:t.pendingContext=n,t=ui(o,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Gi(i,t,l),e!==null&&(Sr(e,i,l,o),Ac(e,i,l)),l}function yd(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 p0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ug(e,t){p0(e,t),(e=e.alternate)&&p0(e,t)}function MT(){return null}var Mw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Wg(e){this._internalRoot=e}gf.prototype.render=Wg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));mf(e,t,null,null)};gf.prototype.unmount=Wg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zo(function(){mf(null,e,null,null)}),t[fi]=null}};function gf(e){this._internalRoot=e}gf.prototype.unstable_scheduleHydration=function(e){if(e){var t=c1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ii.length&&t!==0&&t<Ii[n].priority;n++);Ii.splice(n,0,e),n===0&&f1(e)}};function Vg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function m0(){}function DT(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=yd(l);o.call(u)}}var l=Aw(t,r,e,0,null,!1,!1,"",m0);return e._reactRootContainer=l,e[fi]=l.current,Wa(e.nodeType===8?e.parentNode:e),Zo(),l}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=yd(a);s.call(u)}}var a=Bg(e,0,!1,null,null,!1,!1,"",m0);return e._reactRootContainer=a,e[fi]=a.current,Wa(e.nodeType===8?e.parentNode:e),Zo(function(){mf(t,a,n,r)}),a}function yf(e,t,n,r,i){var o=n._reactRootContainer;if(o){var l=o;if(typeof i=="function"){var s=i;i=function(){var a=yd(l);s.call(a)}}mf(t,l,e,i)}else l=DT(n,t,e,i,r);return yd(l)}a1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=la(t.pendingLanes);n!==0&&(ug(t,n|1),Nn(t,Ct()),!(Me&6)&&(ls=Ct()+500,vo()))}break;case 13:Zo(function(){var r=hi(e,1);if(r!==null){var i=vn();Sr(r,e,1,i)}}),Ug(e,1)}};cg=function(e){if(e.tag===13){var t=hi(e,134217728);if(t!==null){var n=vn();Sr(t,e,134217728,n)}Ug(e,134217728)}};u1=function(e){if(e.tag===13){var t=Xi(e),n=hi(e,t);if(n!==null){var r=vn();Sr(n,e,t,r)}Ug(e,t)}};c1=function(){return Ue};d1=function(e,t){var n=Ue;try{return Ue=e,t()}finally{Ue=n}};dp=function(e,t,n){switch(t){case"input":if(ip(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 i=af(r);if(!i)throw Error(U(90));U_(r),ip(r,i)}}}break;case"textarea":V_(e,n);break;case"select":t=n.value,t!=null&&Ul(e,!!n.multiple,t,!1)}};Q_=Lg;J_=Zo;var IT={usingClientEntryPoint:!1,Events:[Ru,Ol,af,Y_,X_,Lg]},Ks={findFiberByHostInstance:Oo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},LT={bundleType:Ks.bundleType,version:Ks.version,rendererPackageName:Ks.rendererPackageName,rendererConfig:Ks.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:xi.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=t1(e),e===null?null:e.stateNode},findFiberByHostInstance:Ks.findFiberByHostInstance||MT,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 dc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dc.isDisabled&&dc.supportsFiber)try{rf=dc.inject(LT),zr=dc}catch{}}Vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=IT;Vn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vg(t))throw Error(U(200));return AT(e,t,null,n)};Vn.createRoot=function(e,t){if(!Vg(e))throw Error(U(299));var n=!1,r="",i=Mw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Bg(e,1,!1,null,null,n,!1,r,i),e[fi]=t.current,Wa(e.nodeType===8?e.parentNode:e),new Wg(t)};Vn.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=t1(t),e=e===null?null:e.stateNode,e};Vn.flushSync=function(e){return Zo(e)};Vn.hydrate=function(e,t,n){if(!vf(t))throw Error(U(200));return yf(null,e,t,!0,n)};Vn.hydrateRoot=function(e,t,n){if(!Vg(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",l=Mw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=Aw(t,null,e,1,n??null,i,!1,o,l),e[fi]=t.current,Wa(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new gf(t)};Vn.render=function(e,t,n){if(!vf(t))throw Error(U(200));return yf(null,e,t,!1,n)};Vn.unmountComponentAtNode=function(e){if(!vf(e))throw Error(U(40));return e._reactRootContainer?(Zo(function(){yf(null,null,e,!1,function(){e._reactRootContainer=null,e[fi]=null})}),!0):!1};Vn.unstable_batchedUpdates=Lg;Vn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!vf(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return yf(e,t,n,!1,r)};Vn.version="18.2.0-next-9e3b772b8-20220608";function Dw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dw)}catch(e){console.error(e)}}Dw(),A_.exports=Vn;var Gr=A_.exports;const Iw=$u(Gr),jT=E_({__proto__:null,default:Iw},[Gr]);var g0=Gr;Qh.createRoot=g0.createRoot,Qh.hydrateRoot=g0.hydrateRoot;var Lw={exports:{}},xf={};/**
|
|
32
|
+
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function kh(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Rp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var hT=typeof WeakMap=="function"?WeakMap:Map;function aw(e,t,n){n=ui(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){md||(md=!0,Fp=r),Rp(e,t)},n}function uw(e,t,n){n=ui(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Rp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Rp(e,t),typeof r!="function"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Jy(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new hT;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=bT.bind(null,e,t,n),t.then(e,e))}function qy(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 e0(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,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=ui(-1,1),t.tag=2,Gi(n,t,1))),n.lanes|=1),e)}var pT=xi.ReactCurrentOwner,$n=!1;function un(e,t,n,r){t.child=e===null?B1(t,null,n,r):is(t,e.child,n,r)}function t0(e,t,n,r,i){n=n.render;var o=t.ref;return Zl(t,i),r=Ng(e,t,n,r,o,i),n=Rg(),e!==null&&!$n?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pi(e,t,i)):(ot&&n&&vg(t),t.flags|=1,un(e,t,r,i),t.child)}function n0(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Fg(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,cw(e,t,o,r,i)):(e=zc(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:Va,n(l,r)&&e.ref===t.ref)return pi(e,t,i)}return t.flags|=1,e=Qi(o,r),e.ref=t.ref,e.return=t,t.child=e}function cw(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Va(o,r)&&e.ref===t.ref)if($n=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&($n=!0);else return t.lanes=e.lanes,pi(e,t,i)}return Op(e,t,n,r,i)}function dw(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xe(jl,An),An|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Xe(jl,An),An|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Xe(jl,An),An|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Xe(jl,An),An|=r;return un(e,t,i,n),t.child}function fw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Op(e,t,n,r,i){var o=Tn(n)?Wo:rn.current;return o=ns(t,o),Zl(t,i),n=Ng(e,t,n,r,o,i),r=Rg(),e!==null&&!$n?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pi(e,t,i)):(ot&&r&&vg(t),t.flags|=1,un(e,t,n,i),t.child)}function r0(e,t,n,r,i){if(Tn(n)){var o=!0;od(t)}else o=!1;if(Zl(t,i),t.stateNode===null)Lc(e,t),z1(t,n,r),Np(t,n,r,i),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=rr(u):(u=Tn(n)?Wo:rn.current,u=ns(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)&&Gy(t,l,r,u),Mi=!1;var f=t.memoizedState;l.state=f,cd(t,r,l,i),a=t.memoizedState,s!==r||f!==a||bn.current||Mi?(typeof c=="function"&&(Tp(t,n,c,r),a=t.memoizedState),(s=Mi||Zy(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,I1(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:mr(t.type,s),l.props=u,d=t.pendingProps,f=l.context,a=n.contextType,typeof a=="object"&&a!==null?a=rr(a):(a=Tn(n)?Wo:rn.current,a=ns(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)&&Gy(t,l,r,a),Mi=!1,f=t.memoizedState,l.state=f,cd(t,r,l,i);var m=t.memoizedState;s!==d||f!==m||bn.current||Mi?(typeof h=="function"&&(Tp(t,n,h,r),m=t.memoizedState),(u=Mi||Zy(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 Pp(e,t,n,r,o,i)}function Pp(e,t,n,r,i,o){fw(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&Uy(t,n,!1),pi(e,t,o);r=t.stateNode,pT.current=t;var s=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=is(t,e.child,null,o),t.child=is(t,null,s,o)):un(e,t,s,o),t.memoizedState=r.state,i&&Uy(t,n,!0),t.child}function hw(e){var t=e.stateNode;t.pendingContext?By(e,t.pendingContext,t.pendingContext!==t.context):t.context&&By(e,t.context,!1),kg(e,t.containerInfo)}function i0(e,t,n,r,i){return rs(),xg(i),t.flags|=256,un(e,t,n,r),t.child}var Ap={dehydrated:null,treeContext:null,retryLane:0};function Mp(e){return{baseLanes:e,cachePool:null,transitions:null}}function pw(e,t,n){var r=t.pendingProps,i=dt.current,o=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Xe(dt,i&1),e===null)return $p(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,o?(r=t.mode,o=t.child,l={mode:"hidden",children:l},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=pf(l,r,0,null),e=Io(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Mp(n),t.memoizedState=Ap,e):Ag(t,l));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return mT(e,t,l,r,s,i,n);if(o){o=r.fallback,l=t.mode,i=e.child,s=i.sibling;var a={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Qi(i,a),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Qi(s,o):(o=Io(o,l,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,l=e.child.memoizedState,l=l===null?Mp(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Ap,r}return o=e.child,e=o.sibling,r=Qi(o,{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 Ag(e,t){return t=pf({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ac(e,t,n,r){return r!==null&&xg(r),is(t,e.child,null,n),e=Ag(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mT(e,t,n,r,i,o,l){if(n)return t.flags&256?(t.flags&=-257,r=kh(Error(U(422))),ac(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=pf({mode:"visible",children:r.children},i,0,null),o=Io(o,i,l,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&is(t,e.child,null,l),t.child.memoizedState=Mp(l),t.memoizedState=Ap,o);if(!(t.mode&1))return ac(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(U(419)),r=kh(o,r,void 0),ac(e,t,l,r)}if(s=(l&e.childLanes)!==0,$n||s){if(r=Bt,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,hi(e,i),Sr(r,e,i,-1))}return zg(),r=kh(Error(U(421))),ac(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=TT.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ln=Zi(i.nextSibling),In=t,ot=!0,yr=null,e!==null&&(Yn[Xn++]=si,Yn[Xn++]=ai,Yn[Xn++]=Vo,si=e.id,ai=e.overflow,Vo=t),t=Ag(t,r.children),t.flags|=4096,t)}function o0(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),bp(e.return,t,n)}function $h(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function mw(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(un(e,t,r.children,n),r=dt.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&&o0(e,n,t);else if(e.tag===19)o0(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(Xe(dt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&dd(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$h(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&dd(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$h(t,!0,n,null,o);break;case"together":$h(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Lc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pi(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ko|=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=Qi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function gT(e,t,n){switch(t.tag){case 3:hw(t),rs();break;case 5:U1(t);break;case 1:Tn(t.type)&&od(t);break;case 4:kg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Xe(ad,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Xe(dt,dt.current&1),t.flags|=128,null):n&t.child.childLanes?pw(e,t,n):(Xe(dt,dt.current&1),e=pi(e,t,n),e!==null?e.sibling:null);Xe(dt,dt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return mw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xe(dt,dt.current),r)break;return null;case 22:case 23:return t.lanes=0,dw(e,t,n)}return pi(e,t,n)}var gw,Dp,vw,yw;gw=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}};Dp=function(){};vw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ao(Fr.current);var o=null;switch(n){case"input":i=rp(e,i),r=rp(e,r),o=[];break;case"select":i=mt({},i,{value:void 0}),r=mt({},r,{value:void 0}),o=[];break;case"textarea":i=lp(e,i),r=lp(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=rd)}ap(n,r);var l;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(l in s)s.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ia.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(s=i!=null?i[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||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ia.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&et("scroll",e),o||s===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};yw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Zs(e,t){if(!ot)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 Xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function vT(e,t,n){var r=t.pendingProps;switch(yg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(t),null;case 1:return Tn(t.type)&&id(),Xt(t),null;case 3:return r=t.stateNode,os(),it(bn),it(rn),bg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(lc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yr!==null&&(Wp(yr),yr=null))),Dp(e,t),Xt(t),null;case 5:$g(t);var i=Ao(Ya.current);if(n=t.type,e!==null&&t.stateNode!=null)vw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return Xt(t),null}if(e=Ao(Fr.current),lc(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Mr]=t,r[Za]=o,e=(t.mode&1)!==0,n){case"dialog":et("cancel",r),et("close",r);break;case"iframe":case"object":case"embed":et("load",r);break;case"video":case"audio":for(i=0;i<ua.length;i++)et(ua[i],r);break;case"source":et("error",r);break;case"img":case"image":case"link":et("error",r),et("load",r);break;case"details":et("toggle",r);break;case"input":py(r,o),et("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},et("invalid",r);break;case"textarea":gy(r,o),et("invalid",r)}ap(n,o),i=null;for(var l in o)if(o.hasOwnProperty(l)){var s=o[l];l==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&oc(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&oc(r.textContent,s,e),i=["children",""+s]):Ia.hasOwnProperty(l)&&s!=null&&l==="onScroll"&&et("scroll",r)}switch(n){case"input":Qu(r),my(r,o,!0);break;case"textarea":Qu(r),vy(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=rd)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=H_(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[Mr]=t,e[Za]=r,gw(e,t,!1,!1),t.stateNode=e;e:{switch(l=up(n,r),n){case"dialog":et("cancel",e),et("close",e),i=r;break;case"iframe":case"object":case"embed":et("load",e),i=r;break;case"video":case"audio":for(i=0;i<ua.length;i++)et(ua[i],e);i=r;break;case"source":et("error",e),i=r;break;case"img":case"image":case"link":et("error",e),et("load",e),i=r;break;case"details":et("toggle",e),i=r;break;case"input":py(e,r),i=rp(e,r),et("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=mt({},r,{value:void 0}),et("invalid",e);break;case"textarea":gy(e,r),i=lp(e,r),et("invalid",e);break;default:i=r}ap(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="style"?G_(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&K_(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&ja(e,a):typeof a=="number"&&ja(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ia.hasOwnProperty(o)?a!=null&&o==="onScroll"&&et("scroll",e):a!=null&&rg(e,o,a,l))}switch(n){case"input":Qu(e),my(e,r,!1);break;case"textarea":Qu(e),vy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+to(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Wl(e,!!r.multiple,o,!1):r.defaultValue!=null&&Wl(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=rd)}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 Xt(t),null;case 6:if(e&&t.stateNode!=null)yw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=Ao(Ya.current),Ao(Fr.current),lc(t)){if(r=t.stateNode,n=t.memoizedProps,r[Mr]=t,(o=r.nodeValue!==n)&&(e=In,e!==null))switch(e.tag){case 3:oc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&oc(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Mr]=t,t.stateNode=r}return Xt(t),null;case 13:if(it(dt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ot&&Ln!==null&&t.mode&1&&!(t.flags&128))D1(),rs(),t.flags|=98560,o=!1;else if(o=lc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(U(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(U(317));o[Mr]=t}else rs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xt(t),o=!1}else yr!==null&&(Wp(yr),yr=null),o=!0;if(!o)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||dt.current&1?Pt===0&&(Pt=3):zg())),t.updateQueue!==null&&(t.flags|=4),Xt(t),null);case 4:return os(),Dp(e,t),e===null&&Ha(t.stateNode.containerInfo),Xt(t),null;case 10:return Sg(t.type._context),Xt(t),null;case 17:return Tn(t.type)&&id(),Xt(t),null;case 19:if(it(dt),o=t.memoizedState,o===null)return Xt(t),null;if(r=(t.flags&128)!==0,l=o.rendering,l===null)if(r)Zs(o,!1);else{if(Pt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=dd(e),l!==null){for(t.flags|=128,Zs(o,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,l=o.alternate,l===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Xe(dt,dt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ct()>ss&&(t.flags|=128,r=!0,Zs(o,!1),t.lanes=4194304)}else{if(!r)if(e=dd(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!ot)return Xt(t),null}else 2*Ct()-o.renderingStartTime>ss&&n!==1073741824&&(t.flags|=128,r=!0,Zs(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ct(),t.sibling=null,n=dt.current,Xe(dt,r?n&1|2:n&1),t):(Xt(t),null);case 22:case 23:return jg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?An&1073741824&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function yT(e,t){switch(yg(t),t.tag){case 1:return Tn(t.type)&&id(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return os(),it(bn),it(rn),bg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return $g(t),null;case 13:if(it(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));rs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return it(dt),null;case 4:return os(),null;case 10:return Sg(t.type._context),null;case 22:case 23:return jg(),null;case 24:return null;default:return null}}var uc=!1,Jt=!1,xT=typeof WeakSet=="function"?WeakSet:Set,ee=null;function Il(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){vt(e,t,r)}else n.current=null}function Lp(e,t,n){try{n()}catch(r){vt(e,t,r)}}var l0=!1;function _T(e,t){if(xp=ed,e=S1(),gg(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 i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.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||i!==0&&d.nodeType!==3||(s=l+i),d!==o||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===i&&(s=l),f===o&&++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(_p={focusedElem:e,selectionRange:n},ed=!1,ee=t;ee!==null;)if(t=ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ee=e;else for(;ee!==null;){t=ee;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,w=m.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:mr(t.type,g),w);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(S){vt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,ee=e;break}ee=t.return}return m=l0,l0=!1,m}function _a(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Lp(t,n,o)}i=i.next}while(i!==r)}}function ff(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 Ip(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 xw(e){var t=e.alternate;t!==null&&(e.alternate=null,xw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mr],delete t[Za],delete t[Ep],delete t[nT],delete t[rT])),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 _w(e){return e.tag===5||e.tag===3||e.tag===4}function s0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_w(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 jp(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=rd));else if(r!==4&&(e=e.child,e!==null))for(jp(e,t,n),e=e.sibling;e!==null;)jp(e,t,n),e=e.sibling}function zp(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(zp(e,t,n),e=e.sibling;e!==null;)zp(e,t,n),e=e.sibling}var Ht=null,gr=!1;function $i(e,t,n){for(n=n.child;n!==null;)ww(e,t,n),n=n.sibling}function ww(e,t,n){if(zr&&typeof zr.onCommitFiberUnmount=="function")try{zr.onCommitFiberUnmount(rf,n)}catch{}switch(n.tag){case 5:Jt||Il(n,t);case 6:var r=Ht,i=gr;Ht=null,$i(e,t,n),Ht=r,gr=i,Ht!==null&&(gr?(e=Ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ht.removeChild(n.stateNode));break;case 18:Ht!==null&&(gr?(e=Ht,n=n.stateNode,e.nodeType===8?xh(e.parentNode,n):e.nodeType===1&&xh(e,n),Ua(e)):xh(Ht,n.stateNode));break;case 4:r=Ht,i=gr,Ht=n.stateNode.containerInfo,gr=!0,$i(e,t,n),Ht=r,gr=i;break;case 0:case 11:case 14:case 15:if(!Jt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Lp(n,t,l),i=i.next}while(i!==r)}$i(e,t,n);break;case 1:if(!Jt&&(Il(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){vt(n,t,s)}$i(e,t,n);break;case 21:$i(e,t,n);break;case 22:n.mode&1?(Jt=(r=Jt)||n.memoizedState!==null,$i(e,t,n),Jt=r):$i(e,t,n);break;default:$i(e,t,n)}}function a0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new xT),t.forEach(function(r){var i=NT.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function dr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,l=t,s=l;e:for(;s!==null;){switch(s.tag){case 5:Ht=s.stateNode,gr=!1;break e;case 3:Ht=s.stateNode.containerInfo,gr=!0;break e;case 4:Ht=s.stateNode.containerInfo,gr=!0;break e}s=s.return}if(Ht===null)throw Error(U(160));ww(o,l,i),Ht=null,gr=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){vt(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Sw(t,e),t=t.sibling}function Sw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dr(t,e),Or(e),r&4){try{_a(3,e,e.return),ff(3,e)}catch(g){vt(e,e.return,g)}try{_a(5,e,e.return)}catch(g){vt(e,e.return,g)}}break;case 1:dr(t,e),Or(e),r&512&&n!==null&&Il(n,n.return);break;case 5:if(dr(t,e),Or(e),r&512&&n!==null&&Il(n,n.return),e.flags&32){var i=e.stateNode;try{ja(i,"")}catch(g){vt(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,l=n!==null?n.memoizedProps:o,s=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&W_(i,o),up(s,l);var u=up(s,o);for(l=0;l<a.length;l+=2){var c=a[l],d=a[l+1];c==="style"?G_(i,d):c==="dangerouslySetInnerHTML"?K_(i,d):c==="children"?ja(i,d):rg(i,c,d,u)}switch(s){case"input":ip(i,o);break;case"textarea":V_(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?Wl(i,!!o.multiple,h,!1):f!==!!o.multiple&&(o.defaultValue!=null?Wl(i,!!o.multiple,o.defaultValue,!0):Wl(i,!!o.multiple,o.multiple?[]:"",!1))}i[Za]=o}catch(g){vt(e,e.return,g)}}break;case 6:if(dr(t,e),Or(e),r&4){if(e.stateNode===null)throw Error(U(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(g){vt(e,e.return,g)}}break;case 3:if(dr(t,e),Or(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ua(t.containerInfo)}catch(g){vt(e,e.return,g)}break;case 4:dr(t,e),Or(e);break;case 13:dr(t,e),Or(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Lg=Ct())),r&4&&a0(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Jt=(u=Jt)||c,dr(t,e),Jt=u):dr(t,e),Or(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(ee=e,c=e.child;c!==null;){for(d=ee=c;ee!==null;){switch(f=ee,h=f.child,f.tag){case 0:case 11:case 14:case 15:_a(4,f,f.return);break;case 1:Il(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){vt(r,n,g)}}break;case 5:Il(f,f.return);break;case 22:if(f.memoizedState!==null){c0(d);continue}}h!==null?(h.return=f,ee=h):c0(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=d.stateNode,a=d.memoizedProps.style,l=a!=null&&a.hasOwnProperty("display")?a.display:null,s.style.display=Z_("display",l))}catch(g){vt(e,e.return,g)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){vt(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:dr(t,e),Or(e),r&4&&a0(e);break;case 21:break;default:dr(t,e),Or(e)}}function Or(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(_w(n)){var r=n;break e}n=n.return}throw Error(U(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ja(i,""),r.flags&=-33);var o=s0(e);zp(e,o,i);break;case 3:case 4:var l=r.stateNode.containerInfo,s=s0(e);jp(e,s,l);break;default:throw Error(U(161))}}catch(a){vt(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wT(e,t,n){ee=e,Ew(e)}function Ew(e,t,n){for(var r=(e.mode&1)!==0;ee!==null;){var i=ee,o=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||uc;if(!l){var s=i.alternate,a=s!==null&&s.memoizedState!==null||Jt;s=uc;var u=Jt;if(uc=l,(Jt=a)&&!u)for(ee=i;ee!==null;)l=ee,a=l.child,l.tag===22&&l.memoizedState!==null?d0(i):a!==null?(a.return=l,ee=a):d0(i);for(;o!==null;)ee=o,Ew(o),o=o.sibling;ee=i,uc=s,Jt=u}u0(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,ee=o):u0(e)}}function u0(e){for(;ee!==null;){var t=ee;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Jt||ff(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Jt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:mr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Ky(t,o,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}Ky(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&&Ua(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}Jt||t.flags&512&&Ip(t)}catch(f){vt(t,t.return,f)}}if(t===e){ee=null;break}if(n=t.sibling,n!==null){n.return=t.return,ee=n;break}ee=t.return}}function c0(e){for(;ee!==null;){var t=ee;if(t===e){ee=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ee=n;break}ee=t.return}}function d0(e){for(;ee!==null;){var t=ee;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ff(4,t)}catch(a){vt(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){vt(t,i,a)}}var o=t.return;try{Ip(t)}catch(a){vt(t,o,a)}break;case 5:var l=t.return;try{Ip(t)}catch(a){vt(t,l,a)}}}catch(a){vt(t,t.return,a)}if(t===e){ee=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ee=s;break}ee=t.return}}var ST=Math.ceil,pd=xi.ReactCurrentDispatcher,Mg=xi.ReactCurrentOwner,nr=xi.ReactCurrentBatchConfig,Me=0,Bt=null,$t=null,Zt=0,An=0,jl=go(0),Pt=0,qa=null,Ko=0,hf=0,Dg=0,wa=null,kn=null,Lg=0,ss=1/0,ti=null,md=!1,Fp=null,Yi=null,cc=!1,Bi=null,gd=0,Sa=0,Bp=null,Ic=-1,jc=0;function vn(){return Me&6?Ct():Ic!==-1?Ic:Ic=Ct()}function Xi(e){return e.mode&1?Me&2&&Zt!==0?Zt&-Zt:oT.transition!==null?(jc===0&&(jc=l1()),jc):(e=Ue,e!==0||(e=window.event,e=e===void 0?16:h1(e.type)),e):1}function Sr(e,t,n,r){if(50<Sa)throw Sa=0,Bp=null,Error(U(185));Ru(e,n,r),(!(Me&2)||e!==Bt)&&(e===Bt&&(!(Me&2)&&(hf|=n),Pt===4&&Ii(e,Zt)),Nn(e,r),n===1&&Me===0&&!(t.mode&1)&&(ss=Ct()+500,uf&&vo()))}function Nn(e,t){var n=e.callbackNode;ob(e,t);var r=qc(e,e===Bt?Zt:0);if(r===0)n!==null&&_y(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&_y(n),t===1)e.tag===0?iT(f0.bind(null,e)):P1(f0.bind(null,e)),eT(function(){!(Me&6)&&vo()}),n=null;else{switch(s1(r)){case 1:n=ag;break;case 4:n=i1;break;case 16:n=Jc;break;case 536870912:n=o1;break;default:n=Jc}n=Ow(n,Cw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Cw(e,t){if(Ic=-1,jc=0,Me&6)throw Error(U(327));var n=e.callbackNode;if(Gl()&&e.callbackNode!==n)return null;var r=qc(e,e===Bt?Zt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=vd(e,r);else{t=r;var i=Me;Me|=2;var o=$w();(Bt!==e||Zt!==t)&&(ti=null,ss=Ct()+500,Lo(e,t));do try{kT();break}catch(s){kw(e,s)}while(!0);wg(),pd.current=o,Me=i,$t!==null?t=0:(Bt=null,Zt=0,t=Pt)}if(t!==0){if(t===2&&(i=pp(e),i!==0&&(r=i,t=Up(e,i))),t===1)throw n=qa,Lo(e,0),Ii(e,r),Nn(e,Ct()),n;if(t===6)Ii(e,r);else{if(i=e.current.alternate,!(r&30)&&!ET(i)&&(t=vd(e,r),t===2&&(o=pp(e),o!==0&&(r=o,t=Up(e,o))),t===1))throw n=qa,Lo(e,0),Ii(e,r),Nn(e,Ct()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:To(e,kn,ti);break;case 3:if(Ii(e,r),(r&130023424)===r&&(t=Lg+500-Ct(),10<t)){if(qc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){vn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Sp(To.bind(null,e,kn,ti),t);break}To(e,kn,ti);break;case 4:if(Ii(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-wr(r);o=1<<l,l=t[l],l>i&&(i=l),r&=~o}if(r=i,r=Ct()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ST(r/1960))-r,10<r){e.timeoutHandle=Sp(To.bind(null,e,kn,ti),r);break}To(e,kn,ti);break;case 5:To(e,kn,ti);break;default:throw Error(U(329))}}}return Nn(e,Ct()),e.callbackNode===n?Cw.bind(null,e):null}function Up(e,t){var n=wa;return e.current.memoizedState.isDehydrated&&(Lo(e,t).flags|=256),e=vd(e,t),e!==2&&(t=kn,kn=n,t!==null&&Wp(t)),e}function Wp(e){kn===null?kn=e:kn.push.apply(kn,e)}function ET(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 i=n[r],o=i.getSnapshot;i=i.value;try{if(!kr(o(),i))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 Ii(e,t){for(t&=~Dg,t&=~hf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wr(t),r=1<<n;e[n]=-1,t&=~r}}function f0(e){if(Me&6)throw Error(U(327));Gl();var t=qc(e,0);if(!(t&1))return Nn(e,Ct()),null;var n=vd(e,t);if(e.tag!==0&&n===2){var r=pp(e);r!==0&&(t=r,n=Up(e,r))}if(n===1)throw n=qa,Lo(e,0),Ii(e,t),Nn(e,Ct()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,To(e,kn,ti),Nn(e,Ct()),null}function Ig(e,t){var n=Me;Me|=1;try{return e(t)}finally{Me=n,Me===0&&(ss=Ct()+500,uf&&vo())}}function Zo(e){Bi!==null&&Bi.tag===0&&!(Me&6)&&Gl();var t=Me;Me|=1;var n=nr.transition,r=Ue;try{if(nr.transition=null,Ue=1,e)return e()}finally{Ue=r,nr.transition=n,Me=t,!(Me&6)&&vo()}}function jg(){An=jl.current,it(jl)}function Lo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,qb(n)),$t!==null)for(n=$t.return;n!==null;){var r=n;switch(yg(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&id();break;case 3:os(),it(bn),it(rn),bg();break;case 5:$g(r);break;case 4:os();break;case 13:it(dt);break;case 19:it(dt);break;case 10:Sg(r.type._context);break;case 22:case 23:jg()}n=n.return}if(Bt=e,$t=e=Qi(e.current,null),Zt=An=t,Pt=0,qa=null,Dg=hf=Ko=0,kn=wa=null,Po!==null){for(t=0;t<Po.length;t++)if(n=Po[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var l=o.next;o.next=i,r.next=l}n.pending=r}Po=null}return e}function kw(e,t){do{var n=$t;try{if(wg(),Mc.current=hd,fd){for(var r=ht.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}fd=!1}if(Ho=0,Lt=Rt=ht=null,xa=!1,Xa=0,Mg.current=null,n===null||n.return===null){Pt=1,qa=t,$t=null;break}e:{var o=e,l=n.return,s=n,a=t;if(t=Zt,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=qy(l);if(h!==null){h.flags&=-257,e0(h,l,s,o,t),h.mode&1&&Jy(o,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)){Jy(o,u,t),zg();break e}a=Error(U(426))}}else if(ot&&s.mode&1){var w=qy(l);if(w!==null){!(w.flags&65536)&&(w.flags|=256),e0(w,l,s,o,t),xg(ls(a,s));break e}}o=a=ls(a,s),Pt!==4&&(Pt=2),wa===null?wa=[o]:wa.push(o),o=l;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=aw(o,a,t);Hy(o,v);break e;case 1:s=a;var y=o.type,_=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Yi===null||!Yi.has(_)))){o.flags|=65536,t&=-t,o.lanes|=t;var S=uw(o,s,t);Hy(o,S);break e}}o=o.return}while(o!==null)}Tw(n)}catch(E){t=E,$t===n&&n!==null&&($t=n=n.return);continue}break}while(!0)}function $w(){var e=pd.current;return pd.current=hd,e===null?hd:e}function zg(){(Pt===0||Pt===3||Pt===2)&&(Pt=4),Bt===null||!(Ko&268435455)&&!(hf&268435455)||Ii(Bt,Zt)}function vd(e,t){var n=Me;Me|=2;var r=$w();(Bt!==e||Zt!==t)&&(ti=null,Lo(e,t));do try{CT();break}catch(i){kw(e,i)}while(!0);if(wg(),Me=n,pd.current=r,$t!==null)throw Error(U(261));return Bt=null,Zt=0,Pt}function CT(){for(;$t!==null;)bw($t)}function kT(){for(;$t!==null&&!X$();)bw($t)}function bw(e){var t=Rw(e.alternate,e,An);e.memoizedProps=e.pendingProps,t===null?Tw(e):$t=t,Mg.current=null}function Tw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=yT(n,t),n!==null){n.flags&=32767,$t=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Pt=6,$t=null;return}}else if(n=vT(n,t,An),n!==null){$t=n;return}if(t=t.sibling,t!==null){$t=t;return}$t=t=e}while(t!==null);Pt===0&&(Pt=5)}function To(e,t,n){var r=Ue,i=nr.transition;try{nr.transition=null,Ue=1,$T(e,t,n,r)}finally{nr.transition=i,Ue=r}return null}function $T(e,t,n,r){do Gl();while(Bi!==null);if(Me&6)throw Error(U(327));n=e.finishedWork;var i=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 o=n.lanes|n.childLanes;if(lb(e,o),e===Bt&&($t=Bt=null,Zt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||cc||(cc=!0,Ow(Jc,function(){return Gl(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=nr.transition,nr.transition=null;var l=Ue;Ue=1;var s=Me;Me|=4,Mg.current=null,_T(e,n),Sw(n,e),Kb(_p),ed=!!xp,_p=xp=null,e.current=n,wT(n),Q$(),Me=s,Ue=l,nr.transition=o}else e.current=n;if(cc&&(cc=!1,Bi=e,gd=i),o=e.pendingLanes,o===0&&(Yi=null),eb(n.stateNode),Nn(e,Ct()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(md)throw md=!1,e=Fp,Fp=null,e;return gd&1&&e.tag!==0&&Gl(),o=e.pendingLanes,o&1?e===Bp?Sa++:(Sa=0,Bp=e):Sa=0,vo(),null}function Gl(){if(Bi!==null){var e=s1(gd),t=nr.transition,n=Ue;try{if(nr.transition=null,Ue=16>e?16:e,Bi===null)var r=!1;else{if(e=Bi,Bi=null,gd=0,Me&6)throw Error(U(331));var i=Me;for(Me|=4,ee=e.current;ee!==null;){var o=ee,l=o.child;if(ee.flags&16){var s=o.deletions;if(s!==null){for(var a=0;a<s.length;a++){var u=s[a];for(ee=u;ee!==null;){var c=ee;switch(c.tag){case 0:case 11:case 15:_a(8,c,o)}var d=c.child;if(d!==null)d.return=c,ee=d;else for(;ee!==null;){c=ee;var f=c.sibling,h=c.return;if(xw(c),c===u){ee=null;break}if(f!==null){f.return=h,ee=f;break}ee=h}}}var m=o.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}ee=o}}if(o.subtreeFlags&2064&&l!==null)l.return=o,ee=l;else e:for(;ee!==null;){if(o=ee,o.flags&2048)switch(o.tag){case 0:case 11:case 15:_a(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,ee=v;break e}ee=o.return}}var y=e.current;for(ee=y;ee!==null;){l=ee;var _=l.child;if(l.subtreeFlags&2064&&_!==null)_.return=l,ee=_;else e:for(l=y;ee!==null;){if(s=ee,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:ff(9,s)}}catch(E){vt(s,s.return,E)}if(s===l){ee=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,ee=S;break e}ee=s.return}}if(Me=i,vo(),zr&&typeof zr.onPostCommitFiberRoot=="function")try{zr.onPostCommitFiberRoot(rf,e)}catch{}r=!0}return r}finally{Ue=n,nr.transition=t}}return!1}function h0(e,t,n){t=ls(n,t),t=aw(e,t,1),e=Gi(e,t,1),t=vn(),e!==null&&(Ru(e,1,t),Nn(e,t))}function vt(e,t,n){if(e.tag===3)h0(e,e,n);else for(;t!==null;){if(t.tag===3){h0(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yi===null||!Yi.has(r))){e=ls(n,e),e=uw(t,e,1),t=Gi(t,e,1),e=vn(),t!==null&&(Ru(t,1,e),Nn(t,e));break}}t=t.return}}function bT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=vn(),e.pingedLanes|=e.suspendedLanes&n,Bt===e&&(Zt&n)===n&&(Pt===4||Pt===3&&(Zt&130023424)===Zt&&500>Ct()-Lg?Lo(e,0):Dg|=n),Nn(e,t)}function Nw(e,t){t===0&&(e.mode&1?(t=ec,ec<<=1,!(ec&130023424)&&(ec=4194304)):t=1);var n=vn();e=hi(e,t),e!==null&&(Ru(e,t,n),Nn(e,n))}function TT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Nw(e,n)}function NT(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(U(314))}r!==null&&r.delete(t),Nw(e,n)}var Rw;Rw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||bn.current)$n=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return $n=!1,gT(e,t,n);$n=!!(e.flags&131072)}else $n=!1,ot&&t.flags&1048576&&A1(t,sd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Lc(e,t),e=t.pendingProps;var i=ns(t,rn.current);Zl(t,n),i=Ng(null,t,r,e,i,n);var o=Rg();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Tn(r)?(o=!0,od(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Cg(t),i.updater=cf,t.stateNode=i,i._reactInternals=t,Np(t,r,e,n),t=Pp(null,t,r,!0,o,n)):(t.tag=0,ot&&o&&vg(t),un(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Lc(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=OT(r),e=mr(r,e),i){case 0:t=Op(null,t,r,e,n);break e;case 1:t=r0(null,t,r,e,n);break e;case 11:t=t0(null,t,r,e,n);break e;case 14:t=n0(null,t,r,mr(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mr(r,i),Op(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mr(r,i),r0(e,t,r,i,n);case 3:e:{if(hw(t),e===null)throw Error(U(387));r=t.pendingProps,o=t.memoizedState,i=o.element,I1(e,t),cd(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=ls(Error(U(423)),t),t=i0(e,t,r,n,i);break e}else if(r!==i){i=ls(Error(U(424)),t),t=i0(e,t,r,n,i);break e}else for(Ln=Zi(t.stateNode.containerInfo.firstChild),In=t,ot=!0,yr=null,n=B1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rs(),r===i){t=pi(e,t,n);break e}un(e,t,r,n)}t=t.child}return t;case 5:return U1(t),e===null&&$p(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,wp(r,i)?l=null:o!==null&&wp(r,o)&&(t.flags|=32),fw(e,t),un(e,t,l,n),t.child;case 6:return e===null&&$p(t),null;case 13:return pw(e,t,n);case 4:return kg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=is(t,null,r,n):un(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mr(r,i),t0(e,t,r,i,n);case 7:return un(e,t,t.pendingProps,n),t.child;case 8:return un(e,t,t.pendingProps.children,n),t.child;case 12:return un(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Xe(ad,r._currentValue),r._currentValue=l,o!==null)if(kr(o.value,l)){if(o.children===i.children&&!bn.current){t=pi(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){l=o.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=ui(-1,n&-n),a.tag=2;var u=o.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}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),bp(o.return,n,t),s.lanes|=n;break}a=a.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(U(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),bp(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}un(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Zl(t,n),i=rr(i),r=r(i),t.flags|=1,un(e,t,r,n),t.child;case 14:return r=t.type,i=mr(r,t.pendingProps),i=mr(r.type,i),n0(e,t,r,i,n);case 15:return cw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mr(r,i),Lc(e,t),t.tag=1,Tn(r)?(e=!0,od(t)):e=!1,Zl(t,n),z1(t,r,i),Np(t,r,i,n),Pp(null,t,r,!0,e,n);case 19:return mw(e,t,n);case 22:return dw(e,t,n)}throw Error(U(156,t.tag))};function Ow(e,t){return r1(e,t)}function RT(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 qn(e,t,n,r){return new RT(e,t,n,r)}function Fg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function OT(e){if(typeof e=="function")return Fg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===og)return 11;if(e===lg)return 14}return 2}function Qi(e,t){var n=e.alternate;return n===null?(n=qn(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 zc(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")Fg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Tl:return Io(n.children,i,o,t);case ig:l=8,i|=8;break;case qh:return e=qn(12,n,t,i|2),e.elementType=qh,e.lanes=o,e;case ep:return e=qn(13,n,t,i),e.elementType=ep,e.lanes=o,e;case tp:return e=qn(19,n,t,i),e.elementType=tp,e.lanes=o,e;case F_:return pf(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j_:l=10;break e;case z_:l=9;break e;case og:l=11;break e;case lg:l=14;break e;case Ai:l=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=qn(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Io(e,t,n,r){return e=qn(7,e,r,t),e.lanes=n,e}function pf(e,t,n,r){return e=qn(22,e,r,t),e.elementType=F_,e.lanes=n,e.stateNode={isHidden:!1},e}function bh(e,t,n){return e=qn(6,e,null,t),e.lanes=n,e}function Th(e,t,n){return t=qn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function PT(e,t,n,r,i){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=ah(0),this.expirationTimes=ah(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ah(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bg(e,t,n,r,i,o,l,s,a){return e=new PT(e,t,n,s,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cg(o),e}function AT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bl,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Pw(e){if(!e)return no;e=e._reactInternals;e:{if(ol(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(Tn(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(Tn(n))return O1(e,n,t)}return t}function Aw(e,t,n,r,i,o,l,s,a){return e=Bg(n,r,!0,e,i,o,l,s,a),e.context=Pw(null),n=e.current,r=vn(),i=Xi(n),o=ui(r,i),o.callback=t??null,Gi(n,o,i),e.current.lanes=i,Ru(e,i,r),Nn(e,r),e}function mf(e,t,n,r){var i=t.current,o=vn(),l=Xi(i);return n=Pw(n),t.context===null?t.context=n:t.pendingContext=n,t=ui(o,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Gi(i,t,l),e!==null&&(Sr(e,i,l,o),Ac(e,i,l)),l}function yd(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 p0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ug(e,t){p0(e,t),(e=e.alternate)&&p0(e,t)}function MT(){return null}var Mw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Wg(e){this._internalRoot=e}gf.prototype.render=Wg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));mf(e,t,null,null)};gf.prototype.unmount=Wg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zo(function(){mf(null,e,null,null)}),t[fi]=null}};function gf(e){this._internalRoot=e}gf.prototype.unstable_scheduleHydration=function(e){if(e){var t=c1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Li.length&&t!==0&&t<Li[n].priority;n++);Li.splice(n,0,e),n===0&&f1(e)}};function Vg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function m0(){}function DT(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=yd(l);o.call(u)}}var l=Aw(t,r,e,0,null,!1,!1,"",m0);return e._reactRootContainer=l,e[fi]=l.current,Ha(e.nodeType===8?e.parentNode:e),Zo(),l}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=yd(a);s.call(u)}}var a=Bg(e,0,!1,null,null,!1,!1,"",m0);return e._reactRootContainer=a,e[fi]=a.current,Ha(e.nodeType===8?e.parentNode:e),Zo(function(){mf(t,a,n,r)}),a}function yf(e,t,n,r,i){var o=n._reactRootContainer;if(o){var l=o;if(typeof i=="function"){var s=i;i=function(){var a=yd(l);s.call(a)}}mf(t,l,e,i)}else l=DT(n,t,e,i,r);return yd(l)}a1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=aa(t.pendingLanes);n!==0&&(ug(t,n|1),Nn(t,Ct()),!(Me&6)&&(ss=Ct()+500,vo()))}break;case 13:Zo(function(){var r=hi(e,1);if(r!==null){var i=vn();Sr(r,e,1,i)}}),Ug(e,1)}};cg=function(e){if(e.tag===13){var t=hi(e,134217728);if(t!==null){var n=vn();Sr(t,e,134217728,n)}Ug(e,134217728)}};u1=function(e){if(e.tag===13){var t=Xi(e),n=hi(e,t);if(n!==null){var r=vn();Sr(n,e,t,r)}Ug(e,t)}};c1=function(){return Ue};d1=function(e,t){var n=Ue;try{return Ue=e,t()}finally{Ue=n}};dp=function(e,t,n){switch(t){case"input":if(ip(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 i=af(r);if(!i)throw Error(U(90));U_(r),ip(r,i)}}}break;case"textarea":V_(e,n);break;case"select":t=n.value,t!=null&&Wl(e,!!n.multiple,t,!1)}};Q_=Ig;J_=Zo;var LT={usingClientEntryPoint:!1,Events:[Pu,Pl,af,Y_,X_,Ig]},Gs={findFiberByHostInstance:Oo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},IT={bundleType:Gs.bundleType,version:Gs.version,rendererPackageName:Gs.rendererPackageName,rendererConfig:Gs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:xi.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=t1(e),e===null?null:e.stateNode},findFiberByHostInstance:Gs.findFiberByHostInstance||MT,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 dc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dc.isDisabled&&dc.supportsFiber)try{rf=dc.inject(IT),zr=dc}catch{}}Vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=LT;Vn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vg(t))throw Error(U(200));return AT(e,t,null,n)};Vn.createRoot=function(e,t){if(!Vg(e))throw Error(U(299));var n=!1,r="",i=Mw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Bg(e,1,!1,null,null,n,!1,r,i),e[fi]=t.current,Ha(e.nodeType===8?e.parentNode:e),new Wg(t)};Vn.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=t1(t),e=e===null?null:e.stateNode,e};Vn.flushSync=function(e){return Zo(e)};Vn.hydrate=function(e,t,n){if(!vf(t))throw Error(U(200));return yf(null,e,t,!0,n)};Vn.hydrateRoot=function(e,t,n){if(!Vg(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",l=Mw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=Aw(t,null,e,1,n??null,i,!1,o,l),e[fi]=t.current,Ha(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new gf(t)};Vn.render=function(e,t,n){if(!vf(t))throw Error(U(200));return yf(null,e,t,!1,n)};Vn.unmountComponentAtNode=function(e){if(!vf(e))throw Error(U(40));return e._reactRootContainer?(Zo(function(){yf(null,null,e,!1,function(){e._reactRootContainer=null,e[fi]=null})}),!0):!1};Vn.unstable_batchedUpdates=Ig;Vn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!vf(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return yf(e,t,n,!1,r)};Vn.version="18.2.0-next-9e3b772b8-20220608";function Dw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dw)}catch(e){console.error(e)}}Dw(),A_.exports=Vn;var Gr=A_.exports;const Lw=Tu(Gr),jT=E_({__proto__:null,default:Lw},[Gr]);var g0=Gr;Qh.createRoot=g0.createRoot,Qh.hydrateRoot=g0.hydrateRoot;var Iw={exports:{}},xf={};/**
|
|
33
33
|
* @license React
|
|
34
34
|
* react-jsx-runtime.production.min.js
|
|
35
35
|
*
|
|
@@ -37,28 +37,52 @@ Error generating stack: `+o.message+`
|
|
|
37
37
|
*
|
|
38
38
|
* This source code is licensed under the MIT license found in the
|
|
39
39
|
* LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/var zT=p,FT=Symbol.for("react.element"),BT=Symbol.for("react.fragment"),UT=Object.prototype.hasOwnProperty,WT=zT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,VT={key:!0,ref:!0,__self:!0,__source:!0};function jw(e,t,n){var r,i={},o=null,l=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)UT.call(t,r)&&!VT.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:FT,type:e,key:o,ref:l,props:i,_owner:WT.current}}xf.Fragment=BT;xf.jsx=jw;xf.jsxs=jw;
|
|
41
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,l=!1,s;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return o=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function zw(e){return e.length>0}var
|
|
42
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bw(e){return qT(e)||eN(e)||Hg(e)||tN()}function
|
|
43
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ji(e,t){return rN(e)||iN(e,t)||Hg(e,t)||oN()}function lr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y0(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,Uw(r.key),r)}}function sr(e,t,n){return t&&y0(e.prototype,t),n&&y0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hp(e,t){return Hp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Hp(e,t)}function yo(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&&Hp(e,t)}function xd(e){return xd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xd(e)}function lN(){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 Ww(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sN(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 Ww(e)}function xo(e){var t=lN();return function(){var r=xd(e),i;if(t){var o=xd(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return sN(this,i)}}var _o=function(){function e(){lr(this,e)}return sr(e,[{key:"appendValidationError",value:function(n,r,i,o){return n?(n[r]?n[r].push({message:i,value:o}):n[r]=[{message:i,value:o}],n):ye({},r,[{message:i,value:o}])}}]),e}(),Fc=Symbol("GetSchema"),pn=Symbol("Path"),Ot=Symbol("GetSource");function aN(e){return e[Fc]}var Zg=sr(function e(t){lr(this,e),this.span=t}),uN=function(e){yo(n,e);var t=xo(n);function n(r,i){var o;return lr(this,n),o=t.call(this,i),ye(Ww(o),"type","Sym"),o.value=r,o}return sr(n,[{key:"transpile",value:function(){return this.value}}]),n}(Zg);new uN("()");var nn="_type",Rn="_ref",cN=function(e){yo(n,e);var t=xo(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lr(this,n),i=t.call(this),i.options=r,i.opt=o,i}return sr(n,[{key:"validate",value:function(i,o){return this.opt&&o==null?!1:o==null?ye({},i,[{message:"Non-optional image was null or undefined.",value:o}]):typeof o[Rn]!="string"?ye({},i,[{message:"Image did not have a file reference string. Got: ".concat(xe(o[Rn])),value:o}]):o[nn]!=="file"?ye({},i,[{message:"Image did not have the valid file extension type. Got: ".concat(o[nn]),value:o}]):o.metadata?ye({},i,[{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:o,fixes:["image:replace-metadata"]}]):ye({},i,[{message:"Could not validate Image metadata.",value:o,fixes:["image:add-metadata"]}])}},{key:"assert",value:function(i){return this.opt&&i==null?!0:(i==null?void 0:i[Rn])==="image"&&(i==null?void 0:i[nn])==="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}(_o),Vw=function(t){var n;if(!t[Rn].startsWith("/public")){var r;return{url:t[Rn]+"?sha256=".concat((r=t.metadata)===null||r===void 0?void 0:r.sha256),metadata:t.metadata}}return{url:t[Rn].slice(7)+"?sha256=".concat((n=t.metadata)===null||n===void 0?void 0:n.sha256),metadata:t.metadata}};function Hw(e){return xe(e)==="object"&&e!==null&&e!==void 0&&("val"in e||"valPath"in e)}function dN(e){return xe(e)==="object"&&e!==null&&e!==void 0&&pn in e&&"val"in e}function fN(e){return e[pn]}function hN(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function x0(e,t,n){return t?Mt(e(Mt(t,n))):Mt(t,n)}function qi(e){return xe(e)==="object"&&e!==null&&(Ot in e||pn in e)}function Mt(e,t,n){if(xe(e)==="object"){if(qi(e))return e;if(Hw(e))return Mt(e.val,e.valPath)}if(e&&e[Rn]&&e[nn]==="file"){var r=e[Rn];if(typeof r!="string")throw Error("Invalid file ref: "+r);return Mt(Vw(e),t,n)}switch(xe(e)){case"function":case"symbol":throw Error("Invalid selector type: ".concat(xe(e),": ").concat(e));case"object":if(e!==null)return new Proxy(e,{has:function(o,l){return l===Ot||l===pn||l==="andThen"||l===Fc?!0:l in o},get:function(o,l){if(l===Ot)return e;if(l===pn)return t;if(l===Fc)return n;if(l==="andThen")return function(a){return x0(a,e,t)};if(Array.isArray(o)){if(l==="filter")return function(a){var u=o.map(function(c,d){return Mt(c,er(t,d),n==null?void 0:n.item)}).filter(function(c){return a&&a instanceof _o?a.assert(_0(c)):_0(a(c))});return Mt(u,t,n)};if(l==="map")return function(a){var u=o.map(function(c,d){var f=a(Mt(c,er(t,d),n==null?void 0:n.item),Mt(d));return qi(f)?f:Mt(f)});return Mt(u,t,n)}}if(Array.isArray(o)&&l==="length")return Mt(o.length);var s=Reflect.get(o,l);return hN(e,l)?Number.isNaN(Number(l))?Mt(s,er(t,l),n==null?void 0:n.items[l]):Mt(s,er(t,Number(l)),n==null?void 0:n.item):s}});default:return ye(ye(ye({eq:function(o){var l=o;if(qi(o)&&(l=o[Ot],l instanceof Zg))throw Error("TODO: Cannot evaluate equality with an Expr");return Mt(e===l,void 0)},andThen:function(o){return x0(o,e===void 0?null:e,t)}},Ot,e===void 0?null:e),pn,t),Fc,n)}}function er(e,t){if(xe(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 _0(e){if(xe(e)==="object"&&(Ot in e||pn in e)){var t=e[Ot];return t}return e}var Kw=function(e){yo(n,e);var t=xo(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lr(this,n),i=t.call(this),i.items=r,i.opt=o,i}return sr(n,[{key:"validate",value:function(i,o){var l=this,s=!1;return this.opt&&o==null?!1:xe(o)!=="object"?ye({},i,[{message:"Expected 'object', got '".concat(xe(o),"'")}]):Array.isArray(o)?ye({},i,[{message:"Expected 'object', got 'array'"}]):(Object.entries(this.items).forEach(function(a){var u=Ji(a,2),c=u[0],d=u[1],f=er(i,c);if(!f)s=l.appendValidationError(s,i,"Internal error: could not create path at ".concat(!i&&typeof i=="string"?"<empty string>":i," at key ").concat(c),o);else{var h=d.validate(f,o[c]);h&&s?s=ss(ss({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(i){if(this.opt&&i==null)return!0;if(!i)return!1;for(var o=0,l=Object.entries(this.items);o<l.length;o++){var s=Ji(l[o],2),a=s[0],u=s[1];if(!u.assert(i[a]))return!1}return xe(i)==="object"&&!Array.isArray(i)}},{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(i){var o=Ji(i,2),l=o[0],s=o[1];return[l,s.serialize()]})),opt:this.opt}}}]),n}(_o),pN=function(e){yo(n,e);var t=xo(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lr(this,n),i=t.call(this),i.item=r,i.opt=o,i}return sr(n,[{key:"validate",value:function(i,o){var l=this,s=!1;return this.opt&&o==null?!1:xe(o)!=="object"||!Array.isArray(o)?ye({},i,[{message:"Expected 'array', got '".concat(xe(o),"'")}]):(o.forEach(function(a,u){var c=er(i,u);if(!c)s=l.appendValidationError(s,i,"Internal error: could not create path at ".concat(!i&&typeof i=="string"?"<empty string>":i," at index ").concat(u),o);else{var d=l.item.validate(c,a);d&&s?s=ss(ss({},d),s):d&&(s=d)}}),s)}},{key:"assert",value:function(i){if(this.opt&&i==null)return!0;if(!i)return!1;var o=_f(i),l;try{for(o.s();!(l=o.n()).done;){var s=l.value;if(!this.item.assert(s))return!1}}catch(a){o.e(a)}finally{o.f()}return xe(i)==="object"&&Array.isArray(i)}},{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}(_o),w0=function(e){yo(n,e);var t=xo(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lr(this,n),i=t.call(this),i.value=r,i.opt=o,i}return sr(n,[{key:"validate",value:function(i,o){return this.opt&&o==null?!1:typeof o!="string"?ye({},i,[{message:"Expected 'string', got '".concat(xe(o),"'"),value:o}]):o!==this.value?ye({},i,[{message:"Expected literal '".concat(this.value,"', got '").concat(o,"'"),value:o}]):!1}},{key:"assert",value:function(i){return this.opt&&i==null?!0:typeof i=="string"}},{key:"optional",value:function(){return new n(this.value,!0)}},{key:"serialize",value:function(){return{type:"literal",value:this.value,opt:this.opt}}}]),n}(_o),mN=function(e){yo(n,e);var t=xo(n);function n(r,i){var o,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return lr(this,n),o=t.call(this),o.key=r,o.items=i,o.opt=l,o}return sr(n,[{key:"validate",value:function(i,o){var l=o,s=!1;if(this.opt&&l==null)return!1;if(!this.key)return ye({},i,[{message:"Missing required first argument in union"}]);var a=this.key;if(!Array.isArray(this.items))return ye({},i,[{message:"A union schema must take more than 1 schema arguments",fatal:!0}]);if(typeof a=="string"){if(this.items.some(function(N){return!(N instanceof Kw)}))return ye({},i,[{message:"Key is a string, so all schema items must be objects",fatal:!0}]);var u=this.items,c=u.map(function(N){return N.serialize()}),d=c.filter(function(N){return N.type!=="object"||N.items[a].type!=="literal"});if(d.length>0)return ye({},i,[{message:"All schema items must be objects with a key: ".concat(a," that is a literal schema. Found: ").concat(JSON.stringify(d,null,2)),fatal:!0}]);var f=c,h=f.filter(function(N){return N.items[a].opt});if(h.length>1)return ye({},i,[{message:"Schema cannot have an optional keys: ".concat(a),fatal:!0}]);if(xe(l)!=="object")return ye({},i,[{message:"Expected an object"}]);var m=l;if(m[a]===void 0)return ye({},i,[{message:"Missing required key: ".concat(a)}]);var g=[],S=_f(f),v;try{for(S.s();!(v=S.n()).done;){var y=v.value,_=y.items[a];if(_.type==="literal")if(!g.includes(_.value))g.push(_.value);else return ye({},i,[{message:"Found duplicate key in schema: ".concat(_.value),fatal:!0}])}}catch(N){S.e(N)}finally{S.f()}var w=u.find(function(N){return!N.items[a].validate(i,m[a])});if(!w){var E=er(i,a);if(!E)throw new Error("Internal error: could not create path at ".concat(!i&&typeof i=="string"?"<empty string>":i," at key ").concat(a));return ye({},E,[{message:'Invalid key: "'.concat(a,'". Value was: "').concat(m[a],'". Valid values: ').concat(f.map(function(N){var R=N.items[a];if(R.type==="literal"&&R.value)return'"'.concat(R.value,'"');throw new Error("Expected literal schema, got ".concat(JSON.stringify(R,null,2)))}).join(", "))}])}var $=w.validate(i,m);if($)return $}else if(a instanceof w0){if(this.items.some(function(N){return!(N instanceof w0)}))return ye({},i,[{message:"Key is a literal schema, so all schema items must be literals",fatal:!0}]);var C=[a].concat(Bw(this.items));if(typeof l=="string"){var T=C.some(function(N){return!N.validate(i,l)});if(!T)return ye({},i,[{message:"Union must match one of the following: ".concat(C.map(function(N){return'"'.concat(N.value,'"')}).join(", "))}])}}else return ye({},i,[{message:"Expected a string or literal"}]);return s}},{key:"assert",value:function(i){return!0}},{key:"optional",value:function(){return new n(this.key,this.items,!0)}},{key:"serialize",value:function(){return typeof this.key=="string"?{type:"union",key:this.key,items:this.items.map(function(i){return i.serialize()}),opt:this.opt}:{type:"union",items:this.items.map(function(i){return i.serialize()}),opt:this.opt}}}]),n}(_o),gN=function(e){yo(n,e);var t=xo(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lr(this,n),i=t.call(this),i.options=r,i.opt=o,i}return sr(n,[{key:"validate",value:function(i,o){return!1}},{key:"assert",value:function(i){return!0}},{key:"optional",value:function(){return new n(this.options,!0)}},{key:"serialize",value:function(){return{type:"richtext",opt:this.opt}}}]),n}(_o),vN=function(e){yo(n,e);var t=xo(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lr(this,n),i=t.call(this),i.item=r,i.opt=o,i}return sr(n,[{key:"validate",value:function(i,o){var l=this,s=!1;return this.opt&&o==null?!1:xe(o)!=="object"?ye({},i,[{message:"Expected 'object', got '".concat(xe(o),"'")}]):Array.isArray(o)?ye({},i,[{message:"Expected 'object', got 'array'"}]):(Object.entries(o).forEach(function(a){var u=Ji(a,2),c=u[0],d=u[1],f=er(i,c);if(!f)s=l.appendValidationError(s,i,"Internal error: could not create path at ".concat(!i&&typeof i=="string"?"<empty string>":i," at key ").concat(d),o);else{var h=l.item.validate(f,d);h&&s?s=ss(ss({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(i){if(this.opt&&i==null)return!0;if(!i)return!1;for(var o=0,l=Object.entries(i);o<l.length;o++){var s=Ji(l[o],2),a=s[1];if(!this.item.assert(a))return!1}return xe(i)==="object"&&!Array.isArray(i)}},{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}(_o);function yN(e){var t=e[Ot];if(t instanceof Zg)throw Error("Cannot get raw source of an Expr");var n=t;return n}function xN(e){return e.indexOf(".")===-1?[e,""]:[e.slice(0,e.indexOf(".")),e.slice(e.indexOf(".")+1)]}function _N(e){return e instanceof Kw||xe(e)==="object"&&"type"in e&&e.type==="object"}function wN(e){return e instanceof vN||xe(e)==="object"&&"type"in e&&e.type==="record"}function SN(e){return e instanceof pN||xe(e)==="object"&&"type"in e&&e.type==="array"}function EN(e){return e instanceof mN||xe(e)==="object"&&"type"in e&&e.type==="union"}function CN(e){return e instanceof gN||xe(e)==="object"&&"type"in e&&e.type==="richtext"}function kN(e){return e instanceof cN||xe(e)==="object"&&"type"in e&&e.type==="image"}function $N(e,t,n){for(var r=bN(e),i=Bw(r),o=n,l=t,s=function(){var c=r.shift();if(c===void 0)throw Error("Unexpected undefined part");if(SN(o)){if(Number.isNaN(Number(c)))throw Error("Invalid path: array schema ".concat(JSON.stringify(o)," must have a number as path, but got ").concat(c,". Path: ").concat(e));if(xe(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of array, but got ".concat(xe(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],o=o.item}else if(wN(o)){if(typeof c!="string")throw Error("Invalid path: record schema ".concat(o," must have path: ").concat(c," as string"));if(xe(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of record, but got ".concat(xe(l)));if(!l[c])throw Error("Invalid path: record source did not have key ".concat(c," from path: ").concat(e));l=l[c],o=o.item}else if(_N(o)){if(xe(l)!=="object")throw Error("Schema type error: expected source to be type of object, but got ".concat(xe(l)));if(!l[c])throw Error("Invalid path: object source did not have key ".concat(c," from path: ").concat(e));l=l[c],o=o.items[c]}else{if(kN(o))return{v:{path:i.slice(0,i.length-r.length-1).map(function(g){return JSON.stringify(g)}).join("."),schema:o,source:l}};if(EN(o)){var f=o.key;if(!f)return{v:{path:i.map(function(g){return Number.isNaN(Number(g))?JSON.stringify(g):g}).join("."),schema:o,source:l}};var h=l[f];if(!h)throw Error("Invalid path: union source ".concat(o," did not have required key ").concat(f," in path: ").concat(e));var m=o.items.find(function(g){var S;return(g==null||(S=g.items)===null||S===void 0||(S=S[f])===null||S===void 0?void 0:S.value)===h});if(!m)throw Error("Invalid path: union schema ".concat(o," did not have a child object with ").concat(f," of value ").concat(h," in path: ").concat(e));o=m.items[c],l=l[c]}else{if(CN(o))return{v:{path:i.slice(0,i.length-r.length-1).map(function(g){return JSON.stringify(g)}).join("."),schema:o,source:l}};throw Error("Invalid path: ".concat(c," resolved to an unexpected schema ").concat(JSON.stringify(o)))}}},a;r.length>0;)if(a=s(),a)return a.v;if(r.length>0)throw Error("Invalid path: ".concat(r.join(".")," is not a valid path"));return{path:i.map(function(u){return Number.isNaN(Number(u))?JSON.stringify(u):u}).join("."),schema:o,source:l}}function bN(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 i;throw new Error("Invalid input (".concat(JSON.stringify(e),"): Missing closing double quote: ").concat((i=e[n])!==null&&i!==void 0?i:"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 TN(e){return Zw(ON(e))}function NN(e){return qi(e)?xe(e[Ot])==="object"&&e[Ot]!==null&&Array.isArray(e[Ot]):Array.isArray(e)}function RN(e){return qi(e)?xe(e[Ot])==="object"&&e[Ot]!==null&&!Array.isArray(e[Ot]):xe(e)==="object"}function ON(e){var t=Mt(e);function n(r){var i=NN(r),o=RN(r);if(i){var l=Ot in r?r[Ot]:r,s=pn in r?r[pn]:void 0;return{val:l.map(function(c,d){return n(qi(c)?c:Mt(c,er(s,d)))}),valPath:s}}else if(o){var a=Ot in r?r[Ot]:r,u=pn in r?r[pn]:void 0;return{val:a!==null&&Object.fromEntries(Object.entries(a).map(function(c){var d=Ji(c,2),f=d[0],h=d[1];return[f,n(qi(h)?h:Mt(h,er(u,f)))]})),valPath:u}}else return qi(r)?{val:n(r[Ot]),valPath:r[pn]}:r}return n(t)}function Kp(e){var t=Hw(e)?e.val:e;switch(xe(t)){case"function":case"symbol":throw Error("Invalid val type: ".concat(xe(t)));case"object":return t===null?null:Array.isArray(t)?t.map(Kp):Object.fromEntries(Object.entries(t).map(function(n){var r=Ji(n,2),i=r[0],o=r[1];return[i,o&&Kp(o)]}));default:return t}}function Zw(e){var t=e.val;switch(xe(t)){case"function":case"symbol":throw Error("Invalid val type: ".concat(xe(t)));case"object":if(t!==null)return new Proxy(t,{has:function(r,i){return i==="val"||i===pn?!0:S0(r,i)},get:function(r,i){if(i===pn)return e.valPath;if(i==="val")return Kp(e);if(Array.isArray(r)&&i==="length")return r.length;if(S0(t,i)){var o,l;return Zw({val:Reflect.get(r,i).val,valPath:(o=(l=Reflect.get(r,i))===null||l===void 0?void 0:l.valPath)!==null&&o!==void 0?o:er(e.valPath,Array.isArray(r)?Number(i):i)})}return Reflect.get(r,i)}});default:return ye(ye({},pn,e.valPath),"val",e.val)}}function S0(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var PN=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Ve=function(e){return e[e.inputBytes=64]="inputBytes",e[e.inputWords=16]="inputWords",e[e.highIndex=14]="highIndex",e[e.lowIndex=15]="lowIndex",e[e.workWords=64]="workWords",e[e.allocBytes=80]="allocBytes",e[e.allocWords=20]="allocWords",e[e.allocTotal=8e3]="allocTotal",e}(Ve||{}),E0={sha256:1};function AN(e){if(e&&!E0[e]&&!E0[e.toLowerCase()])throw new Error("Digest method not supported");return new MN}var MN=function(){function e(){lr(this,e),ye(this,"A",1779033703),ye(this,"B",-1150833019),ye(this,"C",1013904242),ye(this,"D",-1521486534),ye(this,"E",1359893119),ye(this,"F",-1694144372),ye(this,"G",528734635),ye(this,"H",1541459225),ye(this,"_size",0),ye(this,"_sp",0),(!fc||Zs>=Ve.allocTotal)&&(fc=new ArrayBuffer(Ve.allocTotal),Zs=0),this._byte=new Uint8Array(fc,Zs,Ve.allocBytes),this._word=new Int32Array(fc,Zs,Ve.allocWords),Zs+=Ve.allocBytes}return sr(e,[{key:"update",value:function(n){if(typeof n=="string")return this._utf8(n);if(n==null)throw new TypeError("Invalid type: "+xe(n));var r=n.byteOffset,i=n.byteLength,o=i/Ve.inputBytes|0,l=0;if(o&&!(r&3)&&!(this._size%Ve.inputBytes)){for(var s=new Int32Array(n.buffer,r,o*Ve.inputWords);o--;)this._int32(s,l>>2),l+=Ve.inputBytes;this._size+=l}var a=n.BYTES_PER_ELEMENT;if(a!==1&&n.buffer){var u=new Uint8Array(n.buffer,r+l,i-l);return this._uint8(u)}return l===i?this:this._uint8(n,l)}},{key:"_uint8",value:function(n,r){var i=this._byte,o=this._word,l=n.length;for(r=r|0;r<l;){for(var s=this._size%Ve.inputBytes,a=s;r<l&&a<Ve.inputBytes;)i[a++]=n[r++];a>=Ve.inputBytes&&this._int32(o),this._size+=a-s}return this}},{key:"_utf8",value:function(n){for(var r=this._byte,i=this._word,o=n.length,l=this._sp,s=0;s<o;){for(var a=this._size%Ve.inputBytes,u=a;s<o&&u<Ve.inputBytes;){var c=n.charCodeAt(s++)|0;c<128?r[u++]=c:c<2048?(r[u++]=192|c>>>6,r[u++]=128|c&63):c<55296||c>57343?(r[u++]=224|c>>>12,r[u++]=128|c>>>6&63,r[u++]=128|c&63):l?(c=((l&1023)<<10)+(c&1023)+65536,r[u++]=240|c>>>18,r[u++]=128|c>>>12&63,r[u++]=128|c>>>6&63,r[u++]=128|c&63,l=0):l=c}u>=Ve.inputBytes&&(this._int32(i),i[0]=i[Ve.inputWords]),this._size+=u-a}return this._sp=l,this}},{key:"_int32",value:function(n,r){var i=this.A,o=this.B,l=this.C,s=this.D,a=this.E,u=this.F,c=this.G,d=this.H,f=0;for(r=r|0;f<Ve.inputWords;)ko[f++]=fr(n[r++]);for(f=Ve.inputWords;f<Ve.workWords;f++)ko[f]=UN(ko[f-2])+ko[f-7]+BN(ko[f-15])+ko[f-16]|0;for(f=0;f<Ve.workWords;f++){var h=d+FN(a)+LN(a,u,c)+PN[f]+ko[f]|0,m=zN(i)+jN(i,o,l)|0;d=c,c=u,u=a,a=s+h|0,s=l,l=o,o=i,i=h+m|0}this.A=i+this.A|0,this.B=o+this.B|0,this.C=l+this.C|0,this.D=s+this.D|0,this.E=a+this.E|0,this.F=u+this.F|0,this.G=c+this.G|0,this.H=d+this.H|0}},{key:"digest",value:function(n){var r=this._byte,i=this._word,o=this._size%Ve.inputBytes|0;for(r[o++]=128;o&3;)r[o++]=0;if(o>>=2,o>Ve.highIndex){for(;o<Ve.inputWords;)i[o++]=0;o=0,this._int32(i)}for(;o<Ve.inputWords;)i[o++]=0;var l=this._size*8,s=(l&4294967295)>>>0,a=(l-s)/4294967296;return a&&(i[Ve.highIndex]=fr(a)),s&&(i[Ve.lowIndex]=fr(s)),this._int32(i),n==="hex"?this._hex():this._bin()}},{key:"_hex",value:function(){var n=this.A,r=this.B,i=this.C,o=this.D,l=this.E,s=this.F,a=this.G,u=this.H;return bi(n)+bi(r)+bi(i)+bi(o)+bi(l)+bi(s)+bi(a)+bi(u)}},{key:"_bin",value:function(){var n=this.A,r=this.B,i=this.C,o=this.D,l=this.E,s=this.F,a=this.G,u=this.H,c=this._byte,d=this._word;return d[0]=fr(n),d[1]=fr(r),d[2]=fr(i),d[3]=fr(o),d[4]=fr(l),d[5]=fr(s),d[6]=fr(a),d[7]=fr(u),c.slice(0,32)}}]),e}(),ko=new Int32Array(Ve.workWords),fc,Zs=0,bi=function(t){return(t+4294967296).toString(16).substr(-8)},DN=function(t){return t<<24&4278190080|t<<8&16711680|t>>8&65280|t>>24&255},IN=function(t){return t},fr=WN()?IN:DN,LN=function(t,n,r){return r^t&(n^r)},jN=function(t,n,r){return t&n|r&(t|n)},zN=function(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)},FN=function(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)},BN=function(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3},UN=function(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10};function WN(){var e=new Uint8Array(new Uint16Array([65279]).buffer);return e[0]===254}var VN=function(t){return AN().update(t).digest("hex")};function Ja(){Ja=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(O,A,k){O[A]=k.value},o=typeof Symbol=="function"?Symbol:{},l=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(O,A,k){return Object.defineProperty(O,A,{value:k,enumerable:!0,configurable:!0,writable:!0}),O[A]}try{u({},"")}catch{u=function(A,k,j){return A[k]=j}}function c(O,A,k,j){var L=A&&A.prototype instanceof v?A:v,Z=Object.create(L.prototype),ne=new V(j||[]);return i(Z,"_invoke",{value:R(O,k,ne)}),Z}function d(O,A,k){try{return{type:"normal",arg:O.call(A,k)}}catch(j){return{type:"throw",arg:j}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",m="executing",g="completed",S={};function v(){}function y(){}function _(){}var w={};u(w,l,function(){return this});var E=Object.getPrototypeOf,$=E&&E(E(K([])));$&&$!==n&&r.call($,l)&&(w=$);var C=_.prototype=v.prototype=Object.create(w);function T(O){["next","throw","return"].forEach(function(A){u(O,A,function(k){return this._invoke(A,k)})})}function N(O,A){function k(L,Z,ne,ke){var ve=d(O[L],O,Z);if(ve.type!=="throw"){var We=ve.arg,Fe=We.value;return Fe&&typeof Fe=="object"&&r.call(Fe,"__await")?A.resolve(Fe.__await).then(function(te){k("next",te,ne,ke)},function(te){k("throw",te,ne,ke)}):A.resolve(Fe).then(function(te){We.value=te,ne(We)},function(te){return k("throw",te,ne,ke)})}ke(ve.arg)}var j;i(this,"_invoke",{value:function(L,Z){function ne(){return new A(function(ke,ve){k(L,Z,ke,ve)})}return j=j?j.then(ne,ne):ne()}})}function R(O,A,k){var j=f;return function(L,Z){if(j===m)throw new Error("Generator is already running");if(j===g){if(L==="throw")throw Z;return{value:e,done:!0}}for(k.method=L,k.arg=Z;;){var ne=k.delegate;if(ne){var ke=D(ne,k);if(ke){if(ke===S)continue;return ke}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(j===f)throw j=g,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);j=m;var ve=d(O,A,k);if(ve.type==="normal"){if(j=k.done?g:h,ve.arg===S)continue;return{value:ve.arg,done:k.done}}ve.type==="throw"&&(j=g,k.method="throw",k.arg=ve.arg)}}}function D(O,A){var k=A.method,j=O.iterator[k];if(j===e)return A.delegate=null,k==="throw"&&O.iterator.return&&(A.method="return",A.arg=e,D(O,A),A.method==="throw")||k!=="return"&&(A.method="throw",A.arg=new TypeError("The iterator does not provide a '"+k+"' method")),S;var L=d(j,O.iterator,A.arg);if(L.type==="throw")return A.method="throw",A.arg=L.arg,A.delegate=null,S;var Z=L.arg;return Z?Z.done?(A[O.resultName]=Z.value,A.next=O.nextLoc,A.method!=="return"&&(A.method="next",A.arg=e),A.delegate=null,S):Z:(A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,S)}function F(O){var A={tryLoc:O[0]};1 in O&&(A.catchLoc=O[1]),2 in O&&(A.finallyLoc=O[2],A.afterLoc=O[3]),this.tryEntries.push(A)}function se(O){var A=O.completion||{};A.type="normal",delete A.arg,O.completion=A}function V(O){this.tryEntries=[{tryLoc:"root"}],O.forEach(F,this),this.reset(!0)}function K(O){if(O||O===""){var A=O[l];if(A)return A.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var k=-1,j=function L(){for(;++k<O.length;)if(r.call(O,k))return L.value=O[k],L.done=!1,L;return L.value=e,L.done=!0,L};return j.next=j}}throw new TypeError(typeof O+" is not iterable")}return y.prototype=_,i(C,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:y,configurable:!0}),y.displayName=u(_,a,"GeneratorFunction"),t.isGeneratorFunction=function(O){var A=typeof O=="function"&&O.constructor;return!!A&&(A===y||(A.displayName||A.name)==="GeneratorFunction")},t.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,_):(O.__proto__=_,u(O,a,"GeneratorFunction")),O.prototype=Object.create(C),O},t.awrap=function(O){return{__await:O}},T(N.prototype),u(N.prototype,s,function(){return this}),t.AsyncIterator=N,t.async=function(O,A,k,j,L){L===void 0&&(L=Promise);var Z=new N(c(O,A,k,j),L);return t.isGeneratorFunction(A)?Z:Z.next().then(function(ne){return ne.done?ne.value:Z.next()})},T(C),u(C,a,"Generator"),u(C,l,function(){return this}),u(C,"toString",function(){return"[object Generator]"}),t.keys=function(O){var A=Object(O),k=[];for(var j in A)k.push(j);return k.reverse(),function L(){for(;k.length;){var Z=k.pop();if(Z in A)return L.value=Z,L.done=!1,L}return L.done=!0,L}},t.values=K,V.prototype={constructor:V,reset:function(O){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(se),!O)for(var A in this)A.charAt(0)==="t"&&r.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=e)},stop:function(){this.done=!0;var O=this.tryEntries[0].completion;if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var A=this;function k(ve,We){return Z.type="throw",Z.arg=O,A.next=ve,We&&(A.method="next",A.arg=e),!!We}for(var j=this.tryEntries.length-1;j>=0;--j){var L=this.tryEntries[j],Z=L.completion;if(L.tryLoc==="root")return k("end");if(L.tryLoc<=this.prev){var ne=r.call(L,"catchLoc"),ke=r.call(L,"finallyLoc");if(ne&&ke){if(this.prev<L.catchLoc)return k(L.catchLoc,!0);if(this.prev<L.finallyLoc)return k(L.finallyLoc)}else if(ne){if(this.prev<L.catchLoc)return k(L.catchLoc,!0)}else{if(!ke)throw new Error("try statement without catch or finally");if(this.prev<L.finallyLoc)return k(L.finallyLoc)}}}},abrupt:function(O,A){for(var k=this.tryEntries.length-1;k>=0;--k){var j=this.tryEntries[k];if(j.tryLoc<=this.prev&&r.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var L=j;break}}L&&(O==="break"||O==="continue")&&L.tryLoc<=A&&A<=L.finallyLoc&&(L=null);var Z=L?L.completion:{};return Z.type=O,Z.arg=A,L?(this.method="next",this.next=L.finallyLoc,S):this.complete(Z)},complete:function(O,A){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&A&&(this.next=A),S},finish:function(O){for(var A=this.tryEntries.length-1;A>=0;--A){var k=this.tryEntries[A];if(k.finallyLoc===O)return this.complete(k.completion,k.afterLoc),se(k),S}},catch:function(O){for(var A=this.tryEntries.length-1;A>=0;--A){var k=this.tryEntries[A];if(k.tryLoc===O){var j=k.completion;if(j.type==="throw"){var L=j.arg;se(k)}return L}}throw new Error("illegal catch attempt")},delegateYield:function(O,A,k){return this.delegate={iterator:K(O),resultName:A,nextLoc:k},this.method==="next"&&(this.arg=e),S}},t}function C0(e,t,n,r,i,o,l){try{var s=e[o](l),a=s.value}catch(u){n(u);return}s.done?t(a):Promise.resolve(a).then(r,i)}function Gw(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function l(a){C0(o,r,i,l,s,"next",a)}function s(a){C0(o,r,i,l,s,"throw",a)}l(void 0)})}}var HN=function(){function e(t){lr(this,e),this.host=t}return sr(e,[{key:"getDisableUrl",value:function(n){return"".concat(this.host,"/disable?redirect_to=").concat(encodeURIComponent(n))}},{key:"getLoginUrl",value:function(n){return"".concat(this.host,"/authorize?redirect_to=").concat(encodeURIComponent(n))}},{key:"getEnableUrl",value:function(n){return"".concat(this.host,"/enable?redirect_to=").concat(encodeURIComponent(n))}},{key:"getPatches",value:function(){var t=Gw(Ja().mark(function r(i){var o,l,s;return Ja().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return o=i.patchIds,l=i.headers,s=o?"?".concat(o.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 Ys(c)}).catch(Gs));case 3:case"end":return u.stop()}},r,this)}));function n(r){return t.apply(this,arguments)}return n}()},{key:"getEditUrl",value:function(){return"".concat(this.host,"/static/edit")}},{key:"postPatches",value:function(n,r,i){return fetch("".concat(this.host,"/patches/~"),{headers:i||{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(ye({},n,r))}).then(function(o){return Ys(o)}).catch(Gs)}},{key:"getSession",value:function(){return fetch("".concat(this.host,"/session")).then(function(n){return Ys(n).catch(Gs)})}},{key:"getTree",value:function(n){var r=n.patch,i=r===void 0?!1:r,o=n.includeSchema,l=o===void 0?!1:o,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",i.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 Ys(h)}).catch(Gs)}},{key:"postCommit",value:function(n){var r=n.patches,i=n.headers;return fetch("".concat(this.host,"/commit"),{method:"POST",body:JSON.stringify({patches:r}),headers:i||{"Content-Type":"application/json"}}).then(function(o){return Ys(o)}).catch(Gs)}}]),e}();function Gs(e){return Br({statusCode:500,message:e instanceof Error?e.message:"Unknown error"})}function Ys(e){return Zp.apply(this,arguments)}function Zp(){return Zp=Gw(Ja().mark(function e(t){var n;return Ja().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(i.prev=0,!t.ok){i.next=9;break}return i.t0=jo,i.next=5,t.json();case 5:return i.t1=i.sent,i.abrupt("return",i.t0.ok.call(i.t0,i.t1));case 9:return i.prev=9,i.next=12,t.json();case 12:return n=i.sent,i.abrupt("return",Br({statusCode:t.status,message:n.message||t.statusText,details:n.details||Object.fromEntries(Object.entries(n).filter(function(o){var l=Ji(o,1),s=l[0];return s!=="message"}))}));case 16:return i.prev=16,i.t2=i.catch(9),i.abrupt("return",Br({statusCode:t.status,message:t.statusText}));case 19:i.next=24;break;case 21:return i.prev=21,i.t3=i.catch(0),i.abrupt("return",Br({message:i.t3 instanceof Error?i.t3.message:"Unknown error"}));case 24:case"end":return i.stop()}},e,null,[[0,21],[9,16]])})),Zp.apply(this,arguments)}var jn={convertFileSource:Vw,getSchema:aN,getValPath:fN,getVal:TN,getSource:yN,resolvePath:$N,splitModuleIdAndModulePath:xN,isVal:dN,createValPathOfItem:er,getSHA256Hash:VN,createPatchJSONPath:function(t){return"/".concat(t.split(".").map(function(n){return n&&KN(n)}).join("/"))},VAL_ENABLE_COOKIE_NAME:"val_enable",VAL_STATE_COOKIE:"val_state",VAL_SESSION_COOKIE:"val_session"};function KN(e){try{return JSON.parse(e)}catch{return e}}var Yw={exports:{}};/*!
|
|
40
|
+
*/var zT=p,FT=Symbol.for("react.element"),BT=Symbol.for("react.fragment"),UT=Object.prototype.hasOwnProperty,WT=zT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,VT={key:!0,ref:!0,__self:!0,__source:!0};function jw(e,t,n){var r,i={},o=null,l=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)UT.call(t,r)&&!VT.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:FT,type:e,key:o,ref:l,props:i,_owner:WT.current}}xf.Fragment=BT;xf.jsx=jw;xf.jsxs=jw;Iw.exports=xf;var x=Iw.exports;function Vp(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 Hg(e,t){if(e){if(typeof e=="string")return Vp(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 Vp(e,t)}}function _f(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Hg(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(a){throw a},f:i}}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 o=!0,l=!1,s;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return o=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function zw(e){return e.length>0}var Mu=Object.freeze({kind:"ok",value:void 0});function Du(e){return e===void 0?Mu:{kind:"ok",value:e}}function Br(e){return{kind:"err",error:e}}function Ss(e){return e===Mu||e.kind==="ok"}function Kg(e){return e!==Mu&&e.kind==="err"}function Fw(e){var t=[],n=[],r=_f(e),i;try{for(r.s();!(i=r.n()).done;){var o=i.value;Ss(o)?t.push(o.value):n.push(o.error)}}catch(l){r.e(l)}finally{r.f()}return zw(n)?Br(n):Du(t)}function HT(e){return Fw(e)}function KT(e){var t=[],n=_f(e),r;try{for(n.s();!(r=n.n()).done;){var i=r.value;Kg(i)&&t.push(i.error)}}catch(o){n.e(o)}finally{n.f()}return zw(t)?Br(t):Mu}function ZT(e,t){return function(n){for(var r=Du(t),i=0;i<n.length&&Ss(r);++i)r=e(r.value,n[i],i);return r}}function GT(e){return function(t){return Ss(t)?Du(e(t.value)):t}}function YT(e){return function(t){return Ss(t)?e(t.value):t}}function XT(e){return function(t){return Kg(t)?Br(e(t.error)):t}}function QT(e,t){return function(n){return e(n)?Du(n):Br(t(n))}}var JT=function(t,n){return function(r){return Ss(r)?t(r.value)?r:Br(n(r.value)):r}},jo=Object.freeze({__proto__:null,voidOk:Mu,ok:Du,err:Br,isOk:Ss,isErr:Kg,allT:Fw,all:HT,allV:KT,flatMapReduce:ZT,map:GT,flatMap:YT,mapErr:XT,fromPredicate:QT,filterOrElse:JT});function qT(e){if(Array.isArray(e))return Vp(e)}function eN(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tN(){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 Bw(e){return qT(e)||eN(e)||Hg(e)||tN()}function _e(e){"@babel/helpers - typeof";return _e=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},_e(e)}function nN(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 Uw(e){var t=nN(e,"string");return typeof t=="symbol"?t:String(t)}function ye(e,t,n){return t=Uw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function as(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v0(Object(n),!0).forEach(function(r){ye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rN(e){if(Array.isArray(e))return e}function iN(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,s=[],a=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);a=!0);}catch(c){u=!0,i=c}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return s}}function oN(){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 Ji(e,t){return rN(e)||iN(e,t)||Hg(e,t)||oN()}function lr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y0(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,Uw(r.key),r)}}function sr(e,t,n){return t&&y0(e.prototype,t),n&&y0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hp(e,t){return Hp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Hp(e,t)}function yo(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&&Hp(e,t)}function xd(e){return xd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xd(e)}function lN(){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 Ww(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sN(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 Ww(e)}function xo(e){var t=lN();return function(){var r=xd(e),i;if(t){var o=xd(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return sN(this,i)}}var _o=function(){function e(){lr(this,e)}return sr(e,[{key:"appendValidationError",value:function(n,r,i,o){return n?(n[r]?n[r].push({message:i,value:o}):n[r]=[{message:i,value:o}],n):ye({},r,[{message:i,value:o}])}}]),e}(),Fc=Symbol("GetSchema"),pn=Symbol("Path"),Ot=Symbol("GetSource");function aN(e){return e[Fc]}var Zg=sr(function e(t){lr(this,e),this.span=t}),uN=function(e){yo(n,e);var t=xo(n);function n(r,i){var o;return lr(this,n),o=t.call(this,i),ye(Ww(o),"type","Sym"),o.value=r,o}return sr(n,[{key:"transpile",value:function(){return this.value}}]),n}(Zg);new uN("()");var nn="_type",Rn="_ref";function Vw(e){var t;if(!e[Rn].startsWith("/public")){var n;return{url:e[Rn]+"?sha256=".concat((n=e.metadata)===null||n===void 0?void 0:n.sha256),metadata:e.metadata}}return{url:e[Rn].slice(7)+"?sha256=".concat((t=e.metadata)===null||t===void 0?void 0:t.sha256),metadata:e.metadata}}function Hw(e){return _e(e)==="object"&&e!==null&&e!==void 0&&("val"in e||"valPath"in e)}function cN(e){return _e(e)==="object"&&e!==null&&e!==void 0&&pn in e&&"val"in e}function dN(e){return e[pn]}function fN(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function x0(e,t,n){return t?Mt(e(Mt(t,n))):Mt(t,n)}function qi(e){return _e(e)==="object"&&e!==null&&(Ot in e||pn in e)}function Mt(e,t,n){if(_e(e)==="object"){if(qi(e))return e;if(Hw(e))return Mt(e.val,e.valPath)}if(e&&e[Rn]&&e[nn]==="file"){var r=e[Rn];if(typeof r!="string")throw Error("Invalid file ref: "+r);return Mt(Vw(e),t,n)}switch(_e(e)){case"function":case"symbol":throw Error("Invalid selector type: ".concat(_e(e),": ").concat(e));case"object":if(e!==null)return new Proxy(e,{has:function(o,l){return l===Ot||l===pn||l==="andThen"||l===Fc?!0:l in o},get:function(o,l){if(l===Ot)return e;if(l===pn)return t;if(l===Fc)return n;if(l==="andThen")return function(a){return x0(a,e,t)};if(Array.isArray(o)){if(l==="filter")return function(a){var u=o.map(function(c,d){return Mt(c,er(t,d),n==null?void 0:n.item)}).filter(function(c){return a&&a instanceof _o?a.assert(_0(c)):_0(a(c))});return Mt(u,t,n)};if(l==="map")return function(a){var u=o.map(function(c,d){var f=a(Mt(c,er(t,d),n==null?void 0:n.item),Mt(d));return qi(f)?f:Mt(f)});return Mt(u,t,n)}}if(Array.isArray(o)&&l==="length")return Mt(o.length);var s=Reflect.get(o,l);return fN(e,l)?Number.isNaN(Number(l))?Mt(s,er(t,l),n==null?void 0:n.items[l]):Mt(s,er(t,Number(l)),n==null?void 0:n.item):s}});default:return ye(ye(ye({eq:function(o){var l=o;if(qi(o)&&(l=o[Ot],l instanceof Zg))throw Error("TODO: Cannot evaluate equality with an Expr");return Mt(e===l,void 0)},andThen:function(o){return x0(o,e===void 0?null:e,t)}},Ot,e===void 0?null:e),pn,t),Fc,n)}}function er(e,t){if(_e(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 _0(e){if(_e(e)==="object"&&(Ot in e||pn in e)){var t=e[Ot];return t}return e}var Kw=function(e){yo(n,e);var t=xo(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lr(this,n),i=t.call(this),i.items=r,i.opt=o,i}return sr(n,[{key:"validate",value:function(i,o){var l=this,s=!1;return this.opt&&o==null?!1:_e(o)!=="object"?ye({},i,[{message:"Expected 'object', got '".concat(_e(o),"'")}]):Array.isArray(o)?ye({},i,[{message:"Expected 'object', got 'array'"}]):(Object.entries(this.items).forEach(function(a){var u=Ji(a,2),c=u[0],d=u[1],f=er(i,c);if(!f)s=l.appendValidationError(s,i,"Internal error: could not create path at ".concat(!i&&typeof i=="string"?"<empty string>":i," at key ").concat(c),o);else{var h=d.validate(f,o[c]);h&&s?s=as(as({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(i){if(this.opt&&i==null)return!0;if(!i)return!1;for(var o=0,l=Object.entries(this.items);o<l.length;o++){var s=Ji(l[o],2),a=s[0],u=s[1];if(!u.assert(i[a]))return!1}return _e(i)==="object"&&!Array.isArray(i)}},{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(i){var o=Ji(i,2),l=o[0],s=o[1];return[l,s.serialize()]})),opt:this.opt}}}]),n}(_o),hN=function(e){yo(n,e);var t=xo(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lr(this,n),i=t.call(this),i.item=r,i.opt=o,i}return sr(n,[{key:"validate",value:function(i,o){var l=this,s=!1;return this.opt&&o==null?!1:_e(o)!=="object"||!Array.isArray(o)?ye({},i,[{message:"Expected 'array', got '".concat(_e(o),"'")}]):(o.forEach(function(a,u){var c=er(i,u);if(!c)s=l.appendValidationError(s,i,"Internal error: could not create path at ".concat(!i&&typeof i=="string"?"<empty string>":i," at index ").concat(u),o);else{var d=l.item.validate(c,a);d&&s?s=as(as({},d),s):d&&(s=d)}}),s)}},{key:"assert",value:function(i){if(this.opt&&i==null)return!0;if(!i)return!1;var o=_f(i),l;try{for(o.s();!(l=o.n()).done;){var s=l.value;if(!this.item.assert(s))return!1}}catch(a){o.e(a)}finally{o.f()}return _e(i)==="object"&&Array.isArray(i)}},{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}(_o),w0=function(e){yo(n,e);var t=xo(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lr(this,n),i=t.call(this),i.value=r,i.opt=o,i}return sr(n,[{key:"validate",value:function(i,o){return this.opt&&o==null?!1:typeof o!="string"?ye({},i,[{message:"Expected 'string', got '".concat(_e(o),"'"),value:o}]):o!==this.value?ye({},i,[{message:"Expected literal '".concat(this.value,"', got '").concat(o,"'"),value:o}]):!1}},{key:"assert",value:function(i){return this.opt&&i==null?!0:typeof i=="string"}},{key:"optional",value:function(){return new n(this.value,!0)}},{key:"serialize",value:function(){return{type:"literal",value:this.value,opt:this.opt}}}]),n}(_o),pN=function(e){yo(n,e);var t=xo(n);function n(r,i){var o,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return lr(this,n),o=t.call(this),o.key=r,o.items=i,o.opt=l,o}return sr(n,[{key:"validate",value:function(i,o){var l=o,s=!1;if(this.opt&&l==null)return!1;if(!this.key)return ye({},i,[{message:"Missing required first argument in union"}]);var a=this.key;if(!Array.isArray(this.items))return ye({},i,[{message:"A union schema must take more than 1 schema arguments",fatal:!0}]);if(typeof a=="string"){if(this.items.some(function(N){return!(N instanceof Kw)}))return ye({},i,[{message:"Key is a string, so all schema items must be objects",fatal:!0}]);var u=this.items,c=u.map(function(N){return N.serialize()}),d=c.filter(function(N){return N.type!=="object"||N.items[a].type!=="literal"});if(d.length>0)return ye({},i,[{message:"All schema items must be objects with a key: ".concat(a," that is a literal schema. Found: ").concat(JSON.stringify(d,null,2)),fatal:!0}]);var f=c,h=f.filter(function(N){return N.items[a].opt});if(h.length>1)return ye({},i,[{message:"Schema cannot have an optional keys: ".concat(a),fatal:!0}]);if(_e(l)!=="object")return ye({},i,[{message:"Expected an object"}]);var m=l;if(m[a]===void 0)return ye({},i,[{message:"Missing required key: ".concat(a)}]);var g=[],w=_f(f),v;try{for(w.s();!(v=w.n()).done;){var y=v.value,_=y.items[a];if(_.type==="literal")if(!g.includes(_.value))g.push(_.value);else return ye({},i,[{message:"Found duplicate key in schema: ".concat(_.value),fatal:!0}])}}catch(N){w.e(N)}finally{w.f()}var S=u.find(function(N){return!N.items[a].validate(i,m[a])});if(!S){var E=er(i,a);if(!E)throw new Error("Internal error: could not create path at ".concat(!i&&typeof i=="string"?"<empty string>":i," at key ").concat(a));return ye({},E,[{message:'Invalid key: "'.concat(a,'". Value was: "').concat(m[a],'". Valid values: ').concat(f.map(function(N){var R=N.items[a];if(R.type==="literal"&&R.value)return'"'.concat(R.value,'"');throw new Error("Expected literal schema, got ".concat(JSON.stringify(R,null,2)))}).join(", "))}])}var $=S.validate(i,m);if($)return $}else if(a instanceof w0){if(this.items.some(function(N){return!(N instanceof w0)}))return ye({},i,[{message:"Key is a literal schema, so all schema items must be literals",fatal:!0}]);var C=[a].concat(Bw(this.items));if(typeof l=="string"){var T=C.some(function(N){return!N.validate(i,l)});if(!T)return ye({},i,[{message:"Union must match one of the following: ".concat(C.map(function(N){return'"'.concat(N.value,'"')}).join(", "))}])}}else return ye({},i,[{message:"Expected a string or literal"}]);return s}},{key:"assert",value:function(i){return!0}},{key:"optional",value:function(){return new n(this.key,this.items,!0)}},{key:"serialize",value:function(){return typeof this.key=="string"?{type:"union",key:this.key,items:this.items.map(function(i){return i.serialize()}),opt:this.opt}:{type:"union",items:this.items.map(function(i){return i.serialize()}),opt:this.opt}}}]),n}(_o),mN=function(e){yo(n,e);var t=xo(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lr(this,n),i=t.call(this),i.options=r,i.opt=o,i}return sr(n,[{key:"validate",value:function(i,o){return!1}},{key:"assert",value:function(i){return!0}},{key:"optional",value:function(){return new n(this.options,!0)}},{key:"serialize",value:function(){return{type:"richtext",opt:this.opt}}}]),n}(_o),gN=function(e){yo(n,e);var t=xo(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lr(this,n),i=t.call(this),i.options=r,i.opt=o,i}return sr(n,[{key:"validate",value:function(i,o){return this.opt&&o==null?!1:o==null?ye({},i,[{message:"Non-optional image was null or undefined.",value:o}]):typeof o[Rn]!="string"?ye({},i,[{message:"Image did not have a file reference string. Got: ".concat(_e(o[Rn])),value:o}]):o[nn]!=="file"?ye({},i,[{message:"Image did not have the valid file extension type. Got: ".concat(o[nn]),value:o}]):o.metadata?ye({},i,[{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:o,fixes:["image:replace-metadata"]}]):ye({},i,[{message:"Could not validate Image metadata.",value:o,fixes:["image:add-metadata"]}])}},{key:"assert",value:function(i){return this.opt&&i==null?!0:(i==null?void 0:i[Rn])==="image"&&(i==null?void 0:i[nn])==="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}(_o),vN=function(e){yo(n,e);var t=xo(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lr(this,n),i=t.call(this),i.item=r,i.opt=o,i}return sr(n,[{key:"validate",value:function(i,o){var l=this,s=!1;return this.opt&&o==null?!1:_e(o)!=="object"?ye({},i,[{message:"Expected 'object', got '".concat(_e(o),"'")}]):Array.isArray(o)?ye({},i,[{message:"Expected 'object', got 'array'"}]):(Object.entries(o).forEach(function(a){var u=Ji(a,2),c=u[0],d=u[1],f=er(i,c);if(!f)s=l.appendValidationError(s,i,"Internal error: could not create path at ".concat(!i&&typeof i=="string"?"<empty string>":i," at key ").concat(d),o);else{var h=l.item.validate(f,d);h&&s?s=as(as({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(i){if(this.opt&&i==null)return!0;if(!i)return!1;for(var o=0,l=Object.entries(i);o<l.length;o++){var s=Ji(l[o],2),a=s[1];if(!this.item.assert(a))return!1}return _e(i)==="object"&&!Array.isArray(i)}},{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}(_o);function yN(e){var t=e[Ot];if(t instanceof Zg)throw Error("Cannot get raw source of an Expr");var n=t;return n}function xN(e){return e.indexOf(".")===-1?[e,""]:[e.slice(0,e.indexOf(".")),e.slice(e.indexOf(".")+1)]}function _N(e){return e instanceof Kw||_e(e)==="object"&&"type"in e&&e.type==="object"}function wN(e){return e instanceof vN||_e(e)==="object"&&"type"in e&&e.type==="record"}function SN(e){return e instanceof hN||_e(e)==="object"&&"type"in e&&e.type==="array"}function EN(e){return e instanceof pN||_e(e)==="object"&&"type"in e&&e.type==="union"}function CN(e){return e instanceof mN||_e(e)==="object"&&"type"in e&&e.type==="richtext"}function kN(e){return e instanceof gN||_e(e)==="object"&&"type"in e&&e.type==="image"}function $N(e,t,n){for(var r=bN(e),i=Bw(r),o=n,l=t,s=function(){var c=r.shift();if(c===void 0)throw Error("Unexpected undefined part");if(SN(o)){if(Number.isNaN(Number(c)))throw Error("Invalid path: array schema ".concat(JSON.stringify(o)," must have a number as path, but got ").concat(c,". Path: ").concat(e));if(_e(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of array, but got ".concat(_e(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],o=o.item}else if(wN(o)){if(typeof c!="string")throw Error("Invalid path: record schema ".concat(o," must have path: ").concat(c," as string"));if(_e(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of record, but got ".concat(_e(l)));if(!l[c])throw Error("Invalid path: record source did not have key ".concat(c," from path: ").concat(e));l=l[c],o=o.item}else if(_N(o)){if(_e(l)!=="object")throw Error("Schema type error: expected source to be type of object, but got ".concat(_e(l)));if(!l[c])throw Error("Invalid path: object source did not have key ".concat(c," from path: ").concat(e));l=l[c],o=o.items[c]}else{if(kN(o))return{v:{path:i.slice(0,i.length-r.length-1).map(function(g){return JSON.stringify(g)}).join("."),schema:o,source:l}};if(EN(o)){var f=o.key;if(!f)return{v:{path:i.map(function(g){return Number.isNaN(Number(g))?JSON.stringify(g):g}).join("."),schema:o,source:l}};var h=l[f];if(!h)throw Error("Invalid path: union source ".concat(o," did not have required key ").concat(f," in path: ").concat(e));var m=o.items.find(function(g){var w;return(g==null||(w=g.items)===null||w===void 0||(w=w[f])===null||w===void 0?void 0:w.value)===h});if(!m)throw Error("Invalid path: union schema ".concat(o," did not have a child object with ").concat(f," of value ").concat(h," in path: ").concat(e));o=m.items[c],l=l[c]}else{if(CN(o))return{v:{path:i.slice(0,i.length-r.length-1).map(function(g){return JSON.stringify(g)}).join("."),schema:o,source:l}};throw Error("Invalid path: ".concat(c," resolved to an unexpected schema ").concat(JSON.stringify(o)))}}},a;r.length>0;)if(a=s(),a)return a.v;if(r.length>0)throw Error("Invalid path: ".concat(r.join(".")," is not a valid path"));return{path:i.map(function(u){return Number.isNaN(Number(u))?JSON.stringify(u):u}).join("."),schema:o,source:l}}function bN(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 i;throw new Error("Invalid input (".concat(JSON.stringify(e),"): Missing closing double quote: ").concat((i=e[n])!==null&&i!==void 0?i:"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 TN(e){return Zw(ON(e))}function NN(e){return qi(e)?_e(e[Ot])==="object"&&e[Ot]!==null&&Array.isArray(e[Ot]):Array.isArray(e)}function RN(e){return qi(e)?_e(e[Ot])==="object"&&e[Ot]!==null&&!Array.isArray(e[Ot]):_e(e)==="object"}function ON(e){var t=Mt(e);function n(r){var i=NN(r),o=RN(r);if(i){var l=Ot in r?r[Ot]:r,s=pn in r?r[pn]:void 0;return{val:l.map(function(c,d){return n(qi(c)?c:Mt(c,er(s,d)))}),valPath:s}}else if(o){var a=Ot in r?r[Ot]:r,u=pn in r?r[pn]:void 0;return{val:a!==null&&Object.fromEntries(Object.entries(a).map(function(c){var d=Ji(c,2),f=d[0],h=d[1];return[f,n(qi(h)?h:Mt(h,er(u,f)))]})),valPath:u}}else return qi(r)?{val:n(r[Ot]),valPath:r[pn]}:r}return n(t)}function Kp(e){var t=Hw(e)?e.val:e;switch(_e(t)){case"function":case"symbol":throw Error("Invalid val type: ".concat(_e(t)));case"object":return t===null?null:Array.isArray(t)?t.map(Kp):Object.fromEntries(Object.entries(t).map(function(n){var r=Ji(n,2),i=r[0],o=r[1];return[i,o&&Kp(o)]}));default:return t}}function Zw(e){var t=e.val;switch(_e(t)){case"function":case"symbol":throw Error("Invalid val type: ".concat(_e(t)));case"object":if(t!==null)return new Proxy(t,{has:function(r,i){return i==="val"||i===pn?!0:S0(r,i)},get:function(r,i){if(i===pn)return e.valPath;if(i==="val")return Kp(e);if(Array.isArray(r)&&i==="length")return r.length;if(S0(t,i)){var o,l;return Zw({val:Reflect.get(r,i).val,valPath:(o=(l=Reflect.get(r,i))===null||l===void 0?void 0:l.valPath)!==null&&o!==void 0?o:er(e.valPath,Array.isArray(r)?Number(i):i)})}return Reflect.get(r,i)}});default:return ye(ye({},pn,e.valPath),"val",e.val)}}function S0(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var PN=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Ve=function(e){return e[e.inputBytes=64]="inputBytes",e[e.inputWords=16]="inputWords",e[e.highIndex=14]="highIndex",e[e.lowIndex=15]="lowIndex",e[e.workWords=64]="workWords",e[e.allocBytes=80]="allocBytes",e[e.allocWords=20]="allocWords",e[e.allocTotal=8e3]="allocTotal",e}(Ve||{}),E0={sha256:1};function AN(e){if(e&&!E0[e]&&!E0[e.toLowerCase()])throw new Error("Digest method not supported");return new MN}var MN=function(){function e(){lr(this,e),ye(this,"A",1779033703),ye(this,"B",-1150833019),ye(this,"C",1013904242),ye(this,"D",-1521486534),ye(this,"E",1359893119),ye(this,"F",-1694144372),ye(this,"G",528734635),ye(this,"H",1541459225),ye(this,"_size",0),ye(this,"_sp",0),(!fc||Ys>=Ve.allocTotal)&&(fc=new ArrayBuffer(Ve.allocTotal),Ys=0),this._byte=new Uint8Array(fc,Ys,Ve.allocBytes),this._word=new Int32Array(fc,Ys,Ve.allocWords),Ys+=Ve.allocBytes}return sr(e,[{key:"update",value:function(n){if(typeof n=="string")return this._utf8(n);if(n==null)throw new TypeError("Invalid type: "+_e(n));var r=n.byteOffset,i=n.byteLength,o=i/Ve.inputBytes|0,l=0;if(o&&!(r&3)&&!(this._size%Ve.inputBytes)){for(var s=new Int32Array(n.buffer,r,o*Ve.inputWords);o--;)this._int32(s,l>>2),l+=Ve.inputBytes;this._size+=l}var a=n.BYTES_PER_ELEMENT;if(a!==1&&n.buffer){var u=new Uint8Array(n.buffer,r+l,i-l);return this._uint8(u)}return l===i?this:this._uint8(n,l)}},{key:"_uint8",value:function(n,r){var i=this._byte,o=this._word,l=n.length;for(r=r|0;r<l;){for(var s=this._size%Ve.inputBytes,a=s;r<l&&a<Ve.inputBytes;)i[a++]=n[r++];a>=Ve.inputBytes&&this._int32(o),this._size+=a-s}return this}},{key:"_utf8",value:function(n){for(var r=this._byte,i=this._word,o=n.length,l=this._sp,s=0;s<o;){for(var a=this._size%Ve.inputBytes,u=a;s<o&&u<Ve.inputBytes;){var c=n.charCodeAt(s++)|0;c<128?r[u++]=c:c<2048?(r[u++]=192|c>>>6,r[u++]=128|c&63):c<55296||c>57343?(r[u++]=224|c>>>12,r[u++]=128|c>>>6&63,r[u++]=128|c&63):l?(c=((l&1023)<<10)+(c&1023)+65536,r[u++]=240|c>>>18,r[u++]=128|c>>>12&63,r[u++]=128|c>>>6&63,r[u++]=128|c&63,l=0):l=c}u>=Ve.inputBytes&&(this._int32(i),i[0]=i[Ve.inputWords]),this._size+=u-a}return this._sp=l,this}},{key:"_int32",value:function(n,r){var i=this.A,o=this.B,l=this.C,s=this.D,a=this.E,u=this.F,c=this.G,d=this.H,f=0;for(r=r|0;f<Ve.inputWords;)ko[f++]=fr(n[r++]);for(f=Ve.inputWords;f<Ve.workWords;f++)ko[f]=UN(ko[f-2])+ko[f-7]+BN(ko[f-15])+ko[f-16]|0;for(f=0;f<Ve.workWords;f++){var h=d+FN(a)+IN(a,u,c)+PN[f]+ko[f]|0,m=zN(i)+jN(i,o,l)|0;d=c,c=u,u=a,a=s+h|0,s=l,l=o,o=i,i=h+m|0}this.A=i+this.A|0,this.B=o+this.B|0,this.C=l+this.C|0,this.D=s+this.D|0,this.E=a+this.E|0,this.F=u+this.F|0,this.G=c+this.G|0,this.H=d+this.H|0}},{key:"digest",value:function(n){var r=this._byte,i=this._word,o=this._size%Ve.inputBytes|0;for(r[o++]=128;o&3;)r[o++]=0;if(o>>=2,o>Ve.highIndex){for(;o<Ve.inputWords;)i[o++]=0;o=0,this._int32(i)}for(;o<Ve.inputWords;)i[o++]=0;var l=this._size*8,s=(l&4294967295)>>>0,a=(l-s)/4294967296;return a&&(i[Ve.highIndex]=fr(a)),s&&(i[Ve.lowIndex]=fr(s)),this._int32(i),n==="hex"?this._hex():this._bin()}},{key:"_hex",value:function(){var n=this.A,r=this.B,i=this.C,o=this.D,l=this.E,s=this.F,a=this.G,u=this.H;return bi(n)+bi(r)+bi(i)+bi(o)+bi(l)+bi(s)+bi(a)+bi(u)}},{key:"_bin",value:function(){var n=this.A,r=this.B,i=this.C,o=this.D,l=this.E,s=this.F,a=this.G,u=this.H,c=this._byte,d=this._word;return d[0]=fr(n),d[1]=fr(r),d[2]=fr(i),d[3]=fr(o),d[4]=fr(l),d[5]=fr(s),d[6]=fr(a),d[7]=fr(u),c.slice(0,32)}}]),e}(),ko=new Int32Array(Ve.workWords),fc,Ys=0,bi=function(t){return(t+4294967296).toString(16).substr(-8)},DN=function(t){return t<<24&4278190080|t<<8&16711680|t>>8&65280|t>>24&255},LN=function(t){return t},fr=WN()?LN:DN,IN=function(t,n,r){return r^t&(n^r)},jN=function(t,n,r){return t&n|r&(t|n)},zN=function(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)},FN=function(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)},BN=function(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3},UN=function(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10};function WN(){var e=new Uint8Array(new Uint16Array([65279]).buffer);return e[0]===254}var VN=function(t){return AN().update(t).digest("hex")};function eu(){eu=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(O,A,k){O[A]=k.value},o=typeof Symbol=="function"?Symbol:{},l=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(O,A,k){return Object.defineProperty(O,A,{value:k,enumerable:!0,configurable:!0,writable:!0}),O[A]}try{u({},"")}catch{u=function(A,k,j){return A[k]=j}}function c(O,A,k,j){var I=A&&A.prototype instanceof v?A:v,Z=Object.create(I.prototype),ne=new V(j||[]);return i(Z,"_invoke",{value:R(O,k,ne)}),Z}function d(O,A,k){try{return{type:"normal",arg:O.call(A,k)}}catch(j){return{type:"throw",arg:j}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",m="executing",g="completed",w={};function v(){}function y(){}function _(){}var S={};u(S,l,function(){return this});var E=Object.getPrototypeOf,$=E&&E(E(K([])));$&&$!==n&&r.call($,l)&&(S=$);var C=_.prototype=v.prototype=Object.create(S);function T(O){["next","throw","return"].forEach(function(A){u(O,A,function(k){return this._invoke(A,k)})})}function N(O,A){function k(I,Z,ne,ke){var ve=d(O[I],O,Z);if(ve.type!=="throw"){var We=ve.arg,Fe=We.value;return Fe&&typeof Fe=="object"&&r.call(Fe,"__await")?A.resolve(Fe.__await).then(function(te){k("next",te,ne,ke)},function(te){k("throw",te,ne,ke)}):A.resolve(Fe).then(function(te){We.value=te,ne(We)},function(te){return k("throw",te,ne,ke)})}ke(ve.arg)}var j;i(this,"_invoke",{value:function(I,Z){function ne(){return new A(function(ke,ve){k(I,Z,ke,ve)})}return j=j?j.then(ne,ne):ne()}})}function R(O,A,k){var j=f;return function(I,Z){if(j===m)throw new Error("Generator is already running");if(j===g){if(I==="throw")throw Z;return{value:e,done:!0}}for(k.method=I,k.arg=Z;;){var ne=k.delegate;if(ne){var ke=D(ne,k);if(ke){if(ke===w)continue;return ke}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(j===f)throw j=g,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);j=m;var ve=d(O,A,k);if(ve.type==="normal"){if(j=k.done?g:h,ve.arg===w)continue;return{value:ve.arg,done:k.done}}ve.type==="throw"&&(j=g,k.method="throw",k.arg=ve.arg)}}}function D(O,A){var k=A.method,j=O.iterator[k];if(j===e)return A.delegate=null,k==="throw"&&O.iterator.return&&(A.method="return",A.arg=e,D(O,A),A.method==="throw")||k!=="return"&&(A.method="throw",A.arg=new TypeError("The iterator does not provide a '"+k+"' method")),w;var I=d(j,O.iterator,A.arg);if(I.type==="throw")return A.method="throw",A.arg=I.arg,A.delegate=null,w;var Z=I.arg;return Z?Z.done?(A[O.resultName]=Z.value,A.next=O.nextLoc,A.method!=="return"&&(A.method="next",A.arg=e),A.delegate=null,w):Z:(A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,w)}function F(O){var A={tryLoc:O[0]};1 in O&&(A.catchLoc=O[1]),2 in O&&(A.finallyLoc=O[2],A.afterLoc=O[3]),this.tryEntries.push(A)}function se(O){var A=O.completion||{};A.type="normal",delete A.arg,O.completion=A}function V(O){this.tryEntries=[{tryLoc:"root"}],O.forEach(F,this),this.reset(!0)}function K(O){if(O||O===""){var A=O[l];if(A)return A.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var k=-1,j=function I(){for(;++k<O.length;)if(r.call(O,k))return I.value=O[k],I.done=!1,I;return I.value=e,I.done=!0,I};return j.next=j}}throw new TypeError(typeof O+" is not iterable")}return y.prototype=_,i(C,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:y,configurable:!0}),y.displayName=u(_,a,"GeneratorFunction"),t.isGeneratorFunction=function(O){var A=typeof O=="function"&&O.constructor;return!!A&&(A===y||(A.displayName||A.name)==="GeneratorFunction")},t.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,_):(O.__proto__=_,u(O,a,"GeneratorFunction")),O.prototype=Object.create(C),O},t.awrap=function(O){return{__await:O}},T(N.prototype),u(N.prototype,s,function(){return this}),t.AsyncIterator=N,t.async=function(O,A,k,j,I){I===void 0&&(I=Promise);var Z=new N(c(O,A,k,j),I);return t.isGeneratorFunction(A)?Z:Z.next().then(function(ne){return ne.done?ne.value:Z.next()})},T(C),u(C,a,"Generator"),u(C,l,function(){return this}),u(C,"toString",function(){return"[object Generator]"}),t.keys=function(O){var A=Object(O),k=[];for(var j in A)k.push(j);return k.reverse(),function I(){for(;k.length;){var Z=k.pop();if(Z in A)return I.value=Z,I.done=!1,I}return I.done=!0,I}},t.values=K,V.prototype={constructor:V,reset:function(O){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(se),!O)for(var A in this)A.charAt(0)==="t"&&r.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=e)},stop:function(){this.done=!0;var O=this.tryEntries[0].completion;if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(O){if(this.done)throw O;var A=this;function k(ve,We){return Z.type="throw",Z.arg=O,A.next=ve,We&&(A.method="next",A.arg=e),!!We}for(var j=this.tryEntries.length-1;j>=0;--j){var I=this.tryEntries[j],Z=I.completion;if(I.tryLoc==="root")return k("end");if(I.tryLoc<=this.prev){var ne=r.call(I,"catchLoc"),ke=r.call(I,"finallyLoc");if(ne&&ke){if(this.prev<I.catchLoc)return k(I.catchLoc,!0);if(this.prev<I.finallyLoc)return k(I.finallyLoc)}else if(ne){if(this.prev<I.catchLoc)return k(I.catchLoc,!0)}else{if(!ke)throw new Error("try statement without catch or finally");if(this.prev<I.finallyLoc)return k(I.finallyLoc)}}}},abrupt:function(O,A){for(var k=this.tryEntries.length-1;k>=0;--k){var j=this.tryEntries[k];if(j.tryLoc<=this.prev&&r.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var I=j;break}}I&&(O==="break"||O==="continue")&&I.tryLoc<=A&&A<=I.finallyLoc&&(I=null);var Z=I?I.completion:{};return Z.type=O,Z.arg=A,I?(this.method="next",this.next=I.finallyLoc,w):this.complete(Z)},complete:function(O,A){if(O.type==="throw")throw O.arg;return O.type==="break"||O.type==="continue"?this.next=O.arg:O.type==="return"?(this.rval=this.arg=O.arg,this.method="return",this.next="end"):O.type==="normal"&&A&&(this.next=A),w},finish:function(O){for(var A=this.tryEntries.length-1;A>=0;--A){var k=this.tryEntries[A];if(k.finallyLoc===O)return this.complete(k.completion,k.afterLoc),se(k),w}},catch:function(O){for(var A=this.tryEntries.length-1;A>=0;--A){var k=this.tryEntries[A];if(k.tryLoc===O){var j=k.completion;if(j.type==="throw"){var I=j.arg;se(k)}return I}}throw new Error("illegal catch attempt")},delegateYield:function(O,A,k){return this.delegate={iterator:K(O),resultName:A,nextLoc:k},this.method==="next"&&(this.arg=e),w}},t}function C0(e,t,n,r,i,o,l){try{var s=e[o](l),a=s.value}catch(u){n(u);return}s.done?t(a):Promise.resolve(a).then(r,i)}function Gw(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function l(a){C0(o,r,i,l,s,"next",a)}function s(a){C0(o,r,i,l,s,"throw",a)}l(void 0)})}}var HN=function(){function e(t){lr(this,e),this.host=t}return sr(e,[{key:"getDisableUrl",value:function(n){return"".concat(this.host,"/disable?redirect_to=").concat(encodeURIComponent(n))}},{key:"getLoginUrl",value:function(n){return"".concat(this.host,"/authorize?redirect_to=").concat(encodeURIComponent(n))}},{key:"getEnableUrl",value:function(n){return"".concat(this.host,"/enable?redirect_to=").concat(encodeURIComponent(n))}},{key:"getPatches",value:function(){var t=Gw(eu().mark(function r(i){var o,l,s;return eu().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return o=i.patchIds,l=i.headers,s=o?"?".concat(o.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 Qs(c)}).catch(Xs));case 3:case"end":return u.stop()}},r,this)}));function n(r){return t.apply(this,arguments)}return n}()},{key:"getEditUrl",value:function(){return"".concat(this.host,"/static/edit")}},{key:"postPatches",value:function(n,r,i){return fetch("".concat(this.host,"/patches/~"),{headers:i||{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(ye({},n,r))}).then(function(o){return Qs(o)}).catch(Xs)}},{key:"getSession",value:function(){return fetch("".concat(this.host,"/session")).then(function(n){return Qs(n).catch(Xs)})}},{key:"getTree",value:function(n){var r=n.patch,i=r===void 0?!1:r,o=n.includeSchema,l=o===void 0?!1:o,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",i.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 Qs(h)}).catch(Xs)}},{key:"postCommit",value:function(n){var r=n.patches,i=n.headers;return fetch("".concat(this.host,"/commit"),{method:"POST",body:JSON.stringify({patches:r}),headers:i||{"Content-Type":"application/json"}}).then(function(o){return Qs(o)}).catch(Xs)}}]),e}();function Xs(e){return Br({statusCode:500,message:e instanceof Error?e.message:"Unknown error"})}function Qs(e){return Zp.apply(this,arguments)}function Zp(){return Zp=Gw(eu().mark(function e(t){var n;return eu().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(i.prev=0,!t.ok){i.next=9;break}return i.t0=jo,i.next=5,t.json();case 5:return i.t1=i.sent,i.abrupt("return",i.t0.ok.call(i.t0,i.t1));case 9:return i.prev=9,i.next=12,t.json();case 12:return n=i.sent,i.abrupt("return",Br({statusCode:t.status,message:n.message||t.statusText,details:n.details||Object.fromEntries(Object.entries(n).filter(function(o){var l=Ji(o,1),s=l[0];return s!=="message"}))}));case 16:return i.prev=16,i.t2=i.catch(9),i.abrupt("return",Br({statusCode:t.status,message:t.statusText}));case 19:i.next=24;break;case 21:return i.prev=21,i.t3=i.catch(0),i.abrupt("return",Br({message:i.t3 instanceof Error?i.t3.message:"Unknown error"}));case 24:case"end":return i.stop()}},e,null,[[0,21],[9,16]])})),Zp.apply(this,arguments)}var jn={convertFileSource:Vw,getSchema:aN,getValPath:dN,getVal:TN,getSource:yN,resolvePath:$N,splitModuleIdAndModulePath:xN,isVal:cN,createValPathOfItem:er,getSHA256Hash:VN,createPatchJSONPath:function(t){return"/".concat(t.split(".").map(function(n){return n&&KN(n)}).join("/"))},VAL_ENABLE_COOKIE_NAME:"val_enable",VAL_STATE_COOKIE:"val_state",VAL_SESSION_COOKIE:"val_session"};function KN(e){try{return JSON.parse(e)}catch{return e}}var Yw={exports:{}};/*!
|
|
44
44
|
Copyright (c) 2018 Jed Watson.
|
|
45
45
|
Licensed under the MIT License (MIT), see
|
|
46
46
|
http://jedwatson.github.io/classnames
|
|
47
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var l=typeof o;if(l==="string"||l==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&r.push(s)}}else if(l==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&r.push(a)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Yw);var ZN=Yw.exports;const wf=$u(ZN);function ie(){return ie=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},ie.apply(this,arguments)}function GN(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Xw(...e){return t=>e.forEach(n=>GN(n,t))}function st(...e){return p.useCallback(Xw(...e),e)}const as=p.forwardRef((e,t)=>{const{children:n,...r}=e,i=p.Children.toArray(n),o=i.find(XN);if(o){const l=o.props.children,s=i.map(a=>a===o?p.Children.count(l)>1?p.Children.only(null):p.isValidElement(l)?l.props.children:null:a);return p.createElement(Gp,ie({},r,{ref:t}),p.isValidElement(l)?p.cloneElement(l,void 0,s):null)}return p.createElement(Gp,ie({},r,{ref:t}),n)});as.displayName="Slot";const Gp=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...QN(r,n.props),ref:t?Xw(t,n.ref):n.ref}):p.Children.count(n)>1?p.Children.only(null):null});Gp.displayName="SlotClone";const YN=({children:e})=>p.createElement(p.Fragment,null,e);function XN(e){return p.isValidElement(e)&&e.type===YN}function QN(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const JN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ke=JN.reduce((e,t)=>{const n=p.forwardRef((r,i)=>{const{asChild:o,...l}=r,s=o?as:t;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(s,ie({},l,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function qN(e,t){e&&Gr.flushSync(()=>e.dispatchEvent(t))}const Un=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function e2(e,t){return p.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const Ss=e=>{const{present:t,children:n}=e,r=t2(t),i=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),o=st(r.ref,i.ref);return typeof n=="function"||r.isPresent?p.cloneElement(i,{ref:o}):null};Ss.displayName="Presence";function t2(e){const[t,n]=p.useState(),r=p.useRef({}),i=p.useRef(e),o=p.useRef("none"),l=e?"mounted":"unmounted",[s,a]=e2(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=hc(r.current);o.current=s==="mounted"?u:"none"},[s]),Un(()=>{const u=r.current,c=i.current;if(c!==e){const f=o.current,h=hc(u);e?a("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,a]),Un(()=>{if(t){const u=d=>{const h=hc(r.current).includes(d.animationName);d.target===t&&h&&Gr.flushSync(()=>a("ANIMATION_END"))},c=d=>{d.target===t&&(o.current=hc(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 hc(e){return(e==null?void 0:e.animationName)||"none"}function ol(e,t=[]){let n=[];function r(o,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 \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const i=()=>{const o=n.map(l=>p.createContext(l));return function(s){const a=(s==null?void 0:s[e])||o;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return i.scopeName=e,[r,n2(i,...t)]}function n2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((s,{useScope:a,scopeName:u})=>{const d=a(o)[`__scope${u}`];return{...s,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function en(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 r2=p.createContext(void 0);function Gg(e){const t=p.useContext(r2);return e||t||"ltr"}function Yp(e,[t,n]){return Math.min(n,Math.max(t,e))}function nt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function i2(e,t){return p.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const Qw="ScrollArea",[Jw,bL]=ol(Qw),[o2,ar]=Jw(Qw),l2=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=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),[_,w]=p.useState(0),[E,$]=p.useState(!1),[C,T]=p.useState(!1),N=st(t,D=>a(D)),R=Gg(i);return p.createElement(o2,{scope:n,type:r,dir:R,scrollHideDelay:o,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:m,scrollbarXEnabled:E,onScrollbarXEnabledChange:$,scrollbarY:g,onScrollbarYChange:S,scrollbarYEnabled:C,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeightChange:w},p.createElement(Ke.div,ie({dir:R},l,{ref:N,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})))}),s2="ScrollAreaViewport",a2=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...i}=e,o=ar(s2,n),l=p.useRef(null),s=st(t,l,o.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(Ke.div,ie({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style}}),p.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),_i="ScrollAreaScrollbar",qw=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ar(_i,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=i,s=e.orientation==="horizontal";return p.useEffect(()=>(s?o(!0):l(!0),()=>{s?o(!1):l(!1)}),[s,o,l]),i.type==="hover"?p.createElement(u2,ie({},r,{ref:t,forceMount:n})):i.type==="scroll"?p.createElement(c2,ie({},r,{ref:t,forceMount:n})):i.type==="auto"?p.createElement(eS,ie({},r,{ref:t,forceMount:n})):i.type==="always"?p.createElement(Yg,ie({},r,{ref:t})):null}),u2=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ar(_i,e.__scopeScrollArea),[o,l]=p.useState(!1);return p.useEffect(()=>{const s=i.scrollArea;let a=0;if(s){const u=()=>{window.clearTimeout(a),l(!0)},c=()=>{a=window.setTimeout(()=>l(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(a),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),p.createElement(Ss,{present:n||o},p.createElement(eS,ie({"data-state":o?"visible":"hidden"},r,{ref:t})))}),c2=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ar(_i,e.__scopeScrollArea),o=e.orientation==="horizontal",l=Ef(()=>a("SCROLL_END"),100),[s,a]=i2("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"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,i.scrollHideDelay,a]),p.useEffect(()=>{const u=i.viewport,c=o?"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)}},[i.viewport,o,a,l]),p.createElement(Ss,{present:n||s!=="hidden"},p.createElement(Yg,ie({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:nt(e.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:nt(e.onPointerLeave,()=>a("POINTER_LEAVE"))})))}),eS=p.forwardRef((e,t)=>{const n=ar(_i,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,l]=p.useState(!1),s=e.orientation==="horizontal",a=Ef(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,c=n.viewport.offsetHeight<n.viewport.scrollHeight;l(s?u:c)}},10);return us(n.viewport,a),us(n.content,a),p.createElement(Ss,{present:r||o},p.createElement(Yg,ie({"data-state":o?"visible":"hidden"},i,{ref:t})))}),Yg=p.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=ar(_i,e.__scopeScrollArea),o=p.useRef(null),l=p.useRef(0),[s,a]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=iS(s.viewport,s.content),c={...r,sizes:s,onSizesChange:a,hasThumb:u>0&&u<1,onThumbChange:f=>o.current=f,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:f=>l.current=f};function d(f,h){return y2(f,l.current,s,h)}return n==="horizontal"?p.createElement(d2,ie({},c,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollLeft,h=k0(f,s,i.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollLeft=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollLeft=d(f,i.dir))}})):n==="vertical"?p.createElement(f2,ie({},c,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollTop,h=k0(f,s);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollTop=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollTop=d(f))}})):null}),d2=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=ar(_i,e.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=st(t,a,o.onScrollbarXChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(nS,ie({"data-orientation":"horizontal"},i,{ref:u,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Sf(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(o.viewport){const f=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),lS(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:_d(l.paddingLeft),paddingEnd:_d(l.paddingRight)}})}}))}),f2=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=ar(_i,e.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=st(t,a,o.onScrollbarYChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(nS,ie({"data-orientation":"vertical"},i,{ref:u,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Sf(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(o.viewport){const f=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),lS(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:_d(l.paddingTop),paddingEnd:_d(l.paddingBottom)}})}}))}),[h2,tS]=Jw(_i),nS=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:s,onThumbPositionChange:a,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,h=ar(_i,n),[m,g]=p.useState(null),S=st(t,N=>g(N)),v=p.useRef(null),y=p.useRef(""),_=h.viewport,w=r.content-r.viewport,E=en(c),$=en(a),C=Ef(d,10);function T(N){if(v.current){const R=N.clientX-v.current.left,D=N.clientY-v.current.top;u({x:R,y:D})}}return p.useEffect(()=>{const N=R=>{const D=R.target;(m==null?void 0:m.contains(D))&&E(R,w)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[_,m,w,E]),p.useEffect($,[r,$]),us(m,C),us(h.content,C),p.createElement(h2,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:en(o),onThumbPointerUp:en(l),onThumbPositionChange:$,onThumbPointerDown:en(s)},p.createElement(Ke.div,ie({},f,{ref:S,style:{position:"absolute",...f.style},onPointerDown:nt(e.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),v.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),T(N))}),onPointerMove:nt(e.onPointerMove,T),onPointerUp:nt(e.onPointerUp,N=>{const R=N.target;R.hasPointerCapture(N.pointerId)&&R.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=y.current,h.viewport&&(h.viewport.style.scrollBehavior=""),v.current=null})})))}),Xp="ScrollAreaThumb",p2=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=tS(Xp,e.__scopeScrollArea);return p.createElement(Ss,{present:n||i.hasThumb},p.createElement(m2,ie({ref:t},r)))}),m2=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=ar(Xp,n),l=tS(Xp,n),{onThumbPositionChange:s}=l,a=st(t,d=>l.onThumbChange(d)),u=p.useRef(),c=Ef(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const d=o.viewport;if(d){const f=()=>{if(c(),!u.current){const h=x2(d,s);u.current=h,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[o.viewport,c,s]),p.createElement(Ke.div,ie({"data-state":l.hasThumb?"visible":"hidden"},i,{ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:nt(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:nt(e.onPointerUp,l.onThumbPointerUp)}))}),rS="ScrollAreaCorner",g2=p.forwardRef((e,t)=>{const n=ar(rS,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.createElement(v2,ie({},e,{ref:t})):null}),v2=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=ar(rS,n),[o,l]=p.useState(0),[s,a]=p.useState(0),u=!!(o&&s);return us(i.scrollbarX,()=>{var c;const d=((c=i.scrollbarX)===null||c===void 0?void 0:c.offsetHeight)||0;i.onCornerHeightChange(d),a(d)}),us(i.scrollbarY,()=>{var c;const d=((c=i.scrollbarY)===null||c===void 0?void 0:c.offsetWidth)||0;i.onCornerWidthChange(d),l(d)}),u?p.createElement(Ke.div,ie({},r,{ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function _d(e){return e?parseInt(e,10):0}function iS(e,t){const n=e/t;return isNaN(n)?0:n}function Sf(e){const t=iS(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function y2(e,t,n,r="ltr"){const i=Sf(n),o=i/2,l=t||o,s=i-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 oS([a,u],d)(e)}function k0(e,t,n="ltr"){const r=Sf(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,l=t.content-t.viewport,s=o-r,a=n==="ltr"?[0,l]:[l*-1,0],u=Yp(e,a);return oS([0,l],[0,s])(u)}function oS(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 lS(e,t){return e>0&&e<t}const x2=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},l=n.left!==o.left,s=n.top!==o.top;(l||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function Ef(e,t){const n=en(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 us(e,t){const n=en(t);Un(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}const sS=l2,_2=a2,w2=g2;function aS(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=aS(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function uS(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=aS(e))&&(r&&(r+=" "),r+=t);return r}const Xg="-";function S2(e){const t=C2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function i(l){const s=l.split(Xg);return s[0]===""&&s.length!==1&&s.shift(),cS(s,t)||E2(l)}function o(l,s){const a=n[l]||[];return s&&r[l]?[...a,...r[l]]:a}return{getClassGroupId:i,getConflictingClassGroupIds:o}}function cS(e,t){var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?cS(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Xg);return(l=t.validators.find(({validator:s})=>s(o)))==null?void 0:l.classGroupId}const $0=/^\[(.+)\]$/;function E2(e){if($0.test(e)){const t=$0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function C2(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return $2(Object.entries(e.classGroups),n).forEach(([o,l])=>{Qp(l,r,o,t)}),r}function Qp(e,t,n,r){e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:b0(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(k2(i)){Qp(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,l])=>{Qp(l,b0(t,o),n,r)})})}function b0(e,t){let n=e;return t.split(Xg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function k2(e){return e.isThemeGetter}function $2(e,t){return t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([l,s])=>[t+l,s])):o);return[n,i]}):e}function b2(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function i(o,l){n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return i(o,l),l},set(o,l){n.has(o)?n.set(o,l):i(o,l)}}}const dS="!";function T2(e){const t=e.separator,n=t.length===1,r=t[0],i=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+i)===t)){s.push(l.slice(u,g)),u=g+i;continue}if(S==="/"){c=g;continue}}S==="["?a++:S==="]"&&a--}const d=s.length===0?l:l.substring(u),f=d.startsWith(dS),h=f?d.substring(1):d,m=c&&c>u?c-u:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}}}function N2(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 R2(e){return{cache:b2(e.cacheSize),splitModifiers:T2(e),...S2(e)}}const O2=/\s+/;function P2(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=new Set;return e.trim().split(O2).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=N2(s).join(":");return{isTailwindClass:!0,modifierId:a?h+dS: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 o.has(c)?!1:(o.add(c),i(a,u).forEach(d=>o.add(s+d)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function A2(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=fS(t))&&(r&&(r+=" "),r+=n);return r}function fS(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=fS(e[r]))&&(n&&(n+=" "),n+=t);return n}function M2(e,...t){let n,r,i,o=l;function l(a){const u=t.reduce((c,d)=>d(c),e());return n=R2(u),r=n.cache.get,i=n.cache.set,o=s,s(a)}function s(a){const u=r(a);if(u)return u;const c=P2(a,n);return i(a,c),c}return function(){return o(A2.apply(null,arguments))}}function qe(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const hS=/^\[(?:([a-z-]+):)?(.+)\]$/i,D2=/^\d+\/\d+$/,I2=new Set(["px","full","screen"]),L2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,j2=/\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$/,z2=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,F2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function hr(e){return Mo(e)||I2.has(e)||D2.test(e)}function Ti(e){return Es(e,"length",G2)}function Mo(e){return!!e&&!Number.isNaN(Number(e))}function pc(e){return Es(e,"number",Mo)}function Xs(e){return!!e&&Number.isInteger(Number(e))}function B2(e){return e.endsWith("%")&&Mo(e.slice(0,-1))}function Ee(e){return hS.test(e)}function Ni(e){return L2.test(e)}const U2=new Set(["length","size","percentage"]);function W2(e){return Es(e,U2,pS)}function V2(e){return Es(e,"position",pS)}const H2=new Set(["image","url"]);function K2(e){return Es(e,H2,X2)}function Z2(e){return Es(e,"",Y2)}function Qs(){return!0}function Es(e,t,n){const r=hS.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function G2(e){return j2.test(e)}function pS(){return!1}function Y2(e){return z2.test(e)}function X2(e){return F2.test(e)}function Q2(){const e=qe("colors"),t=qe("spacing"),n=qe("blur"),r=qe("brightness"),i=qe("borderColor"),o=qe("borderRadius"),l=qe("borderSpacing"),s=qe("borderWidth"),a=qe("contrast"),u=qe("grayscale"),c=qe("hueRotate"),d=qe("invert"),f=qe("gap"),h=qe("gradientColorStops"),m=qe("gradientColorStopPositions"),g=qe("inset"),S=qe("margin"),v=qe("opacity"),y=qe("padding"),_=qe("saturate"),w=qe("scale"),E=qe("sepia"),$=qe("skew"),C=qe("space"),T=qe("translate"),N=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",Ee,t],F=()=>[Ee,t],se=()=>["",hr,Ti],V=()=>["auto",Mo,Ee],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],k=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",Ee],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[Mo,pc],ne=()=>[Mo,Ee];return{cacheSize:500,separator:":",theme:{colors:[Qs],spacing:[hr,Ti],blur:["none","",Ni,Ee],brightness:Z(),borderColor:[e],borderRadius:["none","","full",Ni,Ee],borderSpacing:F(),borderWidth:se(),contrast:Z(),grayscale:j(),hueRotate:ne(),invert:j(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[B2,Ti],inset:D(),margin:D(),opacity:Z(),padding:F(),saturate:Z(),scale:Z(),sepia:j(),skew:ne(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",Ee]}],container:["container"],columns:[{columns:[Ni]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:[...K(),Ee]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],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",Xs,Ee]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ee]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Xs,Ee]}],"grid-cols":[{"grid-cols":[Qs]}],"col-start-end":[{col:["auto",{span:["full",Xs,Ee]},Ee]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[Qs]}],"row-start-end":[{row:["auto",{span:[Xs,Ee]},Ee]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ee]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...k()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...k(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...k(),"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":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Ee,t]}],"min-w":[{"min-w":["min","max","fit",Ee,hr]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Ni]},Ni,Ee]}],h:[{h:[Ee,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",hr,Ee]}],"max-h":[{"max-h":[Ee,t,"min","max","fit"]}],"font-size":[{text:["base",Ni,Ti]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pc]}],"font-family":[{font:[Qs]}],"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",Ee]}],"line-clamp":[{"line-clamp":["none",Mo,pc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",hr,Ee]}],"list-image":[{"list-image":["none",Ee]}],"list-style-type":[{list:["none","disc","decimal",Ee]}],"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:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",hr,Ti]}],"underline-offset":[{"underline-offset":["auto",hr,Ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee]}],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",Ee]}],"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:[...K(),V2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",W2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},K2]}],"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:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"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:[...O(),"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:O()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[hr,Ee]}],"outline-w":[{outline:[hr,Ti]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[hr,Ti]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ni,Z2]}],"shadow-color":[{shadow:[Qs]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":A()}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",Ni,Ee]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[_]}],sepia:[{sepia:[E]}],"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":[_]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"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",Ee]}],duration:[{duration:ne()}],ease:[{ease:["linear","in","out","in-out",Ee]}],delay:[{delay:ne()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[Xs,Ee]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ee]}],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",Ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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",Ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[hr,Ti,pc]}],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 J2=M2(Q2);function xt(...e){return J2(uS(e))}const wa=p.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(sS,{ref:r,className:xt("relative overflow-hidden",e),...n,children:[x.jsx(_2,{className:"h-full w-full rounded-[inherit]",children:t}),x.jsx(mS,{}),x.jsx(w2,{})]}));wa.displayName=sS.displayName;const mS=p.forwardRef(({className:e,orientation:t="vertical",...n},r)=>x.jsx(qw,{ref:r,orientation:t,className:xt("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:x.jsx(p2,{className:xt("relative rounded-full bg-border",t==="vertical"&&"flex-1")})}));mS.displayName=qw.displayName;function Sa({children:e}){const t=p.useRef(null),n=p.useRef(null),r=p.useRef(!1),i=p.useRef(0),o=p.useRef(null),l=p.useRef(0),s=()=>{r.current=!1,o.current=null,i.current=0,l.current=0},a=S=>{S.preventDefault();const v=o.current==="left"?t:n;if(v.current&&r.current){const y=o.current==="left"?S.screenX-i.current:i.current-S.screenX;v.current.style.width=`${Math.max(l.current+y,150)}px`}},u=S=>v=>{if(v.target){const _=S==="left"?t:S==="right"?n:null;r.current=!0,_&&_.current&&(i.current=v.screenX,o.current=S,_.current&&(l.current=_.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)}),[]),x.jsxs("div",{className:"flex h-screen",children:[x.jsxs("div",{ref:t,className:"relative border-r border-border",style:{width:300},children:[x.jsxs(Sa.Column,{children:[c,x.jsx(wa,{style:{height:"calc(100vh - 50px)"},children:d})]}),x.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")})]}),x.jsx("div",{className:wf("",{"w-full":!m&&!g}),children:x.jsxs(Sa.Column,{children:[f,x.jsx(wa,{style:{height:"calc(100vh - 50px)"},children:h})]})}),m||g&&x.jsxs("div",{ref:n,className:"relative h-screen border-l border-border",style:{width:300},children:[x.jsxs(Sa.Column,{children:[m,x.jsx(wa,{style:{height:"calc(100vh - 50px)"},children:g})]}),x.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"})]})]})}Sa.Column=({children:e})=>{const[t,n]=p.Children.toArray(e);return x.jsxs("div",{className:"flex flex-col",children:[x.jsx("div",{className:"flex items-center border-b border-border",children:t}),n]})};const q2=({className:e})=>x.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 9 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[x.jsxs("g",{clipPath:"url(#clip0_1225_1638)",children:[x.jsx("rect",{y:"0.5",width:"9",height:"9"}),x.jsx("path",{d:"M0 7L8.5 5",stroke:"currentColor"}),x.jsx("circle",{cx:"3",cy:"3.5",r:"1",fill:"currentColor"})]}),x.jsx("rect",{x:"0.5",y:"1",width:"8",height:"8",stroke:"currentColor"}),x.jsx("defs",{children:x.jsx("clipPath",{id:"clip0_1225_1638",children:x.jsx("rect",{y:"0.5",width:"9",height:"9",fill:"white"})})})]}),gS=q2,eR=({className:e})=>x.jsxs("svg",{width:"9",height:"10",viewBox:"0 0 9 10",className:e,fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[x.jsxs("g",{clipPath:"url(#clip0_1222_1618)",children:[x.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.5H0V0.5H9V1.5Z",fill:"currentColor"}),x.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 9.5H0V8.5H9V9.5Z",fill:"currentColor"})]}),x.jsx("defs",{children:x.jsx("clipPath",{id:"clip0_1222_1618",children:x.jsx("rect",{width:"9",height:"9",fill:"white",transform:"translate(0 0.5)"})})})]}),tR=eR,nR=({className:e})=>x.jsx("svg",{width:"9",height:"10",viewBox:"0 0 9 10",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,children:x.jsx("g",{clipPath:"url(#clip0_1229_1625)",children:x.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"})})}),rR=nR;function vS({children:e,rootPath:t}){return x.jsx("div",{className:"flex flex-col w-full py-2 text-xs",children:p.Children.map(e,n=>p.cloneElement(n,{paths:[t]}))})}vS.Node=({children:e,paths:t=[],path:n,level:r=1,type:i,setActivePath:o})=>{const l=r*30,s=i==="string"?x.jsx(rR,{}):i==="image"?x.jsx(gS,{className:"h-[9px] w-[9px]"}):x.jsx(tR,{});return x.jsxs("div",{className:"w-full",children:[x.jsx("button",{className:"flex justify-between w-full group py-2 text-xs font-[400] shrink-0",onClick:()=>{o&&o(n)},style:{paddingLeft:l},children:x.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s,x.jsx("p",{children:n})]})}),e&&x.jsx(x.Fragment,{children:p.Children.map(e,a=>p.cloneElement(a,{level:r+1,paths:[...t,n]}))})]})};function Qg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ll=Qg();function yS(e){ll=e}const xS=/[&<>"']/,iR=new RegExp(xS.source,"g"),_S=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,oR=new RegExp(_S.source,"g"),lR={"&":"&","<":"<",">":">",'"':""","'":"'"},T0=e=>lR[e];function Mn(e,t){if(t){if(xS.test(e))return e.replace(iR,T0)}else if(_S.test(e))return e.replace(oR,T0);return e}const sR=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function aR(e){return e.replace(sR,(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 uR=/(^|[^\[])\^/g;function Be(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,i)=>(i=typeof i=="object"&&"source"in i?i.source:i,i=i.replace(uR,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}function N0(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const wd={exec:()=>null};function R0(e,t){const n=e.replace(/\|/g,(o,l,s)=>{let a=!1,u=l;for(;--u>=0&&s[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let i=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(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function mc(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o===t&&!n)i++;else if(o!==t&&n)i++;else break}return e.slice(0,r-i)}function cR(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 O0(e,t,n,r){const i=t.href,o=t.title?Mn(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:i,title:o,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,s}return{type:"image",raw:n,href:i,title:o,text:Mn(l)}}function dR(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
|
|
47
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var l=typeof o;if(l==="string"||l==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&r.push(s)}}else if(l==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&r.push(a)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Yw);var ZN=Yw.exports;const wf=Tu(ZN);function ie(){return ie=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},ie.apply(this,arguments)}function GN(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Xw(...e){return t=>e.forEach(n=>GN(n,t))}function st(...e){return p.useCallback(Xw(...e),e)}const us=p.forwardRef((e,t)=>{const{children:n,...r}=e,i=p.Children.toArray(n),o=i.find(XN);if(o){const l=o.props.children,s=i.map(a=>a===o?p.Children.count(l)>1?p.Children.only(null):p.isValidElement(l)?l.props.children:null:a);return p.createElement(Gp,ie({},r,{ref:t}),p.isValidElement(l)?p.cloneElement(l,void 0,s):null)}return p.createElement(Gp,ie({},r,{ref:t}),n)});us.displayName="Slot";const Gp=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...QN(r,n.props),ref:t?Xw(t,n.ref):n.ref}):p.Children.count(n)>1?p.Children.only(null):null});Gp.displayName="SlotClone";const YN=({children:e})=>p.createElement(p.Fragment,null,e);function XN(e){return p.isValidElement(e)&&e.type===YN}function QN(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const JN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ke=JN.reduce((e,t)=>{const n=p.forwardRef((r,i)=>{const{asChild:o,...l}=r,s=o?us:t;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(s,ie({},l,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function qN(e,t){e&&Gr.flushSync(()=>e.dispatchEvent(t))}const Un=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function e2(e,t){return p.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const Es=e=>{const{present:t,children:n}=e,r=t2(t),i=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),o=st(r.ref,i.ref);return typeof n=="function"||r.isPresent?p.cloneElement(i,{ref:o}):null};Es.displayName="Presence";function t2(e){const[t,n]=p.useState(),r=p.useRef({}),i=p.useRef(e),o=p.useRef("none"),l=e?"mounted":"unmounted",[s,a]=e2(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=hc(r.current);o.current=s==="mounted"?u:"none"},[s]),Un(()=>{const u=r.current,c=i.current;if(c!==e){const f=o.current,h=hc(u);e?a("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,a]),Un(()=>{if(t){const u=d=>{const h=hc(r.current).includes(d.animationName);d.target===t&&h&&Gr.flushSync(()=>a("ANIMATION_END"))},c=d=>{d.target===t&&(o.current=hc(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 hc(e){return(e==null?void 0:e.animationName)||"none"}function ll(e,t=[]){let n=[];function r(o,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,w=p.useMemo(()=>m,Object.values(m));return p.createElement(g.Provider,{value:w},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 \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const i=()=>{const o=n.map(l=>p.createContext(l));return function(s){const a=(s==null?void 0:s[e])||o;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return i.scopeName=e,[r,n2(i,...t)]}function n2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((s,{useScope:a,scopeName:u})=>{const d=a(o)[`__scope${u}`];return{...s,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function en(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 r2=p.createContext(void 0);function Gg(e){const t=p.useContext(r2);return e||t||"ltr"}function Yp(e,[t,n]){return Math.min(n,Math.max(t,e))}function nt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function i2(e,t){return p.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const Qw="ScrollArea",[Jw,TI]=ll(Qw),[o2,ar]=Jw(Qw),l2=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...l}=e,[s,a]=p.useState(null),[u,c]=p.useState(null),[d,f]=p.useState(null),[h,m]=p.useState(null),[g,w]=p.useState(null),[v,y]=p.useState(0),[_,S]=p.useState(0),[E,$]=p.useState(!1),[C,T]=p.useState(!1),N=st(t,D=>a(D)),R=Gg(i);return p.createElement(o2,{scope:n,type:r,dir:R,scrollHideDelay:o,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:m,scrollbarXEnabled:E,onScrollbarXEnabledChange:$,scrollbarY:g,onScrollbarYChange:w,scrollbarYEnabled:C,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeightChange:S},p.createElement(Ke.div,ie({dir:R},l,{ref:N,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})))}),s2="ScrollAreaViewport",a2=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...i}=e,o=ar(s2,n),l=p.useRef(null),s=st(t,l,o.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(Ke.div,ie({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style}}),p.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),_i="ScrollAreaScrollbar",qw=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ar(_i,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=i,s=e.orientation==="horizontal";return p.useEffect(()=>(s?o(!0):l(!0),()=>{s?o(!1):l(!1)}),[s,o,l]),i.type==="hover"?p.createElement(u2,ie({},r,{ref:t,forceMount:n})):i.type==="scroll"?p.createElement(c2,ie({},r,{ref:t,forceMount:n})):i.type==="auto"?p.createElement(eS,ie({},r,{ref:t,forceMount:n})):i.type==="always"?p.createElement(Yg,ie({},r,{ref:t})):null}),u2=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ar(_i,e.__scopeScrollArea),[o,l]=p.useState(!1);return p.useEffect(()=>{const s=i.scrollArea;let a=0;if(s){const u=()=>{window.clearTimeout(a),l(!0)},c=()=>{a=window.setTimeout(()=>l(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(a),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),p.createElement(Es,{present:n||o},p.createElement(eS,ie({"data-state":o?"visible":"hidden"},r,{ref:t})))}),c2=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ar(_i,e.__scopeScrollArea),o=e.orientation==="horizontal",l=Ef(()=>a("SCROLL_END"),100),[s,a]=i2("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"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,i.scrollHideDelay,a]),p.useEffect(()=>{const u=i.viewport,c=o?"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)}},[i.viewport,o,a,l]),p.createElement(Es,{present:n||s!=="hidden"},p.createElement(Yg,ie({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:nt(e.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:nt(e.onPointerLeave,()=>a("POINTER_LEAVE"))})))}),eS=p.forwardRef((e,t)=>{const n=ar(_i,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,l]=p.useState(!1),s=e.orientation==="horizontal",a=Ef(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,c=n.viewport.offsetHeight<n.viewport.scrollHeight;l(s?u:c)}},10);return cs(n.viewport,a),cs(n.content,a),p.createElement(Es,{present:r||o},p.createElement(Yg,ie({"data-state":o?"visible":"hidden"},i,{ref:t})))}),Yg=p.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=ar(_i,e.__scopeScrollArea),o=p.useRef(null),l=p.useRef(0),[s,a]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=iS(s.viewport,s.content),c={...r,sizes:s,onSizesChange:a,hasThumb:u>0&&u<1,onThumbChange:f=>o.current=f,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:f=>l.current=f};function d(f,h){return y2(f,l.current,s,h)}return n==="horizontal"?p.createElement(d2,ie({},c,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollLeft,h=k0(f,s,i.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollLeft=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollLeft=d(f,i.dir))}})):n==="vertical"?p.createElement(f2,ie({},c,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollTop,h=k0(f,s);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollTop=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollTop=d(f))}})):null}),d2=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=ar(_i,e.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=st(t,a,o.onScrollbarXChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(nS,ie({"data-orientation":"horizontal"},i,{ref:u,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Sf(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(o.viewport){const f=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),lS(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:_d(l.paddingLeft),paddingEnd:_d(l.paddingRight)}})}}))}),f2=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=ar(_i,e.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=st(t,a,o.onScrollbarYChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(nS,ie({"data-orientation":"vertical"},i,{ref:u,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Sf(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(o.viewport){const f=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),lS(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:_d(l.paddingTop),paddingEnd:_d(l.paddingBottom)}})}}))}),[h2,tS]=Jw(_i),nS=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:s,onThumbPositionChange:a,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,h=ar(_i,n),[m,g]=p.useState(null),w=st(t,N=>g(N)),v=p.useRef(null),y=p.useRef(""),_=h.viewport,S=r.content-r.viewport,E=en(c),$=en(a),C=Ef(d,10);function T(N){if(v.current){const R=N.clientX-v.current.left,D=N.clientY-v.current.top;u({x:R,y:D})}}return p.useEffect(()=>{const N=R=>{const D=R.target;(m==null?void 0:m.contains(D))&&E(R,S)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[_,m,S,E]),p.useEffect($,[r,$]),cs(m,C),cs(h.content,C),p.createElement(h2,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:en(o),onThumbPointerUp:en(l),onThumbPositionChange:$,onThumbPointerDown:en(s)},p.createElement(Ke.div,ie({},f,{ref:w,style:{position:"absolute",...f.style},onPointerDown:nt(e.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),v.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),T(N))}),onPointerMove:nt(e.onPointerMove,T),onPointerUp:nt(e.onPointerUp,N=>{const R=N.target;R.hasPointerCapture(N.pointerId)&&R.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=y.current,h.viewport&&(h.viewport.style.scrollBehavior=""),v.current=null})})))}),Xp="ScrollAreaThumb",p2=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=tS(Xp,e.__scopeScrollArea);return p.createElement(Es,{present:n||i.hasThumb},p.createElement(m2,ie({ref:t},r)))}),m2=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=ar(Xp,n),l=tS(Xp,n),{onThumbPositionChange:s}=l,a=st(t,d=>l.onThumbChange(d)),u=p.useRef(),c=Ef(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const d=o.viewport;if(d){const f=()=>{if(c(),!u.current){const h=x2(d,s);u.current=h,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[o.viewport,c,s]),p.createElement(Ke.div,ie({"data-state":l.hasThumb?"visible":"hidden"},i,{ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:nt(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:nt(e.onPointerUp,l.onThumbPointerUp)}))}),rS="ScrollAreaCorner",g2=p.forwardRef((e,t)=>{const n=ar(rS,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.createElement(v2,ie({},e,{ref:t})):null}),v2=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=ar(rS,n),[o,l]=p.useState(0),[s,a]=p.useState(0),u=!!(o&&s);return cs(i.scrollbarX,()=>{var c;const d=((c=i.scrollbarX)===null||c===void 0?void 0:c.offsetHeight)||0;i.onCornerHeightChange(d),a(d)}),cs(i.scrollbarY,()=>{var c;const d=((c=i.scrollbarY)===null||c===void 0?void 0:c.offsetWidth)||0;i.onCornerWidthChange(d),l(d)}),u?p.createElement(Ke.div,ie({},r,{ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function _d(e){return e?parseInt(e,10):0}function iS(e,t){const n=e/t;return isNaN(n)?0:n}function Sf(e){const t=iS(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function y2(e,t,n,r="ltr"){const i=Sf(n),o=i/2,l=t||o,s=i-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 oS([a,u],d)(e)}function k0(e,t,n="ltr"){const r=Sf(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,l=t.content-t.viewport,s=o-r,a=n==="ltr"?[0,l]:[l*-1,0],u=Yp(e,a);return oS([0,l],[0,s])(u)}function oS(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 lS(e,t){return e>0&&e<t}const x2=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},l=n.left!==o.left,s=n.top!==o.top;(l||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function Ef(e,t){const n=en(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 cs(e,t){const n=en(t);Un(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}const sS=l2,_2=a2,w2=g2;function aS(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=aS(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function uS(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=aS(e))&&(r&&(r+=" "),r+=t);return r}const Xg="-";function S2(e){const t=C2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function i(l){const s=l.split(Xg);return s[0]===""&&s.length!==1&&s.shift(),cS(s,t)||E2(l)}function o(l,s){const a=n[l]||[];return s&&r[l]?[...a,...r[l]]:a}return{getClassGroupId:i,getConflictingClassGroupIds:o}}function cS(e,t){var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?cS(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Xg);return(l=t.validators.find(({validator:s})=>s(o)))==null?void 0:l.classGroupId}const $0=/^\[(.+)\]$/;function E2(e){if($0.test(e)){const t=$0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function C2(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return $2(Object.entries(e.classGroups),n).forEach(([o,l])=>{Qp(l,r,o,t)}),r}function Qp(e,t,n,r){e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:b0(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(k2(i)){Qp(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,l])=>{Qp(l,b0(t,o),n,r)})})}function b0(e,t){let n=e;return t.split(Xg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function k2(e){return e.isThemeGetter}function $2(e,t){return t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([l,s])=>[t+l,s])):o);return[n,i]}):e}function b2(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function i(o,l){n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return i(o,l),l},set(o,l){n.has(o)?n.set(o,l):i(o,l)}}}const dS="!";function T2(e){const t=e.separator,n=t.length===1,r=t[0],i=t.length;return function(l){const s=[];let a=0,u=0,c;for(let g=0;g<l.length;g++){let w=l[g];if(a===0){if(w===r&&(n||l.slice(g,g+i)===t)){s.push(l.slice(u,g)),u=g+i;continue}if(w==="/"){c=g;continue}}w==="["?a++:w==="]"&&a--}const d=s.length===0?l:l.substring(u),f=d.startsWith(dS),h=f?d.substring(1):d,m=c&&c>u?c-u:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}}}function N2(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 R2(e){return{cache:b2(e.cacheSize),splitModifiers:T2(e),...S2(e)}}const O2=/\s+/;function P2(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=new Set;return e.trim().split(O2).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=N2(s).join(":");return{isTailwindClass:!0,modifierId:a?h+dS: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 o.has(c)?!1:(o.add(c),i(a,u).forEach(d=>o.add(s+d)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function A2(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=fS(t))&&(r&&(r+=" "),r+=n);return r}function fS(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=fS(e[r]))&&(n&&(n+=" "),n+=t);return n}function M2(e,...t){let n,r,i,o=l;function l(a){const u=t.reduce((c,d)=>d(c),e());return n=R2(u),r=n.cache.get,i=n.cache.set,o=s,s(a)}function s(a){const u=r(a);if(u)return u;const c=P2(a,n);return i(a,c),c}return function(){return o(A2.apply(null,arguments))}}function qe(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const hS=/^\[(?:([a-z-]+):)?(.+)\]$/i,D2=/^\d+\/\d+$/,L2=new Set(["px","full","screen"]),I2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,j2=/\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$/,z2=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,F2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function hr(e){return Mo(e)||L2.has(e)||D2.test(e)}function Ti(e){return Cs(e,"length",G2)}function Mo(e){return!!e&&!Number.isNaN(Number(e))}function pc(e){return Cs(e,"number",Mo)}function Js(e){return!!e&&Number.isInteger(Number(e))}function B2(e){return e.endsWith("%")&&Mo(e.slice(0,-1))}function Ee(e){return hS.test(e)}function Ni(e){return I2.test(e)}const U2=new Set(["length","size","percentage"]);function W2(e){return Cs(e,U2,pS)}function V2(e){return Cs(e,"position",pS)}const H2=new Set(["image","url"]);function K2(e){return Cs(e,H2,X2)}function Z2(e){return Cs(e,"",Y2)}function qs(){return!0}function Cs(e,t,n){const r=hS.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function G2(e){return j2.test(e)}function pS(){return!1}function Y2(e){return z2.test(e)}function X2(e){return F2.test(e)}function Q2(){const e=qe("colors"),t=qe("spacing"),n=qe("blur"),r=qe("brightness"),i=qe("borderColor"),o=qe("borderRadius"),l=qe("borderSpacing"),s=qe("borderWidth"),a=qe("contrast"),u=qe("grayscale"),c=qe("hueRotate"),d=qe("invert"),f=qe("gap"),h=qe("gradientColorStops"),m=qe("gradientColorStopPositions"),g=qe("inset"),w=qe("margin"),v=qe("opacity"),y=qe("padding"),_=qe("saturate"),S=qe("scale"),E=qe("sepia"),$=qe("skew"),C=qe("space"),T=qe("translate"),N=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",Ee,t],F=()=>[Ee,t],se=()=>["",hr,Ti],V=()=>["auto",Mo,Ee],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],k=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",Ee],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[Mo,pc],ne=()=>[Mo,Ee];return{cacheSize:500,separator:":",theme:{colors:[qs],spacing:[hr,Ti],blur:["none","",Ni,Ee],brightness:Z(),borderColor:[e],borderRadius:["none","","full",Ni,Ee],borderSpacing:F(),borderWidth:se(),contrast:Z(),grayscale:j(),hueRotate:ne(),invert:j(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[B2,Ti],inset:D(),margin:D(),opacity:Z(),padding:F(),saturate:Z(),scale:Z(),sepia:j(),skew:ne(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",Ee]}],container:["container"],columns:[{columns:[Ni]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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:[...K(),Ee]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],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",Js,Ee]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ee]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Js,Ee]}],"grid-cols":[{"grid-cols":[qs]}],"col-start-end":[{col:["auto",{span:["full",Js,Ee]},Ee]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[qs]}],"row-start-end":[{row:["auto",{span:[Js,Ee]},Ee]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ee]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...k()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...k(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...k(),"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:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Ee,t]}],"min-w":[{"min-w":["min","max","fit",Ee,hr]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Ni]},Ni,Ee]}],h:[{h:[Ee,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",hr,Ee]}],"max-h":[{"max-h":[Ee,t,"min","max","fit"]}],"font-size":[{text:["base",Ni,Ti]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pc]}],"font-family":[{font:[qs]}],"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",Ee]}],"line-clamp":[{"line-clamp":["none",Mo,pc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",hr,Ee]}],"list-image":[{"list-image":["none",Ee]}],"list-style-type":[{list:["none","disc","decimal",Ee]}],"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:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",hr,Ti]}],"underline-offset":[{"underline-offset":["auto",hr,Ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee]}],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",Ee]}],"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:[...K(),V2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",W2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},K2]}],"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:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"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:[...O(),"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:O()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[hr,Ee]}],"outline-w":[{outline:[hr,Ti]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[hr,Ti]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ni,Z2]}],"shadow-color":[{shadow:[qs]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":A()}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",Ni,Ee]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[_]}],sepia:[{sepia:[E]}],"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":[_]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"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",Ee]}],duration:[{duration:ne()}],ease:[{ease:["linear","in","out","in-out",Ee]}],delay:[{delay:ne()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Js,Ee]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ee]}],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",Ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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",Ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[hr,Ti,pc]}],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 J2=M2(Q2);function xt(...e){return J2(uS(e))}const Ea=p.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(sS,{ref:r,className:xt("relative overflow-hidden",e),...n,children:[x.jsx(_2,{className:"h-full w-full rounded-[inherit]",children:t}),x.jsx(mS,{}),x.jsx(w2,{})]}));Ea.displayName=sS.displayName;const mS=p.forwardRef(({className:e,orientation:t="vertical",...n},r)=>x.jsx(qw,{ref:r,orientation:t,className:xt("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:x.jsx(p2,{className:xt("relative rounded-full bg-border",t==="vertical"&&"flex-1")})}));mS.displayName=qw.displayName;function Ca({children:e}){const t=p.useRef(null),n=p.useRef(null),r=p.useRef(!1),i=p.useRef(0),o=p.useRef(null),l=p.useRef(0),s=()=>{r.current=!1,o.current=null,i.current=0,l.current=0},a=w=>{w.preventDefault();const v=o.current==="left"?t:n;if(v.current&&r.current){const y=o.current==="left"?w.screenX-i.current:i.current-w.screenX;v.current.style.width=`${Math.max(l.current+y,150)}px`}},u=w=>v=>{if(v.target){const _=w==="left"?t:w==="right"?n:null;r.current=!0,_&&_.current&&(i.current=v.screenX,o.current=w,_.current&&(l.current=_.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)}),[]),x.jsxs("div",{className:"flex h-screen",children:[x.jsxs("div",{ref:t,className:"relative border-r border-border",style:{width:300},children:[x.jsxs(Ca.Column,{children:[c,x.jsx(Ea,{style:{height:"calc(100vh - 50px)"},children:d})]}),x.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")})]}),x.jsx("div",{className:wf("",{"w-full":!m&&!g}),children:x.jsxs(Ca.Column,{children:[f,x.jsx(Ea,{style:{height:"calc(100vh - 50px)"},children:h})]})}),m||g&&x.jsxs("div",{ref:n,className:"relative h-screen border-l border-border",style:{width:300},children:[x.jsxs(Ca.Column,{children:[m,x.jsx(Ea,{style:{height:"calc(100vh - 50px)"},children:g})]}),x.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"})]})]})}Ca.Column=({children:e})=>{const[t,n]=p.Children.toArray(e);return x.jsxs("div",{className:"flex flex-col",children:[x.jsx("div",{className:"flex items-center border-b border-border",children:t}),n]})};const q2=({className:e})=>x.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 9 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[x.jsxs("g",{clipPath:"url(#clip0_1225_1638)",children:[x.jsx("rect",{y:"0.5",width:"9",height:"9"}),x.jsx("path",{d:"M0 7L8.5 5",stroke:"currentColor"}),x.jsx("circle",{cx:"3",cy:"3.5",r:"1",fill:"currentColor"})]}),x.jsx("rect",{x:"0.5",y:"1",width:"8",height:"8",stroke:"currentColor"}),x.jsx("defs",{children:x.jsx("clipPath",{id:"clip0_1225_1638",children:x.jsx("rect",{y:"0.5",width:"9",height:"9",fill:"white"})})})]}),gS=q2,eR=({className:e})=>x.jsxs("svg",{width:"9",height:"10",viewBox:"0 0 9 10",className:e,fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[x.jsxs("g",{clipPath:"url(#clip0_1222_1618)",children:[x.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.5H0V0.5H9V1.5Z",fill:"currentColor"}),x.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 9.5H0V8.5H9V9.5Z",fill:"currentColor"})]}),x.jsx("defs",{children:x.jsx("clipPath",{id:"clip0_1222_1618",children:x.jsx("rect",{width:"9",height:"9",fill:"white",transform:"translate(0 0.5)"})})})]}),tR=eR,nR=({className:e})=>x.jsx("svg",{width:"9",height:"10",viewBox:"0 0 9 10",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,children:x.jsx("g",{clipPath:"url(#clip0_1229_1625)",children:x.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"})})}),rR=nR;function vS({children:e,rootPath:t}){return x.jsx("div",{className:"flex flex-col w-full py-2 text-xs",children:p.Children.map(e,n=>p.cloneElement(n,{paths:[t]}))})}vS.Node=({children:e,paths:t=[],path:n,level:r=1,type:i,setActivePath:o})=>{const l=r*30,s=i==="string"?x.jsx(rR,{}):i==="image"?x.jsx(gS,{className:"h-[9px] w-[9px]"}):x.jsx(tR,{});return x.jsxs("div",{className:"w-full",children:[x.jsx("button",{className:"flex justify-between w-full group py-2 text-xs font-[400] shrink-0",onClick:()=>{o&&o(n)},style:{paddingLeft:l},children:x.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s,x.jsx("p",{children:n})]})}),e&&x.jsx(x.Fragment,{children:p.Children.map(e,a=>p.cloneElement(a,{level:r+1,paths:[...t,n]}))})]})};var L={};let Cf={},yS={},tu={},ka={},Jp={},Yl={},Qg={},qp={},nu={},ru={},Ui={},Jg={},qg={},xS={},_S={},wS={},SS={},ES={},CS={},kS={},wd={},$S={},bS={},TS={},NS={},RS={},OS={},PS={},AS={},MS={},ev={},tv={},em={},DS={},LS={},IS={};function H(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 wi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iR=wi&&"documentMode"in document?document.documentMode:null,Qt=wi&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ro=wi&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Sd=wi&&"InputEvent"in window&&!iR?"getTargetRanges"in new window.InputEvent("input"):!1,nv=wi&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),kf=wi&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,oR=wi&&/^(?=.*Chrome).*/i.test(navigator.userAgent),rv=wi&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!oR,$f=nv||kf||rv?" ":"",lR=ro?" ":$f,sR=/^[^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]/,aR=/^[^\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]/,zo={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},uR={directionless:1,unmergeable:2},T0={center:2,end:6,justify:4,left:1,right:3,start:5},cR={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},dR={normal:0,segmented:2,token:1},fR={0:"normal",2:"segmented",1:"token"},tm=!1,iv=0;function hR(e){iv=e.timeStamp}function Nh(e,t,n){return t.__lexicalLineBreak===e||e[`__lexicalKey_${n._key}`]!==void 0}function pR(e){return e.getEditorState().read(()=>{let t=rt();return t!==null?t.clone():null})}function jS(e,t,n){tm=!0;let r=100<performance.now()-iv;try{Wn(e,()=>{let i=rt()||pR(e);var o=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=Iu(m,s);if(!(g===null&&m!==l||tt(g))){if(h==="characterData"){if(f=r&&J(g))e:{f=i,h=m;var w=g;if(me(f)){var v=f.anchor.getNode();if(v.is(w)&&f.format!==v.getFormat()){f=!1;break e}}f=h.nodeType===3&&w.isAttached()}f&&(w=Xr(e._window),h=f=null,w!==null&&w.anchorNode===m&&(f=w.anchorOffset,h=w.focusOffset),m=m.nodeValue,m!==null&&cv(g,m,f,h,!1))}else if(h==="childList"){for(u=!0,h=f.addedNodes,w=0;w<h.length;w++){v=h[w];var y=HS(v),_=v.parentNode;_==null||v===a||y!==null||v.nodeName==="BR"&&Nh(v,_,e)||(ro&&(y=v.innerText||v.nodeValue)&&(c+=y),_.removeChild(v))}if(f=f.removedNodes,h=f.length,0<h){for(w=0,v=0;v<h;v++)_=f[v],(_.nodeName==="BR"&&Nh(_,m,e)||a===_)&&(m.appendChild(_),w++);h!==w&&(m===l&&(g=s._nodeMap.get("root")),o.set(m,g))}}}}if(0<o.size)for(let[S,E]of o)if(B(E))for(o=E.getChildrenKeys(),l=S.firstChild,s=0;s<o.length;s++)a=e.getElementByKey(o[s]),a!==null&&(l==null?(S.appendChild(a),l=a):l!==a&&S.replaceChild(a,l),l=l.nextSibling);else J(E)&&E.markDirty();if(o=n.takeRecords(),0<o.length){for(l=0;l<o.length;l++)for(a=o[l],s=a.addedNodes,a=a.target,d=0;d<s.length;d++)g=s[d],m=g.parentNode,m==null||g.nodeName!=="BR"||Nh(g,a,e)||m.removeChild(g);n.takeRecords()}i!==null&&(u&&(i.dirty=!0,Wr(i)),ro&&YS(e)&&i.insertRawText(c))})}finally{tm=!1}}function zS(e){let t=e._observer;if(t!==null){let n=t.takeRecords();jS(e,n,t)}}function FS(e){iv===0&&Tf(e).addEventListener("textInput",hR,!0),e._observer=new MutationObserver((t,n)=>{jS(e,t,n)})}function N0(e,t){let n=e.__mode,r=e.__format;e=e.__style;let i=t.__mode,o=t.__format;return t=t.__style,(n===null||n===i)&&(r===null||r===o)&&(e===null||e===t)}function R0(e,t){let n=e.mergeWithSibling(t),r=pt()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function BS(e){if(e.__text===""&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;(t=e.getPreviousSibling())!==null&&J(t)&&t.isSimpleText()&&!t.isUnmergeable();)if(t.__text==="")t.remove();else{N0(t,e)&&(e=R0(t,e));break}for(var n;(n=e.getNextSibling())!==null&&J(n)&&n.isSimpleText()&&!n.isUnmergeable();)if(n.__text==="")n.remove();else{N0(e,n)&&R0(e,n);break}}}function ov(e){return O0(e.anchor),O0(e.focus),e}function O0(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),J(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}else if(!B(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let mR=1,gR=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function lv(e){let t=document.activeElement;if(t===null)return!1;let n=t.nodeName;return tt(Iu(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&t.__lexicalEditor==null)}function Lu(e,t,n){let r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!lv(t)&&sv(t)===e}catch{return!1}}function sv(e){for(;e!=null;){let t=e.__lexicalEditor;if(t!=null)return t;e=bf(e)}return null}function nm(e){return e.isToken()||e.isSegmented()}function Ed(e){for(;e!=null;){if(e.nodeType===3)return e;e=e.firstChild}return null}function US(e,t,n){return t=zo[t],e&t&&(n===null||!(n&t))?e^t:n===null||n&t?e|t:e}function WS(e){return J(e)||su(e)||tt(e)}function VS(e,t){if(t!=null)e.__key=t;else{hn(),99<au&&H(14),t=pt();var n=Qr(),r=""+mR++;n._nodeMap.set(r,e),B(e)?t._dirtyElements.set(r,!0):t._dirtyLeaves.add(r),t._cloneNotNeeded.add(r),t._dirtyType=1,e.__key=r}}function Fo(e){var t=e.getParent();if(t!==null){let i=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 o=e.getWritable();o.__prev=r.__key,r.__next=o.__key}else r.__next=null;i.__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,i.__next=null),t.__size--,i.__parent=null}}function Cd(e){99<au&&H(14);var t=e.getLatest(),n=t.__parent,r=Qr();let i=pt(),o=r._nodeMap;if(r=i._dirtyElements,n!==null)e:for(;n!==null;){if(r.has(n))break e;let l=o.get(n);if(l===void 0)break;r.set(n,!1),n=l.__parent}t=t.__key,i._dirtyType=1,B(e)?r.set(t,!0):i._dirtyLeaves.add(t)}function Kt(e){hn();var t=pt();let n=t._compositionKey;e!==n&&(t._compositionKey=e,n!==null&&(t=It(n),t!==null&&t.getWritable()),e!==null&&(e=It(e),e!==null&&e.getWritable()))}function Wi(){return Ns()?null:pt()._compositionKey}function It(e,t){return e=(t||Qr())._nodeMap.get(e),e===void 0?null:e}function HS(e,t){let n=pt();return e=e[`__lexicalKey_${n._key}`],e!==void 0?It(e,t):null}function Iu(e,t){for(;e!=null;){let n=HS(e,t);if(n!==null)return n;e=bf(e)}return null}function KS(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t}function P0(e){return e.read(()=>Yr().getTextContent())}function vR(e,t){Wn(e,()=>{var n=Qr();if(!n.isEmpty())if(t==="root")Yr().markDirty();else{n=n._nodeMap;for(let[,r]of n)r.markDirty()}},e._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Yr(){return Qr()._nodeMap.get("root")}function Wr(e){hn();let t=Qr();e!==null&&(e.dirty=!0,e._cachedNodes=null),t._selection=e}function zl(e){var t=pt(),n;e:{for(n=e;n!=null;){let r=n[`__lexicalKey_${t._key}`];if(r!==void 0){n=r;break e}n=bf(n)}n=null}return n===null?(t=t.getRootElement(),e===t?It("root"):null):It(n)}function ZS(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function av(e){let t=[];for(;e!==null;)t.push(e),e=e._parentEditor;return t}function GS(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function uv(e,t,n){if(t=Xr(t._window),t!==null){var r=t.anchorNode,{anchorOffset:i,focusOffset:o}=t;if(r!==null&&(t=r.nodeType===3?r.nodeValue:null,r=Iu(r),t!==null&&J(r))){if(t===$f&&n){let l=n.length;t=n,o=i=l}t!==null&&cv(r,t,i,o,e)}}}function cv(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){let u=o.isComposing(),c=t;if((u||i)&&t[t.length-1]===$f&&(c=t.slice(0,-1)),t=o.getTextContent(),i||c!==t)if(c==="")if(Kt(null),nv||kf||rv)o.remove();else{let d=pt();setTimeout(()=>{d.update(()=>{o.isAttached()&&o.remove()})},20)}else{i=o.getParent(),t=Ts();var l=o.getTextContentSize(),s=Wi(),a=o.getKey();o.isToken()||s!==null&&a===s&&!u||me(t)&&(i!==null&&!i.canInsertTextBefore()&&t.anchor.offset===0||t.anchor.key===e.__key&&t.anchor.offset===0&&!o.canInsertTextBefore()||t.focus.key===e.__key&&t.focus.offset===l&&!o.canInsertTextAfter())?o.markDirty():(e=rt(),me(e)&&n!==null&&r!==null&&(e.setTextNodeRange(o,n,o,r),o.isSegmented()&&(n=o.getTextContent(),n=Dt(n),o.replace(n),o=n)),o.setTextContent(c))}}}function yR(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=(J(t)||B(t)&&t.isInline())&&!t.canInsertTextAfter()),e):e===t.getTextContentSize()?!t.canInsertTextAfter()||!n.canInsertTextAfter()||r:!1}function $a(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 dv(e,t,n,r,i){n.size!==0&&(n=r.__type,r=r.__key,t=t.get(n),t===void 0&&H(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"&&i==="created",(e===void 0||n)&&t.set(r,n?"updated":i))}function A0(e,t,n){let r=e.getParent(),i=n;return r!==null&&(t&&n===0?(i=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(i=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?i-1:i)}function rm(e,t){var n=e.offset;return e.type==="element"?(e=e.getNode(),A0(e,t,n)):(e=e.getNode(),t&&n===0||!t&&n===e.getTextContentSize()?(n=t?e.getPreviousSibling():e.getNextSibling(),n===null?A0(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n):null)}function YS(e){return e=(e=Tf(e).event)&&e.inputType,e==="insertFromPaste"||e==="insertFromPasteAsQuotation"}function kd(e){return!mn(e)&&!e.isLastChild()&&!e.isInline()}function $d(e,t){return e=e._keyToDOMMap.get(t),e===void 0&&H(75,t),e}function bf(e){return e=e.assignedSlot||e.parentElement,e!==null&&e.nodeType===11?e.host:e}function bd(e,t){for(e=e.getParent();e!==null;){if(e.is(t))return!0;e=e.getParent()}return!1}function Tf(e){return e=e._window,e===null&&H(78),e}function XS(e){for(e=e.getParentOrThrow();e!==null&&!xr(e);)e=e.getParentOrThrow();return e}function xr(e){return mn(e)||B(e)&&e.isShadowRoot()}function QS(e){return e=e.constructor.clone(e),VS(e,null),e}function ju(e){var t=pt();let n=e.constructor.getType();return t=t._nodes.get(n),t===void 0&&H(97),t=t.replace,t!==null?(t=t(e),t instanceof e.constructor||H(98),t):e}function Rh(e,t){e=e.getParent(),!mn(e)||B(t)||tt(t)||H(99)}function Oh(e){return(tt(e)||B(e)&&!e.canBeEmpty())&&!e.isInline()}function im(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,t=e.parentElement,t!==null&&t.removeChild(e)}function Xr(e){return wi?(e||window).getSelection():null}function JS(e,t){let n=e.getChildAtIndex(t);n==null&&(n=e),xr(e)&&H(102);let r=l=>{const s=l.getParentOrThrow(),a=xr(s),u=l!==n||a?QS(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]},[i,o]=r(n);return[i,o]}function Td(e,t){for(;e!==Yr()&&e!=null;){if(t(e))return e;e=e.getParent()}return null}function xR(e){let t=[],n=[e];for(;0<n.length;){let r=n.pop();r===void 0&&H(112),B(r)&&n.unshift(...r.getChildren()),r!==e&&t.push(r)}return t}function Nf(e){return e.nodeType===1}function qS(e,t,n,r,i,o){for(e=e.getFirstChild();e!==null;){let l=e.__key;e.__parent===t&&(B(e)&&qS(e,l,n,r,i,o),n.has(l)||o.delete(l),i.push(l)),e=e.getNextSibling()}}function _R(e,t,n,r){e=e._nodeMap,t=t._nodeMap;let i=[];for(let[o]of r){let l=t.get(o);l===void 0||l.isAttached()||(B(l)&&qS(l,o,e,t,i,r),e.has(o)||r.delete(o),i.push(o))}for(let o of i)t.delete(o);for(let o of n)r=t.get(o),r===void 0||r.isAttached()||(e.has(o)||n.delete(o),t.delete(o))}let Nt="",fn="",oi="",io,tn,iu,eE=!1,fv=!1,Rf,Bc=null,om,lm,Go,oo,sm,ou;function Uc(e,t){let n=Go.get(e);if(t!==null){let r=cm(e);r.parentNode===t&&t.removeChild(r)}oo.has(e)||tn._keyToDOMMap.delete(e),B(n)&&(e=Nd(n,Go),am(e,0,e.length-1,null)),n!==void 0&&dv(ou,iu,Rf,n,"destroyed")}function am(e,t,n,r){for(;t<=n;++t){let i=e[t];i!==void 0&&Uc(i,r)}}function $o(e,t){e.setProperty("text-align",t)}function tE(e,t){var n=io.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 nE(e,t){e=e.style,t===0?$o(e,""):t===1?$o(e,"left"):t===2?$o(e,"center"):t===3?$o(e,"right"):t===4?$o(e,"justify"):t===5?$o(e,"start"):t===6&&$o(e,"end")}function Wc(e,t,n){let r=oo.get(e);r===void 0&&H(60);let i=r.createDOM(io,tn);var o=tn._keyToDOMMap;if(i["__lexicalKey_"+tn._key]=e,o.set(e,i),J(r)?i.setAttribute("data-lexical-text","true"):tt(r)&&i.setAttribute("data-lexical-decorator","true"),B(r)){if(e=r.__indent,o=r.__size,e!==0&&tE(i,e),o!==0){--o,e=Nd(r,oo);var l=fn;fn="",um(e,r,0,o,i,null),iE(r,i),fn=l}e=r.__format,e!==0&&nE(i,e),r.isInline()||rE(null,r,i),kd(r)&&(Nt+=`
|
|
48
|
+
|
|
49
|
+
`,oi+=`
|
|
50
|
+
|
|
51
|
+
`)}else o=r.getTextContent(),tt(r)?(l=r.decorate(tn,io),l!==null&&oE(e,l),i.contentEditable="false"):J(r)&&(r.isDirectionless()||(fn+=o)),Nt+=o,oi+=o;return t!==null&&(n!=null?t.insertBefore(i,n):(n=t.__lexicalLineBreak,n!=null?t.insertBefore(i,n):t.appendChild(i))),dv(ou,iu,Rf,r,"created"),i}function um(e,t,n,r,i,o){let l=Nt;for(Nt="";n<=r;++n)Wc(e[n],i,o);kd(t)&&(Nt+=`
|
|
52
|
+
|
|
53
|
+
`),i.__lexicalTextContent=Nt,Nt=l+Nt}function M0(e,t){return e=t.get(e),su(e)||tt(e)&&e.isInline()}function rE(e,t,n){e=e!==null&&(e.__size===0||M0(e.__last,Go)),t=t.__size===0||M0(t.__last,oo),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 iE(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==fn||n!==Bc){let o=fn==="";if(o)var r=Bc;else r=fn,r=sR.test(r)?"rtl":aR.test(r)?"ltr":null;if(r!==n){let l=t.classList,s=io.theme;var i=n!==null?s[n]:void 0;let a=r!==null?s[r]:void 0;i!==void 0&&(typeof i=="string"&&(i=i.split(" "),i=s[n]=i),l.remove(...i)),r===null||o&&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),fv||(e.getWritable().__dir=r)}Bc=r,t.__lexicalDirTextContent=fn,t.__lexicalDir=r}}function Nd(e,t){let n=[];for(e=e.__first;e!==null;){let r=t.get(e);r===void 0&&H(101),n.push(e),e=r.__next}return n}function ca(e,t){var n=Go.get(e),r=oo.get(e);n!==void 0&&r!==void 0||H(61);var i=eE||lm.has(e)||om.has(e);let o=$d(tn,e);if(n===r&&!i)return B(n)?(r=o.__lexicalTextContent,r!==void 0&&(Nt+=r,oi+=r),r=o.__lexicalDirTextContent,r!==void 0&&(fn+=r)):(r=n.getTextContent(),J(n)&&!n.isDirectionless()&&(fn+=r),oi+=r,Nt+=r),o;if(n!==r&&i&&dv(ou,iu,Rf,r,"updated"),r.updateDOM(n,o,io))return r=Wc(e,null,null),t===null&&H(62),t.replaceChild(r,o),Uc(e,null),r;if(B(n)&&B(r)){if(e=r.__indent,e!==n.__indent&&tE(o,e),e=r.__format,e!==n.__format&&nE(o,e),i){e=r,i=fn,fn="",t=Nt;var l=n.__size,s=e.__size;if(Nt="",l===1&&s===1){var a=n.__first,u=e.__first;if(a===u)ca(a,o);else{var c=cm(a);u=Wc(u,null,null),o.replaceChild(u,c),Uc(a,null)}}else{u=Nd(n,Go);var d=Nd(e,oo);if(l===0)s!==0&&um(d,e,0,s-1,o,null);else if(s===0)l!==0&&(a=o.__lexicalLineBreak==null,am(u,0,l-1,a?null:o),a&&(o.textContent=""));else{var f=u;u=d,d=l-1,l=s-1;let m=o.firstChild,g=0;for(s=0;g<=d&&s<=l;){var h=f[g];let w=u[s];if(h===w)m=Ph(ca(w,o)),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(w);v?(y?(h=$d(tn,w),h===m?m=Ph(ca(w,o)):(m!=null?o.insertBefore(h,m):o.appendChild(h),ca(w,o)),g++):Wc(w,o,m),s++):(m=Ph(cm(h)),Uc(h,o),g++)}}a=g>d,c=s>l,a&&!c?(a=u[l+1],a=a===void 0?null:tn.getElementByKey(a),um(u,e,s,l,o,a)):c&&!a&&am(f,g,d,o)}}kd(e)&&(Nt+=`
|
|
54
|
+
|
|
55
|
+
`),o.__lexicalTextContent=Nt,Nt=t+Nt,iE(e,o),fn=i,mn(r)||r.isInline()||rE(n,r,o)}kd(r)&&(Nt+=`
|
|
56
|
+
|
|
57
|
+
`,oi+=`
|
|
58
|
+
|
|
59
|
+
`)}else n=r.getTextContent(),tt(r)?(i=r.decorate(tn,io),i!==null&&oE(e,i)):J(r)&&!r.isDirectionless()&&(fn+=n),Nt+=n,oi+=n;return!fv&&mn(r)&&r.__cachedText!==oi&&(r=r.getWritable(),r.__cachedText=oi),o}function oE(e,t){let n=tn._pendingDecorators,r=tn._decorators;if(n===null){if(r[e]===t)return;n=KS(tn)}n[e]=t}function Ph(e){return e=e.nextSibling,e!==null&&e===tn._blockCursorElement&&(e=e.nextSibling),e}function cm(e){let t=sm.get(e);return t===void 0&&H(75,e),t}let ei=Object.freeze({}),dm=[["keydown",TR],["pointerdown",SR],["compositionstart",$R],["compositionend",bR],["input",kR],["click",wR],["cut",ei],["copy",ei],["dragstart",ei],["dragover",ei],["dragend",ei],["paste",ei],["focus",ei],["blur",ei],["drop",ei]];Sd&&dm.push(["beforeinput",(e,t)=>CR(e,t)]);let lu=0,lE=0,sE=0,kl=null,ba=0,fm=!1,hm=!1,Ta=!1,da=!1,aE=[0,"",0,"root",0];function uE(e,t,n,r,i){let o=e.anchor,l=e.focus,s=o.getNode();var a=pt();let u=Xr(a._window),c=u!==null?u.anchorNode:null,d=o.key;a=a.getElementByKey(d);let f=n.length;return d!==l.key||!J(s)||(!i&&(!Sd||sE<r+50)||s.isDirty()&&2>f||ZS(n))&&o.offset!==l.offset&&!s.isComposing()||nm(s)||s.isDirty()&&1<f||(i||!Sd)&&a!==null&&!s.isComposing()&&c!==Ed(a)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||yR(e,s)}function D0(e,t){return e!==null&&e.nodeValue!==null&&e.nodeType===3&&t!==0&&t!==e.nodeValue.length}function L0(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:l}=e;fm&&(fm=!1,D0(r,i)&&D0(o,l))||Wn(t,()=>{if(!n)Wr(null);else if(Lu(t,r,o)){var s=rt();if(me(s)){var a=s.anchor,u=a.getNode();if(s.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(s.dirty=!0);var c=Tf(t).event;c=c?c.timeStamp:performance.now();let[d,f,h,m,g]=aE;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(J(h)&&(u=!0,a&=h.getFormat(),a===0))break}s.format=u?a:0}}X(t,Cf,void 0)}})}function wR(e,t){Wn(t,()=>{let n=rt();var r=Xr(t._window);let i=Ts();if(r)if(me(n)){let l=n.anchor;var o=l.getNode();l.type==="element"&&l.offset===0&&n.isCollapsed()&&!mn(o)&&Yr().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)?(r.removeAllRanges(),n.dirty=!0):e.detail!==3||n.isCollapsed()||(r=n.focus.getNode(),o!==r&&(B(o)?o.select(0):o.getParentOrThrow().select(0)))}else e.pointerType==="touch"&&(o=r.anchorNode,o!==null&&(o=o.nodeType,o===1||o===3))&&(r=pv(i,r,t),Wr(r));X(t,yS,e)})}function SR(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&e!=="touch"&&Wn(t,()=>{tt(Iu(n))||(hm=!0)})}function cE(e){return e.getTargetRanges?(e=e.getTargetRanges(),e.length===0?null:e[0]):null}function ER(e,t){return e!==t||B(e)||B(t)||!e.isToken()||!t.isToken()}function CR(e,t){let n=e.inputType,r=cE(e);n==="deleteCompositionText"||ro&&YS(t)||n!=="insertCompositionText"&&Wn(t,()=>{let i=rt();if(n==="deleteContentBackward"){if(i===null){var o=Ts();if(!me(o))return;Wr(o.clone())}if(me(i)){lE===229&&e.timeStamp<lu+30&&t.isComposing()&&i.anchor.key===i.focus.key?(Kt(null),lu=0,setTimeout(()=>{Wn(t,()=>{Kt(null)})},30),me(i)&&(o=i.anchor.getNode(),o.markDirty(),i.format=o.getFormat(),i.style=o.getStyle())):(e.preventDefault(),X(t,tu,!0));return}}if(me(i)){o=e.data,kl!==null&&uv(!1,t,kl),i.dirty&&kl===null||!i.isCollapsed()||mn(i.anchor.getNode())||r===null||i.applyDOMRange(r),kl=null;var l=i.focus,s=i.anchor.getNode();if(l=l.getNode(),n==="insertText"||n==="insertTranspose")o===`
|
|
60
|
+
`?(e.preventDefault(),X(t,ka,!1)):o===`
|
|
61
|
+
|
|
62
|
+
`?(e.preventDefault(),X(t,Jp,void 0)):o==null&&e.dataTransfer?(o=e.dataTransfer.getData("text/plain"),e.preventDefault(),i.insertRawText(o)):o!=null&&uE(i,r,o,e.timeStamp,!0)?(e.preventDefault(),X(t,Yl,o)):kl=o,sE=e.timeStamp;else switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":X(t,Yl,e);break;case"insertFromComposition":Kt(null),X(t,Yl,e);break;case"insertLineBreak":Kt(null),X(t,ka,!1);break;case"insertParagraph":Kt(null),Ta&&!kf?(Ta=!1,X(t,ka,!1)):X(t,Jp,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":X(t,Qg,e);break;case"deleteByComposition":ER(s,l)&&X(t,qp,e);break;case"deleteByDrag":case"deleteByCut":X(t,qp,e);break;case"deleteContent":X(t,tu,!1);break;case"deleteWordBackward":X(t,nu,!0);break;case"deleteWordForward":X(t,nu,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":X(t,ru,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":X(t,ru,!1);break;case"formatStrikeThrough":X(t,Ui,"strikethrough");break;case"formatBold":X(t,Ui,"bold");break;case"formatItalic":X(t,Ui,"italic");break;case"formatUnderline":X(t,Ui,"underline");break;case"historyUndo":X(t,Jg,void 0);break;case"historyRedo":X(t,qg,void 0)}}})}function kR(e,t){e.stopPropagation(),Wn(t,()=>{var n=rt(),r=e.data,i=cE(e);if(r!=null&&me(n)&&uE(n,i,r,e.timeStamp,!1)){da&&(pm(t,r),da=!1);var o=n.anchor,l=o.getNode();if(i=Xr(t._window),i===null)return;let s=o.offset;(o=Sd&&!n.isCollapsed()&&J(l)&&i.anchorNode!==null)&&(l=l.getTextContent().slice(0,s)+r+l.getTextContent().slice(s+n.focus.offset),i=i.anchorNode,o=l===(i.nodeType===3?i.nodeValue:null)),o||X(t,Yl,r),r=r.length,ro&&1<r&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=r),nv||kf||rv||!t.isComposing()||(lu=0,Kt(null))}else uv(!1,t,r!==null?r:void 0),da&&(pm(t,r||void 0),da=!1);hn(),n=pt(),zS(n)}),kl=null}function $R(e,t){Wn(t,()=>{let n=rt();if(me(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();Kt(r.key),(e.timeStamp<lu+30||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||i.getStyle()!==n.style)&&X(t,Yl,lR)}})}function pm(e,t){var n=e._compositionKey;if(Kt(null),n!==null&&t!=null){if(t===""){t=It(n),e=Ed(e.getElementByKey(n)),e!==null&&e.nodeValue!==null&&J(t)&&cv(t,e.nodeValue,null,null,!0);return}if(t[t.length-1]===`
|
|
63
|
+
`&&(n=rt(),me(n))){t=n.focus,n.anchor.set(t.key,t.offset,t.type),X(e,wd,null);return}}uv(!0,e,t)}function bR(e,t){ro?da=!0:Wn(t,()=>{pm(t,e.data)})}function TR(e,t){if(lu=e.timeStamp,lE=e.keyCode,!t.isComposing()){var{keyCode:n,shiftKey:r,ctrlKey:i,metaKey:o,altKey:l}=e;if(!X(t,xS,e)){if(n!==39||i||o||l)if(n!==39||l||r||!i&&!o)if(n!==37||i||o||l)if(n!==37||l||r||!i&&!o)if(n!==38||i||o)if(n!==40||i||o)if(n===13&&r)Ta=!0,X(t,wd,e);else if(n===32)X(t,$S,e);else if(Qt&&i&&n===79)e.preventDefault(),Ta=!0,X(t,ka,!0);else if(n!==13||r){var s=Qt?l||o?!1:n===8||n===72&&i:i||l||o?!1:n===8;s?n===8?X(t,bS,e):(e.preventDefault(),X(t,tu,!0)):n===27?X(t,TS,e):(s=Qt?r||l||o?!1:n===46||n===68&&i:i||l||o?!1:n===46,s?n===46?X(t,NS,e):(e.preventDefault(),X(t,tu,!1)):n===8&&(Qt?l:i)?(e.preventDefault(),X(t,nu,!0)):n===46&&(Qt?l:i)?(e.preventDefault(),X(t,nu,!1)):Qt&&o&&n===8?(e.preventDefault(),X(t,ru,!0)):Qt&&o&&n===46?(e.preventDefault(),X(t,ru,!1)):n===66&&!l&&(Qt?o:i)?(e.preventDefault(),X(t,Ui,"bold")):n===85&&!l&&(Qt?o:i)?(e.preventDefault(),X(t,Ui,"underline")):n===73&&!l&&(Qt?o:i)?(e.preventDefault(),X(t,Ui,"italic")):n!==9||l||i||o?n===90&&!r&&(Qt?o:i)?(e.preventDefault(),X(t,Jg,void 0)):(s=Qt?n===90&&o&&r:n===89&&i||n===90&&i&&r,s?(e.preventDefault(),X(t,qg,void 0)):bs(t._editorState._selection)?(s=r?!1:n===67?Qt?o:i:!1,s?(e.preventDefault(),X(t,ev,e)):(s=r?!1:n===88?Qt?o:i:!1,s?(e.preventDefault(),X(t,tv,e)):n===65&&(Qt?o:i)&&(e.preventDefault(),X(t,em,e)))):!ro&&n===65&&(Qt?o:i)&&(e.preventDefault(),X(t,em,e))):X(t,RS,e))}else Ta=!1,X(t,wd,e);else X(t,kS,e);else X(t,CS,e);else X(t,ES,e);else X(t,SS,e);else X(t,wS,e);else X(t,_S,e);(i||r||l||o)&&X(t,IS,e)}}}function dE(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}let Xl=new Map;function fE(e){e=e.target;let t=Xr(e==null?null:e.nodeType===9?e.defaultView:e.ownerDocument.defaultView);if(t!==null){var n=sv(t.anchorNode);if(n!==null){hm&&(hm=!1,Wn(n,()=>{var l=Ts(),s=t.anchorNode;s!==null&&(s=s.nodeType,s===1||s===3)&&(l=pv(l,t,n),Wr(l))})),e=av(n),e=e[e.length-1];var r=e._key,i=Xl.get(r),o=i||e;o!==n&&L0(t,o,!1),L0(t,n,!0),n!==e?Xl.set(r,n):i&&Xl.delete(r)}}}function NR(e,t){ba===0&&e.ownerDocument.addEventListener("selectionchange",fE),ba++,e.__lexicalEditor=t;let n=dE(e);for(let r=0;r<dm.length;r++){let[i,o]=dm[r],l=typeof o=="function"?s=>{s._lexicalHandled!==!0&&(s._lexicalHandled=!0,t.isEditable()&&o(s,t))}:s=>{if(s._lexicalHandled!==!0&&(s._lexicalHandled=!0,t.isEditable()))switch(i){case"cut":return X(t,tv,s);case"copy":return X(t,ev,s);case"paste":return X(t,Qg,s);case"dragstart":return X(t,PS,s);case"dragover":return X(t,AS,s);case"dragend":return X(t,MS,s);case"focus":return X(t,DS,s);case"blur":return X(t,LS,s);case"drop":return X(t,OS,s)}};e.addEventListener(i,l),n.push(()=>{e.removeEventListener(i,l)})}}function mm(e,t,n){hn();var r=e.__key;let i=e.getParent();if(i!==null){var o=rt();if(me(o)&&B(e)){var{anchor:l,focus:s}=o,a=l.getNode(),u=s.getNode();bd(a,e)&&l.set(e.__key,0,"element"),bd(u,e)&&s.set(e.__key,0,"element")}if(a=o,u=!1,me(a)&&t){o=a.anchor;let c=a.focus;o.key===r&&(Od(o,e,i,e.getPreviousSibling(),e.getNextSibling()),u=!0),c.key===r&&(Od(c,e,i,e.getPreviousSibling(),e.getNextSibling()),u=!0)}else bs(a)&&t&&e.isSelected()&&e.selectPrevious();me(a)&&t&&!u?(r=e.getIndexWithinParent(),Fo(e),Rd(a,i,r,-1)):Fo(e),n||xr(i)||i.canBeEmpty()||!i.isEmpty()||mm(i,t),t&&mn(i)&&i.isEmpty()&&i.selectEnd()}}class zu{static getType(){H(64,this.name)}static clone(){H(65,this.name)}constructor(t){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,VS(this,t)}getType(){return this.__type}isAttached(){for(var t=this.__key;t!==null;){if(t==="root")return!0;if(t=It(t),t===null)break;t=t.__parent}return!1}isSelected(t){if(t=t||rt(),t==null)return!1;let n=t.getNodes().some(r=>r.__key===this.__key);return J(this)?n:me(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:It(t)}getParentOrThrow(){let t=this.getParent();return t===null&&H(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){let n=t.getParent();if(xr(n))return t;t=n}return null}getTopLevelElementOrThrow(){let t=this.getTopLevelElement();return t===null&&H(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:It(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:It(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();B(this)&&n.unshift(this),B(t)&&r.unshift(t),t=n.length;var i=r.length;if(t===0||i===0||n[t-1]!==r[i-1])return null;for(r=new Set(r),i=0;i<t;i++){let o=n[i];if(r.has(o))return o}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 i=r.getParentOrThrow();if(i===n){i=r.getIndexWithinParent();break}r=i}for(r=t;;){if(t=r.getParentOrThrow(),t===n){n=r.getIndexWithinParent();break}r=t}return i<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=[],i=new Set;for(var o=this;;){var l=o.__key;if(i.has(l)||(i.add(l),r.push(o)),o===t)break;if(l=B(o)?n?o.getFirstChild():o.getLastChild():null,l!==null)o=l;else if(l=n?o.getNextSibling():o.getPreviousSibling(),l!==null)o=l;else{if(o=o.getParentOrThrow(),i.has(o.__key)||r.push(o),o===t)break;l=o;do l===null&&H(68),o=n?l.getNextSibling():l.getPreviousSibling(),l=l.getParent(),l!==null&&(o!==null||i.has(l.__key)||r.push(l));while(o===null)}}return n||r.reverse(),r}isDirty(){let t=pt()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){let t=It(this.__key);return t===null&&H(113),t}getWritable(){hn();var t=Qr(),n=pt();t=t._nodeMap;let r=this.__key,i=this.getLatest(),o=i.__parent;n=n._cloneNotNeeded;var l=rt();return l!==null&&(l._cachedNodes=null),n.has(r)?(Cd(i),i):(l=i.constructor.clone(i),l.__parent=o,l.__next=i.__next,l.__prev=i.__prev,B(i)&&B(l)?(l.__first=i.__first,l.__last=i.__last,l.__size=i.__size,l.__indent=i.__indent,l.__format=i.__format,l.__dir=i.__dir):J(i)&&J(l)&&(l.__format=i.__format,l.__style=i.__style,l.__mode=i.__mode,l.__detail=i.__detail),n.add(r),l.__key=r,Cd(l),t.set(r,l),l)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){H(70)}updateDOM(){H(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){H(72)}static importJSON(){H(18,this.name)}static transform(){return null}remove(t){mm(this,!0,t)}replace(t,n){hn();var r=rt();r!==null&&(r=r.clone()),Rh(this,t);let i=this.getLatest(),o=this.__key,l=t.__key,s=t.getWritable();t=this.getParentOrThrow().getWritable();let a=t.__size;Fo(s);let u=i.getPreviousSibling(),c=i.getNextSibling(),d=i.__prev,f=i.__next,h=i.__parent;return mm(i,!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)}),me(r)&&(Wr(r),n=r.anchor,r=r.focus,n.key===o&&z0(n,s),r.key===o&&z0(r,s)),Wi()===o&&Kt(l),s}insertAfter(t,n=!0){hn(),Rh(this,t);var r=this.getWritable();let i=t.getWritable();var o=i.getParent();let l=rt();var s=!1,a=!1;if(o!==null){var u=t.getIndexWithinParent();Fo(i),me(l)&&(a=o.__key,s=l.anchor,o=l.focus,s=s.type==="element"&&s.key===a&&s.offset===u+1,a=o.type==="element"&&o.key===a&&o.offset===u+1)}o=this.getNextSibling(),u=this.getParentOrThrow().getWritable();let c=i.__key,d=r.__next;return o===null?u.__last=c:o.getWritable().__prev=c,u.__size++,r.__next=c,i.__next=d,i.__prev=r.__key,i.__parent=r.__parent,n&&me(l)&&(n=this.getIndexWithinParent(),Rd(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){hn(),Rh(this,t);var r=this.getWritable();let i=t.getWritable(),o=i.__key;Fo(i);let l=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),a=r.__prev,u=this.getIndexWithinParent();return l===null?s.__first=o:l.getWritable().__next=o,s.__size++,r.__prev=o,i.__prev=a,i.__next=r.__key,i.__parent=r.__parent,r=rt(),n&&me(r)&&(n=this.getParentOrThrow(),Rd(r,n,u)),t}isParentRequired(){return!1}createParentElementNode(){return Yo()}selectPrevious(t,n){hn();let r=this.getPreviousSibling(),i=this.getParentOrThrow();return r===null?i.select(0,0):B(r)?r.select():J(r)?r.select(t,n):(t=r.getIndexWithinParent()+1,i.select(t,t))}selectNext(t,n){hn();let r=this.getNextSibling(),i=this.getParentOrThrow();return r===null?i.select():B(r)?r.select(0,0):J(r)?r.select(t,n):(t=r.getIndexWithinParent(),i.select(t,t))}markDirty(){this.getWritable()}}class ks extends zu{static getType(){return"linebreak"}static clone(t){return new ks(t.__key)}constructor(t){super(t)}getTextContent(){return`
|
|
64
|
+
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:t=>{let n=t.parentElement,r,i;return n!==null&&((r=n.firstChild)===t||r.nextSibling===t&&r.nodeType===3&&(r.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((i=n.lastChild)===t||i.previousSibling===t&&i.nodeType===3&&(i.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:RR,priority:0}}}}static importJSON(){return ds()}exportJSON(){return{type:"linebreak",version:1}}}function RR(){return{node:ds()}}function ds(){return ju(new ks)}function su(e){return e instanceof ks}function Ah(e,t){return t&16?"code":t&128?"mark":t&32?"sub":t&64?"sup":null}function Mh(e,t){return t&1?"strong":t&2?"em":"span"}function Dh(e,t,n,r,i){e=r.classList,r=$a(i,"base"),r!==void 0&&e.add(...r),r=$a(i,"underlineStrikethrough");let o=!1,l=t&8&&t&4;var s=n&8&&n&4;r!==void 0&&(s?(o=!0,l||e.add(...r)):l&&e.remove(...r));for(let a in zo)s=zo[a],r=$a(i,a),r!==void 0&&(n&s?!o||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 Lh(e,t,n){let r=t.firstChild;if(n=n.isComposing(),e+=n?$f:"",r==null)t.textContent=e;else if(t=r.nodeValue,t!==e)if(n||ro){n=t.length;let i=e.length,o=0,l=0;for(;o<n&&o<i&&t[o]===e[o];)o++;for(;l+o<n&&l+o<i&&t[n-l-1]===e[i-l-1];)l++;e=[o,n-o-l,e.slice(o,i-l)];let[s,a,u]=e;a!==0&&r.deleteData(s,a),r.insertData(s,u)}else r.nodeValue=e}function mc(e,t){return t=document.createElement(t),t.appendChild(e),t}class sl extends zu{static getType(){return"text"}static clone(t){return new sl(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 fR[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Wi()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(t){return t=zo[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 US(r,t,n)}createDOM(t){var n=this.__format,r=Ah(this,n);let i=Mh(this,n),o=document.createElement(r===null?i:r),l=o;return this.hasFormat("code")&&o.setAttribute("spellcheck","false"),r!==null&&(l=document.createElement(i),o.appendChild(l)),r=l,Lh(this.__text,r,this),t=t.theme.text,t!==void 0&&Dh(i,0,n,r,t),n=this.__style,n!==""&&(o.style.cssText=n),o}updateDOM(t,n,r){let i=this.__text;var o=t.__format,l=this.__format,s=Ah(this,o);let a=Ah(this,l);var u=Mh(this,o);let c=Mh(this,l);return(s===null?u:s)!==(a===null?c:a)?!0:s===a&&u!==c?(o=n.firstChild,o==null&&H(48),t=s=document.createElement(c),Lh(i,t,this),r=r.theme.text,r!==void 0&&Dh(c,0,l,t,r),n.replaceChild(s,o),!1):(u=n,a!==null&&s!==null&&(u=n.firstChild,u==null&&H(49)),Lh(i,u,this),r=r.theme.text,r!==void 0&&o!==l&&Dh(c,o,l,u,r),l=this.__style,t.__style!==l&&(n.style.cssText=l),!1)}static importDOM(){return{"#text":()=>({conversion:AR,priority:0}),b:()=>({conversion:PR,priority:0}),code:()=>({conversion:Ri,priority:0}),em:()=>({conversion:Ri,priority:0}),i:()=>({conversion:Ri,priority:0}),s:()=>({conversion:Ri,priority:0}),span:()=>({conversion:OR,priority:0}),strong:()=>({conversion:Ri,priority:0}),sub:()=>({conversion:Ri,priority:0}),sup:()=>({conversion:Ri,priority:0}),u:()=>({conversion:Ri,priority:0})}}static importJSON(t){let n=Dt(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&&Nf(t)||H(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=mc(t,"b")),this.hasFormat("italic")&&(t=mc(t,"i")),this.hasFormat("strikethrough")&&(t=mc(t,"s")),this.hasFormat("underline")&&(t=mc(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"?zo[t]:t,n}setDetail(t){let n=this.getWritable();return n.__detail=typeof t=="string"?uR[t]:t,n}setStyle(t){let n=this.getWritable();return n.__style=t,n}toggleFormat(t){return t=zo[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=dR[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){hn();let r=rt();var i=this.getTextContent();let o=this.__key;if(typeof i=="string"?(i=i.length,t===void 0&&(t=i),n===void 0&&(n=i)):n=t=0,me(r))i=Wi(),i!==r.anchor.key&&i!==r.focus.key||Kt(o),r.setTextNodeRange(this,t,this,n);else return mE(o,t,o,n,"text","text");return r}spliceText(t,n,r,i){let o=this.getWritable(),l=o.__text,s=r.length,a=t;0>a&&(a=s+a,0>a&&(a=0));let u=rt();return i&&me(u)&&(t+=s,u.setTextNodeRange(o,t,o,t)),n=l.slice(0,a)+r+l.slice(a+n),o.__text=n,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){hn();var n=this.getLatest(),r=n.getTextContent(),i=n.__key,o=Wi(),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=Dt(c),a.__format=u,a.__style=d,a.__detail=f,s=!0):(a=n.getWritable(),a.__text=c),n=rt(),a=[a],c=c.length;for(let g=1;g<l;g++){var h=t[g],m=h.length;h=Dt(h).getWritable(),h.__format=u,h.__style=d,h.__detail=f;let w=h.__key;if(m=c+m,me(n)){let v=n.anchor,y=n.focus;v.key===i&&v.type==="text"&&v.offset>c&&v.offset<=m&&(v.key=w,v.offset-=c,n.dirty=!0),y.key===i&&y.type==="text"&&y.offset>c&&y.offset<=m&&(y.key=w,y.offset-=c,n.dirty=!0)}o===i&&Kt(w),c=m,a.push(h)}return i=this.getPreviousSibling(),o=this.getNextSibling(),i!==null&&Cd(i),o!==null&&Cd(o),i=r.getWritable(),o=this.getIndexWithinParent(),s?(i.splice(o,0,a),this.remove()):i.splice(o,1,a),me(n)&&Rd(n,r,o,l-1),a}mergeWithSibling(t){var n=t===this.getPreviousSibling();n||t===this.getNextSibling()||H(50);var r=this.__key;let i=t.__key,o=this.__text,l=o.length;Wi()===i&&Kt(r);let s=rt();if(me(s)){let a=s.anchor,u=s.focus;a!==null&&a.key===i&&(K0(a,n,r,t,l),s.dirty=!0),u!==null&&u.key===i&&(K0(u,n,r,t,l),s.dirty=!0)}return r=t.__text,this.setTextContent(n?r+o:o+r),n=this.getWritable(),t.remove(),n}isTextEntity(){return!1}}function OR(e){let t=e.style.fontWeight==="700",n=e.style.textDecoration==="line-through",r=e.style.fontStyle==="italic",i=e.style.textDecoration==="underline",o=e.style.verticalAlign;return{forChild:l=>(J(l)&&(t&&l.toggleFormat("bold"),n&&l.toggleFormat("strikethrough"),r&&l.toggleFormat("italic"),i&&l.toggleFormat("underline"),o==="sub"&&l.toggleFormat("subscript"),o==="super"&&l.toggleFormat("superscript")),l),node:null}}function PR(e){let t=e.style.fontWeight==="normal";return{forChild:n=>(J(n)&&!t&&n.toggleFormat("bold"),n),node:null}}let I0=new WeakMap;function AR(e){e.parentElement===null&&H(129);for(var t=e.textContent||"",n,r=e.parentNode,i=[e];r!==null&&(n=I0.get(r))===void 0&&!(r.nodeName==="PRE"||r.nodeType===1&&r.style.whiteSpace.startsWith("pre"));)i.push(r),r=r.parentNode;for(n=n===void 0?r:n,r=0;r<i.length;r++)I0.set(i[r],n);if(n!==null){for(t=t.split(/(\r?\n|\t)/),e=[],i=t.length,n=0;n<i;n++)r=t[n],r===`
|
|
65
|
+
`||r===`\r
|
|
66
|
+
`?e.push(ds()):r===" "?e.push(Of()):r!==""&&e.push(Dt(r));return{node:e}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){for(i=e,n=!0;i!==null&&(i=j0(i,!1))!==null;)if(r=i.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(i=!0;e!==null&&(e=j0(e,!0))!==null;)if(0<(e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){i=!1;break}i&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:Dt(t)}}let MR=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 j0(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(MR)===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 DR={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ri(e){let t=DR[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:n=>(J(n)&&!n.hasFormat(t)&&n.toggleFormat(t),n),node:null}}function Dt(e=""){return ju(new sl(e))}function J(e){return e instanceof sl}class $s extends sl{static getType(){return"tab"}static clone(t){let n=new $s(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=Of();return n.setFormat(t.format),n.setStyle(t.style),n}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){H(126)}setDetail(){H(127)}setMode(){H(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Of(){return ju(new $s)}class Vr{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(),i=this.offset;if(t=t.offset,B(n)){var o=n.getDescendantByIndex(i);n=o??n}return B(r)&&(o=r.getDescendantByIndex(t),r=o??r),n===r?i<t:n.isBefore(r)}getNode(){let t=It(this.key);return t===null&&H(20),t}set(t,n,r){let i=this._selection,o=this.key;this.key=t,this.offset=n,this.type=r,Ns()||(Wi()===o&&Kt(t),i!==null&&(i._cachedNodes=null,i.dirty=!0))}}function Ih(e,t){let n=t.__key,r=e.offset,i="element";if(J(t))i="text",t=t.getTextContentSize(),r>t&&(r=t);else if(!B(t)){var o=t.getNextSibling();J(o)?(n=o.__key,r=0,i="text"):(o=t.getParent())&&(n=o.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,i)}function z0(e,t){if(B(t)){let n=t.getLastDescendant();B(n)||J(n)?Ih(e,n):Ih(e,t)}else Ih(e,t)}function F0(e,t,n,r){let i=e.getNode(),o=i.getChildAtIndex(e.offset),l=Dt(),s=mn(i)?Yo().append(l):l;l.setFormat(n),l.setStyle(r),o===null?i.append(s):(o.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 Di(e,t,n,r){e.key=t,e.offset=n,e.type=r}class Pf{constructor(t){this.dirty=!1,this._nodes=t,this._cachedNodes=null}is(t){if(!bs(t))return!1;let n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}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 Pf(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t,n){let r=this.getNodes(),i=r.length;var o=r[i-1];if(J(o))o=o.select();else{let l=o.getIndexWithinParent()+1;o=o.getParentOrThrow().select(l,l)}for(o.insertNodes(t,n),t=0;t<i;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=It(r),n!==null&&t.push(n);return Ns()||(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 me(e){return e instanceof al}function gm(e){let[t,,n]=vE(e);e=n.getChildren();let r=e.length;var i=e[0].getChildren().length;let o=Array(r);for(var l=0;l<r;l++)o[l]=Array(i);for(i=0;i<r;i++){l=e[i].getChildren();let s=0;for(let a=0;a<l.length;a++){for(;o[i][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++)o[i+f][s+h]=u;if(t===u)return{colSpan:d,columnIndex:s,rowIndex:i,rowSpan:c};s+=d}}return null}class Af{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 hv(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 Af(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Vc(this)}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t,n){let r=this.focus.getNode();return ov(r.select(0,r.getChildrenSize())).insertNodes(t,n)}getShape(){var t=It(this.anchor.key);if(Qn(t)||H(103),t=gm(t),t===null)throw Error("getCellRect: expected to find AnchorNode");var n=It(this.focus.key);Qn(n)||H(104);let r=gm(n);if(r===null)throw Error("getCellRect: expected to find focusCellNode");n=Math.min(t.columnIndex,r.columnIndex);let i=Math.max(t.columnIndex,r.columnIndex),o=Math.min(t.rowIndex,r.rowIndex);return t=Math.max(t.rowIndex,r.rowIndex),{fromX:Math.min(n,i),fromY:Math.min(o,t),toX:Math.max(n,i),toY:Math.max(o,t)}}getNodes(){function t(w){let{cell:v,startColumn:y,startRow:_}=w;a=Math.min(a,y),u=Math.min(u,_),c=Math.max(c,y+v.__colSpan-1),d=Math.max(d,_+v.__rowSpan-1)}var n=this._cachedNodes;if(n!==null)return n;var r=this.anchor.getNode();n=this.focus.getNode(),r=Td(r,Qn);var i=Td(n,Qn);Qn(r)||H(103),Qn(i)||H(104),n=r.getParent(),uu(n)||H(105),n=n.getParent(),yv(n)||H(106);let[o,l,s]=gE(n,r,i),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,i=u;for(var f=a,h=u;a<r||u<i||c>f||d>h;){if(a<r){var m=h-i;--r;for(var g=0;g<=m;g++)t(o[i+g][r])}if(u<i)for(m=f-r,--i,g=0;g<=m;g++)t(o[i][r+g]);if(c>f)for(m=h-i,f+=1,g=0;g<=m;g++)t(o[i+g][f]);if(d>h)for(m=f-r,h+=1,g=0;g<=m;g++)t(o[h][r+g])}for(n=[n],r=null,i=u;i<=d;i++)for(f=a;f<=c;f++)({cell:h}=o[i][f]),m=h.getParent(),uu(m)||H(107),m!==r&&n.push(m),n.push(h,...xR(h)),r=m;return Ns()||(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 hv(e){return e instanceof Af}class al{constructor(t,n,r,i){this.anchor=t,this.focus=n,this.dirty=!1,this.format=r,this.style=i,this._cachedNodes=null,t._selection=this,n._selection=this}is(t){return me(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),i=r?t:n;r=r?n:t,t=i.getNode(),n=r.getNode();let o=i.offset;return i=r.offset,B(t)&&(r=t.getDescendantByIndex(o),t=r??t),B(n)&&(r=n.getDescendantByIndex(i),r!==null&&r!==t&&n.getChildAtIndex(i)===r&&(r=r.getPreviousSibling()),n=r??n),t=t.is(n)?B(t)&&0<t.getChildrenSize()?[]:[t]:t.getNodesBetween(n),Ns()||(this._cachedNodes=t),t}setTextNodeRange(t,n,r,i){Di(this.anchor,t.__key,n,"text"),Di(this.focus,r.__key,i,"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],i=this.anchor,o=this.focus,l=i.isBefore(o),[s,a]=Vc(this),u="",c=!0;for(let d=0;d<t.length;d++){let f=t[d];if(B(f)&&!f.isInline())c||(u+=`
|
|
67
|
+
`),c=!f.isEmpty();else if(c=!1,J(f)){let h=f.getTextContent();f===n?f===r?(i.type!=="element"||o.type!=="element"||o.offset===i.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!tt(f)&&!su(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(t){let n=pt(),r=n.getEditorState()._selection;if(t=pE(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r),t!==null){var[i,o]=t;Di(this.anchor,i.key,i.offset,i.type),Di(this.focus,o.key,o.offset,o.type),this._cachedNodes=null}}clone(){let t=this.anchor,n=this.focus;return new al(new Vr(t.key,t.offset,t.type),new Vr(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=US(this.format,t,null),this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){return(this.format&zo[t])!==0}insertRawText(t){t=t.split(/(\r?\n|\t)/);let n=[],r=t.length;for(let i=0;i<r;i++){let o=t[i];o===`
|
|
68
|
+
`||o===`\r
|
|
69
|
+
`?n.push(ds()):o===" "?n.push(Of()):n.push(Dt(o))}this.insertNodes(n)}insertText(t){var n=this.anchor,r=this.focus,i=this.isCollapsed()||n.isBefore(r),o=this.format,l=this.style;i&&n.type==="element"?F0(n,r,o,l):i||r.type!=="element"||F0(r,n,o,l);var s=this.getNodes(),a=s.length,u=i?r:n;r=(i?n:r).offset;var c=u.offset;n=s[0],J(n)||H(26),i=n.getTextContent().length;var d=n.getParentOrThrow(),f=s[a-1];if(this.isCollapsed()&&r===i&&(n.isSegmented()||n.isToken()||!n.canInsertTextAfter()||!d.canInsertTextAfter()&&n.getNextSibling()===null)){var h=n.getNextSibling();if(J(h)&&h.canInsertTextBefore()&&!nm(h)||(h=Dt(),h.setFormat(o),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(),(!J(h)||nm(h))&&(h=Dt(),h.setFormat(o),d.canInsertTextBefore()?n.insertBefore(h):d.insertBefore(h)),h.select(),n=h,t!==""){this.insertText(t);return}}else if(n.isSegmented()&&r!==i)d=Dt(n.getTextContent()),d.setFormat(o),n.replace(d),n=d;else if(!(this.isCollapsed()||t===""||(h=f.getParent(),d.canInsertTextBefore()&&d.canInsertTextAfter()&&(!B(h)||h.canInsertTextBefore()&&h.canInsertTextAfter())))){this.insertText(""),hE(this.anchor,this.focus,null),this.insertText(t);return}if(a===1)if(n.isToken())t=Dt(t),t.select(),n.replace(t);else{if(s=n.getFormat(),a=n.getStyle(),r===c&&(s!==o||a!==l))if(n.getTextContent()==="")n.setFormat(o),n.setStyle(l);else{s=Dt(t),s.setFormat(o),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(o=new Set([...n.getParentKeys(),...f.getParentKeys()]),h=B(n)?n:n.getParentOrThrow(),l=B(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(J(f)&&!f.isToken()&&c!==f.getTextContentSize()){if(f.isSegmented()){var m=Dt(f.getTextContent());f.replace(m),f=m}mn(u.getNode())||(f=f.spliceText(0,c,"")),o.add(f.__key)}else u=f.getParentOrThrow(),u.canBeEmpty()||u.getChildrenSize()!==1?f.remove():u.remove();else o.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)||B(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))&&(o.delete(u.__key),c=u),u=u.getParent();for(n.isToken()?r===i?n.select():(t=Dt(t),t.select(),n.replace(t)):(n=n.spliceText(r,i-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],o.has(n.__key)||n.remove()}}removeText(){this.insertText("")}formatText(t){if(this.isCollapsed())this.toggleFormat(t),Kt(null);else{var n=this.getNodes(),r=[];for(var i of n)J(i)&&r.push(i);var o=r.length;if(o===0)this.toggleFormat(t),Kt(null);else{i=this.anchor;var l=this.focus,s=this.isBackward();n=s?l:i,i=s?i: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=o-1,d=r[c];if(o=i.type==="text"?i.offset:d.getTextContentSize(),u.is(d))l!==o&&(l===0&&o===u.getTextContentSize()?u.setFormat(s):(t=u.splitText(l,o),t=l===0?t[0]:t[1],t.setFormat(s),n.type==="text"&&n.set(t.__key,0,"text"),i.type==="text"&&i.set(t.__key,o-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<o&&(o!==d.getTextContentSize()&&([d]=d.splitText(o)),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"),i.type==="text"&&i.set(d.__key,o,"text"),this.format=s|f}}}}}insertNodes(t,n){if(!this.isCollapsed()){var r=this.isBackward()?this.anchor:this.focus,i=r.getNode().getNextSibling();if(i=i?i.getKey():null,r=(r=r.getNode().getPreviousSibling())?r.getKey():null,this.removeText(),this.isCollapsed()&&this.focus.type==="element"){if(this.focus.key===i&&this.focus.offset===0){var o=Dt();this.focus.getNode().insertBefore(o)}else this.focus.key===r&&this.focus.offset===this.focus.getNode().getChildrenSize()&&(o=Dt(),this.focus.getNode().insertAfter(o));o&&(this.focus.set(o.__key,0,"text"),this.anchor.set(o.__key,0,"text"))}}o=this.anchor,r=o.offset;var l=o.getNode();i=l,o.type==="element"&&(o=o.getNode(),i=o.getChildAtIndex(r-1),i=i===null?o:i),o=[];var s=l.getNextSiblings(),a=xr(l)?null:l.getTopLevelElementOrThrow();if(J(l))if(i=l.getTextContent().length,r===0&&i!==0)i=l.getPreviousSibling(),i=i!==null?i:l.getParentOrThrow(),o.push(l);else if(r===i)i=l;else{if(l.isToken())return!1;[i,l]=l.splitText(r),o.push(l)}l=i,o.push(...s),s=t[0];var u=!1,c=null;for(let m=0;m<t.length;m++){var d=t[m];if(xr(i)||tt(i)||!B(d)||d.isInline())u&&!B(d)&&!tt(d)&&xr(i.getParent())&&H(28);else{if(d.is(s)){if(B(i)&&i.isEmpty()&&i.canReplaceWith(d)){i.replace(d),i=d,u=!0;continue}if(u=d.getFirstDescendant(),WS(u)){for(var f=u.getParentOrThrow();f.isInline();)f=f.getParentOrThrow();if(c=f.getChildren(),u=c.length,B(i)){var h=i.getFirstChild();for(let g=0;g<u;g++){let w=c[g];h===null?i.append(w):h.insertAfter(w),h=w}}else{for(h=u-1;0<=h;h--)i.insertAfter(c[h]);i=i.getParentOrThrow()}if(c=c[u-1],f.remove(),u=!0,f.is(d))continue}}J(i)&&(a===null&&H(27),i=a)}u=!1,B(i)&&!i.isInline()?(c=d,tt(d)&&!d.isInline()?i=t.length===1&&i.canBeEmpty()&&i.isEmpty()?i.insertBefore(d,!1):i.insertAfter(d,!1):B(d)?(d.canBeEmpty()||!d.isEmpty())&&(mn(i)?(f=i.getChildAtIndex(r),f!==null?f.insertBefore(d):i.append(d),i=d):d.isInline()?(i.append(d),i=d):i=i.insertAfter(d,!1)):(f=i.getFirstChild(),f!==null?f.insertBefore(d):i.append(d),i=d)):!B(d)||B(d)&&d.isInline()||tt(i)&&!i.isInline()?(c=d,me(this)&&tt(d)&&(B(i)||J(i))&&!d.isInline()?(J(i)?(f=i.getParentOrThrow(),[i]=i.splitText(r),i=i.getIndexWithinParent()+1):(f=i,i=r),[,i]=JS(f,i),i=i.insertBefore(d)):i=i.insertAfter(d,!1)):(d=i.getParentOrThrow(),su(i)&&i.remove(),i=d,m--)}if(n&&(J(l)?l.select():(t=i.getPreviousSibling(),J(t)?t.select():(t=i.getIndexWithinParent(),i.getParentOrThrow().select(t,t)))),B(i)){if(t=J(c)?c:B(c)&&c.isInline()?c.getLastDescendant():i.getLastDescendant(),n||(t===null?i.select():J(t)?t.getTextContent()===""?t.selectPrevious():t.select():t.selectNext()),o.length!==0)for(n=i,t=o.length-1;0<=t;t--)r=o[t],a=r.getParentOrThrow(),!B(i)||vm(r)||tt(r)&&(!r.isInline()||r.isIsolated())?B(i)||vm(r)?B(r)&&!r.canInsertAfter(i)?(l=a.constructor.clone(a),B(l)||H(29),l.append(r),i.insertAfter(l)):i.insertAfter(r):(i.insertBefore(r),i=r):(n===i?i.append(r):i.insertBefore(r),i=r),a.isEmpty()&&!a.canBeEmpty()&&a.remove()}else n||(J(i)?i.select():(n=i.getParentOrThrow(),t=i.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 i=t.getNode(),o=i.getNextSiblings().reverse(),l=i.getParentOrThrow(),s=l.isInline(),a=s?l.getTextContentSize():i.getTextContentSize();n===0?o.push(i):(s&&(r=l.getNextSiblings()),n===a||s&&n===i.getTextContentSize()||([,i]=i.splitText(n),o.push(i)))}else{if(l=t.getNode(),xr(l)){o=Yo(),r=l.getChildAtIndex(n),o.select(),r!==null?r.insertBefore(o,!1):l.append(o);return}o=l.getChildren().slice(n).reverse()}if(i=o.length,n===0&&0<i&&l.isInline()){if(r=l.getParentOrThrow(),o=r.insertNewAfter(this,!1),B(o))for(r=r.getChildren(),l=0;l<r.length;l++)o.append(r[l])}else if(s=l.insertNewAfter(this,!1),s===null)this.insertLineBreak();else if(B(s))if(a=l.getFirstChild(),n===0&&(l.is(t.getNode())||a&&a.is(t.getNode()))&&0<i)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(i!==0)for(r=0;r<i;r++)n=o[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=ds();var r=this.anchor;r.type==="element"&&(r=r.getNode(),mn(r)&&this.insertParagraph()),t?this.insertNodes([n],!0):this.insertNodes([n])&&n.selectNext(0,0)}getCharacterOffsets(){return Vc(this)}extract(){var t=this.getNodes(),n=t.length,r=n-1,i=this.anchor;let o=this.focus;var l=t[0];let s=t[r],[a,u]=Vc(this);return n===0?[]:n===1?J(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=i.isBefore(o),J(l)&&(i=n?a:u,i===l.getTextContentSize()?t.shift():i!==0&&([,l]=l.splitText(i),t[0]=l)),J(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 i=this.focus,o=this.anchor,l=t==="move",s=rm(i,n);if(tt(s)&&!s.isIsolated())l&&s.isKeyboardSelectable()?(n=ym(),n.add(s.__key),Wr(n)):(t=n?s.getPreviousSibling():s.getNextSibling(),J(t)?(s=t.__key,n=n?t.getTextContent().length:0,i.set(s,n,"text"),l&&o.set(s,n,"text")):(r=s.getParentOrThrow(),B(t)?(r=t.__key,s=n?t.getChildrenSize():0):(s=s.getIndexWithinParent(),r=r.__key,n||s++),i.set(r,s,"element"),l&&o.set(r,s,"element")));else if(o=pt(),i=Xr(o._window)){var a=o._blockCursorElement,u=o._rootElement;if(u===null||a===null||!B(s)||s.isInline()||s.canBeEmpty()||im(a,o,u),i.modify(t,n?"backward":"forward",r),0<i.rangeCount&&(s=i.getRangeAt(0),o=this.anchor.getNode(),o=mn(o)?o:XS(o),this.applyDOMRange(s),this.dirty=!0,!l)){for(l=this.getNodes(),t=[],r=!1,a=0;a<l.length;a++)u=l[a],bd(u,o)?t.push(u):r=!0;r&&0<t.length&&(n?(n=t[0],B(n)?n.selectStart():n.getParentOrThrow().selectStart()):(n=t[t.length-1],B(n)?n.selectEnd():n.getParentOrThrow().selectEnd())),(i.anchorNode!==s.startContainer||i.anchorOffset!==s.startOffset)&&(n=this.focus,l=this.anchor,i=l.key,s=l.offset,o=l.type,Di(l,n.key,n.offset,n.type),Di(n,i,s,o),this._cachedNodes=null)}}}deleteCharacter(t){let n=this.isCollapsed();if(this.isCollapsed()){var r=this.anchor,i=this.focus,o=r.getNode();if(!t&&(r.type==="element"&&B(o)&&r.offset===o.getChildrenSize()||r.type==="text"&&r.offset===o.getTextContentSize())){var l=o.getParent();if(l=o.getNextSibling()||(l===null?null:l.getNextSibling()),B(l)&&l.isShadowRoot())return}if(l=rm(i,t),tt(l)&&!l.isIsolated()){l.isKeyboardSelectable()&&B(o)&&o.getChildrenSize()===0?(o.remove(),t=ym(),t.add(l.__key),Wr(t)):(l.remove(),pt().dispatchCommand(Cf,void 0));return}if(!t&&B(l)&&B(o)&&o.isEmpty()){o.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=i.type==="text"?i.getNode():null,o=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){if(r=i.offset,i=l.getTextContentSize(),l.is(o)||t&&r!==i||!t&&r!==0){U0(l,t,r);return}}else if(o!==null&&o.isSegmented()&&(r=r.offset,i=o.getTextContentSize(),o.is(l)||t&&r!==0||!t&&r!==i)){U0(o,t,r);return}if(o=this.anchor,l=this.focus,r=o.getNode(),i=l.getNode(),r===i&&o.type==="text"&&l.type==="text"){var s=o.offset,a=l.offset;let u=s<a;i=u?s:a,a=u?a:s,s=a-1,i!==s&&(r=r.getTextContent().slice(i,a),ZS(r)||(t?l.offset=s:o.offset=s))}}}this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(t=this.anchor.getNode(),t.isEmpty()&&mn(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 bs(e){return e instanceof Pf}function B0(e){let t=e.offset;return e.type==="text"?t:(e=e.getNode(),t===e.getChildrenSize()?e.getTextContent().length:0)}function Vc(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]:[B0(t),B0(e)]}function U0(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),i=r.length,o=0,l=0;for(let s=0;s<i;s++){let a=r[s],u=s===i-1;if(l=o,o+=a.length,t&&o===n||o>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 W0(e,t,n,r){var i=t;if(e.nodeType===1){let s=!1;var o=e.childNodes,l=o.length;i===l&&(s=!0,i=l-1);let a=o[i];if(l=!1,a===r._blockCursorElement?(a=o[i+1],l=!0):r._blockCursorElement!==null&&i--,r=zl(a),J(r))i=s?r.getTextContentSize():0;else{if(o=zl(e),o===null)return null;if(B(o)?(e=o.getChildAtIndex(i),(t=B(e))&&(t=e.getParent(),t=n===null||t===null||!t.canBeEmpty()||t!==n.getNode()),t&&(n=s?e.getLastDescendant():e.getFirstDescendant(),n===null?(o=e,i=0):(e=n,o=B(e)?e:e.getParentOrThrow())),J(e)?(r=e,o=null,i=s?e.getTextContentSize():0):e!==o&&s&&!l&&i++):(i=o.getIndexWithinParent(),i=t===0&&tt(o)&&zl(e)===o?i:i+1,o=o.getParentOrThrow()),B(o))return new Vr(o.__key,i,"element")}}else r=zl(e);return J(r)?new Vr(r.__key,i,"text"):null}function V0(e,t,n){var r=e.offset,i=e.getNode();r===0?(r=i.getPreviousSibling(),i=i.getParent(),t?(n||!t)&&r===null&&B(i)&&i.isInline()&&(t=i.getPreviousSibling(),J(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)):B(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):J(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===i.getTextContent().length&&(r=i.getNextSibling(),i=i.getParent(),t&&B(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&r===null&&B(i)&&i.isInline()&&!i.canInsertTextAfter()&&(t=i.getNextSibling(),J(t)&&(e.key=t.__key,e.offset=0)))}function hE(e,t,n){if(e.type==="text"&&t.type==="text"){var r=e.isBefore(t);let i=e.is(t);V0(e,r,i),V0(t,!r,i),i&&(t.key=e.key,t.offset=e.offset,t.type=e.type),r=pt(),r.isComposing()&&r._compositionKey!==e.key&&me(n)&&(r=n.anchor,n=n.focus,Di(e,r.key,r.offset,r.type),Di(t,n.key,n.offset,n.type))}}function pE(e,t,n,r,i,o){return e===null||n===null||!Lu(i,e,n)||(t=W0(e,t,me(o)?o.anchor:null,i),t===null)||(r=W0(n,r,me(o)?o.focus:null,i),r===null||t.type==="element"&&r.type==="element"&&(e=zl(e),n=zl(n),tt(e)&&tt(n)))?null:(hE(t,r,o),[t,r])}function vm(e){return B(e)&&!e.isInline()}function mE(e,t,n,r,i,o){let l=Qr();return e=new al(new Vr(e,t,i),new Vr(n,r,o),0,""),e.dirty=!0,l._selection=e}function ym(){return new Pf(new Set)}function LR(e){let t=e.getEditorState()._selection,n=Xr(e._window);return bs(t)||hv(t)?t.clone():pv(t,n,e)}function pv(e,t,n){var r=n._window;if(r===null)return null;var i=r.event,o=i?i.type:void 0;r=o==="selectionchange",i=!tm&&(r||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&i&&i.detail===3||o==="drop"||o===void 0);let l;if(!me(e)||i){if(t===null)return null;if(i=t.anchorNode,o=t.focusNode,l=t.anchorOffset,t=t.focusOffset,r&&me(e)&&!Lu(n,i,o))return e.clone()}else return e.clone();if(n=pE(i,l,o,t,n,e),n===null)return null;let[s,a]=n;return new al(s,a,me(e)?e.format:0,me(e)?e.style:"")}function rt(){return Qr()._selection}function Ts(){return pt()._editorState._selection}function Rd(e,t,n,r=1){var i=e.anchor,o=e.focus,l=i.getNode(),s=o.getNode();if(t.is(l)||t.is(s)){if(l=t.__key,e.isCollapsed())t=i.offset,(n<=t&&0<r||n<t&&0>r)&&(n=Math.max(0,t+r),i.set(l,n,"element"),o.set(l,n,"element"),H0(e));else{let u=e.isBackward();s=u?o:i;var a=s.getNode();i=u?i:o,o=i.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(o)&&(t=i.offset,(n<=t&&0<r||n<t&&0>r)&&i.set(l,Math.max(0,t+r),"element"))}H0(e)}}function H0(e){var t=e.anchor,n=t.offset;let r=e.focus;var i=r.offset,o=t.getNode(),l=r.getNode();if(e.isCollapsed())B(o)&&(l=o.getChildrenSize(),l=(i=n>=l)?o.getChildAtIndex(l-1):o.getChildAtIndex(n),J(l)&&(n=0,i&&(n=l.getTextContentSize()),t.set(l.__key,n,"text"),r.set(l.__key,n,"text")));else{if(B(o)){let s=o.getChildrenSize();n=(e=n>=s)?o.getChildAtIndex(s-1):o.getChildAtIndex(n),J(n)&&(o=0,e&&(o=n.getTextContentSize()),t.set(n.__key,o,"text"))}B(l)&&(n=l.getChildrenSize(),i=(t=i>=n)?l.getChildAtIndex(n-1):l.getChildAtIndex(i),J(i)&&(l=0,t&&(l=i.getTextContentSize()),r.set(i.__key,l,"text")))}}function IR(e,t){if(t=t.getEditorState()._selection,e=e._selection,me(e)){var n=e.anchor;let r=e.focus,i;n.type==="text"&&(i=n.getNode(),i.selectionTransform(t,e)),r.type==="text"&&(n=r.getNode(),i!==n&&n.selectionTransform(t,e))}}function Od(e,t,n,r,i){let o=null,l=0,s=null;r!==null?(o=r.__key,J(r)?(l=r.getTextContentSize(),s="text"):B(r)&&(l=r.getChildrenSize(),s="element")):i!==null&&(o=i.__key,J(i)?s="text":B(i)&&(s="element")),o!==null&&s!==null?e.set(o,l,s):(l=t.getIndexWithinParent(),l===-1&&(l=n.getChildrenSize()),e.set(n.__key,l,"element"))}function K0(e,t,n,r,i){e.type==="text"?(e.key=n,t||(e.offset+=i)):e.offset>r.getIndexWithinParent()&&--e.offset}function gE(e,t,n){let r=[],i=null,o=null;e=e.getChildren();for(let c=0;c<e.length;c++){var l=e[c];uu(l)||H(108);var s=l.getChildren();l=0;for(let d of s){for(Qn(d)||H(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 w=0;w<m;w++)r[s+g][a+w]=f}t.is(u)&&(i=f),n.is(u)&&(o=f),l+=d.__colSpan}}return i===null&&H(110),o===null&&H(111),[r,i,o]}function vE(e){e instanceof vv||(e instanceof zu?(e=Td(e,Qn),Qn(e)||H(114)):(e=Td(e.getNode(),Qn),Qn(e)||H(114)));let t=e.getParent();uu(t)||H(115);let n=t.getParent();return yv(n)||H(116),[e,t,n]}let jt=null,zt=null,On=!1,jh=!1,au=0,Z0={characterData:!0,childList:!0,subtree:!0};function Ns(){return On||jt!==null&&jt._readOnly}function hn(){On&&H(13)}function Qr(){return jt===null&&H(15),jt}function pt(){return zt===null&&H(16),zt}function G0(e,t,n){var r=t.__type;let i=e._nodes.get(r);for(i===void 0&&H(30,r),e=n.get(r),e===void 0&&(e=Array.from(i.transforms),n.set(r,e)),n=e.length,r=0;r<n&&(e[r](t),t.isAttached());r++);}function jR(e,t){t=t._dirtyLeaves,e=e._nodeMap;for(let n of t)t=e.get(n),J(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&BS(t)}function zR(e,t){let n=t._dirtyLeaves,r=t._dirtyElements;e=e._nodeMap;let i=Wi(),o=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),J(l)&&l.isAttached()&&l.isSimpleText()&&!l.isUnmergeable()&&BS(l),l!==void 0&&l!==void 0&&l.__key!==i&&l.isAttached()&&G0(t,l,o),n.add(c);if(l=t._dirtyLeaves,s=l.size,0<s){au++;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!==i&&l.isAttached()&&G0(t,l,o),r.set(a,u));l=t._dirtyLeaves,s=l.size,a=t._dirtyElements,u=a.size,au++}t._dirtyLeaves=n,t._dirtyElements=r}function mv(e,t){var n=e.type,r=t.get(n);if(r===void 0&&H(17,n),n=r.klass,e.type!==n.getType()&&H(18,n.name),n=n.importJSON(e),e=e.children,B(n)&&Array.isArray(e))for(r=0;r<e.length;r++){let i=mv(e[r],t);n.append(i)}return n}function Y0(e,t){let n=jt,r=On,i=zt;jt=e,On=!0,zt=null;try{return t()}finally{jt=n,On=r,zt=i}}function Bo(e,t){let n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n!==null){var o=e._editorState,l=o._selection,s=n._selection,a=e._dirtyType!==0,u=jt,c=On,d=zt,f=e._updating,h=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&a&&h!==null){zt=e,jt=n,On=!1,e._updating=!0;try{let je=e._dirtyType,Tt=e._dirtyElements,at=e._dirtyLeaves;h.disconnect();var g=je,w=Tt,v=at;fn=oi=Nt="",eE=g===2,Bc=null,tn=e,io=e._config,iu=e._nodes,Rf=tn._listeners.mutation,om=w,lm=v,Go=o._nodeMap,oo=n._nodeMap,fv=n._readOnly,sm=new Map(e._keyToDOMMap);let ln=new Map;ou=ln,ca("root",null),ou=sm=io=oo=Go=lm=om=iu=tn=void 0,m=ln}catch(je){if(je instanceof Error&&e._onError(je),jh)throw je;wE(e,null,r,n),FS(e),e._dirtyType=2,jh=!0,Bo(e,o),jh=!1;return}finally{h.observe(r,Z0),e._updating=f,jt=u,On=c,zt=d}}n._readOnly||(n._readOnly=!0);var y=e._dirtyLeaves,_=e._dirtyElements,S=e._normalizedNodes,E=e._updateTags,$=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 C=e._decorators,T=e._pendingDecorators||C,N=n._nodeMap,R;for(R in T)N.has(R)||(T===C&&(T=KS(e)),delete T[R]);var D=i?null:Xr(e._window);if(e._editable&&D!==null&&(a||s===null||s.dirty)){zt=e,jt=n;try{if(h!==null&&h.disconnect(),a||s===null||s.dirty){let je=e._blockCursorElement;je!==null&&im(je,e,r);e:{let Tt=D.anchorNode,at=D.focusNode,ln=D.anchorOffset,En=D.focusOffset,_t=document.activeElement;if(!(E.has("collaboration")&&_t!==r||_t!==null&&lv(_t)))if(me(s)){var F=s.anchor,se=s.focus,V=F.key,K=se.key,O=$d(e,V),A=$d(e,K),k=F.offset,j=se.offset,I=s.format,Z=s.style,ne=s.isCollapsed(),ke=O,ve=A,We=!1;if(F.type==="text"){ke=Ed(O);let At=F.getNode();We=At.getFormat()!==I||At.getStyle()!==Z}else me(l)&&l.anchor.type==="text"&&(We=!0);if(se.type==="text"&&(ve=Ed(A)),ke!==null&&ve!==null){if(ne&&(l===null||We||me(l)&&(l.format!==I||l.style!==Z))){var Fe=performance.now();aE=[I,Z,k,V,Fe]}if(ln===k&&En===j&&Tt===ke&&at===ve&&(D.type!=="Range"||!ne)&&(_t!==null&&r.contains(_t)||r.focus({preventScroll:!0}),F.type!=="element"))break e;try{D.setBaseAndExtent(ke,k,ve,j)}catch{}if(!E.has("skip-scroll-into-view")&&s.isCollapsed()&&r!==null&&r===document.activeElement){let At=s instanceof al&&s.anchor.type==="element"?ke.childNodes[k]||null:0<D.rangeCount?D.getRangeAt(0):null;if(At!==null){let sn;if(At instanceof Text){let gt=document.createRange();gt.selectNode(At),sn=gt.getBoundingClientRect()}else sn=At.getBoundingClientRect();let Pn=r.ownerDocument,qr=Pn.defaultView;if(qr!==null)for(var{top:te,bottom:Ie}=sn,be,Re,Se=r;Se!==null;){let gt=Se===Pn.body;if(gt)be=0,Re=Tf(e).innerHeight;else{let Eo=Se.getBoundingClientRect();be=Eo.top,Re=Eo.bottom}let Nr=0;if(te<be?Nr=-(be-te):Ie>Re&&(Nr=Ie-Re),Nr!==0)if(gt)qr.scrollBy(0,Nr);else{let Eo=Se.scrollTop;Se.scrollTop+=Nr;let zs=Se.scrollTop-Eo;te-=zs,Ie-=zs}if(gt)break;Se=bf(Se)}}}fm=!0}}else l!==null&&Lu(e,Tt,at)&&D.removeAllRanges()}}e:{let je=e._blockCursorElement;if(me(s)&&s.isCollapsed()&&s.anchor.type==="element"&&r.contains(document.activeElement)){let Tt=s.anchor,at=Tt.getNode(),ln=Tt.offset,En=at.getChildrenSize(),_t=!1,At=null;if(ln===En){let sn=at.getChildAtIndex(ln-1);Oh(sn)&&(_t=!0)}else{let sn=at.getChildAtIndex(ln);if(Oh(sn)){let Pn=sn.getPreviousSibling();(Pn===null||Oh(Pn))&&(_t=!0,At=e.getElementByKey(sn.__key))}}if(_t){let sn=e.getElementByKey(at.__key);if(je===null){let Pn=e._config.theme,qr=document.createElement("div");qr.contentEditable="false",qr.setAttribute("data-lexical-cursor","true");let gt=Pn.blockCursor;if(gt!==void 0){if(typeof gt=="string"){let Nr=gt.split(" ");gt=Pn.blockCursor=Nr}gt!==void 0&&qr.classList.add(...gt)}e._blockCursorElement=je=qr}r.style.caretColor="transparent",At===null?sn.appendChild(je):sn.insertBefore(je,At);break e}}je!==null&&im(je,e,r)}h!==null&&h.observe(r,Z0)}finally{zt=d,jt=u}}if(m!==null){var De=m;let je=Array.from(e._listeners.mutation),Tt=je.length;for(let at=0;at<Tt;at++){let[ln,En]=je[at],_t=De.get(En);_t!==void 0&&ln(_t,{dirtyLeaves:y,prevEditorState:o,updateTags:E})}}me(s)||s===null||l!==null&&l.is(s)||e.dispatchCommand(Cf,void 0);var Qe=e._pendingDecorators;Qe!==null&&(e._decorators=Qe,e._pendingDecorators=null,Na("decorator",e,!0,Qe));var Wt=P0(t||o),Sn=P0(n);if(Wt!==Sn&&Na("textcontent",e,!0,Sn),Na("update",e,!0,{dirtyElements:_,dirtyLeaves:y,editorState:n,normalizedNodes:S,prevEditorState:t||o,tags:E}),e._deferred=[],$.length!==0){let je=e._updating;e._updating=!0;try{for(let Tt=0;Tt<$.length;Tt++)$[Tt]()}finally{e._updating=je}}var ur=e._updates;if(ur.length!==0){let je=ur.shift();if(je){let[Tt,at]=je;yE(e,Tt,at)}}}}function Na(e,t,n,...r){let i=t._updating;t._updating=n;try{let o=Array.from(t._listeners[e]);for(e=0;e<o.length;e++)o[e].apply(null,r)}finally{t._updating=i}}function X(e,t,n){if(e._updating===!1||zt!==e){let o=!1;return e.update(()=>{o=X(e,t,n)}),o}let r=av(e);for(let o=4;0<=o;o--)for(let l=0;l<r.length;l++){var i=r[l]._commands.get(t);if(i!==void 0&&(i=i[o],i!==void 0)){i=Array.from(i);let s=i.length;for(let a=0;a<s;a++)if(i[a](n,e)===!0)return!0}}return!1}function X0(e,t){let n=e._updates;for(t=t||!1;n.length!==0;){var r=n.shift();if(r){let[i,o]=r,l;o!==void 0&&(r=o.onUpdate,l=o.tag,o.skipTransforms&&(t=!0),r&&e._deferred.push(r),l&&e._updateTags.add(l)),i()}}return t}function yE(e,t,n){let r=e._updateTags;var i,o=i=!1;if(n!==void 0){var l=n.onUpdate;i=n.tag,i!=null&&r.add(i),i=n.skipTransforms||!1,o=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 Mf(new Map((l||n)._nodeMap)),s=!0),l._flushSync=o,o=jt;let a=On,u=zt,c=e._updating;jt=l,On=!1,e._updating=!0,zt=e;try{s&&(e._headless?n._selection!=null&&(l._selection=n._selection.clone()):l._selection=LR(e));let d=e._compositionKey;t(),i=X0(e,i),IR(l,e),e._dirtyType!==0&&(i?jR(l,e):zR(l,e),X0(e),_R(n,l,e._dirtyLeaves,e._dirtyElements)),d!==e._compositionKey&&(l._flushSync=!0);let f=l._selection;if(me(f)){let h=l._nodeMap,m=f.focus.key;h.get(f.anchor.key)!==void 0&&h.get(m)!==void 0||H(19)}else bs(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(),Bo(e);return}finally{jt=o,On=a,zt=u,e._updating=c,au=0}e._dirtyType!==0||FR(l,e)?l._flushSync?(l._flushSync=!1,Bo(e)):s&&gR(()=>{Bo(e)}):(l._flushSync=!1,s&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Wn(e,t,n){e._updating?e._updates.push([t,n]):yE(e,t,n)}class xE extends zu{constructor(t){super(t)}decorate(){H(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function tt(e){return e instanceof xE}class ul extends zu{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 cR[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=pt()._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(J(n)&&t.push(n),B(n)){let r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;t!==null;){if(B(t)){let n=t.getFirstChild();if(n!==null){t=n;continue}}break}return t}getLastDescendant(){let t=this.getLastChild();for(;t!==null;){if(B(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],B(t)&&t.getLastDescendant()||t||null):(t=n[t],B(t)&&t.getFirstDescendant()||t||null)}getFirstChild(){let t=this.getLatest().__first;return t===null?null:It(t)}getFirstChildOrThrow(){let t=this.getFirstChild();return t===null&&H(45,this.__key),t}getLastChild(){let t=this.getLatest().__last;return t===null?null:It(t)}getLastChildOrThrow(){let t=this.getLastChild();return t===null&&H(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 i=0;i<r;i++){let o=n[i];t+=o.getTextContent(),B(o)&&i!==r-1&&!o.isInline()&&(t+=`
|
|
70
|
+
|
|
71
|
+
`)}return t}getTextContentSize(){let t=0,n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){let o=n[i];t+=o.getTextContentSize(),B(o)&&i!==r-1&&!o.isInline()&&(t+=2)}return t}getDirection(){return this.getLatest().__dir}hasFormat(t){return t!==""?(t=T0[t],(this.getFormat()&t)!==0):!1}select(t,n){hn();let r=rt(),i=t,o=n;var l=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&n===0){if(t=this.getFirstChild(),J(t)||B(t))return t.select(0,0)}else if(!(t!==void 0&&t!==l||n!==void 0&&n!==l)&&(t=this.getLastChild(),J(t)||B(t)))return t.select()}if(i===void 0&&(i=l),o===void 0&&(o=l),l=this.__key,me(r))r.anchor.set(l,i,"element"),r.focus.set(l,o,"element"),r.dirty=!0;else return mE(l,i,l,o,"element","element");return r}selectStart(){let t=this.getFirstDescendant();return B(t)||J(t)?t.select(0,0):t!==null?t.selectPrevious():this.select(0,0)}selectEnd(){let t=this.getLastDescendant();return B(t)||J(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!==""?T0[t]:0,this}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){let i=r.length,o=this.getChildrenSize(),l=this.getWritable(),s=l.__key;var a=[],u=[];let c=this.getChildAtIndex(t+n),d=null,f=o-n+i;if(t!==0)if(t===o)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&&H(100);var g=m.getNextSibling(),w=m.__key;m=m.getWritable(),Fo(m),u.push(w),m=g}}for(h=d,g=0;g<i;g++){w=r[g],h!==null&&w.is(h)&&(d=h=h.getPreviousSibling()),m=w.getWritable(),m.__parent===s&&f--,Fo(m);let v=w.__key;h===null?(l.__first=v,m.__prev=null):(h=h.getWritable(),h.__next=v,m.__prev=h.__key),w.__key===s&&H(76),m.__parent=s,a.push(v),h=w}if(t+n===o?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=rt(),me(t))){u=new Set(u),a=new Set(a);let{anchor:v,focus:y}=t;Q0(v,u,a)&&Od(v,v.getNode(),this,d,c),Q0(y,u,a)&&Od(y,y.getNode(),this,d,c),f!==0||this.canBeEmpty()||xr(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 B(e){return e instanceof ul}function Q0(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 Rs extends ul{static getType(){return"root"}static clone(){return new Rs}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){H(51)}getTextContent(){let t=this.__cachedText;return!Ns()&&pt()._dirtyType!==0||t===null?super.getTextContent():t}remove(){H(52)}replace(){H(53)}insertBefore(){H(54)}insertAfter(){H(55)}updateDOM(){return!1}append(...t){for(let n=0;n<t.length;n++){let r=t[n];B(r)||tt(r)||H(56)}return super.append(...t)}static importJSON(t){let n=Yr();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 mn(e){return e instanceof Rs}function FR(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 gv(){return new Mf(new Map([["root",new Rs]]))}function _E(e){let t=e.exportJSON();var n=e.constructor;t.type!==n.getType()&&H(130,n.name);let r=t.children;if(B(e))for(Array.isArray(r)||H(59,n.name),e=e.getChildren(),n=0;n<e.length;n++){let i=_E(e[n]);r.push(i)}return t}class Mf{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 Y0(this,t)}clone(t){return t=new Mf(this._nodeMap,t===void 0?this._selection:t),t._readOnly=!0,t}toJSON(){return Y0(this,()=>({root:_E(Yr())}))}}class Os extends ul{static getType(){return"paragraph"}static clone(t){return new Os(t.__key)}createDOM(t){let n=document.createElement("p");return t=$a(t.theme,"paragraph"),t!==void 0&&n.classList.add(...t),n}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:BR,priority:0})}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&Nf(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=Yo();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=Yo();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=this.getChildren();if(t.length===0||J(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 BR(e){let t=Yo();return e.style&&(t.setFormat(e.style.textAlign),e=parseInt(e.style.textIndent,10)/20,0<e&&t.setIndent(e)),{node:t}}function Yo(){return ju(new Os)}function wE(e,t,n,r){let i=e._keyToDOMMap;i.clear(),e._editorState=gv(),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="",i.set("root",n))}function UR(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 i=r();i!==null&&Object.keys(i).forEach(o=>{let l=t.get(o);l===void 0&&(l=[],t.set(o,l)),l.push(i[o])})}}),t}class WR{constructor(t,n,r,i,o,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=i,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=GS(),this._onError=o,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&&H(35);let i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);let o=i.get(t);o===void 0&&H(36,String(t));let l=o[r];return l.add(n),()=>{l.delete(n),o.every(s=>s.size===0)&&i.delete(t)}}registerMutationListener(t,n){this._nodes.get(t.getType())===void 0&&H(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&&H(37,t.name),r.transforms.add(n),r}registerNodeTransform(t,n){var r=this.registerNodeTransformToKlass(t,n);let i=[r];return r=r.replaceWithKlass,r!=null&&(r=this.registerNodeTransformToKlass(r,n),i.push(r)),vR(this,t.getType()),()=>{i.forEach(o=>o.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return X(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=$a(this._config.theme,"root");var r=this._pendingEditorState||this._editorState;if(this._rootElement=t,wE(this,n,t,r),n!==null){if(!this._config.disableEvents){ba!==0&&(ba--,ba===0&&n.ownerDocument.removeEventListener("selectionchange",fE));var i=n.__lexicalEditor;if(i!=null){if(i._parentEditor!==null){var o=av(i);o=o[o.length-1]._key,Xl.get(o)===i&&Xl.delete(o)}else Xl.delete(i._key);n.__lexicalEditor=null}for(i=dE(n),o=0;o<i.length;o++)i[o]();n.__lexicalEventHandles=[]}l!=null&&n.classList.remove(...l)}t!==null?(r=(r=t.ownerDocument)&&r.defaultView||null,i=t.style,i.userSelect="text",i.whiteSpace="pre-wrap",i.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=r,this._dirtyType=2,FS(this),this._updateTags.add("history-merge"),Bo(this),this._config.disableEvents||NR(t,this),l!=null&&t.classList.add(...l)):(this._editorState=r,this._window=this._pendingEditorState=null),Na("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&H(38),zS(this);let r=this._pendingEditorState,i=this._updateTags;n=n!==void 0?n.tag:null,r===null||r.isEmpty()||(n!=null&&i.add(n),Bo(this)),this._pendingEditorState=t,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,n!=null&&i.add(n),Bo(this)}parseEditorState(t,n){t=typeof t=="string"?JSON.parse(t):t;let r=gv(),i=jt,o=On,l=zt,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,jt=r,On=!1,zt=this;try{mv(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,jt=i,On=o,zt=l}return r}update(t,n){Wn(this,t,n)}focus(t,n={}){let r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Wn(this,()=>{let i=rt(),o=Yr();i!==null?i.dirty=!0:o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.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=Xr(this._window),t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Na("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}class vv extends ul{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 Qn(e){return e instanceof vv}class SE extends ul{}function yv(e){return e instanceof SE}class EE extends ul{}function uu(e){return e instanceof EE}L.$addUpdateTag=function(e){hn(),pt()._updateTags.add(e)};L.$applyNodeReplacement=ju;L.$copyNode=QS;L.$createLineBreakNode=ds;L.$createNodeSelection=ym;L.$createParagraphNode=Yo;L.$createRangeSelection=function(){let e=new Vr("root",0,"element"),t=new Vr("root",0,"element");return new al(e,t,0,"")};L.$createTabNode=Of;L.$createTextNode=Dt;L.$getAdjacentNode=rm;L.$getNearestNodeFromDOMNode=Iu;L.$getNearestRootOrShadowRoot=XS;L.$getNodeByKey=It;L.$getPreviousSelection=Ts;L.$getRoot=Yr;L.$getSelection=rt;L.$getTextContent=function(){let e=rt();return e===null?"":e.getTextContent()};L.$hasAncestor=bd;L.$hasUpdateTag=function(e){return pt()._updateTags.has(e)};L.$insertNodes=function(e,t){let n=rt()||Ts();return n===null&&(n=Yr().selectEnd()),n.insertNodes(e,t)};L.$isBlockElementNode=vm;L.$isDecoratorNode=tt;L.$isElementNode=B;L.$isInlineElementOrDecoratorNode=function(e){return B(e)&&e.isInline()||tt(e)&&e.isInline()};L.$isLeafNode=WS;L.$isLineBreakNode=su;L.$isNodeSelection=bs;L.$isParagraphNode=function(e){return e instanceof Os};L.$isRangeSelection=me;L.$isRootNode=mn;L.$isRootOrShadowRoot=xr;L.$isTabNode=function(e){return e instanceof $s};L.$isTextNode=J;L.$nodesOfType=function(e){var t=Qr();let n=t._readOnly,r=e.getType();t=t._nodeMap;let i=[];for(let[,o]of t)o instanceof e&&o.__type===r&&(n||o.isAttached())&&i.push(o);return i};L.$normalizeSelection__EXPERIMENTAL=ov;L.$parseSerializedNode=function(e){return mv(e,pt()._nodes)};L.$selectAll=function(){var e=Yr();e=e.select(0,e.getChildrenSize()),Wr(ov(e))};L.$setCompositionKey=Kt;L.$setSelection=Wr;L.$splitNode=JS;L.BLUR_COMMAND=LS;L.CAN_REDO_COMMAND={};L.CAN_UNDO_COMMAND={};L.CLEAR_EDITOR_COMMAND={};L.CLEAR_HISTORY_COMMAND={};L.CLICK_COMMAND=yS;L.COMMAND_PRIORITY_CRITICAL=4;L.COMMAND_PRIORITY_EDITOR=0;L.COMMAND_PRIORITY_HIGH=3;L.COMMAND_PRIORITY_LOW=1;L.COMMAND_PRIORITY_NORMAL=2;L.CONTROLLED_TEXT_INSERTION_COMMAND=Yl;L.COPY_COMMAND=ev;L.CUT_COMMAND=tv;L.DELETE_CHARACTER_COMMAND=tu;L.DELETE_LINE_COMMAND=ru;L.DELETE_WORD_COMMAND=nu;L.DEPRECATED_$computeGridMap=gE;L.DEPRECATED_$createGridSelection=function(){let e=new Vr("root",0,"element"),t=new Vr("root",0,"element");return new Af("root",e,t)};L.DEPRECATED_$getGridCellNodeRect=gm;L.DEPRECATED_$getNodeTriplet=vE;L.DEPRECATED_$isGridCellNode=Qn;L.DEPRECATED_$isGridNode=yv;L.DEPRECATED_$isGridRowNode=uu;L.DEPRECATED_$isGridSelection=hv;L.DEPRECATED_GridCellNode=vv;L.DEPRECATED_GridNode=SE;L.DEPRECATED_GridRowNode=EE;L.DRAGEND_COMMAND=MS;L.DRAGOVER_COMMAND=AS;L.DRAGSTART_COMMAND=PS;L.DROP_COMMAND=OS;L.DecoratorNode=xE;L.ElementNode=ul;L.FOCUS_COMMAND=DS;L.FORMAT_ELEMENT_COMMAND={};L.FORMAT_TEXT_COMMAND=Ui;L.INDENT_CONTENT_COMMAND={};L.INSERT_LINE_BREAK_COMMAND=ka;L.INSERT_PARAGRAPH_COMMAND=Jp;L.INSERT_TAB_COMMAND={};L.KEY_ARROW_DOWN_COMMAND=kS;L.KEY_ARROW_LEFT_COMMAND=SS;L.KEY_ARROW_RIGHT_COMMAND=_S;L.KEY_ARROW_UP_COMMAND=CS;L.KEY_BACKSPACE_COMMAND=bS;L.KEY_DELETE_COMMAND=NS;L.KEY_DOWN_COMMAND=xS;L.KEY_ENTER_COMMAND=wd;L.KEY_ESCAPE_COMMAND=TS;L.KEY_MODIFIER_COMMAND=IS;L.KEY_SPACE_COMMAND=$S;L.KEY_TAB_COMMAND=RS;L.LineBreakNode=ks;L.MOVE_TO_END=wS;L.MOVE_TO_START=ES;L.OUTDENT_CONTENT_COMMAND={};L.PASTE_COMMAND=Qg;L.ParagraphNode=Os;L.REDO_COMMAND=qg;L.REMOVE_TEXT_COMMAND=qp;L.RootNode=Rs;L.SELECTION_CHANGE_COMMAND=Cf;L.SELECT_ALL_COMMAND=em;L.TabNode=$s;L.TextNode=sl;L.UNDO_COMMAND=Jg;L.createCommand=function(){return{}};L.createEditor=function(e){var t=e||{},n=zt,r=t.theme||{};let i=e===void 0?n:t.parentEditor||null,o=t.disableEvents||!1,l=gv(),s=t.namespace||(i!==null?i._config.namespace:GS()),a=t.editorState,u=[Rs,sl,ks,$s,Os,...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(),w=new Set;g!==null&&w.add(g),e.set(m,{klass:f,replace:h,replaceWithKlass:d,transforms:w})}return r=new WR(l,i,e,{disableEvents:o,namespace:s,theme:r},c||console.error,UR(e),t),a!==void 0&&(r._pendingEditorState=a,r._dirtyType=2),r};L.getNearestEditorFromDOMNode=sv;L.isHTMLAnchorElement=function(e){return Nf(e)&&e.tagName==="A"};L.isHTMLElement=Nf;L.isSelectionCapturedInDecoratorInput=lv;L.isSelectionWithinEditor=Lu;const VR=L;var xe=VR;function xv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let cl=xv();function CE(e){cl=e}const kE=/[&<>"']/,HR=new RegExp(kE.source,"g"),$E=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,KR=new RegExp($E.source,"g"),ZR={"&":"&","<":"<",">":">",'"':""","'":"'"},J0=e=>ZR[e];function Mn(e,t){if(t){if(kE.test(e))return e.replace(HR,J0)}else if($E.test(e))return e.replace(KR,J0);return e}const GR=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function YR(e){return e.replace(GR,(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 XR=/(^|[^\[])\^/g;function Be(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,i)=>(i=typeof i=="object"&&"source"in i?i.source:i,i=i.replace(XR,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}function q0(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Pd={exec:()=>null};function ex(e,t){const n=e.replace(/\|/g,(o,l,s)=>{let a=!1,u=l;for(;--u>=0&&s[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let i=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(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function gc(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o===t&&!n)i++;else if(o!==t&&n)i++;else break}return e.slice(0,r-i)}function QR(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 tx(e,t,n,r){const i=t.href,o=t.title?Mn(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:i,title:o,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,s}return{type:"image",raw:n,href:i,title:o,text:Mn(l)}}function JR(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
|
|
48
72
|
`).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[l]=o;return l.length>=r.length?i.slice(r.length):i}).join(`
|
|
49
|
-
`)}class
|
|
50
|
-
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=
|
|
73
|
+
`)}class Ad{constructor(t){Je(this,"options");Je(this,"rules");Je(this,"lexer");this.options=t||cl}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:gc(r,`
|
|
74
|
+
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=JR(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=gc(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.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=gc(n[0].replace(/^ *>[ \t]?/gm,""),`
|
|
51
75
|
`),i=this.lexer.state.top;this.lexer.state.top=!0;const o=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:o,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?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(`
|
|
52
76
|
`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),f=t.split(`
|
|
53
77
|
`,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+`
|
|
54
|
-
`,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+|$)`),_=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),
|
|
55
|
-
`,1)[0];if(f=E,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),_.test(f)||
|
|
56
|
-
`+f.slice(h);else{if(m||d.search(/[^ ]/)>=4||_.test(d)||
|
|
78
|
+
`,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+|$)`),_=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),S=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;t;){const E=t.split(`
|
|
79
|
+
`,1)[0];if(f=E,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),_.test(f)||S.test(f)||v.test(f)||y.test(t))break;if(f.search(/[^ ]/)>=h||!f.trim())a+=`
|
|
80
|
+
`+f.slice(h);else{if(m||d.search(/[^ ]/)>=4||_.test(d)||S.test(d)||y.test(d))break;a+=`
|
|
57
81
|
`+f}!m&&!f.trim()&&(m=!0),s+=E+`
|
|
58
|
-
`,t=t.substring(E.length+1),d=f.slice(h)}}o.loose||(u?o.loose=!0:/\n *\n *$/.test(s)&&(u=!0));let g=null,
|
|
59
|
-
`):[]};if(r.header.length===r.align.length){let i=r.align.length,o,l,s,a;for(o=0;o<i;o++){const u=r.align[o];u&&(/^ *-+: *$/.test(u)?r.align[o]="right":/^ *:-+: *$/.test(u)?r.align[o]="center":/^ *:-+ *$/.test(u)?r.align[o]="left":r.align[o]=null)}for(i=r.rows.length,o=0;o<i;o++)r.rows[o]=
|
|
60
|
-
`?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:Mn(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=
|
|
61
|
-
]`).replace("lheading",ue.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Y={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:
|
|
82
|
+
`,t=t.substring(E.length+1),d=f.slice(h)}}o.loose||(u?o.loose=!0:/\n *\n *$/.test(s)&&(u=!0));let g=null,w;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(w=g[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:s,task:!!g,checked:w,loose:!1,text:a,tokens:[]}),o.raw+=s}o.items[o.items.length-1].raw=s.trimEnd(),o.items[o.items.length-1].text=a.trimEnd(),o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){const d=o.items[c].tokens.filter(h=>h.type==="space"),f=d.length>0&&d.some(h=>/\n.*\n/.test(h.raw));o.loose=f}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}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," "),i=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",o=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:i,title:o}}}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:ex(n[1]).map(i=>({text:i,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
83
|
+
`):[]};if(r.header.length===r.align.length){let i=r.align.length,o,l,s,a;for(o=0;o<i;o++){const u=r.align[o];u&&(/^ *-+: *$/.test(u)?r.align[o]="right":/^ *:-+: *$/.test(u)?r.align[o]="center":/^ *:-+ *$/.test(u)?r.align[o]="left":r.align[o]=null)}for(i=r.rows.length,o=0;o<i;o++)r.rows[o]=ex(r.rows[o],r.header.length).map(u=>({text:u,tokens:[]}));for(i=r.header.length,l=0;l<i;l++)r.header[l].tokens=this.lexer.inline(r.header[l].text);for(i=r.rows.length,l=0;l<i;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)===`
|
|
84
|
+
`?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:Mn(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=gc(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=QR(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 i=n[2],o="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);l&&(i=l[1],o=l[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),tx(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.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 i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return tx(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...i[0]].length-1;let s,a,u=l,c=0;const d=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+l);(i=d.exec(n))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(a=[...s].length,i[3]||i[4]){u+=a;continue}else if((i[5]||i[6])&&l%3&&!((l+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const f=[...i[0]][0].length,h=t.slice(0,l+i.index+f+a);if(Math.min(l,a)%2){const g=h.slice(1,-1);return{type:"em",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}const m=h.slice(2,-2);return{type:"strong",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),o=/^ /.test(r)&&/ $/.test(r);return i&&o&&(r=r.substring(1,r.length-1)),r=Mn(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,i;return n[2]==="@"?(r=Mn(n[1]),i="mailto:"+r):(r=Mn(n[1]),i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,i;if(n[2]==="@")r=Mn(n[0]),i="mailto:"+r;else{let o;do o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(o!==n[0]);r=Mn(n[0]),n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:r,href:i,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=Mn(n[0]),{type:"text",raw:n[0],text:r}}}}const ue={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:Pd,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]+/};ue._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;ue._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;ue.def=Be(ue.def).replace("label",ue._label).replace("title",ue._title).getRegex();ue.bullet=/(?:[*+-]|\d{1,9}[.)])/;ue.listItemStart=Be(/^( *)(bull) */).replace("bull",ue.bullet).getRegex();ue.list=Be(ue.list).replace(/bull/g,ue.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ue.def.source+")").getRegex();ue._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";ue._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;ue.html=Be(ue.html,"i").replace("comment",ue._comment).replace("tag",ue._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();ue.lheading=Be(ue.lheading).replace(/bull/g,ue.bullet).getRegex();ue.paragraph=Be(ue._paragraph).replace("hr",ue.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",ue._tag).getRegex();ue.blockquote=Be(ue.blockquote).replace("paragraph",ue.paragraph).getRegex();ue.normal={...ue};ue.gfm={...ue.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};ue.gfm.table=Be(ue.gfm.table).replace("hr",ue.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",ue._tag).getRegex();ue.gfm.paragraph=Be(ue._paragraph).replace("hr",ue.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ue.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",ue._tag).getRegex();ue.pedantic={...ue.normal,html:Be(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ue._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:Pd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Be(ue.normal._paragraph).replace("hr",ue.hr).replace("heading",` *#{1,6} *[^
|
|
85
|
+
]`).replace("lheading",ue.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Y={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Pd,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:Pd,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/};Y._punctuation="\\p{P}$+<=>`^|~";Y.punctuation=Be(Y.punctuation,"u").replace(/punctuation/g,Y._punctuation).getRegex();Y.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;Y.anyPunctuation=/\\[punct]/g;Y._escapes=/\\([punct])/g;Y._comment=Be(ue._comment).replace("(?:-->|$)","-->").getRegex();Y.emStrong.lDelim=Be(Y.emStrong.lDelim,"u").replace(/punct/g,Y._punctuation).getRegex();Y.emStrong.rDelimAst=Be(Y.emStrong.rDelimAst,"gu").replace(/punct/g,Y._punctuation).getRegex();Y.emStrong.rDelimUnd=Be(Y.emStrong.rDelimUnd,"gu").replace(/punct/g,Y._punctuation).getRegex();Y.anyPunctuation=Be(Y.anyPunctuation,"gu").replace(/punct/g,Y._punctuation).getRegex();Y._escapes=Be(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=Be(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=Be(Y.tag).replace("comment",Y._comment).replace("attribute",Y._attribute).getRegex();Y._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;Y._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;Y._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;Y.link=Be(Y.link).replace("label",Y._label).replace("href",Y._href).replace("title",Y._title).getRegex();Y.reflink=Be(Y.reflink).replace("label",Y._label).replace("ref",ue._label).getRegex();Y.nolink=Be(Y.nolink).replace("ref",ue._label).getRegex();Y.reflinkSearch=Be(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:Be(/^!?\[(label)\]\((.*?)\)/).replace("label",Y._label).getRegex(),reflink:Be(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y._label).getRegex()};Y.gfm={...Y.normal,escape:Be(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=Be(Y.gfm.url,"i").replace("email",Y.gfm._extended_email).getRegex();Y.breaks={...Y.gfm,br:Be(Y.br).replace("{2,}","*").getRegex(),text:Be(Y.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class Lr{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||cl,this.options.tokenizer=this.options.tokenizer||new Ad,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:ue.normal,inline:Y.normal};this.options.pedantic?(n.block=ue.pedantic,n.inline=Y.pedantic):this.options.gfm&&(n.block=ue.gfm,this.options.breaks?n.inline=Y.breaks:n.inline=Y.gfm),this.tokenizer.rules=n}static get rules(){return{block:ue,inline:Y}}static lex(t,n){return new Lr(n).lex(t)}static lexInline(t,n){return new Lr(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
62
86
|
`),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,i,o,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+=`
|
|
63
87
|
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
|
64
88
|
`+r.raw,i.text+=`
|
|
@@ -68,7 +92,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
68
92
|
`+r.raw,i.text+=`
|
|
69
93
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),l=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
|
|
70
94
|
`+r.raw,i.text+=`
|
|
71
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.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,i,o,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),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.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),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.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(o=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&&(o=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.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
|
|
95
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.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,i,o,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),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.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),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.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(o=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&&(o=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.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 Md{constructor(t){Je(this,"options");this.options=t||cl}code(t,n,r){var o;const i=(o=(n||"").match(/^\S*/))==null?void 0:o[0];return t=t.replace(/\n$/,"")+`
|
|
72
96
|
`,i?'<pre><code class="language-'+Mn(i)+'">'+(r?t:Mn(t,!0))+`</code></pre>
|
|
73
97
|
`:"<pre><code>"+(r?t:Mn(t,!0))+`</code></pre>
|
|
74
98
|
`}blockquote(t){return`<blockquote>
|
|
@@ -86,48 +110,24 @@ ${t}</blockquote>
|
|
|
86
110
|
`}tablerow(t){return`<tr>
|
|
87
111
|
${t}</tr>
|
|
88
112
|
`}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+`</${r}>
|
|
89
|
-
`}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 i=
|
|
90
|
-
`+(l.tokens?this.parseInline(l.tokens):l.text);r+=n?this.renderer.paragraph(s):s;continue}default:{const l='Token with "'+o.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 i=0;i<t.length;i++){const o=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=l||"";continue}}switch(o.type){case"escape":{const l=o;r+=n.text(l.text);break}case"html":{const l=o;r+=n.html(l.text);break}case"link":{const l=o;r+=n.link(l.href,l.title,this.parseInline(l.tokens,n));break}case"image":{const l=o;r+=n.image(l.href,l.title,l.text);break}case"strong":{const l=o;r+=n.strong(this.parseInline(l.tokens,n));break}case"em":{const l=o;r+=n.em(this.parseInline(l.tokens,n));break}case"codespan":{const l=o;r+=n.codespan(l.text);break}case"br":{r+=n.br();break}case"del":{const l=o;r+=n.del(this.parseInline(l.tokens,n));break}case"text":{const l=o;r+=n.text(l.text);break}default:{const l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}}class
|
|
91
|
-
Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+Mn(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}};const
|
|
92
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
93
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,l=!1,s;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return o=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function
|
|
94
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
95
|
-
`],n=[],r={},i=0;i<e.length;i++){var o=e[i],l=
|
|
113
|
+
`}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 i=q0(t);if(i===null)return r;t=i;let o='<a href="'+t+'"';return n&&(o+=' title="'+n+'"'),o+=">"+r+"</a>",o}image(t,n,r){const i=q0(t);if(i===null)return r;t=i;let o=`<img src="${t}" alt="${r}"`;return n&&(o+=` title="${n}"`),o+=">",o}text(t){return t}}class _v{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 Ir{constructor(t){Je(this,"options");Je(this,"renderer");Je(this,"textRenderer");this.options=t||cl,this.options.renderer=this.options.renderer||new Md,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new _v}static parse(t,n){return new Ir(n).parse(t)}static parseInline(t,n){return new Ir(n).parseInline(t)}parse(t,n=!0){let r="";for(let i=0;i<t.length;i++){const o=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const l=o,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(o.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{const l=o;r+=this.renderer.heading(this.parseInline(l.tokens),l.depth,YR(this.parseInline(l.tokens,this.textRenderer)));continue}case"code":{const l=o;r+=this.renderer.code(l.text,l.lang,!!l.escaped);continue}case"table":{const l=o;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=o,s=this.parse(l.tokens);r+=this.renderer.blockquote(s);continue}case"list":{const l=o,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 w=this.renderer.checkbox(!!h);u?f.tokens.length>0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=w+" "+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=w+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:w+" "}):g+=w+" "}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=o;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=o;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=o,s=l.tokens?this.parseInline(l.tokens):l.text;for(;i+1<t.length&&t[i+1].type==="text";)l=t[++i],s+=`
|
|
114
|
+
`+(l.tokens?this.parseInline(l.tokens):l.text);r+=n?this.renderer.paragraph(s):s;continue}default:{const l='Token with "'+o.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 i=0;i<t.length;i++){const o=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=l||"";continue}}switch(o.type){case"escape":{const l=o;r+=n.text(l.text);break}case"html":{const l=o;r+=n.html(l.text);break}case"link":{const l=o;r+=n.link(l.href,l.title,this.parseInline(l.tokens,n));break}case"image":{const l=o;r+=n.image(l.href,l.title,l.text);break}case"strong":{const l=o;r+=n.strong(this.parseInline(l.tokens,n));break}case"em":{const l=o;r+=n.em(this.parseInline(l.tokens,n));break}case"codespan":{const l=o;r+=n.codespan(l.text);break}case"br":{r+=n.br();break}case"del":{const l=o;r+=n.del(this.parseInline(l.tokens,n));break}case"text":{const l=o;r+=n.text(l.text);break}default:{const l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}}class Ra{constructor(t){Je(this,"options");this.options=t||cl}preprocess(t){return t}postprocess(t){return t}}Je(Ra,"passThroughHooks",new Set(["preprocess","postprocess"]));var bu,xm,nf,bE;class qR{constructor(...t){nh(this,bu);nh(this,nf);Je(this,"defaults",xv());Je(this,"options",this.setOptions);Je(this,"parse",Gu(this,bu,xm).call(this,Lr.lex,Ir.parse));Je(this,"parseInline",Gu(this,bu,xm).call(this,Lr.lexInline,Ir.parseInline));Je(this,"Parser",Ir);Je(this,"Renderer",Md);Je(this,"TextRenderer",_v);Je(this,"Lexer",Lr);Je(this,"Tokenizer",Ad);Je(this,"Hooks",Ra);this.use(...t)}walkTokens(t,n){var i,o;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;(o=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&o[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 i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const l=n.renderers[o.name];l?n.renderers[o.name]=function(...s){let a=o.renderer.apply(this,s);return a===!1&&(a=l.apply(this,s)),a}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[o.level];l?l.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),i.extensions=n),r.renderer){const o=this.defaults.renderer||new Md(this.defaults);for(const l in r.renderer){const s=r.renderer[l],a=l,u=o[a];o[a]=(...c)=>{let d=s.apply(o,c);return d===!1&&(d=u.apply(o,c)),d||""}}i.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new Ad(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],a=l,u=o[a];o[a]=(...c)=>{let d=s.apply(o,c);return d===!1&&(d=u.apply(o,c)),d}}i.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new Ra;for(const l in r.hooks){const s=r.hooks[l],a=l,u=o[a];Ra.passThroughHooks.has(l)?o[a]=c=>{if(this.defaults.async)return Promise.resolve(s.call(o,c)).then(f=>u.call(o,f));const d=s.call(o,c);return u.call(o,d)}:o[a]=(...c)=>{let d=s.apply(o,c);return d===!1&&(d=u.apply(o,c)),d}}i.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,l=r.walkTokens;i.walkTokens=function(s){let a=[];return a.push(l.call(this,s)),o&&(a=a.concat(o.call(this,s))),a}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Lr.lex(t,n??this.defaults)}parser(t,n){return Ir.parse(t,n??this.defaults)}}bu=new WeakSet,xm=function(t,n){return(r,i)=>{const o={...i},l={...this.defaults,...o};this.defaults.async===!0&&o.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=Gu(this,nf,bE).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)}}},nf=new WeakSet,bE=function(t,n){return r=>{if(r.message+=`
|
|
115
|
+
Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+Mn(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}};const Xo=new qR;function He(e,t){return Xo.parse(e,t)}He.options=He.setOptions=function(e){return Xo.setOptions(e),He.defaults=Xo.defaults,CE(He.defaults),He};He.getDefaults=xv;He.defaults=cl;He.use=function(...e){return Xo.use(...e),He.defaults=Xo.defaults,CE(He.defaults),He};He.walkTokens=function(e,t){return Xo.walkTokens(e,t)};He.parseInline=Xo.parseInline;He.Parser=Ir;He.parser=Ir.parse;He.Renderer=Md;He.TextRenderer=_v;He.Lexer=Lr;He.lexer=Lr.lex;He.Tokenizer=Ad;He.Hooks=Ra;He.parse=He;He.options;He.setOptions;He.use;He.walkTokens;He.parseInline;Ir.parse;const eO=Lr.lex;function tO(e){if(Array.isArray(e))return e}function nO(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,s=[],a=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);a=!0);}catch(c){u=!0,i=c}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return s}}function _m(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 wv(e,t){if(e){if(typeof e=="string")return _m(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 _m(e,t)}}function rO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
116
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iO(e,t){return tO(e)||nO(e,t)||wv(e,t)||rO()}function oO(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 lO(e){var t=oO(e,"string");return typeof t=="symbol"?t:String(t)}function qt(e,t,n){return t=lO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sO(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=wv(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(a){throw a},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
117
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,l=!1,s;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return o=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function aO(e){if(Array.isArray(e))return _m(e)}function uO(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
118
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wm(e){return aO(e)||uO(e)||wv(e)||cO()}var dO=/^data:(image\/(png|jpeg|jpg|gif|webp|bmp|tiff|ico|svg\+xml));base64,/;function Sv(e){var t=dO.exec(e);if(t&&t[1])return t[1]}function Ev(e){return e==="image/svg+xml"?"svg":e==="image/vnd.microsoft.icon"?"ico":e.startsWith("image/")?e.slice(6):e}var fO=/^h([\d+])$/;function hO(e){var t=e.children.map(pO);return mO(t)}function pO(e){if(e.type==="heading"){var t,n="",r=Number((t=e.tag.match(fO))===null||t===void 0?void 0:t[1]);if(Number.isNaN(r))throw new Error("Invalid header depth");for(var i=0;i<Number(r);i++)n+="#";var o=["".concat(n," ")];return{type:"block",children:o.concat.apply(o,wm(e.children.map(Sm)))}}else{if(e.type==="paragraph")return e.children.length===0?{type:"block",children:["<br />"]}:{type:"block",children:e.children.map(function(s){return Sm(s)})};if(e.type==="list")return{type:"block",children:e.children.flatMap(function(s,a){return NE(RE(e),s,0,a===0)})};var l=e;throw new Error("Unhandled node type: ".concat("type"in l?"exhaustiveCheck.type":"unknown"))}}function mO(e){for(var t=[`
|
|
119
|
+
`],n=[],r={},i=0;i<e.length;i++){var o=e[i],l=sO(o.children),s;try{for(l.s();!(s=l.n()).done;){var a=s.value;if(typeof a=="string")t[t.length-1]+=a;else{if(a.type==="image")n.push(xO(a,r));else if(a.type==="link")n.push(wO(a));else{var u=a;throw new Error("Unexpected node type: ".concat(JSON.stringify(u,null,2)))}t.push("")}}}catch(c){l.e(c)}finally{l.f()}i===e.length-1?t[t.length-1]+=`
|
|
96
120
|
`:t[t.length-1]+=`
|
|
97
121
|
|
|
98
|
-
`}return qt(qt(qt(qt({},nn,"richtext"),"templateStrings",t),"exprs",n),"files",r)}function
|
|
99
|
-
`:e}function
|
|
100
|
-
`,l=["".concat(o).concat(" ".repeat(n)).concat(e)];return((r=t.children)===null||r===void 0||(r=r[0])===null||r===void 0?void 0:r.type)!=="list"&&l.push(" "),l.concat(t.children.flatMap(function(s){return s.type==="list"?s.children.flatMap(function(a){return
|
|
101
|
-
`),c=u.flatMap(function(w,E){return E===u.length-1?[w]:[w,{tag:"br",children:[]}]});i.push.apply(i,em(c))}else i.push(a.raw);else if(a.type==="list")i.push({tag:a.ordered?"ol":"ul",children:pr(a.items,t,0).children});else if(a.type==="list_item")i.push({tag:"li",children:pr(a.tokens?a.tokens:[],t,0,!0).children});else if(a.type!=="space")if(a.type==="html"){if(a.text===rm)return{v:{children:i,cursor:n}};var d=a.text.indexOf(nm);if(a.text.startsWith(Cd)&&d>-1){var f=Number(a.text.slice(Cd.length,d));if(Number.isNaN(f))throw Error("Illegal val intermediate node: ".concat(JSON.stringify(a)));var h=pr(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")i.push({tag:"a",href:S.href,children:m});else if(S._type==="file"){var v,y;i.push({tag:"img",src:jn.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 _=/<br\s*\/?>/gi;a.text.trim().match(_)&&i.push({tag:"br",children:[]})}else a.type==="link"?a.raw===a.href?i.push(a.raw):i.push({tag:"a",href:a.href,children:pr(a.tokens?a.tokens:[],t,0).children}):a.type==="br"?i.push({tag:"br",children:[]}):console.error("Could not parse markdown: unsupported token type: ".concat(a.type,". Found: ").concat(a.raw));n++},l;n<e.length;)if(l=o(),l)return l.v;return{children:i,cursor:n}}function $S(e){var t=e.templateStrings,n=e.exprs,r=t.flatMap(function(a,u){var c=n[u];return c?c[nn]==="link"?a.concat("".concat(Cd).concat(u).concat(nm).concat(c.children[0]).concat(rm)):a.concat("".concat(Cd).concat(u).concat(nm).concat(rm)):a}).join(""),i=hR(r,{gfm:!0}),o=pr(i,n,0),l=o.children,s=o.cursor;if(s!==i.length)throw Error("Unexpectedly terminated markdown parsing. Possible reason: unclosed html tag?");return qt(qt({},nn,"richtext"),"children",l)}var wn={},I={};let Cf={},bS={},qa={},Ca={},im={},Gl={},nv={},om={},eu={},tu={},Ui={},rv={},iv={},TS={},NS={},RS={},OS={},PS={},AS={},MS={},kd={},DS={},IS={},LS={},jS={},zS={},FS={},BS={},US={},WS={},ov={},lv={},lm={},VS={},HS={},KS={};function H(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 wi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",WR=wi&&"documentMode"in document?document.documentMode:null,Qt=wi&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ro=wi&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),$d=wi&&"InputEvent"in window&&!WR?"getTargetRanges"in new window.InputEvent("input"):!1,sv=wi&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),kf=wi&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,VR=wi&&/^(?=.*Chrome).*/i.test(navigator.userAgent),av=wi&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!VR,$f=sv||kf||av?" ":"",HR=ro?" ":$f,KR=/^[^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]/,ZR=/^[^\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]/,zo={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},GR={directionless:1,unmergeable:2},M0={center:2,end:6,justify:4,left:1,right:3,start:5},YR={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},XR={normal:0,segmented:2,token:1},QR={0:"normal",2:"segmented",1:"token"},sm=!1,uv=0;function JR(e){uv=e.timeStamp}function Nh(e,t,n){return t.__lexicalLineBreak===e||e[`__lexicalKey_${n._key}`]!==void 0}function qR(e){return e.getEditorState().read(()=>{let t=rt();return t!==null?t.clone():null})}function ZS(e,t,n){sm=!0;let r=100<performance.now()-uv;try{Wn(e,()=>{let i=rt()||qR(e);var o=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=Du(m,s);if(!(g===null&&m!==l||tt(g))){if(h==="characterData"){if(f=r&&J(g))e:{f=i,h=m;var S=g;if(me(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=Xr(e._window),h=f=null,S!==null&&S.anchorNode===m&&(f=S.anchorOffset,h=S.focusOffset),m=m.nodeValue,m!==null&&mv(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=eE(v),_=v.parentNode;_==null||v===a||y!==null||v.nodeName==="BR"&&Nh(v,_,e)||(ro&&(y=v.innerText||v.nodeValue)&&(c+=y),_.removeChild(v))}if(f=f.removedNodes,h=f.length,0<h){for(S=0,v=0;v<h;v++)_=f[v],(_.nodeName==="BR"&&Nh(_,m,e)||a===_)&&(m.appendChild(_),S++);h!==S&&(m===l&&(g=s._nodeMap.get("root")),o.set(m,g))}}}}if(0<o.size)for(let[w,E]of o)if(B(E))for(o=E.getChildrenKeys(),l=w.firstChild,s=0;s<o.length;s++)a=e.getElementByKey(o[s]),a!==null&&(l==null?(w.appendChild(a),l=a):l!==a&&w.replaceChild(a,l),l=l.nextSibling);else J(E)&&E.markDirty();if(o=n.takeRecords(),0<o.length){for(l=0;l<o.length;l++)for(a=o[l],s=a.addedNodes,a=a.target,d=0;d<s.length;d++)g=s[d],m=g.parentNode,m==null||g.nodeName!=="BR"||Nh(g,a,e)||m.removeChild(g);n.takeRecords()}i!==null&&(u&&(i.dirty=!0,Wr(i)),ro&&iE(e)&&i.insertRawText(c))})}finally{sm=!1}}function GS(e){let t=e._observer;if(t!==null){let n=t.takeRecords();ZS(e,n,t)}}function YS(e){uv===0&&Tf(e).addEventListener("textInput",JR,!0),e._observer=new MutationObserver((t,n)=>{ZS(e,t,n)})}function D0(e,t){let n=e.__mode,r=e.__format;e=e.__style;let i=t.__mode,o=t.__format;return t=t.__style,(n===null||n===i)&&(r===null||r===o)&&(e===null||e===t)}function I0(e,t){let n=e.mergeWithSibling(t),r=pt()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function XS(e){if(e.__text===""&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;(t=e.getPreviousSibling())!==null&&J(t)&&t.isSimpleText()&&!t.isUnmergeable();)if(t.__text==="")t.remove();else{D0(t,e)&&(e=I0(t,e));break}for(var n;(n=e.getNextSibling())!==null&&J(n)&&n.isSimpleText()&&!n.isUnmergeable();)if(n.__text==="")n.remove();else{D0(e,n)&&I0(e,n);break}}}function cv(e){return L0(e.anchor),L0(e.focus),e}function L0(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),J(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}else if(!B(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let eO=1,tO=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function dv(e){let t=document.activeElement;if(t===null)return!1;let n=t.nodeName;return tt(Du(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&t.__lexicalEditor==null)}function Mu(e,t,n){let r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!dv(t)&&fv(t)===e}catch{return!1}}function fv(e){for(;e!=null;){let t=e.__lexicalEditor;if(t!=null)return t;e=bf(e)}return null}function am(e){return e.isToken()||e.isSegmented()}function bd(e){for(;e!=null;){if(e.nodeType===3)return e;e=e.firstChild}return null}function QS(e,t,n){return t=zo[t],e&t&&(n===null||!(n&t))?e^t:n===null||n&t?e|t:e}function JS(e){return J(e)||ou(e)||tt(e)}function qS(e,t){if(t!=null)e.__key=t;else{hn(),99<lu&&H(14),t=pt();var n=Qr(),r=""+eO++;n._nodeMap.set(r,e),B(e)?t._dirtyElements.set(r,!0):t._dirtyLeaves.add(r),t._cloneNotNeeded.add(r),t._dirtyType=1,e.__key=r}}function Fo(e){var t=e.getParent();if(t!==null){let i=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 o=e.getWritable();o.__prev=r.__key,r.__next=o.__key}else r.__next=null;i.__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,i.__next=null),t.__size--,i.__parent=null}}function Td(e){99<lu&&H(14);var t=e.getLatest(),n=t.__parent,r=Qr();let i=pt(),o=r._nodeMap;if(r=i._dirtyElements,n!==null)e:for(;n!==null;){if(r.has(n))break e;let l=o.get(n);if(l===void 0)break;r.set(n,!1),n=l.__parent}t=t.__key,i._dirtyType=1,B(e)?r.set(t,!0):i._dirtyLeaves.add(t)}function Kt(e){hn();var t=pt();let n=t._compositionKey;e!==n&&(t._compositionKey=e,n!==null&&(t=Lt(n),t!==null&&t.getWritable()),e!==null&&(e=Lt(e),e!==null&&e.getWritable()))}function Wi(){return Ns()?null:pt()._compositionKey}function Lt(e,t){return e=(t||Qr())._nodeMap.get(e),e===void 0?null:e}function eE(e,t){let n=pt();return e=e[`__lexicalKey_${n._key}`],e!==void 0?Lt(e,t):null}function Du(e,t){for(;e!=null;){let n=eE(e,t);if(n!==null)return n;e=bf(e)}return null}function tE(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t}function j0(e){return e.read(()=>Yr().getTextContent())}function nO(e,t){Wn(e,()=>{var n=Qr();if(!n.isEmpty())if(t==="root")Yr().markDirty();else{n=n._nodeMap;for(let[,r]of n)r.markDirty()}},e._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Yr(){return Qr()._nodeMap.get("root")}function Wr(e){hn();let t=Qr();e!==null&&(e.dirty=!0,e._cachedNodes=null),t._selection=e}function jl(e){var t=pt(),n;e:{for(n=e;n!=null;){let r=n[`__lexicalKey_${t._key}`];if(r!==void 0){n=r;break e}n=bf(n)}n=null}return n===null?(t=t.getRootElement(),e===t?Lt("root"):null):Lt(n)}function nE(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function hv(e){let t=[];for(;e!==null;)t.push(e),e=e._parentEditor;return t}function rE(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function pv(e,t,n){if(t=Xr(t._window),t!==null){var r=t.anchorNode,{anchorOffset:i,focusOffset:o}=t;if(r!==null&&(t=r.nodeType===3?r.nodeValue:null,r=Du(r),t!==null&&J(r))){if(t===$f&&n){let l=n.length;t=n,o=i=l}t!==null&&mv(r,t,i,o,e)}}}function mv(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){let u=o.isComposing(),c=t;if((u||i)&&t[t.length-1]===$f&&(c=t.slice(0,-1)),t=o.getTextContent(),i||c!==t)if(c==="")if(Kt(null),sv||kf||av)o.remove();else{let d=pt();setTimeout(()=>{d.update(()=>{o.isAttached()&&o.remove()})},20)}else{i=o.getParent(),t=Ts();var l=o.getTextContentSize(),s=Wi(),a=o.getKey();o.isToken()||s!==null&&a===s&&!u||me(t)&&(i!==null&&!i.canInsertTextBefore()&&t.anchor.offset===0||t.anchor.key===e.__key&&t.anchor.offset===0&&!o.canInsertTextBefore()||t.focus.key===e.__key&&t.focus.offset===l&&!o.canInsertTextAfter())?o.markDirty():(e=rt(),me(e)&&n!==null&&r!==null&&(e.setTextNodeRange(o,n,o,r),o.isSegmented()&&(n=o.getTextContent(),n=Dt(n),o.replace(n),o=n)),o.setTextContent(c))}}}function rO(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=(J(t)||B(t)&&t.isInline())&&!t.canInsertTextAfter()),e):e===t.getTextContentSize()?!t.canInsertTextAfter()||!n.canInsertTextAfter()||r:!1}function ka(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 gv(e,t,n,r,i){n.size!==0&&(n=r.__type,r=r.__key,t=t.get(n),t===void 0&&H(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"&&i==="created",(e===void 0||n)&&t.set(r,n?"updated":i))}function z0(e,t,n){let r=e.getParent(),i=n;return r!==null&&(t&&n===0?(i=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(i=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?i-1:i)}function um(e,t){var n=e.offset;return e.type==="element"?(e=e.getNode(),z0(e,t,n)):(e=e.getNode(),t&&n===0||!t&&n===e.getTextContentSize()?(n=t?e.getPreviousSibling():e.getNextSibling(),n===null?z0(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n):null)}function iE(e){return e=(e=Tf(e).event)&&e.inputType,e==="insertFromPaste"||e==="insertFromPasteAsQuotation"}function Nd(e){return!mn(e)&&!e.isLastChild()&&!e.isInline()}function Rd(e,t){return e=e._keyToDOMMap.get(t),e===void 0&&H(75,t),e}function bf(e){return e=e.assignedSlot||e.parentElement,e!==null&&e.nodeType===11?e.host:e}function Od(e,t){for(e=e.getParent();e!==null;){if(e.is(t))return!0;e=e.getParent()}return!1}function Tf(e){return e=e._window,e===null&&H(78),e}function oE(e){for(e=e.getParentOrThrow();e!==null&&!xr(e);)e=e.getParentOrThrow();return e}function xr(e){return mn(e)||B(e)&&e.isShadowRoot()}function lE(e){return e=e.constructor.clone(e),qS(e,null),e}function Iu(e){var t=pt();let n=e.constructor.getType();return t=t._nodes.get(n),t===void 0&&H(97),t=t.replace,t!==null?(t=t(e),t instanceof e.constructor||H(98),t):e}function Rh(e,t){e=e.getParent(),!mn(e)||B(t)||tt(t)||H(99)}function Oh(e){return(tt(e)||B(e)&&!e.canBeEmpty())&&!e.isInline()}function cm(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,t=e.parentElement,t!==null&&t.removeChild(e)}function Xr(e){return wi?(e||window).getSelection():null}function sE(e,t){let n=e.getChildAtIndex(t);n==null&&(n=e),xr(e)&&H(102);let r=l=>{const s=l.getParentOrThrow(),a=xr(s),u=l!==n||a?lE(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]},[i,o]=r(n);return[i,o]}function Pd(e,t){for(;e!==Yr()&&e!=null;){if(t(e))return e;e=e.getParent()}return null}function iO(e){let t=[],n=[e];for(;0<n.length;){let r=n.pop();r===void 0&&H(112),B(r)&&n.unshift(...r.getChildren()),r!==e&&t.push(r)}return t}function Nf(e){return e.nodeType===1}function aE(e,t,n,r,i,o){for(e=e.getFirstChild();e!==null;){let l=e.__key;e.__parent===t&&(B(e)&&aE(e,l,n,r,i,o),n.has(l)||o.delete(l),i.push(l)),e=e.getNextSibling()}}function oO(e,t,n,r){e=e._nodeMap,t=t._nodeMap;let i=[];for(let[o]of r){let l=t.get(o);l===void 0||l.isAttached()||(B(l)&&aE(l,o,e,t,i,r),e.has(o)||r.delete(o),i.push(o))}for(let o of i)t.delete(o);for(let o of n)r=t.get(o),r===void 0||r.isAttached()||(e.has(o)||n.delete(o),t.delete(o))}let Nt="",fn="",oi="",io,tn,nu,uE=!1,vv=!1,Rf,Bc=null,dm,fm,Yo,oo,hm,ru;function Uc(e,t){let n=Yo.get(e);if(t!==null){let r=gm(e);r.parentNode===t&&t.removeChild(r)}oo.has(e)||tn._keyToDOMMap.delete(e),B(n)&&(e=Ad(n,Yo),pm(e,0,e.length-1,null)),n!==void 0&&gv(ru,nu,Rf,n,"destroyed")}function pm(e,t,n,r){for(;t<=n;++t){let i=e[t];i!==void 0&&Uc(i,r)}}function $o(e,t){e.setProperty("text-align",t)}function cE(e,t){var n=io.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 dE(e,t){e=e.style,t===0?$o(e,""):t===1?$o(e,"left"):t===2?$o(e,"center"):t===3?$o(e,"right"):t===4?$o(e,"justify"):t===5?$o(e,"start"):t===6&&$o(e,"end")}function Wc(e,t,n){let r=oo.get(e);r===void 0&&H(60);let i=r.createDOM(io,tn);var o=tn._keyToDOMMap;if(i["__lexicalKey_"+tn._key]=e,o.set(e,i),J(r)?i.setAttribute("data-lexical-text","true"):tt(r)&&i.setAttribute("data-lexical-decorator","true"),B(r)){if(e=r.__indent,o=r.__size,e!==0&&cE(i,e),o!==0){--o,e=Ad(r,oo);var l=fn;fn="",mm(e,r,0,o,i,null),hE(r,i),fn=l}e=r.__format,e!==0&&dE(i,e),r.isInline()||fE(null,r,i),Nd(r)&&(Nt+=`
|
|
102
|
-
|
|
103
|
-
`,oi+=`
|
|
104
|
-
|
|
105
|
-
`)}else o=r.getTextContent(),tt(r)?(l=r.decorate(tn,io),l!==null&&pE(e,l),i.contentEditable="false"):J(r)&&(r.isDirectionless()||(fn+=o)),Nt+=o,oi+=o;return t!==null&&(n!=null?t.insertBefore(i,n):(n=t.__lexicalLineBreak,n!=null?t.insertBefore(i,n):t.appendChild(i))),gv(ru,nu,Rf,r,"created"),i}function mm(e,t,n,r,i,o){let l=Nt;for(Nt="";n<=r;++n)Wc(e[n],i,o);Nd(t)&&(Nt+=`
|
|
106
|
-
|
|
107
|
-
`),i.__lexicalTextContent=Nt,Nt=l+Nt}function F0(e,t){return e=t.get(e),ou(e)||tt(e)&&e.isInline()}function fE(e,t,n){e=e!==null&&(e.__size===0||F0(e.__last,Yo)),t=t.__size===0||F0(t.__last,oo),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 hE(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==fn||n!==Bc){let o=fn==="";if(o)var r=Bc;else r=fn,r=KR.test(r)?"rtl":ZR.test(r)?"ltr":null;if(r!==n){let l=t.classList,s=io.theme;var i=n!==null?s[n]:void 0;let a=r!==null?s[r]:void 0;i!==void 0&&(typeof i=="string"&&(i=i.split(" "),i=s[n]=i),l.remove(...i)),r===null||o&&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),vv||(e.getWritable().__dir=r)}Bc=r,t.__lexicalDirTextContent=fn,t.__lexicalDir=r}}function Ad(e,t){let n=[];for(e=e.__first;e!==null;){let r=t.get(e);r===void 0&&H(101),n.push(e),e=r.__next}return n}function aa(e,t){var n=Yo.get(e),r=oo.get(e);n!==void 0&&r!==void 0||H(61);var i=uE||fm.has(e)||dm.has(e);let o=Rd(tn,e);if(n===r&&!i)return B(n)?(r=o.__lexicalTextContent,r!==void 0&&(Nt+=r,oi+=r),r=o.__lexicalDirTextContent,r!==void 0&&(fn+=r)):(r=n.getTextContent(),J(n)&&!n.isDirectionless()&&(fn+=r),oi+=r,Nt+=r),o;if(n!==r&&i&&gv(ru,nu,Rf,r,"updated"),r.updateDOM(n,o,io))return r=Wc(e,null,null),t===null&&H(62),t.replaceChild(r,o),Uc(e,null),r;if(B(n)&&B(r)){if(e=r.__indent,e!==n.__indent&&cE(o,e),e=r.__format,e!==n.__format&&dE(o,e),i){e=r,i=fn,fn="",t=Nt;var l=n.__size,s=e.__size;if(Nt="",l===1&&s===1){var a=n.__first,u=e.__first;if(a===u)aa(a,o);else{var c=gm(a);u=Wc(u,null,null),o.replaceChild(u,c),Uc(a,null)}}else{u=Ad(n,Yo);var d=Ad(e,oo);if(l===0)s!==0&&mm(d,e,0,s-1,o,null);else if(s===0)l!==0&&(a=o.__lexicalLineBreak==null,pm(u,0,l-1,a?null:o),a&&(o.textContent=""));else{var f=u;u=d,d=l-1,l=s-1;let m=o.firstChild,g=0;for(s=0;g<=d&&s<=l;){var h=f[g];let S=u[s];if(h===S)m=Ph(aa(S,o)),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=Rd(tn,S),h===m?m=Ph(aa(S,o)):(m!=null?o.insertBefore(h,m):o.appendChild(h),aa(S,o)),g++):Wc(S,o,m),s++):(m=Ph(gm(h)),Uc(h,o),g++)}}a=g>d,c=s>l,a&&!c?(a=u[l+1],a=a===void 0?null:tn.getElementByKey(a),mm(u,e,s,l,o,a)):c&&!a&&pm(f,g,d,o)}}Nd(e)&&(Nt+=`
|
|
108
|
-
|
|
109
|
-
`),o.__lexicalTextContent=Nt,Nt=t+Nt,hE(e,o),fn=i,mn(r)||r.isInline()||fE(n,r,o)}Nd(r)&&(Nt+=`
|
|
110
|
-
|
|
111
|
-
`,oi+=`
|
|
112
|
-
|
|
113
|
-
`)}else n=r.getTextContent(),tt(r)?(i=r.decorate(tn,io),i!==null&&pE(e,i)):J(r)&&!r.isDirectionless()&&(fn+=n),Nt+=n,oi+=n;return!vv&&mn(r)&&r.__cachedText!==oi&&(r=r.getWritable(),r.__cachedText=oi),o}function pE(e,t){let n=tn._pendingDecorators,r=tn._decorators;if(n===null){if(r[e]===t)return;n=tE(tn)}n[e]=t}function Ph(e){return e=e.nextSibling,e!==null&&e===tn._blockCursorElement&&(e=e.nextSibling),e}function gm(e){let t=hm.get(e);return t===void 0&&H(75,e),t}let ei=Object.freeze({}),vm=[["keydown",hO],["pointerdown",sO],["compositionstart",dO],["compositionend",fO],["input",cO],["click",lO],["cut",ei],["copy",ei],["dragstart",ei],["dragover",ei],["dragend",ei],["paste",ei],["focus",ei],["blur",ei],["drop",ei]];$d&&vm.push(["beforeinput",(e,t)=>uO(e,t)]);let iu=0,mE=0,gE=0,Cl=null,$a=0,ym=!1,xm=!1,ba=!1,ua=!1,vE=[0,"",0,"root",0];function yE(e,t,n,r,i){let o=e.anchor,l=e.focus,s=o.getNode();var a=pt();let u=Xr(a._window),c=u!==null?u.anchorNode:null,d=o.key;a=a.getElementByKey(d);let f=n.length;return d!==l.key||!J(s)||(!i&&(!$d||gE<r+50)||s.isDirty()&&2>f||nE(n))&&o.offset!==l.offset&&!s.isComposing()||am(s)||s.isDirty()&&1<f||(i||!$d)&&a!==null&&!s.isComposing()&&c!==bd(a)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||rO(e,s)}function B0(e,t){return e!==null&&e.nodeValue!==null&&e.nodeType===3&&t!==0&&t!==e.nodeValue.length}function U0(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:l}=e;ym&&(ym=!1,B0(r,i)&&B0(o,l))||Wn(t,()=>{if(!n)Wr(null);else if(Mu(t,r,o)){var s=rt();if(me(s)){var a=s.anchor,u=a.getNode();if(s.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(s.dirty=!0);var c=Tf(t).event;c=c?c.timeStamp:performance.now();let[d,f,h,m,g]=vE;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(J(h)&&(u=!0,a&=h.getFormat(),a===0))break}s.format=u?a:0}}X(t,Cf,void 0)}})}function lO(e,t){Wn(t,()=>{let n=rt();var r=Xr(t._window);let i=Ts();if(r)if(me(n)){let l=n.anchor;var o=l.getNode();l.type==="element"&&l.offset===0&&n.isCollapsed()&&!mn(o)&&Yr().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)?(r.removeAllRanges(),n.dirty=!0):e.detail!==3||n.isCollapsed()||(r=n.focus.getNode(),o!==r&&(B(o)?o.select(0):o.getParentOrThrow().select(0)))}else e.pointerType==="touch"&&(o=r.anchorNode,o!==null&&(o=o.nodeType,o===1||o===3))&&(r=xv(i,r,t),Wr(r));X(t,bS,e)})}function sO(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&e!=="touch"&&Wn(t,()=>{tt(Du(n))||(xm=!0)})}function xE(e){return e.getTargetRanges?(e=e.getTargetRanges(),e.length===0?null:e[0]):null}function aO(e,t){return e!==t||B(e)||B(t)||!e.isToken()||!t.isToken()}function uO(e,t){let n=e.inputType,r=xE(e);n==="deleteCompositionText"||ro&&iE(t)||n!=="insertCompositionText"&&Wn(t,()=>{let i=rt();if(n==="deleteContentBackward"){if(i===null){var o=Ts();if(!me(o))return;Wr(o.clone())}if(me(i)){mE===229&&e.timeStamp<iu+30&&t.isComposing()&&i.anchor.key===i.focus.key?(Kt(null),iu=0,setTimeout(()=>{Wn(t,()=>{Kt(null)})},30),me(i)&&(o=i.anchor.getNode(),o.markDirty(),i.format=o.getFormat(),i.style=o.getStyle())):(e.preventDefault(),X(t,qa,!0));return}}if(me(i)){o=e.data,Cl!==null&&pv(!1,t,Cl),i.dirty&&Cl===null||!i.isCollapsed()||mn(i.anchor.getNode())||r===null||i.applyDOMRange(r),Cl=null;var l=i.focus,s=i.anchor.getNode();if(l=l.getNode(),n==="insertText"||n==="insertTranspose")o===`
|
|
114
|
-
`?(e.preventDefault(),X(t,Ca,!1)):o===`
|
|
115
|
-
|
|
116
|
-
`?(e.preventDefault(),X(t,im,void 0)):o==null&&e.dataTransfer?(o=e.dataTransfer.getData("text/plain"),e.preventDefault(),i.insertRawText(o)):o!=null&&yE(i,r,o,e.timeStamp,!0)?(e.preventDefault(),X(t,Gl,o)):Cl=o,gE=e.timeStamp;else switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":X(t,Gl,e);break;case"insertFromComposition":Kt(null),X(t,Gl,e);break;case"insertLineBreak":Kt(null),X(t,Ca,!1);break;case"insertParagraph":Kt(null),ba&&!kf?(ba=!1,X(t,Ca,!1)):X(t,im,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":X(t,nv,e);break;case"deleteByComposition":aO(s,l)&&X(t,om,e);break;case"deleteByDrag":case"deleteByCut":X(t,om,e);break;case"deleteContent":X(t,qa,!1);break;case"deleteWordBackward":X(t,eu,!0);break;case"deleteWordForward":X(t,eu,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":X(t,tu,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":X(t,tu,!1);break;case"formatStrikeThrough":X(t,Ui,"strikethrough");break;case"formatBold":X(t,Ui,"bold");break;case"formatItalic":X(t,Ui,"italic");break;case"formatUnderline":X(t,Ui,"underline");break;case"historyUndo":X(t,rv,void 0);break;case"historyRedo":X(t,iv,void 0)}}})}function cO(e,t){e.stopPropagation(),Wn(t,()=>{var n=rt(),r=e.data,i=xE(e);if(r!=null&&me(n)&&yE(n,i,r,e.timeStamp,!1)){ua&&(_m(t,r),ua=!1);var o=n.anchor,l=o.getNode();if(i=Xr(t._window),i===null)return;let s=o.offset;(o=$d&&!n.isCollapsed()&&J(l)&&i.anchorNode!==null)&&(l=l.getTextContent().slice(0,s)+r+l.getTextContent().slice(s+n.focus.offset),i=i.anchorNode,o=l===(i.nodeType===3?i.nodeValue:null)),o||X(t,Gl,r),r=r.length,ro&&1<r&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=r),sv||kf||av||!t.isComposing()||(iu=0,Kt(null))}else pv(!1,t,r!==null?r:void 0),ua&&(_m(t,r||void 0),ua=!1);hn(),n=pt(),GS(n)}),Cl=null}function dO(e,t){Wn(t,()=>{let n=rt();if(me(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();Kt(r.key),(e.timeStamp<iu+30||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||i.getStyle()!==n.style)&&X(t,Gl,HR)}})}function _m(e,t){var n=e._compositionKey;if(Kt(null),n!==null&&t!=null){if(t===""){t=Lt(n),e=bd(e.getElementByKey(n)),e!==null&&e.nodeValue!==null&&J(t)&&mv(t,e.nodeValue,null,null,!0);return}if(t[t.length-1]===`
|
|
117
|
-
`&&(n=rt(),me(n))){t=n.focus,n.anchor.set(t.key,t.offset,t.type),X(e,kd,null);return}}pv(!0,e,t)}function fO(e,t){ro?ua=!0:Wn(t,()=>{_m(t,e.data)})}function hO(e,t){if(iu=e.timeStamp,mE=e.keyCode,!t.isComposing()){var{keyCode:n,shiftKey:r,ctrlKey:i,metaKey:o,altKey:l}=e;if(!X(t,TS,e)){if(n!==39||i||o||l)if(n!==39||l||r||!i&&!o)if(n!==37||i||o||l)if(n!==37||l||r||!i&&!o)if(n!==38||i||o)if(n!==40||i||o)if(n===13&&r)ba=!0,X(t,kd,e);else if(n===32)X(t,DS,e);else if(Qt&&i&&n===79)e.preventDefault(),ba=!0,X(t,Ca,!0);else if(n!==13||r){var s=Qt?l||o?!1:n===8||n===72&&i:i||l||o?!1:n===8;s?n===8?X(t,IS,e):(e.preventDefault(),X(t,qa,!0)):n===27?X(t,LS,e):(s=Qt?r||l||o?!1:n===46||n===68&&i:i||l||o?!1:n===46,s?n===46?X(t,jS,e):(e.preventDefault(),X(t,qa,!1)):n===8&&(Qt?l:i)?(e.preventDefault(),X(t,eu,!0)):n===46&&(Qt?l:i)?(e.preventDefault(),X(t,eu,!1)):Qt&&o&&n===8?(e.preventDefault(),X(t,tu,!0)):Qt&&o&&n===46?(e.preventDefault(),X(t,tu,!1)):n===66&&!l&&(Qt?o:i)?(e.preventDefault(),X(t,Ui,"bold")):n===85&&!l&&(Qt?o:i)?(e.preventDefault(),X(t,Ui,"underline")):n===73&&!l&&(Qt?o:i)?(e.preventDefault(),X(t,Ui,"italic")):n!==9||l||i||o?n===90&&!r&&(Qt?o:i)?(e.preventDefault(),X(t,rv,void 0)):(s=Qt?n===90&&o&&r:n===89&&i||n===90&&i&&r,s?(e.preventDefault(),X(t,iv,void 0)):bs(t._editorState._selection)?(s=r?!1:n===67?Qt?o:i:!1,s?(e.preventDefault(),X(t,ov,e)):(s=r?!1:n===88?Qt?o:i:!1,s?(e.preventDefault(),X(t,lv,e)):n===65&&(Qt?o:i)&&(e.preventDefault(),X(t,lm,e)))):!ro&&n===65&&(Qt?o:i)&&(e.preventDefault(),X(t,lm,e))):X(t,zS,e))}else ba=!1,X(t,kd,e);else X(t,MS,e);else X(t,AS,e);else X(t,PS,e);else X(t,OS,e);else X(t,RS,e);else X(t,NS,e);(i||r||l||o)&&X(t,KS,e)}}}function _E(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}let Yl=new Map;function wE(e){e=e.target;let t=Xr(e==null?null:e.nodeType===9?e.defaultView:e.ownerDocument.defaultView);if(t!==null){var n=fv(t.anchorNode);if(n!==null){xm&&(xm=!1,Wn(n,()=>{var l=Ts(),s=t.anchorNode;s!==null&&(s=s.nodeType,s===1||s===3)&&(l=xv(l,t,n),Wr(l))})),e=hv(n),e=e[e.length-1];var r=e._key,i=Yl.get(r),o=i||e;o!==n&&U0(t,o,!1),U0(t,n,!0),n!==e?Yl.set(r,n):i&&Yl.delete(r)}}}function pO(e,t){$a===0&&e.ownerDocument.addEventListener("selectionchange",wE),$a++,e.__lexicalEditor=t;let n=_E(e);for(let r=0;r<vm.length;r++){let[i,o]=vm[r],l=typeof o=="function"?s=>{s._lexicalHandled!==!0&&(s._lexicalHandled=!0,t.isEditable()&&o(s,t))}:s=>{if(s._lexicalHandled!==!0&&(s._lexicalHandled=!0,t.isEditable()))switch(i){case"cut":return X(t,lv,s);case"copy":return X(t,ov,s);case"paste":return X(t,nv,s);case"dragstart":return X(t,BS,s);case"dragover":return X(t,US,s);case"dragend":return X(t,WS,s);case"focus":return X(t,VS,s);case"blur":return X(t,HS,s);case"drop":return X(t,FS,s)}};e.addEventListener(i,l),n.push(()=>{e.removeEventListener(i,l)})}}function wm(e,t,n){hn();var r=e.__key;let i=e.getParent();if(i!==null){var o=rt();if(me(o)&&B(e)){var{anchor:l,focus:s}=o,a=l.getNode(),u=s.getNode();Od(a,e)&&l.set(e.__key,0,"element"),Od(u,e)&&s.set(e.__key,0,"element")}if(a=o,u=!1,me(a)&&t){o=a.anchor;let c=a.focus;o.key===r&&(Dd(o,e,i,e.getPreviousSibling(),e.getNextSibling()),u=!0),c.key===r&&(Dd(c,e,i,e.getPreviousSibling(),e.getNextSibling()),u=!0)}else bs(a)&&t&&e.isSelected()&&e.selectPrevious();me(a)&&t&&!u?(r=e.getIndexWithinParent(),Fo(e),Md(a,i,r,-1)):Fo(e),n||xr(i)||i.canBeEmpty()||!i.isEmpty()||wm(i,t),t&&mn(i)&&i.isEmpty()&&i.selectEnd()}}class Lu{static getType(){H(64,this.name)}static clone(){H(65,this.name)}constructor(t){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,qS(this,t)}getType(){return this.__type}isAttached(){for(var t=this.__key;t!==null;){if(t==="root")return!0;if(t=Lt(t),t===null)break;t=t.__parent}return!1}isSelected(t){if(t=t||rt(),t==null)return!1;let n=t.getNodes().some(r=>r.__key===this.__key);return J(this)?n:me(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:Lt(t)}getParentOrThrow(){let t=this.getParent();return t===null&&H(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){let n=t.getParent();if(xr(n))return t;t=n}return null}getTopLevelElementOrThrow(){let t=this.getTopLevelElement();return t===null&&H(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:Lt(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:Lt(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();B(this)&&n.unshift(this),B(t)&&r.unshift(t),t=n.length;var i=r.length;if(t===0||i===0||n[t-1]!==r[i-1])return null;for(r=new Set(r),i=0;i<t;i++){let o=n[i];if(r.has(o))return o}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 i=r.getParentOrThrow();if(i===n){i=r.getIndexWithinParent();break}r=i}for(r=t;;){if(t=r.getParentOrThrow(),t===n){n=r.getIndexWithinParent();break}r=t}return i<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=[],i=new Set;for(var o=this;;){var l=o.__key;if(i.has(l)||(i.add(l),r.push(o)),o===t)break;if(l=B(o)?n?o.getFirstChild():o.getLastChild():null,l!==null)o=l;else if(l=n?o.getNextSibling():o.getPreviousSibling(),l!==null)o=l;else{if(o=o.getParentOrThrow(),i.has(o.__key)||r.push(o),o===t)break;l=o;do l===null&&H(68),o=n?l.getNextSibling():l.getPreviousSibling(),l=l.getParent(),l!==null&&(o!==null||i.has(l.__key)||r.push(l));while(o===null)}}return n||r.reverse(),r}isDirty(){let t=pt()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){let t=Lt(this.__key);return t===null&&H(113),t}getWritable(){hn();var t=Qr(),n=pt();t=t._nodeMap;let r=this.__key,i=this.getLatest(),o=i.__parent;n=n._cloneNotNeeded;var l=rt();return l!==null&&(l._cachedNodes=null),n.has(r)?(Td(i),i):(l=i.constructor.clone(i),l.__parent=o,l.__next=i.__next,l.__prev=i.__prev,B(i)&&B(l)?(l.__first=i.__first,l.__last=i.__last,l.__size=i.__size,l.__indent=i.__indent,l.__format=i.__format,l.__dir=i.__dir):J(i)&&J(l)&&(l.__format=i.__format,l.__style=i.__style,l.__mode=i.__mode,l.__detail=i.__detail),n.add(r),l.__key=r,Td(l),t.set(r,l),l)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){H(70)}updateDOM(){H(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){H(72)}static importJSON(){H(18,this.name)}static transform(){return null}remove(t){wm(this,!0,t)}replace(t,n){hn();var r=rt();r!==null&&(r=r.clone()),Rh(this,t);let i=this.getLatest(),o=this.__key,l=t.__key,s=t.getWritable();t=this.getParentOrThrow().getWritable();let a=t.__size;Fo(s);let u=i.getPreviousSibling(),c=i.getNextSibling(),d=i.__prev,f=i.__next,h=i.__parent;return wm(i,!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)}),me(r)&&(Wr(r),n=r.anchor,r=r.focus,n.key===o&&H0(n,s),r.key===o&&H0(r,s)),Wi()===o&&Kt(l),s}insertAfter(t,n=!0){hn(),Rh(this,t);var r=this.getWritable();let i=t.getWritable();var o=i.getParent();let l=rt();var s=!1,a=!1;if(o!==null){var u=t.getIndexWithinParent();Fo(i),me(l)&&(a=o.__key,s=l.anchor,o=l.focus,s=s.type==="element"&&s.key===a&&s.offset===u+1,a=o.type==="element"&&o.key===a&&o.offset===u+1)}o=this.getNextSibling(),u=this.getParentOrThrow().getWritable();let c=i.__key,d=r.__next;return o===null?u.__last=c:o.getWritable().__prev=c,u.__size++,r.__next=c,i.__next=d,i.__prev=r.__key,i.__parent=r.__parent,n&&me(l)&&(n=this.getIndexWithinParent(),Md(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){hn(),Rh(this,t);var r=this.getWritable();let i=t.getWritable(),o=i.__key;Fo(i);let l=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),a=r.__prev,u=this.getIndexWithinParent();return l===null?s.__first=o:l.getWritable().__next=o,s.__size++,r.__prev=o,i.__prev=a,i.__next=r.__key,i.__parent=r.__parent,r=rt(),n&&me(r)&&(n=this.getParentOrThrow(),Md(r,n,u)),t}isParentRequired(){return!1}createParentElementNode(){return Xo()}selectPrevious(t,n){hn();let r=this.getPreviousSibling(),i=this.getParentOrThrow();return r===null?i.select(0,0):B(r)?r.select():J(r)?r.select(t,n):(t=r.getIndexWithinParent()+1,i.select(t,t))}selectNext(t,n){hn();let r=this.getNextSibling(),i=this.getParentOrThrow();return r===null?i.select():B(r)?r.select(0,0):J(r)?r.select(t,n):(t=r.getIndexWithinParent(),i.select(t,t))}markDirty(){this.getWritable()}}class ks extends Lu{static getType(){return"linebreak"}static clone(t){return new ks(t.__key)}constructor(t){super(t)}getTextContent(){return`
|
|
118
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:t=>{let n=t.parentElement,r,i;return n!==null&&((r=n.firstChild)===t||r.nextSibling===t&&r.nodeType===3&&(r.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((i=n.lastChild)===t||i.previousSibling===t&&i.nodeType===3&&(i.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:mO,priority:0}}}}static importJSON(){return cs()}exportJSON(){return{type:"linebreak",version:1}}}function mO(){return{node:cs()}}function cs(){return Iu(new ks)}function ou(e){return e instanceof ks}function Ah(e,t){return t&16?"code":t&128?"mark":t&32?"sub":t&64?"sup":null}function Mh(e,t){return t&1?"strong":t&2?"em":"span"}function Dh(e,t,n,r,i){e=r.classList,r=ka(i,"base"),r!==void 0&&e.add(...r),r=ka(i,"underlineStrikethrough");let o=!1,l=t&8&&t&4;var s=n&8&&n&4;r!==void 0&&(s?(o=!0,l||e.add(...r)):l&&e.remove(...r));for(let a in zo)s=zo[a],r=ka(i,a),r!==void 0&&(n&s?!o||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 Ih(e,t,n){let r=t.firstChild;if(n=n.isComposing(),e+=n?$f:"",r==null)t.textContent=e;else if(t=r.nodeValue,t!==e)if(n||ro){n=t.length;let i=e.length,o=0,l=0;for(;o<n&&o<i&&t[o]===e[o];)o++;for(;l+o<n&&l+o<i&&t[n-l-1]===e[i-l-1];)l++;e=[o,n-o-l,e.slice(o,i-l)];let[s,a,u]=e;a!==0&&r.deleteData(s,a),r.insertData(s,u)}else r.nodeValue=e}function gc(e,t){return t=document.createElement(t),t.appendChild(e),t}class sl extends Lu{static getType(){return"text"}static clone(t){return new sl(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 QR[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Wi()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(t){return t=zo[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 QS(r,t,n)}createDOM(t){var n=this.__format,r=Ah(this,n);let i=Mh(this,n),o=document.createElement(r===null?i:r),l=o;return this.hasFormat("code")&&o.setAttribute("spellcheck","false"),r!==null&&(l=document.createElement(i),o.appendChild(l)),r=l,Ih(this.__text,r,this),t=t.theme.text,t!==void 0&&Dh(i,0,n,r,t),n=this.__style,n!==""&&(o.style.cssText=n),o}updateDOM(t,n,r){let i=this.__text;var o=t.__format,l=this.__format,s=Ah(this,o);let a=Ah(this,l);var u=Mh(this,o);let c=Mh(this,l);return(s===null?u:s)!==(a===null?c:a)?!0:s===a&&u!==c?(o=n.firstChild,o==null&&H(48),t=s=document.createElement(c),Ih(i,t,this),r=r.theme.text,r!==void 0&&Dh(c,0,l,t,r),n.replaceChild(s,o),!1):(u=n,a!==null&&s!==null&&(u=n.firstChild,u==null&&H(49)),Ih(i,u,this),r=r.theme.text,r!==void 0&&o!==l&&Dh(c,o,l,u,r),l=this.__style,t.__style!==l&&(n.style.cssText=l),!1)}static importDOM(){return{"#text":()=>({conversion:yO,priority:0}),b:()=>({conversion:vO,priority:0}),code:()=>({conversion:Ri,priority:0}),em:()=>({conversion:Ri,priority:0}),i:()=>({conversion:Ri,priority:0}),s:()=>({conversion:Ri,priority:0}),span:()=>({conversion:gO,priority:0}),strong:()=>({conversion:Ri,priority:0}),sub:()=>({conversion:Ri,priority:0}),sup:()=>({conversion:Ri,priority:0}),u:()=>({conversion:Ri,priority:0})}}static importJSON(t){let n=Dt(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&&Nf(t)||H(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=gc(t,"b")),this.hasFormat("italic")&&(t=gc(t,"i")),this.hasFormat("strikethrough")&&(t=gc(t,"s")),this.hasFormat("underline")&&(t=gc(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"?zo[t]:t,n}setDetail(t){let n=this.getWritable();return n.__detail=typeof t=="string"?GR[t]:t,n}setStyle(t){let n=this.getWritable();return n.__style=t,n}toggleFormat(t){return t=zo[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=XR[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){hn();let r=rt();var i=this.getTextContent();let o=this.__key;if(typeof i=="string"?(i=i.length,t===void 0&&(t=i),n===void 0&&(n=i)):n=t=0,me(r))i=Wi(),i!==r.anchor.key&&i!==r.focus.key||Kt(o),r.setTextNodeRange(this,t,this,n);else return CE(o,t,o,n,"text","text");return r}spliceText(t,n,r,i){let o=this.getWritable(),l=o.__text,s=r.length,a=t;0>a&&(a=s+a,0>a&&(a=0));let u=rt();return i&&me(u)&&(t+=s,u.setTextNodeRange(o,t,o,t)),n=l.slice(0,a)+r+l.slice(a+n),o.__text=n,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){hn();var n=this.getLatest(),r=n.getTextContent(),i=n.__key,o=Wi(),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=Dt(c),a.__format=u,a.__style=d,a.__detail=f,s=!0):(a=n.getWritable(),a.__text=c),n=rt(),a=[a],c=c.length;for(let g=1;g<l;g++){var h=t[g],m=h.length;h=Dt(h).getWritable(),h.__format=u,h.__style=d,h.__detail=f;let S=h.__key;if(m=c+m,me(n)){let v=n.anchor,y=n.focus;v.key===i&&v.type==="text"&&v.offset>c&&v.offset<=m&&(v.key=S,v.offset-=c,n.dirty=!0),y.key===i&&y.type==="text"&&y.offset>c&&y.offset<=m&&(y.key=S,y.offset-=c,n.dirty=!0)}o===i&&Kt(S),c=m,a.push(h)}return i=this.getPreviousSibling(),o=this.getNextSibling(),i!==null&&Td(i),o!==null&&Td(o),i=r.getWritable(),o=this.getIndexWithinParent(),s?(i.splice(o,0,a),this.remove()):i.splice(o,1,a),me(n)&&Md(n,r,o,l-1),a}mergeWithSibling(t){var n=t===this.getPreviousSibling();n||t===this.getNextSibling()||H(50);var r=this.__key;let i=t.__key,o=this.__text,l=o.length;Wi()===i&&Kt(r);let s=rt();if(me(s)){let a=s.anchor,u=s.focus;a!==null&&a.key===i&&(J0(a,n,r,t,l),s.dirty=!0),u!==null&&u.key===i&&(J0(u,n,r,t,l),s.dirty=!0)}return r=t.__text,this.setTextContent(n?r+o:o+r),n=this.getWritable(),t.remove(),n}isTextEntity(){return!1}}function gO(e){let t=e.style.fontWeight==="700",n=e.style.textDecoration==="line-through",r=e.style.fontStyle==="italic",i=e.style.textDecoration==="underline",o=e.style.verticalAlign;return{forChild:l=>(J(l)&&(t&&l.toggleFormat("bold"),n&&l.toggleFormat("strikethrough"),r&&l.toggleFormat("italic"),i&&l.toggleFormat("underline"),o==="sub"&&l.toggleFormat("subscript"),o==="super"&&l.toggleFormat("superscript")),l),node:null}}function vO(e){let t=e.style.fontWeight==="normal";return{forChild:n=>(J(n)&&!t&&n.toggleFormat("bold"),n),node:null}}let W0=new WeakMap;function yO(e){e.parentElement===null&&H(129);for(var t=e.textContent||"",n,r=e.parentNode,i=[e];r!==null&&(n=W0.get(r))===void 0&&!(r.nodeName==="PRE"||r.nodeType===1&&r.style.whiteSpace.startsWith("pre"));)i.push(r),r=r.parentNode;for(n=n===void 0?r:n,r=0;r<i.length;r++)W0.set(i[r],n);if(n!==null){for(t=t.split(/(\r?\n|\t)/),e=[],i=t.length,n=0;n<i;n++)r=t[n],r===`
|
|
119
|
-
`||r===`\r
|
|
120
|
-
`?e.push(cs()):r===" "?e.push(Of()):r!==""&&e.push(Dt(r));return{node:e}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){for(i=e,n=!0;i!==null&&(i=V0(i,!1))!==null;)if(r=i.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(i=!0;e!==null&&(e=V0(e,!0))!==null;)if(0<(e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){i=!1;break}i&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:Dt(t)}}let xO=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 V0(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(xO)===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 _O={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ri(e){let t=_O[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:n=>(J(n)&&!n.hasFormat(t)&&n.toggleFormat(t),n),node:null}}function Dt(e=""){return Iu(new sl(e))}function J(e){return e instanceof sl}class $s extends sl{static getType(){return"tab"}static clone(t){let n=new $s(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=Of();return n.setFormat(t.format),n.setStyle(t.style),n}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){H(126)}setDetail(){H(127)}setMode(){H(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Of(){return Iu(new $s)}class Vr{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(),i=this.offset;if(t=t.offset,B(n)){var o=n.getDescendantByIndex(i);n=o??n}return B(r)&&(o=r.getDescendantByIndex(t),r=o??r),n===r?i<t:n.isBefore(r)}getNode(){let t=Lt(this.key);return t===null&&H(20),t}set(t,n,r){let i=this._selection,o=this.key;this.key=t,this.offset=n,this.type=r,Ns()||(Wi()===o&&Kt(t),i!==null&&(i._cachedNodes=null,i.dirty=!0))}}function Lh(e,t){let n=t.__key,r=e.offset,i="element";if(J(t))i="text",t=t.getTextContentSize(),r>t&&(r=t);else if(!B(t)){var o=t.getNextSibling();J(o)?(n=o.__key,r=0,i="text"):(o=t.getParent())&&(n=o.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,i)}function H0(e,t){if(B(t)){let n=t.getLastDescendant();B(n)||J(n)?Lh(e,n):Lh(e,t)}else Lh(e,t)}function K0(e,t,n,r){let i=e.getNode(),o=i.getChildAtIndex(e.offset),l=Dt(),s=mn(i)?Xo().append(l):l;l.setFormat(n),l.setStyle(r),o===null?i.append(s):(o.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 Di(e,t,n,r){e.key=t,e.offset=n,e.type=r}class Pf{constructor(t){this.dirty=!1,this._nodes=t,this._cachedNodes=null}is(t){if(!bs(t))return!1;let n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}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 Pf(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t,n){let r=this.getNodes(),i=r.length;var o=r[i-1];if(J(o))o=o.select();else{let l=o.getIndexWithinParent()+1;o=o.getParentOrThrow().select(l,l)}for(o.insertNodes(t,n),t=0;t<i;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=Lt(r),n!==null&&t.push(n);return Ns()||(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 me(e){return e instanceof al}function Sm(e){let[t,,n]=$E(e);e=n.getChildren();let r=e.length;var i=e[0].getChildren().length;let o=Array(r);for(var l=0;l<r;l++)o[l]=Array(i);for(i=0;i<r;i++){l=e[i].getChildren();let s=0;for(let a=0;a<l.length;a++){for(;o[i][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++)o[i+f][s+h]=u;if(t===u)return{colSpan:d,columnIndex:s,rowIndex:i,rowSpan:c};s+=d}}return null}class Af{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 yv(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 Af(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Vc(this)}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t,n){let r=this.focus.getNode();return cv(r.select(0,r.getChildrenSize())).insertNodes(t,n)}getShape(){var t=Lt(this.anchor.key);if(Qn(t)||H(103),t=Sm(t),t===null)throw Error("getCellRect: expected to find AnchorNode");var n=Lt(this.focus.key);Qn(n)||H(104);let r=Sm(n);if(r===null)throw Error("getCellRect: expected to find focusCellNode");n=Math.min(t.columnIndex,r.columnIndex);let i=Math.max(t.columnIndex,r.columnIndex),o=Math.min(t.rowIndex,r.rowIndex);return t=Math.max(t.rowIndex,r.rowIndex),{fromX:Math.min(n,i),fromY:Math.min(o,t),toX:Math.max(n,i),toY:Math.max(o,t)}}getNodes(){function t(S){let{cell:v,startColumn:y,startRow:_}=S;a=Math.min(a,y),u=Math.min(u,_),c=Math.max(c,y+v.__colSpan-1),d=Math.max(d,_+v.__rowSpan-1)}var n=this._cachedNodes;if(n!==null)return n;var r=this.anchor.getNode();n=this.focus.getNode(),r=Pd(r,Qn);var i=Pd(n,Qn);Qn(r)||H(103),Qn(i)||H(104),n=r.getParent(),su(n)||H(105),n=n.getParent(),Ev(n)||H(106);let[o,l,s]=kE(n,r,i),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,i=u;for(var f=a,h=u;a<r||u<i||c>f||d>h;){if(a<r){var m=h-i;--r;for(var g=0;g<=m;g++)t(o[i+g][r])}if(u<i)for(m=f-r,--i,g=0;g<=m;g++)t(o[i][r+g]);if(c>f)for(m=h-i,f+=1,g=0;g<=m;g++)t(o[i+g][f]);if(d>h)for(m=f-r,h+=1,g=0;g<=m;g++)t(o[h][r+g])}for(n=[n],r=null,i=u;i<=d;i++)for(f=a;f<=c;f++)({cell:h}=o[i][f]),m=h.getParent(),su(m)||H(107),m!==r&&n.push(m),n.push(h,...iO(h)),r=m;return Ns()||(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 yv(e){return e instanceof Af}class al{constructor(t,n,r,i){this.anchor=t,this.focus=n,this.dirty=!1,this.format=r,this.style=i,this._cachedNodes=null,t._selection=this,n._selection=this}is(t){return me(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),i=r?t:n;r=r?n:t,t=i.getNode(),n=r.getNode();let o=i.offset;return i=r.offset,B(t)&&(r=t.getDescendantByIndex(o),t=r??t),B(n)&&(r=n.getDescendantByIndex(i),r!==null&&r!==t&&n.getChildAtIndex(i)===r&&(r=r.getPreviousSibling()),n=r??n),t=t.is(n)?B(t)&&0<t.getChildrenSize()?[]:[t]:t.getNodesBetween(n),Ns()||(this._cachedNodes=t),t}setTextNodeRange(t,n,r,i){Di(this.anchor,t.__key,n,"text"),Di(this.focus,r.__key,i,"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],i=this.anchor,o=this.focus,l=i.isBefore(o),[s,a]=Vc(this),u="",c=!0;for(let d=0;d<t.length;d++){let f=t[d];if(B(f)&&!f.isInline())c||(u+=`
|
|
121
|
-
`),c=!f.isEmpty();else if(c=!1,J(f)){let h=f.getTextContent();f===n?f===r?(i.type!=="element"||o.type!=="element"||o.offset===i.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!tt(f)&&!ou(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(t){let n=pt(),r=n.getEditorState()._selection;if(t=EE(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r),t!==null){var[i,o]=t;Di(this.anchor,i.key,i.offset,i.type),Di(this.focus,o.key,o.offset,o.type),this._cachedNodes=null}}clone(){let t=this.anchor,n=this.focus;return new al(new Vr(t.key,t.offset,t.type),new Vr(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=QS(this.format,t,null),this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){return(this.format&zo[t])!==0}insertRawText(t){t=t.split(/(\r?\n|\t)/);let n=[],r=t.length;for(let i=0;i<r;i++){let o=t[i];o===`
|
|
122
|
-
`||o===`\r
|
|
123
|
-
`?n.push(cs()):o===" "?n.push(Of()):n.push(Dt(o))}this.insertNodes(n)}insertText(t){var n=this.anchor,r=this.focus,i=this.isCollapsed()||n.isBefore(r),o=this.format,l=this.style;i&&n.type==="element"?K0(n,r,o,l):i||r.type!=="element"||K0(r,n,o,l);var s=this.getNodes(),a=s.length,u=i?r:n;r=(i?n:r).offset;var c=u.offset;n=s[0],J(n)||H(26),i=n.getTextContent().length;var d=n.getParentOrThrow(),f=s[a-1];if(this.isCollapsed()&&r===i&&(n.isSegmented()||n.isToken()||!n.canInsertTextAfter()||!d.canInsertTextAfter()&&n.getNextSibling()===null)){var h=n.getNextSibling();if(J(h)&&h.canInsertTextBefore()&&!am(h)||(h=Dt(),h.setFormat(o),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(),(!J(h)||am(h))&&(h=Dt(),h.setFormat(o),d.canInsertTextBefore()?n.insertBefore(h):d.insertBefore(h)),h.select(),n=h,t!==""){this.insertText(t);return}}else if(n.isSegmented()&&r!==i)d=Dt(n.getTextContent()),d.setFormat(o),n.replace(d),n=d;else if(!(this.isCollapsed()||t===""||(h=f.getParent(),d.canInsertTextBefore()&&d.canInsertTextAfter()&&(!B(h)||h.canInsertTextBefore()&&h.canInsertTextAfter())))){this.insertText(""),SE(this.anchor,this.focus,null),this.insertText(t);return}if(a===1)if(n.isToken())t=Dt(t),t.select(),n.replace(t);else{if(s=n.getFormat(),a=n.getStyle(),r===c&&(s!==o||a!==l))if(n.getTextContent()==="")n.setFormat(o),n.setStyle(l);else{s=Dt(t),s.setFormat(o),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(o=new Set([...n.getParentKeys(),...f.getParentKeys()]),h=B(n)?n:n.getParentOrThrow(),l=B(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(J(f)&&!f.isToken()&&c!==f.getTextContentSize()){if(f.isSegmented()){var m=Dt(f.getTextContent());f.replace(m),f=m}mn(u.getNode())||(f=f.spliceText(0,c,"")),o.add(f.__key)}else u=f.getParentOrThrow(),u.canBeEmpty()||u.getChildrenSize()!==1?f.remove():u.remove();else o.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)||B(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))&&(o.delete(u.__key),c=u),u=u.getParent();for(n.isToken()?r===i?n.select():(t=Dt(t),t.select(),n.replace(t)):(n=n.spliceText(r,i-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],o.has(n.__key)||n.remove()}}removeText(){this.insertText("")}formatText(t){if(this.isCollapsed())this.toggleFormat(t),Kt(null);else{var n=this.getNodes(),r=[];for(var i of n)J(i)&&r.push(i);var o=r.length;if(o===0)this.toggleFormat(t),Kt(null);else{i=this.anchor;var l=this.focus,s=this.isBackward();n=s?l:i,i=s?i: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=o-1,d=r[c];if(o=i.type==="text"?i.offset:d.getTextContentSize(),u.is(d))l!==o&&(l===0&&o===u.getTextContentSize()?u.setFormat(s):(t=u.splitText(l,o),t=l===0?t[0]:t[1],t.setFormat(s),n.type==="text"&&n.set(t.__key,0,"text"),i.type==="text"&&i.set(t.__key,o-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<o&&(o!==d.getTextContentSize()&&([d]=d.splitText(o)),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"),i.type==="text"&&i.set(d.__key,o,"text"),this.format=s|f}}}}}insertNodes(t,n){if(!this.isCollapsed()){var r=this.isBackward()?this.anchor:this.focus,i=r.getNode().getNextSibling();if(i=i?i.getKey():null,r=(r=r.getNode().getPreviousSibling())?r.getKey():null,this.removeText(),this.isCollapsed()&&this.focus.type==="element"){if(this.focus.key===i&&this.focus.offset===0){var o=Dt();this.focus.getNode().insertBefore(o)}else this.focus.key===r&&this.focus.offset===this.focus.getNode().getChildrenSize()&&(o=Dt(),this.focus.getNode().insertAfter(o));o&&(this.focus.set(o.__key,0,"text"),this.anchor.set(o.__key,0,"text"))}}o=this.anchor,r=o.offset;var l=o.getNode();i=l,o.type==="element"&&(o=o.getNode(),i=o.getChildAtIndex(r-1),i=i===null?o:i),o=[];var s=l.getNextSiblings(),a=xr(l)?null:l.getTopLevelElementOrThrow();if(J(l))if(i=l.getTextContent().length,r===0&&i!==0)i=l.getPreviousSibling(),i=i!==null?i:l.getParentOrThrow(),o.push(l);else if(r===i)i=l;else{if(l.isToken())return!1;[i,l]=l.splitText(r),o.push(l)}l=i,o.push(...s),s=t[0];var u=!1,c=null;for(let m=0;m<t.length;m++){var d=t[m];if(xr(i)||tt(i)||!B(d)||d.isInline())u&&!B(d)&&!tt(d)&&xr(i.getParent())&&H(28);else{if(d.is(s)){if(B(i)&&i.isEmpty()&&i.canReplaceWith(d)){i.replace(d),i=d,u=!0;continue}if(u=d.getFirstDescendant(),JS(u)){for(var f=u.getParentOrThrow();f.isInline();)f=f.getParentOrThrow();if(c=f.getChildren(),u=c.length,B(i)){var h=i.getFirstChild();for(let g=0;g<u;g++){let S=c[g];h===null?i.append(S):h.insertAfter(S),h=S}}else{for(h=u-1;0<=h;h--)i.insertAfter(c[h]);i=i.getParentOrThrow()}if(c=c[u-1],f.remove(),u=!0,f.is(d))continue}}J(i)&&(a===null&&H(27),i=a)}u=!1,B(i)&&!i.isInline()?(c=d,tt(d)&&!d.isInline()?i=t.length===1&&i.canBeEmpty()&&i.isEmpty()?i.insertBefore(d,!1):i.insertAfter(d,!1):B(d)?(d.canBeEmpty()||!d.isEmpty())&&(mn(i)?(f=i.getChildAtIndex(r),f!==null?f.insertBefore(d):i.append(d),i=d):d.isInline()?(i.append(d),i=d):i=i.insertAfter(d,!1)):(f=i.getFirstChild(),f!==null?f.insertBefore(d):i.append(d),i=d)):!B(d)||B(d)&&d.isInline()||tt(i)&&!i.isInline()?(c=d,me(this)&&tt(d)&&(B(i)||J(i))&&!d.isInline()?(J(i)?(f=i.getParentOrThrow(),[i]=i.splitText(r),i=i.getIndexWithinParent()+1):(f=i,i=r),[,i]=sE(f,i),i=i.insertBefore(d)):i=i.insertAfter(d,!1)):(d=i.getParentOrThrow(),ou(i)&&i.remove(),i=d,m--)}if(n&&(J(l)?l.select():(t=i.getPreviousSibling(),J(t)?t.select():(t=i.getIndexWithinParent(),i.getParentOrThrow().select(t,t)))),B(i)){if(t=J(c)?c:B(c)&&c.isInline()?c.getLastDescendant():i.getLastDescendant(),n||(t===null?i.select():J(t)?t.getTextContent()===""?t.selectPrevious():t.select():t.selectNext()),o.length!==0)for(n=i,t=o.length-1;0<=t;t--)r=o[t],a=r.getParentOrThrow(),!B(i)||Em(r)||tt(r)&&(!r.isInline()||r.isIsolated())?B(i)||Em(r)?B(r)&&!r.canInsertAfter(i)?(l=a.constructor.clone(a),B(l)||H(29),l.append(r),i.insertAfter(l)):i.insertAfter(r):(i.insertBefore(r),i=r):(n===i?i.append(r):i.insertBefore(r),i=r),a.isEmpty()&&!a.canBeEmpty()&&a.remove()}else n||(J(i)?i.select():(n=i.getParentOrThrow(),t=i.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 i=t.getNode(),o=i.getNextSiblings().reverse(),l=i.getParentOrThrow(),s=l.isInline(),a=s?l.getTextContentSize():i.getTextContentSize();n===0?o.push(i):(s&&(r=l.getNextSiblings()),n===a||s&&n===i.getTextContentSize()||([,i]=i.splitText(n),o.push(i)))}else{if(l=t.getNode(),xr(l)){o=Xo(),r=l.getChildAtIndex(n),o.select(),r!==null?r.insertBefore(o,!1):l.append(o);return}o=l.getChildren().slice(n).reverse()}if(i=o.length,n===0&&0<i&&l.isInline()){if(r=l.getParentOrThrow(),o=r.insertNewAfter(this,!1),B(o))for(r=r.getChildren(),l=0;l<r.length;l++)o.append(r[l])}else if(s=l.insertNewAfter(this,!1),s===null)this.insertLineBreak();else if(B(s))if(a=l.getFirstChild(),n===0&&(l.is(t.getNode())||a&&a.is(t.getNode()))&&0<i)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(i!==0)for(r=0;r<i;r++)n=o[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=cs();var r=this.anchor;r.type==="element"&&(r=r.getNode(),mn(r)&&this.insertParagraph()),t?this.insertNodes([n],!0):this.insertNodes([n])&&n.selectNext(0,0)}getCharacterOffsets(){return Vc(this)}extract(){var t=this.getNodes(),n=t.length,r=n-1,i=this.anchor;let o=this.focus;var l=t[0];let s=t[r],[a,u]=Vc(this);return n===0?[]:n===1?J(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=i.isBefore(o),J(l)&&(i=n?a:u,i===l.getTextContentSize()?t.shift():i!==0&&([,l]=l.splitText(i),t[0]=l)),J(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 i=this.focus,o=this.anchor,l=t==="move",s=um(i,n);if(tt(s)&&!s.isIsolated())l&&s.isKeyboardSelectable()?(n=Cm(),n.add(s.__key),Wr(n)):(t=n?s.getPreviousSibling():s.getNextSibling(),J(t)?(s=t.__key,n=n?t.getTextContent().length:0,i.set(s,n,"text"),l&&o.set(s,n,"text")):(r=s.getParentOrThrow(),B(t)?(r=t.__key,s=n?t.getChildrenSize():0):(s=s.getIndexWithinParent(),r=r.__key,n||s++),i.set(r,s,"element"),l&&o.set(r,s,"element")));else if(o=pt(),i=Xr(o._window)){var a=o._blockCursorElement,u=o._rootElement;if(u===null||a===null||!B(s)||s.isInline()||s.canBeEmpty()||cm(a,o,u),i.modify(t,n?"backward":"forward",r),0<i.rangeCount&&(s=i.getRangeAt(0),o=this.anchor.getNode(),o=mn(o)?o:oE(o),this.applyDOMRange(s),this.dirty=!0,!l)){for(l=this.getNodes(),t=[],r=!1,a=0;a<l.length;a++)u=l[a],Od(u,o)?t.push(u):r=!0;r&&0<t.length&&(n?(n=t[0],B(n)?n.selectStart():n.getParentOrThrow().selectStart()):(n=t[t.length-1],B(n)?n.selectEnd():n.getParentOrThrow().selectEnd())),(i.anchorNode!==s.startContainer||i.anchorOffset!==s.startOffset)&&(n=this.focus,l=this.anchor,i=l.key,s=l.offset,o=l.type,Di(l,n.key,n.offset,n.type),Di(n,i,s,o),this._cachedNodes=null)}}}deleteCharacter(t){let n=this.isCollapsed();if(this.isCollapsed()){var r=this.anchor,i=this.focus,o=r.getNode();if(!t&&(r.type==="element"&&B(o)&&r.offset===o.getChildrenSize()||r.type==="text"&&r.offset===o.getTextContentSize())){var l=o.getParent();if(l=o.getNextSibling()||(l===null?null:l.getNextSibling()),B(l)&&l.isShadowRoot())return}if(l=um(i,t),tt(l)&&!l.isIsolated()){l.isKeyboardSelectable()&&B(o)&&o.getChildrenSize()===0?(o.remove(),t=Cm(),t.add(l.__key),Wr(t)):(l.remove(),pt().dispatchCommand(Cf,void 0));return}if(!t&&B(l)&&B(o)&&o.isEmpty()){o.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=i.type==="text"?i.getNode():null,o=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){if(r=i.offset,i=l.getTextContentSize(),l.is(o)||t&&r!==i||!t&&r!==0){G0(l,t,r);return}}else if(o!==null&&o.isSegmented()&&(r=r.offset,i=o.getTextContentSize(),o.is(l)||t&&r!==0||!t&&r!==i)){G0(o,t,r);return}if(o=this.anchor,l=this.focus,r=o.getNode(),i=l.getNode(),r===i&&o.type==="text"&&l.type==="text"){var s=o.offset,a=l.offset;let u=s<a;i=u?s:a,a=u?a:s,s=a-1,i!==s&&(r=r.getTextContent().slice(i,a),nE(r)||(t?l.offset=s:o.offset=s))}}}this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(t=this.anchor.getNode(),t.isEmpty()&&mn(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 bs(e){return e instanceof Pf}function Z0(e){let t=e.offset;return e.type==="text"?t:(e=e.getNode(),t===e.getChildrenSize()?e.getTextContent().length:0)}function Vc(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]:[Z0(t),Z0(e)]}function G0(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),i=r.length,o=0,l=0;for(let s=0;s<i;s++){let a=r[s],u=s===i-1;if(l=o,o+=a.length,t&&o===n||o>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 Y0(e,t,n,r){var i=t;if(e.nodeType===1){let s=!1;var o=e.childNodes,l=o.length;i===l&&(s=!0,i=l-1);let a=o[i];if(l=!1,a===r._blockCursorElement?(a=o[i+1],l=!0):r._blockCursorElement!==null&&i--,r=jl(a),J(r))i=s?r.getTextContentSize():0;else{if(o=jl(e),o===null)return null;if(B(o)?(e=o.getChildAtIndex(i),(t=B(e))&&(t=e.getParent(),t=n===null||t===null||!t.canBeEmpty()||t!==n.getNode()),t&&(n=s?e.getLastDescendant():e.getFirstDescendant(),n===null?(o=e,i=0):(e=n,o=B(e)?e:e.getParentOrThrow())),J(e)?(r=e,o=null,i=s?e.getTextContentSize():0):e!==o&&s&&!l&&i++):(i=o.getIndexWithinParent(),i=t===0&&tt(o)&&jl(e)===o?i:i+1,o=o.getParentOrThrow()),B(o))return new Vr(o.__key,i,"element")}}else r=jl(e);return J(r)?new Vr(r.__key,i,"text"):null}function X0(e,t,n){var r=e.offset,i=e.getNode();r===0?(r=i.getPreviousSibling(),i=i.getParent(),t?(n||!t)&&r===null&&B(i)&&i.isInline()&&(t=i.getPreviousSibling(),J(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)):B(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):J(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===i.getTextContent().length&&(r=i.getNextSibling(),i=i.getParent(),t&&B(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&r===null&&B(i)&&i.isInline()&&!i.canInsertTextAfter()&&(t=i.getNextSibling(),J(t)&&(e.key=t.__key,e.offset=0)))}function SE(e,t,n){if(e.type==="text"&&t.type==="text"){var r=e.isBefore(t);let i=e.is(t);X0(e,r,i),X0(t,!r,i),i&&(t.key=e.key,t.offset=e.offset,t.type=e.type),r=pt(),r.isComposing()&&r._compositionKey!==e.key&&me(n)&&(r=n.anchor,n=n.focus,Di(e,r.key,r.offset,r.type),Di(t,n.key,n.offset,n.type))}}function EE(e,t,n,r,i,o){return e===null||n===null||!Mu(i,e,n)||(t=Y0(e,t,me(o)?o.anchor:null,i),t===null)||(r=Y0(n,r,me(o)?o.focus:null,i),r===null||t.type==="element"&&r.type==="element"&&(e=jl(e),n=jl(n),tt(e)&&tt(n)))?null:(SE(t,r,o),[t,r])}function Em(e){return B(e)&&!e.isInline()}function CE(e,t,n,r,i,o){let l=Qr();return e=new al(new Vr(e,t,i),new Vr(n,r,o),0,""),e.dirty=!0,l._selection=e}function Cm(){return new Pf(new Set)}function wO(e){let t=e.getEditorState()._selection,n=Xr(e._window);return bs(t)||yv(t)?t.clone():xv(t,n,e)}function xv(e,t,n){var r=n._window;if(r===null)return null;var i=r.event,o=i?i.type:void 0;r=o==="selectionchange",i=!sm&&(r||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&i&&i.detail===3||o==="drop"||o===void 0);let l;if(!me(e)||i){if(t===null)return null;if(i=t.anchorNode,o=t.focusNode,l=t.anchorOffset,t=t.focusOffset,r&&me(e)&&!Mu(n,i,o))return e.clone()}else return e.clone();if(n=EE(i,l,o,t,n,e),n===null)return null;let[s,a]=n;return new al(s,a,me(e)?e.format:0,me(e)?e.style:"")}function rt(){return Qr()._selection}function Ts(){return pt()._editorState._selection}function Md(e,t,n,r=1){var i=e.anchor,o=e.focus,l=i.getNode(),s=o.getNode();if(t.is(l)||t.is(s)){if(l=t.__key,e.isCollapsed())t=i.offset,(n<=t&&0<r||n<t&&0>r)&&(n=Math.max(0,t+r),i.set(l,n,"element"),o.set(l,n,"element"),Q0(e));else{let u=e.isBackward();s=u?o:i;var a=s.getNode();i=u?i:o,o=i.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(o)&&(t=i.offset,(n<=t&&0<r||n<t&&0>r)&&i.set(l,Math.max(0,t+r),"element"))}Q0(e)}}function Q0(e){var t=e.anchor,n=t.offset;let r=e.focus;var i=r.offset,o=t.getNode(),l=r.getNode();if(e.isCollapsed())B(o)&&(l=o.getChildrenSize(),l=(i=n>=l)?o.getChildAtIndex(l-1):o.getChildAtIndex(n),J(l)&&(n=0,i&&(n=l.getTextContentSize()),t.set(l.__key,n,"text"),r.set(l.__key,n,"text")));else{if(B(o)){let s=o.getChildrenSize();n=(e=n>=s)?o.getChildAtIndex(s-1):o.getChildAtIndex(n),J(n)&&(o=0,e&&(o=n.getTextContentSize()),t.set(n.__key,o,"text"))}B(l)&&(n=l.getChildrenSize(),i=(t=i>=n)?l.getChildAtIndex(n-1):l.getChildAtIndex(i),J(i)&&(l=0,t&&(l=i.getTextContentSize()),r.set(i.__key,l,"text")))}}function SO(e,t){if(t=t.getEditorState()._selection,e=e._selection,me(e)){var n=e.anchor;let r=e.focus,i;n.type==="text"&&(i=n.getNode(),i.selectionTransform(t,e)),r.type==="text"&&(n=r.getNode(),i!==n&&n.selectionTransform(t,e))}}function Dd(e,t,n,r,i){let o=null,l=0,s=null;r!==null?(o=r.__key,J(r)?(l=r.getTextContentSize(),s="text"):B(r)&&(l=r.getChildrenSize(),s="element")):i!==null&&(o=i.__key,J(i)?s="text":B(i)&&(s="element")),o!==null&&s!==null?e.set(o,l,s):(l=t.getIndexWithinParent(),l===-1&&(l=n.getChildrenSize()),e.set(n.__key,l,"element"))}function J0(e,t,n,r,i){e.type==="text"?(e.key=n,t||(e.offset+=i)):e.offset>r.getIndexWithinParent()&&--e.offset}function kE(e,t,n){let r=[],i=null,o=null;e=e.getChildren();for(let c=0;c<e.length;c++){var l=e[c];su(l)||H(108);var s=l.getChildren();l=0;for(let d of s){for(Qn(d)||H(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)&&(i=f),n.is(u)&&(o=f),l+=d.__colSpan}}return i===null&&H(110),o===null&&H(111),[r,i,o]}function $E(e){e instanceof Sv||(e instanceof Lu?(e=Pd(e,Qn),Qn(e)||H(114)):(e=Pd(e.getNode(),Qn),Qn(e)||H(114)));let t=e.getParent();su(t)||H(115);let n=t.getParent();return Ev(n)||H(116),[e,t,n]}let jt=null,zt=null,On=!1,jh=!1,lu=0,q0={characterData:!0,childList:!0,subtree:!0};function Ns(){return On||jt!==null&&jt._readOnly}function hn(){On&&H(13)}function Qr(){return jt===null&&H(15),jt}function pt(){return zt===null&&H(16),zt}function ex(e,t,n){var r=t.__type;let i=e._nodes.get(r);for(i===void 0&&H(30,r),e=n.get(r),e===void 0&&(e=Array.from(i.transforms),n.set(r,e)),n=e.length,r=0;r<n&&(e[r](t),t.isAttached());r++);}function EO(e,t){t=t._dirtyLeaves,e=e._nodeMap;for(let n of t)t=e.get(n),J(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&XS(t)}function CO(e,t){let n=t._dirtyLeaves,r=t._dirtyElements;e=e._nodeMap;let i=Wi(),o=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),J(l)&&l.isAttached()&&l.isSimpleText()&&!l.isUnmergeable()&&XS(l),l!==void 0&&l!==void 0&&l.__key!==i&&l.isAttached()&&ex(t,l,o),n.add(c);if(l=t._dirtyLeaves,s=l.size,0<s){lu++;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!==i&&l.isAttached()&&ex(t,l,o),r.set(a,u));l=t._dirtyLeaves,s=l.size,a=t._dirtyElements,u=a.size,lu++}t._dirtyLeaves=n,t._dirtyElements=r}function _v(e,t){var n=e.type,r=t.get(n);if(r===void 0&&H(17,n),n=r.klass,e.type!==n.getType()&&H(18,n.name),n=n.importJSON(e),e=e.children,B(n)&&Array.isArray(e))for(r=0;r<e.length;r++){let i=_v(e[r],t);n.append(i)}return n}function tx(e,t){let n=jt,r=On,i=zt;jt=e,On=!0,zt=null;try{return t()}finally{jt=n,On=r,zt=i}}function Bo(e,t){let n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n!==null){var o=e._editorState,l=o._selection,s=n._selection,a=e._dirtyType!==0,u=jt,c=On,d=zt,f=e._updating,h=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&a&&h!==null){zt=e,jt=n,On=!1,e._updating=!0;try{let je=e._dirtyType,Tt=e._dirtyElements,at=e._dirtyLeaves;h.disconnect();var g=je,S=Tt,v=at;fn=oi=Nt="",uE=g===2,Bc=null,tn=e,io=e._config,nu=e._nodes,Rf=tn._listeners.mutation,dm=S,fm=v,Yo=o._nodeMap,oo=n._nodeMap,vv=n._readOnly,hm=new Map(e._keyToDOMMap);let ln=new Map;ru=ln,aa("root",null),ru=hm=io=oo=Yo=fm=dm=nu=tn=void 0,m=ln}catch(je){if(je instanceof Error&&e._onError(je),jh)throw je;RE(e,null,r,n),YS(e),e._dirtyType=2,jh=!0,Bo(e,o),jh=!1;return}finally{h.observe(r,q0),e._updating=f,jt=u,On=c,zt=d}}n._readOnly||(n._readOnly=!0);var y=e._dirtyLeaves,_=e._dirtyElements,w=e._normalizedNodes,E=e._updateTags,$=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 C=e._decorators,T=e._pendingDecorators||C,N=n._nodeMap,R;for(R in T)N.has(R)||(T===C&&(T=tE(e)),delete T[R]);var D=i?null:Xr(e._window);if(e._editable&&D!==null&&(a||s===null||s.dirty)){zt=e,jt=n;try{if(h!==null&&h.disconnect(),a||s===null||s.dirty){let je=e._blockCursorElement;je!==null&&cm(je,e,r);e:{let Tt=D.anchorNode,at=D.focusNode,ln=D.anchorOffset,En=D.focusOffset,_t=document.activeElement;if(!(E.has("collaboration")&&_t!==r||_t!==null&&dv(_t)))if(me(s)){var F=s.anchor,se=s.focus,V=F.key,K=se.key,O=Rd(e,V),A=Rd(e,K),k=F.offset,j=se.offset,L=s.format,Z=s.style,ne=s.isCollapsed(),ke=O,ve=A,We=!1;if(F.type==="text"){ke=bd(O);let At=F.getNode();We=At.getFormat()!==L||At.getStyle()!==Z}else me(l)&&l.anchor.type==="text"&&(We=!0);if(se.type==="text"&&(ve=bd(A)),ke!==null&&ve!==null){if(ne&&(l===null||We||me(l)&&(l.format!==L||l.style!==Z))){var Fe=performance.now();vE=[L,Z,k,V,Fe]}if(ln===k&&En===j&&Tt===ke&&at===ve&&(D.type!=="Range"||!ne)&&(_t!==null&&r.contains(_t)||r.focus({preventScroll:!0}),F.type!=="element"))break e;try{D.setBaseAndExtent(ke,k,ve,j)}catch{}if(!E.has("skip-scroll-into-view")&&s.isCollapsed()&&r!==null&&r===document.activeElement){let At=s instanceof al&&s.anchor.type==="element"?ke.childNodes[k]||null:0<D.rangeCount?D.getRangeAt(0):null;if(At!==null){let sn;if(At instanceof Text){let gt=document.createRange();gt.selectNode(At),sn=gt.getBoundingClientRect()}else sn=At.getBoundingClientRect();let Pn=r.ownerDocument,qr=Pn.defaultView;if(qr!==null)for(var{top:te,bottom:Le}=sn,be,Re,Se=r;Se!==null;){let gt=Se===Pn.body;if(gt)be=0,Re=Tf(e).innerHeight;else{let Eo=Se.getBoundingClientRect();be=Eo.top,Re=Eo.bottom}let Nr=0;if(te<be?Nr=-(be-te):Le>Re&&(Nr=Le-Re),Nr!==0)if(gt)qr.scrollBy(0,Nr);else{let Eo=Se.scrollTop;Se.scrollTop+=Nr;let Ls=Se.scrollTop-Eo;te-=Ls,Le-=Ls}if(gt)break;Se=bf(Se)}}}ym=!0}}else l!==null&&Mu(e,Tt,at)&&D.removeAllRanges()}}e:{let je=e._blockCursorElement;if(me(s)&&s.isCollapsed()&&s.anchor.type==="element"&&r.contains(document.activeElement)){let Tt=s.anchor,at=Tt.getNode(),ln=Tt.offset,En=at.getChildrenSize(),_t=!1,At=null;if(ln===En){let sn=at.getChildAtIndex(ln-1);Oh(sn)&&(_t=!0)}else{let sn=at.getChildAtIndex(ln);if(Oh(sn)){let Pn=sn.getPreviousSibling();(Pn===null||Oh(Pn))&&(_t=!0,At=e.getElementByKey(sn.__key))}}if(_t){let sn=e.getElementByKey(at.__key);if(je===null){let Pn=e._config.theme,qr=document.createElement("div");qr.contentEditable="false",qr.setAttribute("data-lexical-cursor","true");let gt=Pn.blockCursor;if(gt!==void 0){if(typeof gt=="string"){let Nr=gt.split(" ");gt=Pn.blockCursor=Nr}gt!==void 0&&qr.classList.add(...gt)}e._blockCursorElement=je=qr}r.style.caretColor="transparent",At===null?sn.appendChild(je):sn.insertBefore(je,At);break e}}je!==null&&cm(je,e,r)}h!==null&&h.observe(r,q0)}finally{zt=d,jt=u}}if(m!==null){var De=m;let je=Array.from(e._listeners.mutation),Tt=je.length;for(let at=0;at<Tt;at++){let[ln,En]=je[at],_t=De.get(En);_t!==void 0&&ln(_t,{dirtyLeaves:y,prevEditorState:o,updateTags:E})}}me(s)||s===null||l!==null&&l.is(s)||e.dispatchCommand(Cf,void 0);var Qe=e._pendingDecorators;Qe!==null&&(e._decorators=Qe,e._pendingDecorators=null,Ta("decorator",e,!0,Qe));var Wt=j0(t||o),Sn=j0(n);if(Wt!==Sn&&Ta("textcontent",e,!0,Sn),Ta("update",e,!0,{dirtyElements:_,dirtyLeaves:y,editorState:n,normalizedNodes:w,prevEditorState:t||o,tags:E}),e._deferred=[],$.length!==0){let je=e._updating;e._updating=!0;try{for(let Tt=0;Tt<$.length;Tt++)$[Tt]()}finally{e._updating=je}}var ur=e._updates;if(ur.length!==0){let je=ur.shift();if(je){let[Tt,at]=je;bE(e,Tt,at)}}}}function Ta(e,t,n,...r){let i=t._updating;t._updating=n;try{let o=Array.from(t._listeners[e]);for(e=0;e<o.length;e++)o[e].apply(null,r)}finally{t._updating=i}}function X(e,t,n){if(e._updating===!1||zt!==e){let o=!1;return e.update(()=>{o=X(e,t,n)}),o}let r=hv(e);for(let o=4;0<=o;o--)for(let l=0;l<r.length;l++){var i=r[l]._commands.get(t);if(i!==void 0&&(i=i[o],i!==void 0)){i=Array.from(i);let s=i.length;for(let a=0;a<s;a++)if(i[a](n,e)===!0)return!0}}return!1}function nx(e,t){let n=e._updates;for(t=t||!1;n.length!==0;){var r=n.shift();if(r){let[i,o]=r,l;o!==void 0&&(r=o.onUpdate,l=o.tag,o.skipTransforms&&(t=!0),r&&e._deferred.push(r),l&&e._updateTags.add(l)),i()}}return t}function bE(e,t,n){let r=e._updateTags;var i,o=i=!1;if(n!==void 0){var l=n.onUpdate;i=n.tag,i!=null&&r.add(i),i=n.skipTransforms||!1,o=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 Mf(new Map((l||n)._nodeMap)),s=!0),l._flushSync=o,o=jt;let a=On,u=zt,c=e._updating;jt=l,On=!1,e._updating=!0,zt=e;try{s&&(e._headless?n._selection!=null&&(l._selection=n._selection.clone()):l._selection=wO(e));let d=e._compositionKey;t(),i=nx(e,i),SO(l,e),e._dirtyType!==0&&(i?EO(l,e):CO(l,e),nx(e),oO(n,l,e._dirtyLeaves,e._dirtyElements)),d!==e._compositionKey&&(l._flushSync=!0);let f=l._selection;if(me(f)){let h=l._nodeMap,m=f.focus.key;h.get(f.anchor.key)!==void 0&&h.get(m)!==void 0||H(19)}else bs(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(),Bo(e);return}finally{jt=o,On=a,zt=u,e._updating=c,lu=0}e._dirtyType!==0||kO(l,e)?l._flushSync?(l._flushSync=!1,Bo(e)):s&&tO(()=>{Bo(e)}):(l._flushSync=!1,s&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Wn(e,t,n){e._updating?e._updates.push([t,n]):bE(e,t,n)}class TE extends Lu{constructor(t){super(t)}decorate(){H(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function tt(e){return e instanceof TE}class ul extends Lu{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 YR[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=pt()._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(J(n)&&t.push(n),B(n)){let r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;t!==null;){if(B(t)){let n=t.getFirstChild();if(n!==null){t=n;continue}}break}return t}getLastDescendant(){let t=this.getLastChild();for(;t!==null;){if(B(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],B(t)&&t.getLastDescendant()||t||null):(t=n[t],B(t)&&t.getFirstDescendant()||t||null)}getFirstChild(){let t=this.getLatest().__first;return t===null?null:Lt(t)}getFirstChildOrThrow(){let t=this.getFirstChild();return t===null&&H(45,this.__key),t}getLastChild(){let t=this.getLatest().__last;return t===null?null:Lt(t)}getLastChildOrThrow(){let t=this.getLastChild();return t===null&&H(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 i=0;i<r;i++){let o=n[i];t+=o.getTextContent(),B(o)&&i!==r-1&&!o.isInline()&&(t+=`
|
|
124
|
-
|
|
125
|
-
`)}return t}getTextContentSize(){let t=0,n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){let o=n[i];t+=o.getTextContentSize(),B(o)&&i!==r-1&&!o.isInline()&&(t+=2)}return t}getDirection(){return this.getLatest().__dir}hasFormat(t){return t!==""?(t=M0[t],(this.getFormat()&t)!==0):!1}select(t,n){hn();let r=rt(),i=t,o=n;var l=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&n===0){if(t=this.getFirstChild(),J(t)||B(t))return t.select(0,0)}else if(!(t!==void 0&&t!==l||n!==void 0&&n!==l)&&(t=this.getLastChild(),J(t)||B(t)))return t.select()}if(i===void 0&&(i=l),o===void 0&&(o=l),l=this.__key,me(r))r.anchor.set(l,i,"element"),r.focus.set(l,o,"element"),r.dirty=!0;else return CE(l,i,l,o,"element","element");return r}selectStart(){let t=this.getFirstDescendant();return B(t)||J(t)?t.select(0,0):t!==null?t.selectPrevious():this.select(0,0)}selectEnd(){let t=this.getLastDescendant();return B(t)||J(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!==""?M0[t]:0,this}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){let i=r.length,o=this.getChildrenSize(),l=this.getWritable(),s=l.__key;var a=[],u=[];let c=this.getChildAtIndex(t+n),d=null,f=o-n+i;if(t!==0)if(t===o)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&&H(100);var g=m.getNextSibling(),S=m.__key;m=m.getWritable(),Fo(m),u.push(S),m=g}}for(h=d,g=0;g<i;g++){S=r[g],h!==null&&S.is(h)&&(d=h=h.getPreviousSibling()),m=S.getWritable(),m.__parent===s&&f--,Fo(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&&H(76),m.__parent=s,a.push(v),h=S}if(t+n===o?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=rt(),me(t))){u=new Set(u),a=new Set(a);let{anchor:v,focus:y}=t;rx(v,u,a)&&Dd(v,v.getNode(),this,d,c),rx(y,u,a)&&Dd(y,y.getNode(),this,d,c),f!==0||this.canBeEmpty()||xr(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 B(e){return e instanceof ul}function rx(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 Rs extends ul{static getType(){return"root"}static clone(){return new Rs}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){H(51)}getTextContent(){let t=this.__cachedText;return!Ns()&&pt()._dirtyType!==0||t===null?super.getTextContent():t}remove(){H(52)}replace(){H(53)}insertBefore(){H(54)}insertAfter(){H(55)}updateDOM(){return!1}append(...t){for(let n=0;n<t.length;n++){let r=t[n];B(r)||tt(r)||H(56)}return super.append(...t)}static importJSON(t){let n=Yr();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 mn(e){return e instanceof Rs}function kO(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 wv(){return new Mf(new Map([["root",new Rs]]))}function NE(e){let t=e.exportJSON();var n=e.constructor;t.type!==n.getType()&&H(130,n.name);let r=t.children;if(B(e))for(Array.isArray(r)||H(59,n.name),e=e.getChildren(),n=0;n<e.length;n++){let i=NE(e[n]);r.push(i)}return t}class Mf{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 tx(this,t)}clone(t){return t=new Mf(this._nodeMap,t===void 0?this._selection:t),t._readOnly=!0,t}toJSON(){return tx(this,()=>({root:NE(Yr())}))}}class Os extends ul{static getType(){return"paragraph"}static clone(t){return new Os(t.__key)}createDOM(t){let n=document.createElement("p");return t=ka(t.theme,"paragraph"),t!==void 0&&n.classList.add(...t),n}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:$O,priority:0})}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&Nf(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=Xo();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=Xo();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=this.getChildren();if(t.length===0||J(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 $O(e){let t=Xo();return e.style&&(t.setFormat(e.style.textAlign),e=parseInt(e.style.textIndent,10)/20,0<e&&t.setIndent(e)),{node:t}}function Xo(){return Iu(new Os)}function RE(e,t,n,r){let i=e._keyToDOMMap;i.clear(),e._editorState=wv(),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="",i.set("root",n))}function bO(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 i=r();i!==null&&Object.keys(i).forEach(o=>{let l=t.get(o);l===void 0&&(l=[],t.set(o,l)),l.push(i[o])})}}),t}class TO{constructor(t,n,r,i,o,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=i,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=rE(),this._onError=o,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&&H(35);let i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);let o=i.get(t);o===void 0&&H(36,String(t));let l=o[r];return l.add(n),()=>{l.delete(n),o.every(s=>s.size===0)&&i.delete(t)}}registerMutationListener(t,n){this._nodes.get(t.getType())===void 0&&H(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&&H(37,t.name),r.transforms.add(n),r}registerNodeTransform(t,n){var r=this.registerNodeTransformToKlass(t,n);let i=[r];return r=r.replaceWithKlass,r!=null&&(r=this.registerNodeTransformToKlass(r,n),i.push(r)),nO(this,t.getType()),()=>{i.forEach(o=>o.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return X(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=ka(this._config.theme,"root");var r=this._pendingEditorState||this._editorState;if(this._rootElement=t,RE(this,n,t,r),n!==null){if(!this._config.disableEvents){$a!==0&&($a--,$a===0&&n.ownerDocument.removeEventListener("selectionchange",wE));var i=n.__lexicalEditor;if(i!=null){if(i._parentEditor!==null){var o=hv(i);o=o[o.length-1]._key,Yl.get(o)===i&&Yl.delete(o)}else Yl.delete(i._key);n.__lexicalEditor=null}for(i=_E(n),o=0;o<i.length;o++)i[o]();n.__lexicalEventHandles=[]}l!=null&&n.classList.remove(...l)}t!==null?(r=(r=t.ownerDocument)&&r.defaultView||null,i=t.style,i.userSelect="text",i.whiteSpace="pre-wrap",i.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=r,this._dirtyType=2,YS(this),this._updateTags.add("history-merge"),Bo(this),this._config.disableEvents||pO(t,this),l!=null&&t.classList.add(...l)):(this._editorState=r,this._window=this._pendingEditorState=null),Ta("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&H(38),GS(this);let r=this._pendingEditorState,i=this._updateTags;n=n!==void 0?n.tag:null,r===null||r.isEmpty()||(n!=null&&i.add(n),Bo(this)),this._pendingEditorState=t,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,n!=null&&i.add(n),Bo(this)}parseEditorState(t,n){t=typeof t=="string"?JSON.parse(t):t;let r=wv(),i=jt,o=On,l=zt,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,jt=r,On=!1,zt=this;try{_v(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,jt=i,On=o,zt=l}return r}update(t,n){Wn(this,t,n)}focus(t,n={}){let r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Wn(this,()=>{let i=rt(),o=Yr();i!==null?i.dirty=!0:o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.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=Xr(this._window),t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Ta("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Sv extends ul{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 Qn(e){return e instanceof Sv}class OE extends ul{}function Ev(e){return e instanceof OE}class PE extends ul{}function su(e){return e instanceof PE}I.$addUpdateTag=function(e){hn(),pt()._updateTags.add(e)};I.$applyNodeReplacement=Iu;I.$copyNode=lE;I.$createLineBreakNode=cs;I.$createNodeSelection=Cm;I.$createParagraphNode=Xo;I.$createRangeSelection=function(){let e=new Vr("root",0,"element"),t=new Vr("root",0,"element");return new al(e,t,0,"")};I.$createTabNode=Of;I.$createTextNode=Dt;I.$getAdjacentNode=um;I.$getNearestNodeFromDOMNode=Du;I.$getNearestRootOrShadowRoot=oE;I.$getNodeByKey=Lt;I.$getPreviousSelection=Ts;I.$getRoot=Yr;I.$getSelection=rt;I.$getTextContent=function(){let e=rt();return e===null?"":e.getTextContent()};I.$hasAncestor=Od;I.$hasUpdateTag=function(e){return pt()._updateTags.has(e)};I.$insertNodes=function(e,t){let n=rt()||Ts();return n===null&&(n=Yr().selectEnd()),n.insertNodes(e,t)};I.$isBlockElementNode=Em;I.$isDecoratorNode=tt;I.$isElementNode=B;I.$isInlineElementOrDecoratorNode=function(e){return B(e)&&e.isInline()||tt(e)&&e.isInline()};I.$isLeafNode=JS;I.$isLineBreakNode=ou;I.$isNodeSelection=bs;I.$isParagraphNode=function(e){return e instanceof Os};I.$isRangeSelection=me;I.$isRootNode=mn;I.$isRootOrShadowRoot=xr;I.$isTabNode=function(e){return e instanceof $s};I.$isTextNode=J;I.$nodesOfType=function(e){var t=Qr();let n=t._readOnly,r=e.getType();t=t._nodeMap;let i=[];for(let[,o]of t)o instanceof e&&o.__type===r&&(n||o.isAttached())&&i.push(o);return i};I.$normalizeSelection__EXPERIMENTAL=cv;I.$parseSerializedNode=function(e){return _v(e,pt()._nodes)};I.$selectAll=function(){var e=Yr();e=e.select(0,e.getChildrenSize()),Wr(cv(e))};I.$setCompositionKey=Kt;I.$setSelection=Wr;I.$splitNode=sE;I.BLUR_COMMAND=HS;I.CAN_REDO_COMMAND={};I.CAN_UNDO_COMMAND={};I.CLEAR_EDITOR_COMMAND={};I.CLEAR_HISTORY_COMMAND={};I.CLICK_COMMAND=bS;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=Gl;I.COPY_COMMAND=ov;I.CUT_COMMAND=lv;I.DELETE_CHARACTER_COMMAND=qa;I.DELETE_LINE_COMMAND=tu;I.DELETE_WORD_COMMAND=eu;I.DEPRECATED_$computeGridMap=kE;I.DEPRECATED_$createGridSelection=function(){let e=new Vr("root",0,"element"),t=new Vr("root",0,"element");return new Af("root",e,t)};I.DEPRECATED_$getGridCellNodeRect=Sm;I.DEPRECATED_$getNodeTriplet=$E;I.DEPRECATED_$isGridCellNode=Qn;I.DEPRECATED_$isGridNode=Ev;I.DEPRECATED_$isGridRowNode=su;I.DEPRECATED_$isGridSelection=yv;I.DEPRECATED_GridCellNode=Sv;I.DEPRECATED_GridNode=OE;I.DEPRECATED_GridRowNode=PE;I.DRAGEND_COMMAND=WS;I.DRAGOVER_COMMAND=US;I.DRAGSTART_COMMAND=BS;I.DROP_COMMAND=FS;I.DecoratorNode=TE;I.ElementNode=ul;I.FOCUS_COMMAND=VS;I.FORMAT_ELEMENT_COMMAND={};I.FORMAT_TEXT_COMMAND=Ui;I.INDENT_CONTENT_COMMAND={};I.INSERT_LINE_BREAK_COMMAND=Ca;I.INSERT_PARAGRAPH_COMMAND=im;I.INSERT_TAB_COMMAND={};I.KEY_ARROW_DOWN_COMMAND=MS;I.KEY_ARROW_LEFT_COMMAND=OS;I.KEY_ARROW_RIGHT_COMMAND=NS;I.KEY_ARROW_UP_COMMAND=AS;I.KEY_BACKSPACE_COMMAND=IS;I.KEY_DELETE_COMMAND=jS;I.KEY_DOWN_COMMAND=TS;I.KEY_ENTER_COMMAND=kd;I.KEY_ESCAPE_COMMAND=LS;I.KEY_MODIFIER_COMMAND=KS;I.KEY_SPACE_COMMAND=DS;I.KEY_TAB_COMMAND=zS;I.LineBreakNode=ks;I.MOVE_TO_END=RS;I.MOVE_TO_START=PS;I.OUTDENT_CONTENT_COMMAND={};I.PASTE_COMMAND=nv;I.ParagraphNode=Os;I.REDO_COMMAND=iv;I.REMOVE_TEXT_COMMAND=om;I.RootNode=Rs;I.SELECTION_CHANGE_COMMAND=Cf;I.SELECT_ALL_COMMAND=lm;I.TabNode=$s;I.TextNode=sl;I.UNDO_COMMAND=rv;I.createCommand=function(){return{}};I.createEditor=function(e){var t=e||{},n=zt,r=t.theme||{};let i=e===void 0?n:t.parentEditor||null,o=t.disableEvents||!1,l=wv(),s=t.namespace||(i!==null?i._config.namespace:rE()),a=t.editorState,u=[Rs,sl,ks,$s,Os,...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 TO(l,i,e,{disableEvents:o,namespace:s,theme:r},c||console.error,bO(e),t),a!==void 0&&(r._pendingEditorState=a,r._dirtyType=2),r};I.getNearestEditorFromDOMNode=fv;I.isHTMLAnchorElement=function(e){return Nf(e)&&e.tagName==="A"};I.isHTMLElement=Nf;I.isSelectionCapturedInDecoratorInput=dv;I.isSelectionWithinEditor=Mu;const NO=I;var we=NO,bt={},Ut={},le=we;let Id=new Map;function ix(e){for(;e!=null;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function ox(e){let t=e.parentNode;if(t==null)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function AE(e){let t={};e=e.split(";");for(let n of e)if(n!==""){let[r,i]=n.split(/:([^]+)/);t[r.trim()]=i.trim()}return t}function Ld(e){let t=Id.get(e);return t===void 0&&(t=AE(e),Id.set(e,t)),t}function RO(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}function gl(e,t){var n=Ld("getStyle"in e?e.getStyle():e.style);t=Object.entries(t).reduce((r,[i,o])=>(o===null?delete r[i]:r[i]=o,r),{...n}),n=RO(t),e.setStyle(n),Id.set(n,t)}function ME(e,t){var n=e.getNodes(),r=n.length;if(le.DEPRECATED_$isGridSelection(e)){for(var i=le.$createRangeSelection(),o=i.anchor,l=i.focus,s=0;s<r;s++){var a=n[s];le.DEPRECATED_$isGridCellNode(a)&&(o.set(a.getKey(),0,"element"),l.set(a.getKey(),a.getChildrenSize(),"element"),ME(le.$normalizeSelection__EXPERIMENTAL(i),t))}le.$setSelection(e)}else if(--r,i=n[0],o=n[r],e.isCollapsed())gl(e,t);else{var u=e.anchor,c=e.focus;s=i.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,le.$isTextNode(i)&&l===s&&(c=i.getNextSibling(),le.$isTextNode(c)&&(l=d=0,i=c)),n.length===1)le.$isTextNode(i)&&(l=h==="element"?0:d>a?a:d,e=m==="element"?s:d>a?d:a,l!==e&&(l===0&&e===s?(gl(i,t),i.select(l,e)):(n=i.splitText(l,e),n=l===0?n[0]:n[1],gl(n,t),n.select(0,e-l))));else for(le.$isTextNode(i)&&l<i.getTextContentSize()&&(l!==0&&(i=i.splitText(l)[1]),gl(i,t)),le.$isTextNode(o)&&(l=o.getTextContent().length,o.__key!==u&&e!==0&&(e=l),e!==l&&([o]=o.splitText(e)),e!==0&&gl(o,t)),e=1;e<r;e++)l=n[e],s=l.getKey(),le.$isTextNode(l)&&s!==i.getKey()&&s!==o.getKey()&&!l.isToken()&&gl(l,t)}}function OO(e){for(;e!==null&&!le.$isRootOrShadowRoot(e);){let t=e.getLatest(),n=e.getParent();t.getChildrenSize()===0&&e.remove(!0),e=n}}function zh(e,t,n,r,i=null){if(t.length!==0){var o=t[0],l=new Map,s=[];o=le.$isElementNode(o)?o:o.getParentOrThrow(),o.isInline()&&(o=o.getParentOrThrow());for(var a=!1;o!==null;){var u=o.getPreviousSibling();if(u!==null){o=u,a=!0;break}if(o=o.getParentOrThrow(),le.$isRootOrShadowRoot(o))break}u=new Set;for(var c=0;c<n;c++){var d=t[c];le.$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&&le.$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()),le.$isElementNode(g)&&g.getChildrenKeys().forEach(S=>f.add(S))}),OO(h)}}else u.has(d.getKey())&&(h=r(),h.setFormat(d.getFormatType()),h.setIndent(d.getIndent()),s.push(h),d.remove(!0))}if(i!==null)for(t=0;t<s.length;t++)i.append(s[t]);if(t=null,le.$isRootOrShadowRoot(o))if(a)if(i!==null)o.insertAfter(i);else for(i=s.length-1;0<=i;i--)o.insertAfter(s[i]);else if(a=o.getFirstChild(),le.$isElementNode(a)&&(o=a),a===null)if(i)o.append(i);else for(i=0;i<s.length;i++)a=s[i],o.append(a),t=a;else if(i!==null)a.insertBefore(i);else for(o=0;o<s.length;o++)i=s[o],a.insertBefore(i),t=i;else if(i)o.insertAfter(i);else for(i=s.length-1;0<=i;i--)a=s[i],o.insertAfter(a),t=a;s=le.$getPreviousSelection(),le.$isRangeSelection(s)&&s.anchor.getNode().isAttached()&&s.focus.getNode().isAttached()?le.$setSelection(s.clone()):t!==null?t.selectEnd():e.dirty=!0}}function DE(e,t,n,r){e.modify(t?"extend":"move",n,r)}function IE(e){return e=e.anchor.getNode(),(le.$isRootNode(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}Ut.$addNodeStyle=function(e){e=e.getStyle();let t=AE(e);Id.set(e,t)};Ut.$cloneWithProperties=function(e){let t=e.constructor.clone(e);return t.__parent=e.__parent,t.__next=e.__next,t.__prev=e.__prev,le.$isElementNode(e)&&le.$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):(le.$isTextNode(e)&&le.$isTextNode(t)&&(t.__format=e.__format,t.__style=e.__style,t.__mode=e.__mode,t.__detail=e.__detail),t)};Ut.$getSelectionStyleValueForProperty=function(e,t,n=""){let r=null,i=e.getNodes();var o=e.anchor,l=e.focus,s=e.isBackward();let a=s?l.offset:o.offset;if(o=s?l.getNode():o.getNode(),e.style!==""&&(e=Ld(e.style),e!==null&&t in e))return e[t];for(e=0;e<i.length;e++){var u=i[e];if((e===0||a!==0||!u.is(o))&&le.$isTextNode(u)){if(l=t,s=n,u=u.getStyle(),u=Ld(u),l=u!==null&&u[l]||s,r===null)r=l;else if(r!==l){r="";break}}}return r===null?n:r};Ut.$isAtNodeEnd=function(e){return e.type==="text"?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()};Ut.$isParentElementRTL=IE;Ut.$moveCaretSelection=DE;Ut.$moveCharacter=function(e,t,n){let r=IE(e);DE(e,t,n?!r:r,"character")};Ut.$patchStyleText=ME;Ut.$selectAll=function(e){let t=e.anchor;e=e.focus;var n=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();let r=n.getFirstDescendant();n=n.getLastDescendant();let i="element",o="element",l=0;le.$isTextNode(r)?i="text":le.$isElementNode(r)||r===null||(r=r.getParentOrThrow()),le.$isTextNode(n)?(o="text",l=n.getTextContentSize()):le.$isElementNode(n)||n===null||(n=n.getParentOrThrow()),r&&n&&(t.set(r.getKey(),0,i),e.set(n.getKey(),l,o))};Ut.$setBlocksType=function(e,t){if(e.anchor.key==="root"){t=t();var n=le.$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 o=n[e];var r=o;if(!le.$isElementNode(r)||le.$isRootOrShadowRoot(r))r=!1;else{var i=r.getFirstChild();i=i===null||le.$isLineBreakNode(i)||le.$isTextNode(i)||i.isInline(),r=!r.isInline()&&r.canBeEmpty()!==!1&&i}r&&(r=t(),r.setFormat(o.getFormatType()),r.setIndent(o.getIndent()),o.replace(r,!0))}};Ut.$shouldOverrideDefaultCharacterSelection=function(e,t){return e=le.$getAdjacentNode(e.focus,t),le.$isDecoratorNode(e)&&!e.isIsolated()||le.$isElementNode(e)&&!e.isInline()&&!e.canBeEmpty()};Ut.$sliceSelectedTextNodeContent=function(e,t){if(t.isSelected()&&!t.isSegmented()&&!t.isToken()&&(le.$isRangeSelection(e)||le.DEPRECATED_$isGridSelection(e))){var n=e.anchor.getNode(),r=e.focus.getNode(),i=t.is(n),o=t.is(r);if(i||o){i=e.isBackward();let[l,s]=e.getCharacterOffsets();e=n.is(r),o=t.is(i?r:n),r=t.is(i?n:r),n=0;let a;e?(n=l>s?s:l,a=l>s?l:s):o?(n=i?s:l,a=void 0):r&&(i=i?l:s,n=0,a=i),t.__text=t.__text.slice(n,a)}}return t};Ut.$wrapNodes=function(e,t,n=null){var r=e.getNodes();let i=r.length;var o=e.anchor;if(i===0||i===1&&o.type==="element"&&o.getNode().getChildrenSize()===0){e=o.type==="text"?o.getNode().getParentOrThrow():o.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{o=null;var l=[];for(let s=0;s<i;s++){let a=r[s];le.$isRootOrShadowRoot(a)?(zh(e,l,l.length,t,n),l=[],o=a):o===null||o!==null&&le.$hasAncestor(a,o)?l.push(a):(zh(e,l,l.length,t,n),l=[a])}zh(e,l,l.length,t,n)}};Ut.createDOMRange=function(e,t,n,r,i){let o=t.getKey(),l=r.getKey(),s=document.createRange(),a=e.getElementByKey(o);if(e=e.getElementByKey(l),le.$isTextNode(t)&&(a=ix(a)),le.$isTextNode(r)&&(e=ix(e)),t===void 0||r===void 0||a===null||e===null)return null;a.nodeName==="BR"&&([a,n]=ox(a)),e.nodeName==="BR"&&([e,i]=ox(e)),t=a.firstChild,a===e&&t!=null&&t.nodeName==="BR"&&n===0&&i===0&&(i=1);try{s.setStart(a,n),s.setEnd(e,i)}catch{return null}return!s.collapsed||n===i&&o===l||(s.setStart(e,i),s.setEnd(a,n)),s};Ut.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((o,l)=>{let s=o.top-l.top;return 3>=Math.abs(s)?o.left-l.left:s});let i;for(let o=0;o<r;o++){let l=t[o],s=l.width+n===e.width;i&&i.top<=l.top&&i.top+i.height>l.top&&i.left+i.width>l.left||s?(t.splice(o--,1),r--):i=l}return t};Ut.getStyleObjectFromCSS=Ld;Ut.trimTextContentFromAnchor=function(e,t,n){let r=t.getNode();if(le.$isElementNode(r)){var i=r.getDescendantByIndex(t.offset);i!==null&&(r=i)}for(;0<n&&r!==null;){var o=r.getPreviousSibling(),l=0;if(o===null){i=r.getParentOrThrow();for(var s=i.getPreviousSibling();s===null;){if(i=i.getParent(),i===null){o=null;break}s=i.getPreviousSibling()}i!==null&&(l=i.isInline()?0:2,o=le.$isElementNode(s)?s.getLastDescendant():s)}if(s=r.getTextContent(),s===""&&le.$isElementNode(r)&&!r.isInline()&&(s=`
|
|
122
|
+
`}return qt(qt(qt(qt({},nn,"richtext"),"templateStrings",t),"exprs",n),"files",r)}function TE(e){var t=typeof e.format=="number"?vO(e.format):[],n=e.text.trimStart(),r=e.text.length-n.length;n=n.trimEnd();var i=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(i))}function Sm(e){return e.type==="text"?TE(e):e.type==="linebreak"?`
|
|
123
|
+
`:e}function NE(e,t,n){var r,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=i?"":`
|
|
124
|
+
`,l=["".concat(o).concat(" ".repeat(n)).concat(e)];return((r=t.children)===null||r===void 0||(r=r[0])===null||r===void 0?void 0:r.type)!=="list"&&l.push(" "),l.concat(t.children.flatMap(function(s){return s.type==="list"?s.children.flatMap(function(a){return NE(RE(s),a,n+4)}):[Sm(s)]}))}function RE(e){if(e.listType==="bullet")return"-";if(e.listType==="number")return"1.";throw new Error("Unhandled list type: ".concat(e.listType))}var gO={bold:1,italic:2,"line-through":4};function vO(e){return Object.entries(gO).flatMap(function(t){var n=iO(t,2),r=n[0],i=n[1];return(i&e)===i?[r]:[]})}var yO=new TextEncoder;function xO(e,t){if(e.src.startsWith("data:")){var n=jn.getSHA256Hash(yO.encode(e.src)),r=Sv(e.src);if(r===void 0)throw new Error("Could not detect Mime Type for image: ".concat(e.src));var i=Ev(r),o="/public/".concat(n,".").concat(i);return t[o]=e.src,qt(qt(qt({},nn,"file"),Rn,o),"metadata",{width:e.width||0,height:e.height||0,sha256:n||"",mimeType:r})}else{var l=_O("sha256",e.src);return qt(qt(qt({},nn,"file"),Rn,"/public".concat(e.src.split("?")[0])),"metadata",{width:e.width||0,height:e.height||0,sha256:l||"",mimeType:e.mimeType||""})}}function _O(e,t){var n=t.split("?");if(!(n.length<2)){var r=n[1],i=new URLSearchParams(r);if(i.has(e))return i.get(e)}}function wO(e){return qt(qt(qt({},nn,"link"),"href",e.url),"children",e.children.map(TE))}function nx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nx(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var $r={version:1,format:"",indent:0,direction:null};function Ps(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(typeof e=="string")return lt(lt({},$r),{},{type:"text",format:"",text:e});if("tag"in e)switch(e.tag){case"h1":return gl(e);case"h2":return gl(e);case"h3":return gl(e);case"h4":return gl(e);case"h5":return gl(e);case"h6":return gl(e);case"li":return bO(e);case"p":return kO(e);case"ul":return rx(e);case"ol":return rx(e);case"span":return OE(e);case"a":return EO(e);case"img":return SO(e);case"br":return t?lt(lt({},$r),{},{type:"linebreak"}):$O();default:throw Error("Unexpected node tag: "+JSON.stringify(e,null,2))}else throw Error("Unexpected node: "+JSON.stringify(e,null,2))}function SO(e){var t=e.src;return lt(lt({},$r),{},{type:"image",src:t,width:e.width,height:e.height,mimeType:e.mimeType})}function EO(e){return lt(lt({},$r),{},{type:"link",url:e.href,children:e.children.map(function(t){return Ps(t)})})}function CO(e){return lt(lt({},$r),{},{format:"",type:"root",children:e.children.map(function(t){return Ps(t)})})}function gl(e){return lt(lt({},$r),{},{type:"heading",tag:e.tag,children:e.children.map(function(t){return Ps(t)})})}function kO(e){return lt(lt({},$r),{},{type:"paragraph",children:e.children.map(function(t){return Ps(t,!0)})})}function $O(){return lt(lt({},$r),{},{type:"paragraph",children:[]})}function bO(e){return lt(lt({},$r),{},{type:"listitem",children:e.children.map(function(t){return Ps(t,!0)})})}function rx(e){return lt(lt({},$r),{},{type:"list",listType:e.tag==="ol"?"number":"bullet",children:e.children.map(function(t){return Ps(t)})},e.dir?{direction:e.dir}:{direction:null})}var TO={bold:1,italic:2,"line-through":4};function NO(e){return e.reduce(function(t,n){return t|TO[n]},0)}function OE(e){var t=e.children[0];return typeof t=="string"?lt(lt({},$r),{},{type:"text",text:t,format:NO(e.classes)}):OE(lt(lt({},t),{},{classes:e.classes.concat(t.classes)}))}var Dd='<val value="',Em='">',Cm="</val>";function pr(e,t,n){for(var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=[],o=function(){var a=e[n];if(a.type==="heading")i.push({tag:"h".concat(a.depth),children:pr(a.tokens?a.tokens:[],t,0).children});else if(a.type==="paragraph")i.push({tag:"p",children:pr(a.tokens?a.tokens:[],t,0).children});else if(a.type==="strong")i.push({tag:"span",classes:["bold"],children:pr(a.tokens?a.tokens:[],t,0).children});else if(a.type==="em")i.push({tag:"span",classes:["italic"],children:pr(a.tokens?a.tokens:[],t,0).children});else if(a.type==="del")i.push({tag:"span",classes:["line-through"],children:pr(a.tokens?a.tokens:[],t,0).children});else if(a.type==="text")if("tokens"in a&&Array.isArray(a.tokens))i.push.apply(i,wm(pr(a.tokens,t,n,r).children));else if(r&&typeof a.raw=="string"){var u=a.raw.split(`
|
|
125
|
+
`),c=u.flatMap(function(E,$){return $===u.length-1?[E]:[E,{tag:"br",children:[]}]});i.push.apply(i,wm(c))}else i.push(a.raw);else if(a.type==="list")i.push({tag:a.ordered?"ol":"ul",children:pr(a.items,t,0).children});else if(a.type==="list_item")i.push({tag:"li",children:pr(a.tokens?a.tokens:[],t,0,!0).children});else if(a.type!=="space")if(a.type==="html"){if(a.text===Cm)return{v:{children:i,cursor:n}};var d=a.text.indexOf(Em);if(a.text.startsWith(Dd)&&d>-1){var f=Number(a.text.slice(Dd.length,d));if(Number.isNaN(f))throw Error("Illegal val intermediate node: ".concat(JSON.stringify(a)));var h=pr(e.map(function(E){return E.type==="link"||E.type==="list"?{type:"text",raw:E.raw,text:E.raw}:E}),t,n+1),m=h.children,g=h.cursor,w=t[f];if(w._type==="link")i.push({tag:"a",href:w.href,children:m});else if(w._type==="file"){var v,y,_;i.push({tag:"img",src:jn.convertFileSource(w).url,width:(v=w.metadata)===null||v===void 0?void 0:v.width,height:(y=w.metadata)===null||y===void 0?void 0:y.height,mimeType:(_=w.metadata)===null||_===void 0?void 0:_.mimeType,children:[]})}n=g}var S=/<br\s*\/?>/gi;a.text.trim().match(S)&&i.push({tag:"br",children:[]})}else a.type==="link"?a.raw===a.href?i.push(a.raw):i.push({tag:"a",href:a.href,children:pr(a.tokens?a.tokens:[],t,0).children}):a.type==="br"?i.push({tag:"br",children:[]}):console.error("Could not parse markdown: unsupported token type: ".concat(a.type,". Found: ").concat(a.raw));n++},l;n<e.length;)if(l=o(),l)return l.v;return{children:i,cursor:n}}function PE(e){var t=e.templateStrings,n=e.exprs,r=t.flatMap(function(a,u){var c=n[u];return c?c[nn]==="link"?a.concat("".concat(Dd).concat(u).concat(Em).concat(c.children[0]).concat(Cm)):a.concat("".concat(Dd).concat(u).concat(Em).concat(Cm)):a}).join(""),i=eO(r,{gfm:!0}),o=pr(i,n,0),l=o.children,s=o.cursor;if(s!==i.length)throw Error("Unexpectedly terminated markdown parsing. Possible reason: unclosed html tag?");return qt(qt({},nn,"richtext"),"children",l)}var wn={},bt={},Ut={},le=xe;let Ld=new Map;function ix(e){for(;e!=null;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function ox(e){let t=e.parentNode;if(t==null)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function AE(e){let t={};e=e.split(";");for(let n of e)if(n!==""){let[r,i]=n.split(/:([^]+)/);t[r.trim()]=i.trim()}return t}function Id(e){let t=Ld.get(e);return t===void 0&&(t=AE(e),Ld.set(e,t)),t}function RO(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}function vl(e,t){var n=Id("getStyle"in e?e.getStyle():e.style);t=Object.entries(t).reduce((r,[i,o])=>(o===null?delete r[i]:r[i]=o,r),{...n}),n=RO(t),e.setStyle(n),Ld.set(n,t)}function ME(e,t){var n=e.getNodes(),r=n.length;if(le.DEPRECATED_$isGridSelection(e)){for(var i=le.$createRangeSelection(),o=i.anchor,l=i.focus,s=0;s<r;s++){var a=n[s];le.DEPRECATED_$isGridCellNode(a)&&(o.set(a.getKey(),0,"element"),l.set(a.getKey(),a.getChildrenSize(),"element"),ME(le.$normalizeSelection__EXPERIMENTAL(i),t))}le.$setSelection(e)}else if(--r,i=n[0],o=n[r],e.isCollapsed())vl(e,t);else{var u=e.anchor,c=e.focus;s=i.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,le.$isTextNode(i)&&l===s&&(c=i.getNextSibling(),le.$isTextNode(c)&&(l=d=0,i=c)),n.length===1)le.$isTextNode(i)&&(l=h==="element"?0:d>a?a:d,e=m==="element"?s:d>a?d:a,l!==e&&(l===0&&e===s?(vl(i,t),i.select(l,e)):(n=i.splitText(l,e),n=l===0?n[0]:n[1],vl(n,t),n.select(0,e-l))));else for(le.$isTextNode(i)&&l<i.getTextContentSize()&&(l!==0&&(i=i.splitText(l)[1]),vl(i,t)),le.$isTextNode(o)&&(l=o.getTextContent().length,o.__key!==u&&e!==0&&(e=l),e!==l&&([o]=o.splitText(e)),e!==0&&vl(o,t)),e=1;e<r;e++)l=n[e],s=l.getKey(),le.$isTextNode(l)&&s!==i.getKey()&&s!==o.getKey()&&!l.isToken()&&vl(l,t)}}function OO(e){for(;e!==null&&!le.$isRootOrShadowRoot(e);){let t=e.getLatest(),n=e.getParent();t.getChildrenSize()===0&&e.remove(!0),e=n}}function zh(e,t,n,r,i=null){if(t.length!==0){var o=t[0],l=new Map,s=[];o=le.$isElementNode(o)?o:o.getParentOrThrow(),o.isInline()&&(o=o.getParentOrThrow());for(var a=!1;o!==null;){var u=o.getPreviousSibling();if(u!==null){o=u,a=!0;break}if(o=o.getParentOrThrow(),le.$isRootOrShadowRoot(o))break}u=new Set;for(var c=0;c<n;c++){var d=t[c];le.$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&&le.$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()),le.$isElementNode(g)&&g.getChildrenKeys().forEach(w=>f.add(w))}),OO(h)}}else u.has(d.getKey())&&(h=r(),h.setFormat(d.getFormatType()),h.setIndent(d.getIndent()),s.push(h),d.remove(!0))}if(i!==null)for(t=0;t<s.length;t++)i.append(s[t]);if(t=null,le.$isRootOrShadowRoot(o))if(a)if(i!==null)o.insertAfter(i);else for(i=s.length-1;0<=i;i--)o.insertAfter(s[i]);else if(a=o.getFirstChild(),le.$isElementNode(a)&&(o=a),a===null)if(i)o.append(i);else for(i=0;i<s.length;i++)a=s[i],o.append(a),t=a;else if(i!==null)a.insertBefore(i);else for(o=0;o<s.length;o++)i=s[o],a.insertBefore(i),t=i;else if(i)o.insertAfter(i);else for(i=s.length-1;0<=i;i--)a=s[i],o.insertAfter(a),t=a;s=le.$getPreviousSelection(),le.$isRangeSelection(s)&&s.anchor.getNode().isAttached()&&s.focus.getNode().isAttached()?le.$setSelection(s.clone()):t!==null?t.selectEnd():e.dirty=!0}}function DE(e,t,n,r){e.modify(t?"extend":"move",n,r)}function LE(e){return e=e.anchor.getNode(),(le.$isRootNode(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}Ut.$addNodeStyle=function(e){e=e.getStyle();let t=AE(e);Ld.set(e,t)};Ut.$cloneWithProperties=function(e){let t=e.constructor.clone(e);return t.__parent=e.__parent,t.__next=e.__next,t.__prev=e.__prev,le.$isElementNode(e)&&le.$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):(le.$isTextNode(e)&&le.$isTextNode(t)&&(t.__format=e.__format,t.__style=e.__style,t.__mode=e.__mode,t.__detail=e.__detail),t)};Ut.$getSelectionStyleValueForProperty=function(e,t,n=""){let r=null,i=e.getNodes();var o=e.anchor,l=e.focus,s=e.isBackward();let a=s?l.offset:o.offset;if(o=s?l.getNode():o.getNode(),e.style!==""&&(e=Id(e.style),e!==null&&t in e))return e[t];for(e=0;e<i.length;e++){var u=i[e];if((e===0||a!==0||!u.is(o))&&le.$isTextNode(u)){if(l=t,s=n,u=u.getStyle(),u=Id(u),l=u!==null&&u[l]||s,r===null)r=l;else if(r!==l){r="";break}}}return r===null?n:r};Ut.$isAtNodeEnd=function(e){return e.type==="text"?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()};Ut.$isParentElementRTL=LE;Ut.$moveCaretSelection=DE;Ut.$moveCharacter=function(e,t,n){let r=LE(e);DE(e,t,n?!r:r,"character")};Ut.$patchStyleText=ME;Ut.$selectAll=function(e){let t=e.anchor;e=e.focus;var n=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();let r=n.getFirstDescendant();n=n.getLastDescendant();let i="element",o="element",l=0;le.$isTextNode(r)?i="text":le.$isElementNode(r)||r===null||(r=r.getParentOrThrow()),le.$isTextNode(n)?(o="text",l=n.getTextContentSize()):le.$isElementNode(n)||n===null||(n=n.getParentOrThrow()),r&&n&&(t.set(r.getKey(),0,i),e.set(n.getKey(),l,o))};Ut.$setBlocksType=function(e,t){if(e.anchor.key==="root"){t=t();var n=le.$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 o=n[e];var r=o;if(!le.$isElementNode(r)||le.$isRootOrShadowRoot(r))r=!1;else{var i=r.getFirstChild();i=i===null||le.$isLineBreakNode(i)||le.$isTextNode(i)||i.isInline(),r=!r.isInline()&&r.canBeEmpty()!==!1&&i}r&&(r=t(),r.setFormat(o.getFormatType()),r.setIndent(o.getIndent()),o.replace(r,!0))}};Ut.$shouldOverrideDefaultCharacterSelection=function(e,t){return e=le.$getAdjacentNode(e.focus,t),le.$isDecoratorNode(e)&&!e.isIsolated()||le.$isElementNode(e)&&!e.isInline()&&!e.canBeEmpty()};Ut.$sliceSelectedTextNodeContent=function(e,t){if(t.isSelected()&&!t.isSegmented()&&!t.isToken()&&(le.$isRangeSelection(e)||le.DEPRECATED_$isGridSelection(e))){var n=e.anchor.getNode(),r=e.focus.getNode(),i=t.is(n),o=t.is(r);if(i||o){i=e.isBackward();let[l,s]=e.getCharacterOffsets();e=n.is(r),o=t.is(i?r:n),r=t.is(i?n:r),n=0;let a;e?(n=l>s?s:l,a=l>s?l:s):o?(n=i?s:l,a=void 0):r&&(i=i?l:s,n=0,a=i),t.__text=t.__text.slice(n,a)}}return t};Ut.$wrapNodes=function(e,t,n=null){var r=e.getNodes();let i=r.length;var o=e.anchor;if(i===0||i===1&&o.type==="element"&&o.getNode().getChildrenSize()===0){e=o.type==="text"?o.getNode().getParentOrThrow():o.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{o=null;var l=[];for(let s=0;s<i;s++){let a=r[s];le.$isRootOrShadowRoot(a)?(zh(e,l,l.length,t,n),l=[],o=a):o===null||o!==null&&le.$hasAncestor(a,o)?l.push(a):(zh(e,l,l.length,t,n),l=[a])}zh(e,l,l.length,t,n)}};Ut.createDOMRange=function(e,t,n,r,i){let o=t.getKey(),l=r.getKey(),s=document.createRange(),a=e.getElementByKey(o);if(e=e.getElementByKey(l),le.$isTextNode(t)&&(a=ix(a)),le.$isTextNode(r)&&(e=ix(e)),t===void 0||r===void 0||a===null||e===null)return null;a.nodeName==="BR"&&([a,n]=ox(a)),e.nodeName==="BR"&&([e,i]=ox(e)),t=a.firstChild,a===e&&t!=null&&t.nodeName==="BR"&&n===0&&i===0&&(i=1);try{s.setStart(a,n),s.setEnd(e,i)}catch{return null}return!s.collapsed||n===i&&o===l||(s.setStart(e,i),s.setEnd(a,n)),s};Ut.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((o,l)=>{let s=o.top-l.top;return 3>=Math.abs(s)?o.left-l.left:s});let i;for(let o=0;o<r;o++){let l=t[o],s=l.width+n===e.width;i&&i.top<=l.top&&i.top+i.height>l.top&&i.left+i.width>l.left||s?(t.splice(o--,1),r--):i=l}return t};Ut.getStyleObjectFromCSS=Id;Ut.trimTextContentFromAnchor=function(e,t,n){let r=t.getNode();if(le.$isElementNode(r)){var i=r.getDescendantByIndex(t.offset);i!==null&&(r=i)}for(;0<n&&r!==null;){var o=r.getPreviousSibling(),l=0;if(o===null){i=r.getParentOrThrow();for(var s=i.getPreviousSibling();s===null;){if(i=i.getParent(),i===null){o=null;break}s=i.getPreviousSibling()}i!==null&&(l=i.isInline()?0:2,o=le.$isElementNode(s)?s.getLastDescendant():s)}if(s=r.getTextContent(),s===""&&le.$isElementNode(r)&&!r.isInline()&&(s=`
|
|
126
126
|
|
|
127
|
-
`),i=s.length,!le.$isTextNode(r)||n>=i)s=r.getParent(),r.remove(),s==null||s.getChildrenSize()!==0||le.$isRootNode(s)||s.remove(),n-=i+l,r=o;else{let a=r.getKey();l=e.getEditorState().read(()=>{const c=le.$getNodeByKey(a);return le.$isTextNode(c)&&c.isSimpleText()?c.getTextContent():null}),o=i-n;let u=s.slice(0,o);l!==null&&l!==s?(n=le.$getPreviousSelection(),i=r,r.isSimpleText()?r.setTextContent(l):(i=le.$createTextNode(l),r.replace(i)),le.$isRangeSelection(n)&&n.isCollapsed()&&(n=n.anchor.offset,i.select(n,n))):r.isSimpleText()?(l=t.key===a,s=t.offset,s<n&&(s=i),n=l?s-n:0,i=l?s:o,l&&n===0?([n]=r.splitText(n,i),n.remove()):([,n]=r.splitText(n,i),n.remove())):(n=le.$createTextNode(u),r.replace(n)),n=0}}};const PO=Ut;var lo=PO,AO=lo,Et=we;function MO(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 LE(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function jE(e,t){for(;e!==Et.$getRoot()&&e!=null;){if(t(e))return e;e=e.getParent()}return null}bt.$splitNode=Et.$splitNode;bt.isHTMLAnchorElement=Et.isHTMLAnchorElement;bt.isHTMLElement=Et.isHTMLElement;bt.$dfs=function(e,t){let n=[];e=(e||Et.$getRoot()).getLatest(),t=t||(Et.$isElementNode(e)?e.getLastDescendant():e);for(var r=e,i=0;(r=r.getParent())!==null;)i++;for(r=i;e!==null&&!e.is(t);)if(n.push({depth:r,node:e}),Et.$isElementNode(e)&&0<e.getChildrenSize())e=e.getFirstChild(),r++;else for(i=null;i===null&&e!==null;)i=e.getNextSibling(),i===null?(e=e.getParent(),r--):e=i;return e!==null&&e.is(t)&&n.push({depth:r,node:e}),n};bt.$filter=function(e,t){let n=[];for(let r=0;r<e.length;r++){let i=t(e[r]);i!==null&&n.push(i)}return n};bt.$findMatchingParent=jE;bt.$getNearestBlockElementAncestorOrThrow=function(e){let t=jE(e,n=>Et.$isElementNode(n)&&!n.isInline());return Et.$isElementNode(t)||MO(4,e.__key),t};bt.$getNearestNodeOfType=function(e,t){for(;e!=null;){if(e instanceof t)return e;e=e.getParent()}return null};bt.$insertFirst=function(e,t){let n=e.getFirstChild();n!==null?n.insertBefore(t):e.append(t)};bt.$insertNodeToNearestRoot=function(e){var t=Et.$getSelection()||Et.$getPreviousSelection();if(Et.$isRangeSelection(t)){var{focus:n}=t;if(t=n.getNode(),n=n.offset,Et.$isRootOrShadowRoot(t))n=t.getChildAtIndex(n),n==null?t.append(e):n.insertBefore(e),e.selectNext();else{let r,i;Et.$isTextNode(t)?(r=t.getParentOrThrow(),i=t.getIndexWithinParent(),0<n&&(i+=1,t.splitText(n))):(r=t,i=n),[,t]=Et.$splitNode(r,i),t.insertBefore(e),t.selectStart()}}else Et.$isNodeSelection(t)||Et.DEPRECATED_$isGridSelection(t)?(t=t.getNodes(),t[t.length-1].getTopLevelElementOrThrow().insertAfter(e)):Et.$getRoot().append(e),t=Et.$createParagraphNode(),e.insertAfter(t),t.select();return e.getLatest()};bt.$restoreEditorState=function(e,t){let n=new Map,r=e._pendingEditorState;for(let[i,o]of t._nodeMap){let l=AO.$cloneWithProperties(o);Et.$isTextNode(l)&&(l.__text=o.__text),n.set(i,l)}r&&(r._nodeMap=n),e._dirtyType=2,e=t._selection,Et.$setSelection(e===null?null:e.clone())};bt.$wrapNodeInElement=function(e,t){return t=t(),e.replace(t),t.append(e),t};bt.addClassNamesToElement=function(e,...t){t.forEach(n=>{typeof n=="string"&&(n=n.split(" ").filter(r=>r!==""),e.classList.add(...n))})};bt.isMimeType=LE;bt.mediaFileReader=function(e,t){let n=e[Symbol.iterator]();return new Promise((r,i)=>{let o=[],l=()=>{const{done:s,value:a}=n.next();if(s)return r(o);const u=new FileReader;u.addEventListener("error",i),u.addEventListener("load",()=>{const c=u.result;typeof c=="string"&&o.push({file:a,result:c}),l()}),LE(a,t)?u.readAsDataURL(a):l()};l()})};bt.mergeRegister=function(...e){return()=>{e.forEach(t=>t())}};bt.objectKlassEquals=function(e,t){return e!==null?Object.getPrototypeOf(e).constructor.name===t.name:!1};bt.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,i=>{e:{for(var o=i.getChildren(),l=0;l<o.length;l++)if(o[l]instanceof t){o=null;break e}for(o=i;o!==null;)if(l=o,o=o.getParent(),o instanceof t){o={child:l,parent:o};break e}o=null}if(o!==null){const{child:s,parent:a}=o;if(s.is(i)){if(r(a,i),i=s.getNextSiblings(),o=i.length,a.insertAfter(s),o!==0){l=n(a),s.insertAfter(l);for(let u=0;u<o;u++)l.append(i[u])}a.canBeEmpty()||a.getChildrenSize()!==0||a.remove()}}})};bt.removeClassNamesFromElement=function(e,...t){t.forEach(n=>{typeof n=="string"&&e.classList.remove(...n.split(" "))})};const DO=bt;var Ft=DO,ze=we,so=Ft;function ds(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 zE(e){let t=1;for(e=e.getParent();e!=null;){if(ft(e)){if(e=e.getParent(),Ne(e)){t++,e=e.getParent();continue}ds(40)}break}return t}function km(e){e=e.getParent(),Ne(e)||ds(40);let t=e;for(;t!==null;)t=t.getParent(),Ne(t)&&(e=t);return e}function FE(e){let t=[];e=e.getChildren().filter(ft);for(let n=0;n<e.length;n++){let r=e[n],i=r.getFirstChild();Ne(i)?t=t.concat(FE(i)):t.push(r)}return t}function Ar(e){return ft(e)&&Ne(e.getFirstChild())}function IO(e){for(;e.getNextSibling()==null&&e.getPreviousSibling()==null;){let t=e.getParent();if(t==null||!ft(e)&&!Ne(e))break;e=t}e.remove()}function lx(e){return zn().append(e)}function BE(e,t){return ft(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function Qo(e,t){e.splice(e.getChildrenSize(),0,t)}function sx(e,t){if(Ne(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),i=zn();return i.setFormat(e.getFormatType()),i.setIndent(e.getIndent()),Qo(i,e.getChildren()),Ne(n)&&t===n.getListType()?(n.append(i),e.remove(),Ne(r)&&t===r.getListType()&&(Qo(n,r.getChildren()),r.remove()),n):Ne(r)&&t===r.getListType()?(r.getFirstChildOrThrow().insertBefore(i),e.remove(),r):(t=gn(t),t.append(i),e.replace(t),cn(t),t)}function UE(e,t){var n=e.getLastChild();let r=t.getFirstChild();n&&r&&Ar(n)&&Ar(r)&&(UE(n.getFirstChild(),r.getFirstChild()),r.remove()),n=t.getChildren(),0<n.length&&(e.append(...n),cn(e)),t.remove()}function cn(e,t){if(e=t||e.getChildren(),e!==void 0)for(t=0;t<e.length;t++){let o=e[t];if(ft(o)){let l=o.getValue();var n=o,r=n.getParent(),i=1;for(r!=null&&(Ne(r)?i=r.getStart():ds(44)),n=n.getPreviousSiblings(),r=0;r<n.length;r++){let s=n[r];ft(s)&&!Ne(s.getFirstChild())&&i++}l!==i&&o.setValue(i)}}}function LO(e){if(!Ar(e)){var t=e.getParent(),n=t?t.getParent():void 0,r=n?n.getParent():void 0;if(Ne(r)&&ft(n)&&Ne(t)){var i=t?t.getFirstChild():void 0,o=t?t.getLastChild():void 0;if(e.is(i))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(o))n.insertAfter(e),t.isEmpty()&&n.remove();else{var l=t.getListType();i=zn();let s=gn(l);i.append(s),e.getPreviousSiblings().forEach(a=>s.append(a)),o=zn(),l=gn(l),o.append(l),Qo(l,e.getNextSiblings()),n.insertBefore(i),n.insertAfter(o),n.replace(e)}cn(t),cn(r)}}}let Df=class WE extends ze.ElementNode{static getType(){return"listitem"}static clone(t){return new WE(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 Ne(r)&&r.getListType()==="check"&&ux(n,this,null),n.value=this.__value,ax(n,t.theme,this),n}updateDOM(t,n,r){let i=this.getParent();return Ne(i)&&i.getListType()==="check"&&ux(n,this,t),n.value=this.__value,ax(n,r.theme,this),!1}static transform(){return t=>{let n=t.getParent();Ne(n)&&(cn(n),n.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:jO,priority:0})}}static importJSON(t){let n=zn();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(ze.$isElementNode(r)&&this.canMergeWith(r)){let i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(t,n){if(ft(t))return super.replace(t);this.setIndent(0);let r=this.getParentOrThrow();if(!Ne(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{let i=gn(r.getListType()),o=this.getNextSibling();for(;o;){let l=o;o=o.getNextSibling(),i.append(l)}r.insertAfter(t),t.insertAfter(i)}return n&&this.getChildren().forEach(i=>{t.append(i)}),this.remove(),r.getChildrenSize()===0&&r.remove(),t}insertAfter(t,n=!0){var r=this.getParentOrThrow();Ne(r)||ds(39);var i=this.getNextSiblings();if(ft(t))return n=super.insertAfter(t,n),t=t.getParentOrThrow(),Ne(t)&&cn(t),n;if(Ne(t)){for(r=t,t=t.getChildren(),i=t.length-1;0<=i;i--)r=t[i],this.insertAfter(r,n);return r}if(r.insertAfter(t,n),i.length!==0){let o=gn(r.getListType());i.forEach(l=>o.append(l)),t.insertAfter(o,n)}return t}remove(t){let n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(t),n&&r&&Ar(n)&&Ar(r)?(UE(n.getFirstChild(),r.getFirstChild()),r.remove()):r&&(t=r.getParent(),Ne(t)&&cn(t))}insertNewAfter(t,n=!0){return t=zn(this.__checked==null?void 0:!1),this.insertAfter(t,n),t}collapseAtStart(t){let n=ze.$createParagraphNode();this.getChildren().forEach(l=>n.append(l));var r=this.getParentOrThrow(),i=r.getParentOrThrow();let o=ft(i);return r.getChildrenSize()===1?o?(r.remove(),i.select()):(r.insertBefore(n),r.remove(),r=t.anchor,t=t.focus,i=n.getKey(),r.type==="element"&&r.getNode().is(this)&&r.set(i,r.offset,"element"),t.type==="element"&&t.getNode().is(this)&&t.set(i,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(;ft(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t=="number"&&-1<t||ds(117);let n=this.getIndent();for(;n!==t;)if(n<t){e:{var r=new Set;if(Ar(this)||r.has(this.getKey()))break e;let s=this.getParent();var i=this.getNextSibling(),o=this.getPreviousSibling();if(Ar(i)&&Ar(o)){if(o=o.getFirstChild(),Ne(o)){o.append(this);var l=i.getFirstChild();Ne(l)&&(l=l.getChildren(),Qo(o,l),i.remove(),r.add(i.getKey())),cn(o)}}else Ar(i)?(i=i.getFirstChild(),Ne(i)&&(r=i.getFirstChild(),r!==null&&r.insertBefore(this),cn(i))):Ar(o)?(i=o.getFirstChild(),Ne(i)&&(i.append(this),cn(i))):Ne(s)&&(r=zn(),l=gn(s.getListType()),r.append(l),l.append(this),o?o.insertAfter(r):i?i.insertBefore(r):s.append(r),cn(l));Ne(s)&&cn(s)}n++}else LO(this),n--;return this}insertBefore(t){if(ft(t)){let n=this.getParentOrThrow();if(Ne(n)){let r=this.getNextSiblings();cn(n,r)}}return super.insertBefore(t)}canInsertAfter(t){return ft(t)}canReplaceWith(t){return ft(t)}canMergeWith(t){return ze.$isParagraphNode(t)||ft(t)}extractWithChild(t,n){if(!ze.$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 gn("bullet")}};function ax(e,t,n){let r=[],i=[];var o=(t=t.list)?t.listitem:void 0;if(t&&t.nested)var l=t.nested.listitem;if(o!==void 0&&(o=o.split(" "),r.push(...o)),t){o=n.getParent(),o=Ne(o)&&o.getListType()==="check";let s=n.getChecked();o&&!s||i.push(t.listitemUnchecked),o&&s||i.push(t.listitemChecked),o&&r.push(s?t.listitemChecked:t.listitemUnchecked)}l!==void 0&&(l=l.split(" "),n.getChildren().some(s=>Ne(s))?r.push(...l):i.push(...l)),0<i.length&&so.removeClassNamesFromElement(e,...i),0<r.length&&so.addClassNamesToElement(e,...r)}function ux(e,t,n){Ne(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 jO(e){return e=so.isHTMLElement(e)&&e.getAttribute("aria-checked")==="true",{node:zn(e)}}function zn(e){return ze.$applyNodeReplacement(new Df(void 0,e))}function ft(e){return e instanceof Df}let Cv=class VE extends ze.ElementNode{static getType(){return"list"}static clone(t){return new VE(t.__listType||fx[t.__tag],t.__start,t.__key)}constructor(t,n,r){super(r),this.__listType=t=fx[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,cx(n,t.theme,this),n}updateDOM(t,n,r){return t.__tag!==this.__tag?!0:(cx(n,r.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:dx,priority:0}),ul:()=>({conversion:dx,priority:0})}}static importJSON(t){let n=gn(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&&so.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(ft(n))super.append(n);else{let i=zn();Ne(n)||ze.$isElementNode(n)&&(n=ze.$createTextNode(n.getTextContent())),i.append(n),super.append(i)}}return cn(this),this}extractWithChild(t){return ft(t)}};function cx(e,t,n){let r=[],i=[];var o=t.list;if(o!==void 0){let s=o[`${n.__tag}Depth`]||[];t=zE(n)-1;let a=t%s.length;var l=s[a];let u=o[n.__tag],c;if(o=o.nested,o!==void 0&&o.list&&(c=o.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&&i.push(n.__tag+l);c!==void 0&&(n=c.split(" "),1<t?r.push(...n):i.push(...n))}0<i.length&&so.removeClassNamesFromElement(e,...i),0<r.length&&so.addClassNamesToElement(e,...r)}function zO(e){let t=[];for(let r=0;r<e.length;r++){var n=e[r];ft(n)?(t.push(n),n=n.getChildren(),1<n.length&&n.forEach(i=>{Ne(i)&&t.push(lx(i))})):t.push(lx(n))}return t}function dx(e){let t=e.nodeName.toLowerCase(),n=null;return t==="ol"?n=gn("number",e.start):t==="ul"&&(n=so.isHTMLElement(e)&&e.getAttribute("__lexicallisttype")==="check"?gn("check"):gn("bullet")),{after:zO,node:n}}let fx={ol:"number",ul:"bullet"};function gn(e,t=1){return ze.$applyNodeReplacement(new Cv(e,t))}function Ne(e){return e instanceof Cv}let FO=ze.createCommand("INSERT_UNORDERED_LIST_COMMAND"),BO=ze.createCommand("INSERT_ORDERED_LIST_COMMAND"),UO=ze.createCommand("INSERT_CHECK_LIST_COMMAND"),WO=ze.createCommand("REMOVE_LIST_COMMAND");wn.$createListItemNode=zn;wn.$createListNode=gn;wn.$getListDepth=zE;wn.$handleListInsertParagraph=function(){var e=ze.$getSelection();if(!ze.$isRangeSelection(e)||!e.isCollapsed()||(e=e.anchor.getNode(),!ft(e)||e.getChildrenSize()!==0))return!1;var t=km(e),n=e.getParent();Ne(n)||ds(40);let r=n.getParent(),i;if(ze.$isRootOrShadowRoot(r))i=ze.$createParagraphNode(),t.insertAfter(i);else if(ft(r))i=zn(),r.insertAfter(i);else return!1;if(i.select(),t=e.getNextSiblings(),0<t.length){let o=gn(n.getListType());ze.$isParagraphNode(i)?i.insertAfter(o):(n=zn(),n.append(o),i.insertAfter(n)),t.forEach(l=>{l.remove(),o.append(l)})}return IO(e),!0};wn.$isListItemNode=ft;wn.$isListNode=Ne;wn.INSERT_CHECK_LIST_COMMAND=UO;wn.INSERT_ORDERED_LIST_COMMAND=BO;wn.INSERT_UNORDERED_LIST_COMMAND=FO;wn.ListItemNode=Df;wn.ListNode=Cv;wn.REMOVE_LIST_COMMAND=WO;wn.insertList=function(e,t){e.update(()=>{var n=ze.$getSelection();if(ze.$isRangeSelection(n)||ze.DEPRECATED_$isGridSelection(n)){var r=n.getNodes();n=n.anchor.getNode();var i=n.getParent();if(BE(n,r))r=gn(t),ze.$isRootOrShadowRoot(i)?(n.replace(r),i=zn(),ze.$isElementNode(n)&&(i.setFormat(n.getFormatType()),i.setIndent(n.getIndent())),r.append(i)):ft(n)&&(n=n.getParentOrThrow(),Qo(r,n.getChildren()),n.replace(r));else for(n=new Set,i=0;i<r.length;i++){var o=r[i];if(ze.$isElementNode(o)&&o.isEmpty()&&!n.has(o.getKey()))sx(o,t);else if(ze.$isLeafNode(o))for(o=o.getParent();o!=null;){let s=o.getKey();if(Ne(o)){if(!n.has(s)){var l=gn(t);Qo(l,o.getChildren()),o.replace(l),cn(l),n.add(s)}break}else{if(l=o.getParent(),ze.$isRootOrShadowRoot(l)&&!n.has(s)){n.add(s),sx(o,t);break}o=l}}}}})};wn.removeList=function(e){e.update(()=>{let t=ze.$getSelection();if(ze.$isRangeSelection(t)){var n=new Set,r=t.getNodes(),i=t.anchor.getNode();if(BE(i,r))n.add(km(i));else for(i=0;i<r.length;i++){var o=r[i];ze.$isLeafNode(o)&&(o=so.$getNearestNodeOfType(o,Df),o!=null&&n.add(km(o)))}for(let l of n){n=l,r=FE(l);for(let s of r)r=ze.$createParagraphNode(),Qo(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 VO=wn;var ji=VO,HE={},If={},KE=p;function HO(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 ZE=KE.createContext(null);If.LexicalComposerContext=ZE;If.createLexicalComposerContext=function(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n!=null?n.getTheme():null)}}};If.useLexicalComposerContext=function(){let e=KE.useContext(ZE);return e==null&&HO(8),e};const KO=If;var Tr=KO,hx=Tr,ca=we,jd=p;let GE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var ZO=GE?jd.useLayoutEffect:jd.useEffect;let vc={tag:"history-merge"};function GO(e,t){if(t!==null){if(t===void 0)e.update(()=>{var n=ca.$getRoot();if(n.isEmpty()){let r=ca.$createParagraphNode();n.append(r),n=GE?document.activeElement:null,(ca.$getSelection()!==null||n!==null&&n===e.getRootElement())&&r.select()}},vc);else if(t!==null)switch(typeof t){case"string":let n=e.parseEditorState(t);e.setEditorState(n,vc);break;case"object":e.setEditorState(t,vc);break;case"function":e.update(()=>{ca.$getRoot().isEmpty()&&t(e)},vc)}}}HE.LexicalComposer=function({initialConfig:e,children:t}){let n=jd.useMemo(()=>{const{theme:r,namespace:i,editor__DEPRECATED:o,nodes:l,onError:s,editorState:a}=e,u=hx.createLexicalComposerContext(null,r);let c=o||null;if(c===null){const d=ca.createEditor({editable:e.editable,namespace:i,nodes:l,onError:f=>s(f,d),theme:r});GO(d,a),c=d}return[c,u]},[]);return ZO(()=>{let r=e.editable,[i]=n;i.setEditable(r!==void 0?r:!0)},[]),jd.createElement(hx.LexicalComposerContext.Provider,{value:n},t)};const YO=HE;var XO=YO,Na=p;function $m(e,t){return $m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},$m(e,t)}function QO(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$m(e,t)}function JO(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 px={error:null},qO=function(e){function t(){for(var r,i=arguments.length,o=Array(i),l=0;l<i;l++)o[l]=arguments[l];return r=e.call.apply(e,[this].concat(o))||this,r.state=px,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}QO(t,e),t.getDerivedStateFromError=function(r){return{error:r}};var n=t.prototype;return n.reset=function(){this.setState(px)},n.componentDidCatch=function(r,i){var o,l;(o=(l=this.props).onError)==null||o.call(l,r,i)},n.componentDidUpdate=function(r,i){var o=this.props.resetKeys;if(this.state.error!==null&&i.error!==null&&JO(r.resetKeys,o)){var l,s;(l=(s=this.props).onResetKeysChange)==null||l.call(s,r.resetKeys,o),this.reset()}},n.render=function(){var r=this.state.error,i=this.props,o=i.fallbackRender,l=i.FallbackComponent;if(i=i.fallback,r!==null){if(r={error:r,resetErrorBoundary:this.resetErrorBoundary},Na.isValidElement(i))return i;if(typeof o=="function")return o(r);if(l)return Na.createElement(l,r);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(Na.Component),eP=function({children:e,onError:t}){return Na.createElement(qO,{fallback:Na.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:t},e)};const tP=eP;var nP=tP;const rP=$u(nP);var kv={},$v={},iP=Ft,Ye=we;function oP(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;var o=t._selection,l=e._selection;if(i)return 1;if(!(Ye.$isRangeSelection(o)&&Ye.$isRangeSelection(l)&&l.isCollapsed()&&o.isCollapsed()))return 0;i=t._nodeMap;let s=[];for(let a of n)n=i.get(a),n!==void 0&&s.push(n);for(let[a,u]of r)u&&(r=i.get(a),r===void 0||Ye.$isRootNode(r)||s.push(r));return s.length===0?0:1<s.length?(r=t._nodeMap,t=r.get(o.anchor.key),l=r.get(l.anchor.key),t&&l&&!e._nodeMap.has(t.__key)&&Ye.$isTextNode(t)&&t.__text.length===1&&o.anchor.offset===1?2:0):(t=s[0],e=e._nodeMap.get(t.__key),!Ye.$isTextNode(e)||!Ye.$isTextNode(t)||e.__mode!==t.__mode||(e=e.__text,t=t.__text,e===t)||(o=o.anchor,l=l.anchor,o.key!==l.key||o.type!=="text")?0:(o=o.offset,l=l.offset,e=t.length-e.length,e===1&&l===o-1?2:e===-1&&l===o+1?3:e===-1&&l===o?4:0))}function lP(e,t){let n=Date.now(),r=0;return(i,o,l,s,a,u)=>{let c=Date.now();if(u.has("historic"))return r=0,n=c,2;let d=oP(i,o,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(i===null)return 1;var g=o._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=i._nodeMap.get(m),m=o._nodeMap.get(m),g=i._selection;let S=o._selection,v=!1;Ye.$isRangeSelection(g)&&Ye.$isRangeSelection(S)&&(v=g.anchor.type==="element"&&g.focus.type==="element"&&S.anchor.type==="text"&&S.focus.type==="text"),h=!v&&Ye.$isTextNode(h)&&Ye.$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}}$v.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}};$v.registerHistory=function(e,t,n){let r=lP(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(Ye.CAN_REDO_COMMAND,!1)),d!==null&&(h.push({...d}),e.dispatchCommand(Ye.CAN_UNDO_COMMAND,!0));else if(s===2)return;t.current={editor:e,editorState:l}}};let i=iP.mergeRegister(e.registerCommand(Ye.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(Ye.CAN_REDO_COMMAND,!0)),s.length===0&&e.dispatchCommand(Ye.CAN_UNDO_COMMAND,!1),t.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:"historic"})}return!0},Ye.COMMAND_PRIORITY_EDITOR),e.registerCommand(Ye.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(Ye.CAN_UNDO_COMMAND,!0)),s=l.pop(),l.length===0&&e.dispatchCommand(Ye.CAN_REDO_COMMAND,!1),t.current=s||null,s&&s.editor.setEditorState(s.editorState,{tag:"historic"})}return!0},Ye.COMMAND_PRIORITY_EDITOR),e.registerCommand(Ye.CLEAR_EDITOR_COMMAND,()=>(t.undoStack=[],t.redoStack=[],t.current=null,!1),Ye.COMMAND_PRIORITY_EDITOR),e.registerCommand(Ye.CLEAR_HISTORY_COMMAND,()=>(t.undoStack=[],t.redoStack=[],t.current=null,e.dispatchCommand(Ye.CAN_REDO_COMMAND,!1),e.dispatchCommand(Ye.CAN_UNDO_COMMAND,!1),!0),Ye.COMMAND_PRIORITY_EDITOR),e.registerUpdateListener(n)),o=e.registerUpdateListener(n);return()=>{i(),o()}};const sP=$v;var aP=sP,uP=Tr,bm=aP,mx=p;function cP(e,t,n=1e3){let r=mx.useMemo(()=>t||bm.createEmptyHistoryState(),[t]);mx.useEffect(()=>bm.registerHistory(e,r,n),[n,e,r])}kv.createEmptyHistoryState=bm.createEmptyHistoryState;kv.HistoryPlugin=function({externalHistoryState:e}){let[t]=uP.useLexicalComposerContext();return cP(t,e),null};const dP=kv;var fP=dP,YE={},hP=Tr,Ra=p,pP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Ra.useLayoutEffect:Ra.useEffect;function mP(e){let[t]=hP.useLexicalComposerContext(),n=Ra.useMemo(()=>e(t),[t,e]),r=Ra.useRef(n.initialValueFn()),[i,o]=Ra.useState(r.current);return pP(()=>{let{initialValueFn:l,subscribe:s}=n,a=l();return r.current!==a&&(r.current=a,o(a)),s(u=>{r.current=u,o(u)})},[n,e]),i}function gP(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}var vP=function(){return mP(gP)};const yP=vP;var xP=yP,wo={},dn=we;function bv(e,t=!0){return e?!1:(e=XE(),t&&(e=e.trim()),e==="")}function XE(){return dn.$getRoot().getTextContent()}function QE(e){if(!bv(e,!1))return!1;e=dn.$getRoot().getChildren();let t=e.length;if(1<t)return!1;for(let r=0;r<t;r++){var n=e[r];if(dn.$isDecoratorNode(n))return!1;if(dn.$isElementNode(n)){if(!dn.$isParagraphNode(n)||n.__indent!==0)return!1;n=n.getChildren();let i=n.length;for(let o=0;o<i;o++)if(!dn.$isTextNode(n[r]))return!1}}return!0}wo.$canShowPlaceholder=QE;wo.$canShowPlaceholderCurry=function(e){return()=>QE(e)};wo.$findTextIntersectionFromCharacters=function(e,t){var n=e.getFirstChild();e=0;e:for(;n!==null;){if(dn.$isElementNode(n)){var r=n.getFirstChild();if(r!==null){n=r;continue}}else if(dn.$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=bv;wo.$isRootTextContentEmptyCurry=function(e,t){return()=>bv(e,t)};wo.$rootTextContent=XE;wo.registerLexicalTextEntity=function(e,t,n,r){let i=l=>{const s=dn.$createTextNode(l.getTextContent());s.setFormat(l.getFormat()),l.replace(s)},o=e.registerNodeTransform(dn.TextNode,l=>{if(l.isSimpleText()){var s=l.getPreviousSibling(),a=l.getTextContent(),u=l;if(dn.$isTextNode(s)){var c=s.getTextContent(),d=t(c+a);if(s instanceof n){if(d===null||s.getLatest().__mode!==0){i(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(),dn.$isTextNode(c)){if(d=u.getTextContent()+c.getTextContent(),d=t(d),d===null){c instanceof n?i(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&&dn.$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?i(l):s.length>a.end?l.splitText(a.end):(s=l.getPreviousSibling(),dn.$isTextNode(s)&&s.isTextEntity()&&(i(s),i(l)),s=l.getNextSibling(),dn.$isTextNode(s)&&s.isTextEntity()&&(i(s),l instanceof n&&i(l)))}),[o,e]};const _P=wo;var wP=_P,JE={},yc=we;JE.registerDragonSupport=function(e){let t=window.location.origin,n=r=>{if(r.origin===t){var i=e.getRootElement();if(document.activeElement===i&&(i=r.data,typeof i=="string")){try{var o=JSON.parse(i)}catch{return}if(o&&o.protocol==="nuanria_messaging"&&o.type==="request"&&(o=o.payload)&&o.functionId==="makeChanges"&&(o=o.args)){const[l,s,a,u,c]=o;e.update(()=>{const d=yc.$getSelection();if(yc.$isRangeSelection(d)){var f=d.anchor;let h=f.getNode(),m=0,g=0;yc.$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()),yc.$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 SP=JE;var EP=SP,Jr={},Si={},Tv={},gx=lo,CP=Ft,zl=we;function qE(e,t,n,r=null){let i=r!=null?t.isSelected(r):!0,o=zl.$isElementNode(t)&&t.excludeFromCopy("html");var l=t;r!==null&&(l=gx.$cloneWithProperties(t),l=zl.$isTextNode(l)&&r!=null?gx.$sliceSelectedTextNodeContent(r,l):l);let s=zl.$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=qE(e,f,c,r);!i&&zl.$isElementNode(t)&&h&&t.extractWithChild(f,r,"html")&&(i=!0)}return i&&!o?(CP.isHTMLElement(a)&&a.append(c),n.append(a),u&&(e=u.call(l,a))&&a.replaceWith(e)):n.append(c),i}let eC=new Set(["STYLE","SCRIPT"]);function tC(e,t,n=new Map,r){let i=[];if(eC.has(e.nodeName))return i;let o=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,o=Array.isArray(a)?a[a.length-1]:a,o!==null){for(var[,u]of n)if(o=u(o,r),!o)break;o&&i.push(...Array.isArray(a)?a:[o])}s.forChild!=null&&n.set(e.nodeName,s.forChild)}for(e=e.childNodes,r=[],u=0;u<e.length;u++)r.push(...tC(e[u],t,new Map(n),o));return l!=null&&(r=l(r)),o==null?i=i.concat(r):zl.$isElementNode(o)&&o.append(...r),i}Tv.$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=zl.$getRoot().getChildren();for(let i=0;i<r.length;i++)qE(e,r[i],n,t);return n.innerHTML};Tv.$generateNodesFromDOM=function(e,t){t=t.body?t.body.childNodes:[];let n=[];for(let i=0;i<t.length;i++){var r=t[i];eC.has(r.nodeName)||(r=tC(r,e),r!==null&&(n=n.concat(r)))}return n};const kP=Tv;var $P=kP,nC=$P,Tm=lo,Xl=Ft,pe=we;function li(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 rC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function iC(e){let t=pe.$getSelection();if(t==null)throw Error("Expected valid LexicalSelection");return pe.$isRangeSelection(t)&&t.isCollapsed()||t.getNodes().length===0?"":nC.$generateHtmlFromNodes(e,t)}function oC(e){let t=pe.$getSelection();if(t==null)throw Error("Expected valid LexicalSelection");return pe.$isRangeSelection(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(sC(e,t))}function Nm(e,t,n){(pe.DEPRECATED_$isGridSelection(n)||Xl.$findMatchingParent(n.anchor.getNode(),r=>pe.DEPRECATED_$isGridCellNode(r))!==null&&Xl.$findMatchingParent(n.focus.getNode(),r=>pe.DEPRECATED_$isGridCellNode(r))!==null)&&t.length===1&&pe.DEPRECATED_$isGridNode(t[0])?TP(t,n,!1,e):bP(t,n)}function bP(e,t){let n=[],r=null;for(let i=0;i<e.length;i++){let o=e[i],l=pe.$isLineBreakNode(o);if(l||pe.$isDecoratorNode(o)&&o.isInline()||pe.$isElementNode(o)&&o.isInline()||pe.$isTextNode(o)||o.isParentRequired()){if(r===null&&(r=o.createParentElementNode(),n.push(r),l))continue;r!==null&&r.append(o)}else n.push(o),r=null}pe.$isRangeSelection(t)?t.insertNodes(n):pe.DEPRECATED_$isGridSelection(t)&&(e=t.anchor.getNode(),pe.DEPRECATED_$isGridCellNode(e)||li(41),e.append(...n))}function TP(e,t,n,r){e.length===1&&pe.DEPRECATED_$isGridNode(e[0])||li(42);var i=e[0];e=i.getChildren(),n=i.getFirstChildOrThrow().getChildrenSize();var o=i.getChildrenSize(),l=Xl.$findMatchingParent(t.anchor.getNode(),h=>pe.DEPRECATED_$isGridCellNode(h));t=(i=l&&Xl.$findMatchingParent(l,h=>pe.DEPRECATED_$isGridRowNode(h)))&&Xl.$findMatchingParent(i,h=>pe.DEPRECATED_$isGridNode(h)),pe.DEPRECATED_$isGridCellNode(l)&&pe.DEPRECATED_$isGridRowNode(i)&&pe.DEPRECATED_$isGridNode(t)||li(43);var s=i.getIndexWithinParent(),a=Math.min(t.getChildrenSize()-1,s+o-1);o=l.getIndexWithinParent(),l=Math.min(i.getChildrenSize()-1,o+n-1),n=Math.min(o,l),i=Math.min(s,a),o=Math.max(o,l),s=Math.max(s,a),a=t.getChildren(),l=0;let u,c;for(let h=i;h<=s;h++){var d=a[h];pe.DEPRECATED_$isGridRowNode(d)||li(24);var f=e[l];pe.DEPRECATED_$isGridRowNode(f)||li(24),d=d.getChildren(),f=f.getChildren();let m=0;for(let g=n;g<=o;g++){let S=d[g];pe.DEPRECATED_$isGridCellNode(S)||li(25);let v=f[m];pe.DEPRECATED_$isGridCellNode(v)||li(25),h===i&&g===n?u=S.getKey():h===s&&g===o&&(c=S.getKey());let y=S.getChildren();v.getChildren().forEach(_=>{pe.$isTextNode(_)&&pe.$createParagraphNode().append(_),S.append(_)}),y.forEach(_=>_.remove()),m++}l++}u&&c&&(e=pe.DEPRECATED_$createGridSelection(),e.set(t.getKey(),u,c),pe.$setSelection(e),r.dispatchCommand(pe.SELECTION_CHANGE_COMMAND,void 0))}function lC(e,t,n,r=[]){let i=t!=null?n.isSelected(t):!0,o=pe.$isElementNode(n)&&n.excludeFromCopy("html");var l=n;if(t!==null){var s=Tm.$cloneWithProperties(n);l=s=pe.$isTextNode(s)&&t!=null?Tm.$sliceSelectedTextNodeContent(t,s):s}let a=pe.$isElementNode(l)?l.getChildren():[];var u=l;s=u.exportJSON();var c=u.constructor;s.type!==c.getType()&&li(58,c.name);let d=s.children;for(pe.$isElementNode(u)&&(Array.isArray(d)||li(59,c.name)),pe.$isTextNode(l)&&(l=l.__text,0<l.length?s.text=l:i=!1),l=0;l<a.length;l++)u=a[l],c=lC(e,t,u,s.children),!i&&pe.$isElementNode(n)&&c&&n.extractWithChild(u,t,"clone")&&(i=!0);if(i&&!o)r.push(s);else if(Array.isArray(s.children))for(e=0;e<s.children.length;e++)r.push(s.children[e]);return i}function sC(e,t){let n=[],r=pe.$getRoot().getChildren();for(let i=0;i<r.length;i++)lC(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function aC(e){let t=[];for(let n=0;n<e.length;n++){let r=pe.$parseSerializedNode(e[n]);pe.$isTextNode(r)&&Tm.$addNodeStyle(r),t.push(r)}return t}let vl=null;function vx(e,t){var n=rC?(e._window||window).getSelection():null;if(!n)return!1;var r=n.anchorNode;if(n=n.focusNode,r!==null&&n!==null&&!pe.isSelectionWithinEditor(e,r,n)||(t.preventDefault(),t=t.clipboardData,r=pe.$getSelection(),t===null||r===null))return!1;n=iC(e),e=oC(e);let i="";return r!==null&&(i=r.getTextContent()),n!==null&&t.setData("text/html",n),e!==null&&t.setData("application/x-lexical-editor",e),t.setData("text/plain",i),!0}Si.$generateJSONFromSelectedNodes=sC;Si.$generateNodesFromSerializedNodes=aC;Si.$getHtmlContent=iC;Si.$getLexicalContent=oC;Si.$insertDataTransferForPlainText=function(e,t){e=e.getData("text/plain")||e.getData("text/uri-list"),e!=null&&t.insertRawText(e)};Si.$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=aC(l.nodes);return Nm(n,s,t)}}catch{}if(r=e.getData("text/html"))try{var i=new DOMParser().parseFromString(r,"text/html"),o=nC.$generateNodesFromDOM(n,i);return Nm(n,o,t)}catch{}if(e=e.getData("text/plain")||e.getData("text/uri-list"),e!=null)if(pe.$isRangeSelection(t))for(e=e.split(/(\r?\n|\t)/),n=e.length,i=0;i<n;i++)o=e[i],o===`
|
|
127
|
+
`),i=s.length,!le.$isTextNode(r)||n>=i)s=r.getParent(),r.remove(),s==null||s.getChildrenSize()!==0||le.$isRootNode(s)||s.remove(),n-=i+l,r=o;else{let a=r.getKey();l=e.getEditorState().read(()=>{const c=le.$getNodeByKey(a);return le.$isTextNode(c)&&c.isSimpleText()?c.getTextContent():null}),o=i-n;let u=s.slice(0,o);l!==null&&l!==s?(n=le.$getPreviousSelection(),i=r,r.isSimpleText()?r.setTextContent(l):(i=le.$createTextNode(l),r.replace(i)),le.$isRangeSelection(n)&&n.isCollapsed()&&(n=n.anchor.offset,i.select(n,n))):r.isSimpleText()?(l=t.key===a,s=t.offset,s<n&&(s=i),n=l?s-n:0,i=l?s:o,l&&n===0?([n]=r.splitText(n,i),n.remove()):([,n]=r.splitText(n,i),n.remove())):(n=le.$createTextNode(u),r.replace(n)),n=0}}};const PO=Ut;var lo=PO,AO=lo,Et=xe;function MO(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 IE(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function jE(e,t){for(;e!==Et.$getRoot()&&e!=null;){if(t(e))return e;e=e.getParent()}return null}bt.$splitNode=Et.$splitNode;bt.isHTMLAnchorElement=Et.isHTMLAnchorElement;bt.isHTMLElement=Et.isHTMLElement;bt.$dfs=function(e,t){let n=[];e=(e||Et.$getRoot()).getLatest(),t=t||(Et.$isElementNode(e)?e.getLastDescendant():e);for(var r=e,i=0;(r=r.getParent())!==null;)i++;for(r=i;e!==null&&!e.is(t);)if(n.push({depth:r,node:e}),Et.$isElementNode(e)&&0<e.getChildrenSize())e=e.getFirstChild(),r++;else for(i=null;i===null&&e!==null;)i=e.getNextSibling(),i===null?(e=e.getParent(),r--):e=i;return e!==null&&e.is(t)&&n.push({depth:r,node:e}),n};bt.$filter=function(e,t){let n=[];for(let r=0;r<e.length;r++){let i=t(e[r]);i!==null&&n.push(i)}return n};bt.$findMatchingParent=jE;bt.$getNearestBlockElementAncestorOrThrow=function(e){let t=jE(e,n=>Et.$isElementNode(n)&&!n.isInline());return Et.$isElementNode(t)||MO(4,e.__key),t};bt.$getNearestNodeOfType=function(e,t){for(;e!=null;){if(e instanceof t)return e;e=e.getParent()}return null};bt.$insertFirst=function(e,t){let n=e.getFirstChild();n!==null?n.insertBefore(t):e.append(t)};bt.$insertNodeToNearestRoot=function(e){var t=Et.$getSelection()||Et.$getPreviousSelection();if(Et.$isRangeSelection(t)){var{focus:n}=t;if(t=n.getNode(),n=n.offset,Et.$isRootOrShadowRoot(t))n=t.getChildAtIndex(n),n==null?t.append(e):n.insertBefore(e),e.selectNext();else{let r,i;Et.$isTextNode(t)?(r=t.getParentOrThrow(),i=t.getIndexWithinParent(),0<n&&(i+=1,t.splitText(n))):(r=t,i=n),[,t]=Et.$splitNode(r,i),t.insertBefore(e),t.selectStart()}}else Et.$isNodeSelection(t)||Et.DEPRECATED_$isGridSelection(t)?(t=t.getNodes(),t[t.length-1].getTopLevelElementOrThrow().insertAfter(e)):Et.$getRoot().append(e),t=Et.$createParagraphNode(),e.insertAfter(t),t.select();return e.getLatest()};bt.$restoreEditorState=function(e,t){let n=new Map,r=e._pendingEditorState;for(let[i,o]of t._nodeMap){let l=AO.$cloneWithProperties(o);Et.$isTextNode(l)&&(l.__text=o.__text),n.set(i,l)}r&&(r._nodeMap=n),e._dirtyType=2,e=t._selection,Et.$setSelection(e===null?null:e.clone())};bt.$wrapNodeInElement=function(e,t){return t=t(),e.replace(t),t.append(e),t};bt.addClassNamesToElement=function(e,...t){t.forEach(n=>{typeof n=="string"&&(n=n.split(" ").filter(r=>r!==""),e.classList.add(...n))})};bt.isMimeType=IE;bt.mediaFileReader=function(e,t){let n=e[Symbol.iterator]();return new Promise((r,i)=>{let o=[],l=()=>{const{done:s,value:a}=n.next();if(s)return r(o);const u=new FileReader;u.addEventListener("error",i),u.addEventListener("load",()=>{const c=u.result;typeof c=="string"&&o.push({file:a,result:c}),l()}),IE(a,t)?u.readAsDataURL(a):l()};l()})};bt.mergeRegister=function(...e){return()=>{e.forEach(t=>t())}};bt.objectKlassEquals=function(e,t){return e!==null?Object.getPrototypeOf(e).constructor.name===t.name:!1};bt.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,i=>{e:{for(var o=i.getChildren(),l=0;l<o.length;l++)if(o[l]instanceof t){o=null;break e}for(o=i;o!==null;)if(l=o,o=o.getParent(),o instanceof t){o={child:l,parent:o};break e}o=null}if(o!==null){const{child:s,parent:a}=o;if(s.is(i)){if(r(a,i),i=s.getNextSiblings(),o=i.length,a.insertAfter(s),o!==0){l=n(a),s.insertAfter(l);for(let u=0;u<o;u++)l.append(i[u])}a.canBeEmpty()||a.getChildrenSize()!==0||a.remove()}}})};bt.removeClassNamesFromElement=function(e,...t){t.forEach(n=>{typeof n=="string"&&e.classList.remove(...n.split(" "))})};const DO=bt;var Ft=DO,ze=xe,so=Ft;function fs(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 zE(e){let t=1;for(e=e.getParent();e!=null;){if(ft(e)){if(e=e.getParent(),Ne(e)){t++,e=e.getParent();continue}fs(40)}break}return t}function km(e){e=e.getParent(),Ne(e)||fs(40);let t=e;for(;t!==null;)t=t.getParent(),Ne(t)&&(e=t);return e}function FE(e){let t=[];e=e.getChildren().filter(ft);for(let n=0;n<e.length;n++){let r=e[n],i=r.getFirstChild();Ne(i)?t=t.concat(FE(i)):t.push(r)}return t}function Ar(e){return ft(e)&&Ne(e.getFirstChild())}function LO(e){for(;e.getNextSibling()==null&&e.getPreviousSibling()==null;){let t=e.getParent();if(t==null||!ft(e)&&!Ne(e))break;e=t}e.remove()}function lx(e){return zn().append(e)}function BE(e,t){return ft(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function Qo(e,t){e.splice(e.getChildrenSize(),0,t)}function sx(e,t){if(Ne(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),i=zn();return i.setFormat(e.getFormatType()),i.setIndent(e.getIndent()),Qo(i,e.getChildren()),Ne(n)&&t===n.getListType()?(n.append(i),e.remove(),Ne(r)&&t===r.getListType()&&(Qo(n,r.getChildren()),r.remove()),n):Ne(r)&&t===r.getListType()?(r.getFirstChildOrThrow().insertBefore(i),e.remove(),r):(t=gn(t),t.append(i),e.replace(t),cn(t),t)}function UE(e,t){var n=e.getLastChild();let r=t.getFirstChild();n&&r&&Ar(n)&&Ar(r)&&(UE(n.getFirstChild(),r.getFirstChild()),r.remove()),n=t.getChildren(),0<n.length&&(e.append(...n),cn(e)),t.remove()}function cn(e,t){if(e=t||e.getChildren(),e!==void 0)for(t=0;t<e.length;t++){let o=e[t];if(ft(o)){let l=o.getValue();var n=o,r=n.getParent(),i=1;for(r!=null&&(Ne(r)?i=r.getStart():fs(44)),n=n.getPreviousSiblings(),r=0;r<n.length;r++){let s=n[r];ft(s)&&!Ne(s.getFirstChild())&&i++}l!==i&&o.setValue(i)}}}function IO(e){if(!Ar(e)){var t=e.getParent(),n=t?t.getParent():void 0,r=n?n.getParent():void 0;if(Ne(r)&&ft(n)&&Ne(t)){var i=t?t.getFirstChild():void 0,o=t?t.getLastChild():void 0;if(e.is(i))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(o))n.insertAfter(e),t.isEmpty()&&n.remove();else{var l=t.getListType();i=zn();let s=gn(l);i.append(s),e.getPreviousSiblings().forEach(a=>s.append(a)),o=zn(),l=gn(l),o.append(l),Qo(l,e.getNextSiblings()),n.insertBefore(i),n.insertAfter(o),n.replace(e)}cn(t),cn(r)}}}let Df=class WE extends ze.ElementNode{static getType(){return"listitem"}static clone(t){return new WE(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 Ne(r)&&r.getListType()==="check"&&ux(n,this,null),n.value=this.__value,ax(n,t.theme,this),n}updateDOM(t,n,r){let i=this.getParent();return Ne(i)&&i.getListType()==="check"&&ux(n,this,t),n.value=this.__value,ax(n,r.theme,this),!1}static transform(){return t=>{let n=t.getParent();Ne(n)&&(cn(n),n.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:jO,priority:0})}}static importJSON(t){let n=zn();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(ze.$isElementNode(r)&&this.canMergeWith(r)){let i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(t,n){if(ft(t))return super.replace(t);this.setIndent(0);let r=this.getParentOrThrow();if(!Ne(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{let i=gn(r.getListType()),o=this.getNextSibling();for(;o;){let l=o;o=o.getNextSibling(),i.append(l)}r.insertAfter(t),t.insertAfter(i)}return n&&this.getChildren().forEach(i=>{t.append(i)}),this.remove(),r.getChildrenSize()===0&&r.remove(),t}insertAfter(t,n=!0){var r=this.getParentOrThrow();Ne(r)||fs(39);var i=this.getNextSiblings();if(ft(t))return n=super.insertAfter(t,n),t=t.getParentOrThrow(),Ne(t)&&cn(t),n;if(Ne(t)){for(r=t,t=t.getChildren(),i=t.length-1;0<=i;i--)r=t[i],this.insertAfter(r,n);return r}if(r.insertAfter(t,n),i.length!==0){let o=gn(r.getListType());i.forEach(l=>o.append(l)),t.insertAfter(o,n)}return t}remove(t){let n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(t),n&&r&&Ar(n)&&Ar(r)?(UE(n.getFirstChild(),r.getFirstChild()),r.remove()):r&&(t=r.getParent(),Ne(t)&&cn(t))}insertNewAfter(t,n=!0){return t=zn(this.__checked==null?void 0:!1),this.insertAfter(t,n),t}collapseAtStart(t){let n=ze.$createParagraphNode();this.getChildren().forEach(l=>n.append(l));var r=this.getParentOrThrow(),i=r.getParentOrThrow();let o=ft(i);return r.getChildrenSize()===1?o?(r.remove(),i.select()):(r.insertBefore(n),r.remove(),r=t.anchor,t=t.focus,i=n.getKey(),r.type==="element"&&r.getNode().is(this)&&r.set(i,r.offset,"element"),t.type==="element"&&t.getNode().is(this)&&t.set(i,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(;ft(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t=="number"&&-1<t||fs(117);let n=this.getIndent();for(;n!==t;)if(n<t){e:{var r=new Set;if(Ar(this)||r.has(this.getKey()))break e;let s=this.getParent();var i=this.getNextSibling(),o=this.getPreviousSibling();if(Ar(i)&&Ar(o)){if(o=o.getFirstChild(),Ne(o)){o.append(this);var l=i.getFirstChild();Ne(l)&&(l=l.getChildren(),Qo(o,l),i.remove(),r.add(i.getKey())),cn(o)}}else Ar(i)?(i=i.getFirstChild(),Ne(i)&&(r=i.getFirstChild(),r!==null&&r.insertBefore(this),cn(i))):Ar(o)?(i=o.getFirstChild(),Ne(i)&&(i.append(this),cn(i))):Ne(s)&&(r=zn(),l=gn(s.getListType()),r.append(l),l.append(this),o?o.insertAfter(r):i?i.insertBefore(r):s.append(r),cn(l));Ne(s)&&cn(s)}n++}else IO(this),n--;return this}insertBefore(t){if(ft(t)){let n=this.getParentOrThrow();if(Ne(n)){let r=this.getNextSiblings();cn(n,r)}}return super.insertBefore(t)}canInsertAfter(t){return ft(t)}canReplaceWith(t){return ft(t)}canMergeWith(t){return ze.$isParagraphNode(t)||ft(t)}extractWithChild(t,n){if(!ze.$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 gn("bullet")}};function ax(e,t,n){let r=[],i=[];var o=(t=t.list)?t.listitem:void 0;if(t&&t.nested)var l=t.nested.listitem;if(o!==void 0&&(o=o.split(" "),r.push(...o)),t){o=n.getParent(),o=Ne(o)&&o.getListType()==="check";let s=n.getChecked();o&&!s||i.push(t.listitemUnchecked),o&&s||i.push(t.listitemChecked),o&&r.push(s?t.listitemChecked:t.listitemUnchecked)}l!==void 0&&(l=l.split(" "),n.getChildren().some(s=>Ne(s))?r.push(...l):i.push(...l)),0<i.length&&so.removeClassNamesFromElement(e,...i),0<r.length&&so.addClassNamesToElement(e,...r)}function ux(e,t,n){Ne(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 jO(e){return e=so.isHTMLElement(e)&&e.getAttribute("aria-checked")==="true",{node:zn(e)}}function zn(e){return ze.$applyNodeReplacement(new Df(void 0,e))}function ft(e){return e instanceof Df}let Cv=class VE extends ze.ElementNode{static getType(){return"list"}static clone(t){return new VE(t.__listType||fx[t.__tag],t.__start,t.__key)}constructor(t,n,r){super(r),this.__listType=t=fx[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,cx(n,t.theme,this),n}updateDOM(t,n,r){return t.__tag!==this.__tag?!0:(cx(n,r.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:dx,priority:0}),ul:()=>({conversion:dx,priority:0})}}static importJSON(t){let n=gn(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&&so.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(ft(n))super.append(n);else{let i=zn();Ne(n)||ze.$isElementNode(n)&&(n=ze.$createTextNode(n.getTextContent())),i.append(n),super.append(i)}}return cn(this),this}extractWithChild(t){return ft(t)}};function cx(e,t,n){let r=[],i=[];var o=t.list;if(o!==void 0){let s=o[`${n.__tag}Depth`]||[];t=zE(n)-1;let a=t%s.length;var l=s[a];let u=o[n.__tag],c;if(o=o.nested,o!==void 0&&o.list&&(c=o.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&&i.push(n.__tag+l);c!==void 0&&(n=c.split(" "),1<t?r.push(...n):i.push(...n))}0<i.length&&so.removeClassNamesFromElement(e,...i),0<r.length&&so.addClassNamesToElement(e,...r)}function zO(e){let t=[];for(let r=0;r<e.length;r++){var n=e[r];ft(n)?(t.push(n),n=n.getChildren(),1<n.length&&n.forEach(i=>{Ne(i)&&t.push(lx(i))})):t.push(lx(n))}return t}function dx(e){let t=e.nodeName.toLowerCase(),n=null;return t==="ol"?n=gn("number",e.start):t==="ul"&&(n=so.isHTMLElement(e)&&e.getAttribute("__lexicallisttype")==="check"?gn("check"):gn("bullet")),{after:zO,node:n}}let fx={ol:"number",ul:"bullet"};function gn(e,t=1){return ze.$applyNodeReplacement(new Cv(e,t))}function Ne(e){return e instanceof Cv}let FO=ze.createCommand("INSERT_UNORDERED_LIST_COMMAND"),BO=ze.createCommand("INSERT_ORDERED_LIST_COMMAND"),UO=ze.createCommand("INSERT_CHECK_LIST_COMMAND"),WO=ze.createCommand("REMOVE_LIST_COMMAND");wn.$createListItemNode=zn;wn.$createListNode=gn;wn.$getListDepth=zE;wn.$handleListInsertParagraph=function(){var e=ze.$getSelection();if(!ze.$isRangeSelection(e)||!e.isCollapsed()||(e=e.anchor.getNode(),!ft(e)||e.getChildrenSize()!==0))return!1;var t=km(e),n=e.getParent();Ne(n)||fs(40);let r=n.getParent(),i;if(ze.$isRootOrShadowRoot(r))i=ze.$createParagraphNode(),t.insertAfter(i);else if(ft(r))i=zn(),r.insertAfter(i);else return!1;if(i.select(),t=e.getNextSiblings(),0<t.length){let o=gn(n.getListType());ze.$isParagraphNode(i)?i.insertAfter(o):(n=zn(),n.append(o),i.insertAfter(n)),t.forEach(l=>{l.remove(),o.append(l)})}return LO(e),!0};wn.$isListItemNode=ft;wn.$isListNode=Ne;wn.INSERT_CHECK_LIST_COMMAND=UO;wn.INSERT_ORDERED_LIST_COMMAND=BO;wn.INSERT_UNORDERED_LIST_COMMAND=FO;wn.ListItemNode=Df;wn.ListNode=Cv;wn.REMOVE_LIST_COMMAND=WO;wn.insertList=function(e,t){e.update(()=>{var n=ze.$getSelection();if(ze.$isRangeSelection(n)||ze.DEPRECATED_$isGridSelection(n)){var r=n.getNodes();n=n.anchor.getNode();var i=n.getParent();if(BE(n,r))r=gn(t),ze.$isRootOrShadowRoot(i)?(n.replace(r),i=zn(),ze.$isElementNode(n)&&(i.setFormat(n.getFormatType()),i.setIndent(n.getIndent())),r.append(i)):ft(n)&&(n=n.getParentOrThrow(),Qo(r,n.getChildren()),n.replace(r));else for(n=new Set,i=0;i<r.length;i++){var o=r[i];if(ze.$isElementNode(o)&&o.isEmpty()&&!n.has(o.getKey()))sx(o,t);else if(ze.$isLeafNode(o))for(o=o.getParent();o!=null;){let s=o.getKey();if(Ne(o)){if(!n.has(s)){var l=gn(t);Qo(l,o.getChildren()),o.replace(l),cn(l),n.add(s)}break}else{if(l=o.getParent(),ze.$isRootOrShadowRoot(l)&&!n.has(s)){n.add(s),sx(o,t);break}o=l}}}}})};wn.removeList=function(e){e.update(()=>{let t=ze.$getSelection();if(ze.$isRangeSelection(t)){var n=new Set,r=t.getNodes(),i=t.anchor.getNode();if(BE(i,r))n.add(km(i));else for(i=0;i<r.length;i++){var o=r[i];ze.$isLeafNode(o)&&(o=so.$getNearestNodeOfType(o,Df),o!=null&&n.add(km(o)))}for(let l of n){n=l,r=FE(l);for(let s of r)r=ze.$createParagraphNode(),Qo(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 VO=wn;var ji=VO,HE={},Lf={},KE=p;function HO(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 ZE=KE.createContext(null);Lf.LexicalComposerContext=ZE;Lf.createLexicalComposerContext=function(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n!=null?n.getTheme():null)}}};Lf.useLexicalComposerContext=function(){let e=KE.useContext(ZE);return e==null&&HO(8),e};const KO=Lf;var Tr=KO,hx=Tr,fa=xe,jd=p;let GE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var ZO=GE?jd.useLayoutEffect:jd.useEffect;let vc={tag:"history-merge"};function GO(e,t){if(t!==null){if(t===void 0)e.update(()=>{var n=fa.$getRoot();if(n.isEmpty()){let r=fa.$createParagraphNode();n.append(r),n=GE?document.activeElement:null,(fa.$getSelection()!==null||n!==null&&n===e.getRootElement())&&r.select()}},vc);else if(t!==null)switch(typeof t){case"string":let n=e.parseEditorState(t);e.setEditorState(n,vc);break;case"object":e.setEditorState(t,vc);break;case"function":e.update(()=>{fa.$getRoot().isEmpty()&&t(e)},vc)}}}HE.LexicalComposer=function({initialConfig:e,children:t}){let n=jd.useMemo(()=>{const{theme:r,namespace:i,editor__DEPRECATED:o,nodes:l,onError:s,editorState:a}=e,u=hx.createLexicalComposerContext(null,r);let c=o||null;if(c===null){const d=fa.createEditor({editable:e.editable,namespace:i,nodes:l,onError:f=>s(f,d),theme:r});GO(d,a),c=d}return[c,u]},[]);return ZO(()=>{let r=e.editable,[i]=n;i.setEditable(r!==void 0?r:!0)},[]),jd.createElement(hx.LexicalComposerContext.Provider,{value:n},t)};const YO=HE;var XO=YO,Oa=p;function $m(e,t){return $m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},$m(e,t)}function QO(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$m(e,t)}function JO(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 px={error:null},qO=function(e){function t(){for(var r,i=arguments.length,o=Array(i),l=0;l<i;l++)o[l]=arguments[l];return r=e.call.apply(e,[this].concat(o))||this,r.state=px,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}QO(t,e),t.getDerivedStateFromError=function(r){return{error:r}};var n=t.prototype;return n.reset=function(){this.setState(px)},n.componentDidCatch=function(r,i){var o,l;(o=(l=this.props).onError)==null||o.call(l,r,i)},n.componentDidUpdate=function(r,i){var o=this.props.resetKeys;if(this.state.error!==null&&i.error!==null&&JO(r.resetKeys,o)){var l,s;(l=(s=this.props).onResetKeysChange)==null||l.call(s,r.resetKeys,o),this.reset()}},n.render=function(){var r=this.state.error,i=this.props,o=i.fallbackRender,l=i.FallbackComponent;if(i=i.fallback,r!==null){if(r={error:r,resetErrorBoundary:this.resetErrorBoundary},Oa.isValidElement(i))return i;if(typeof o=="function")return o(r);if(l)return Oa.createElement(l,r);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(Oa.Component),eP=function({children:e,onError:t}){return Oa.createElement(qO,{fallback:Oa.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:t},e)};const tP=eP;var nP=tP;const rP=Tu(nP);var kv={},$v={},iP=Ft,Ye=xe;function oP(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;var o=t._selection,l=e._selection;if(i)return 1;if(!(Ye.$isRangeSelection(o)&&Ye.$isRangeSelection(l)&&l.isCollapsed()&&o.isCollapsed()))return 0;i=t._nodeMap;let s=[];for(let a of n)n=i.get(a),n!==void 0&&s.push(n);for(let[a,u]of r)u&&(r=i.get(a),r===void 0||Ye.$isRootNode(r)||s.push(r));return s.length===0?0:1<s.length?(r=t._nodeMap,t=r.get(o.anchor.key),l=r.get(l.anchor.key),t&&l&&!e._nodeMap.has(t.__key)&&Ye.$isTextNode(t)&&t.__text.length===1&&o.anchor.offset===1?2:0):(t=s[0],e=e._nodeMap.get(t.__key),!Ye.$isTextNode(e)||!Ye.$isTextNode(t)||e.__mode!==t.__mode||(e=e.__text,t=t.__text,e===t)||(o=o.anchor,l=l.anchor,o.key!==l.key||o.type!=="text")?0:(o=o.offset,l=l.offset,e=t.length-e.length,e===1&&l===o-1?2:e===-1&&l===o+1?3:e===-1&&l===o?4:0))}function lP(e,t){let n=Date.now(),r=0;return(i,o,l,s,a,u)=>{let c=Date.now();if(u.has("historic"))return r=0,n=c,2;let d=oP(i,o,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(i===null)return 1;var g=o._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=i._nodeMap.get(m),m=o._nodeMap.get(m),g=i._selection;let w=o._selection,v=!1;Ye.$isRangeSelection(g)&&Ye.$isRangeSelection(w)&&(v=g.anchor.type==="element"&&g.focus.type==="element"&&w.anchor.type==="text"&&w.focus.type==="text"),h=!v&&Ye.$isTextNode(h)&&Ye.$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}}$v.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}};$v.registerHistory=function(e,t,n){let r=lP(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(Ye.CAN_REDO_COMMAND,!1)),d!==null&&(h.push({...d}),e.dispatchCommand(Ye.CAN_UNDO_COMMAND,!0));else if(s===2)return;t.current={editor:e,editorState:l}}};let i=iP.mergeRegister(e.registerCommand(Ye.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(Ye.CAN_REDO_COMMAND,!0)),s.length===0&&e.dispatchCommand(Ye.CAN_UNDO_COMMAND,!1),t.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:"historic"})}return!0},Ye.COMMAND_PRIORITY_EDITOR),e.registerCommand(Ye.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(Ye.CAN_UNDO_COMMAND,!0)),s=l.pop(),l.length===0&&e.dispatchCommand(Ye.CAN_REDO_COMMAND,!1),t.current=s||null,s&&s.editor.setEditorState(s.editorState,{tag:"historic"})}return!0},Ye.COMMAND_PRIORITY_EDITOR),e.registerCommand(Ye.CLEAR_EDITOR_COMMAND,()=>(t.undoStack=[],t.redoStack=[],t.current=null,!1),Ye.COMMAND_PRIORITY_EDITOR),e.registerCommand(Ye.CLEAR_HISTORY_COMMAND,()=>(t.undoStack=[],t.redoStack=[],t.current=null,e.dispatchCommand(Ye.CAN_REDO_COMMAND,!1),e.dispatchCommand(Ye.CAN_UNDO_COMMAND,!1),!0),Ye.COMMAND_PRIORITY_EDITOR),e.registerUpdateListener(n)),o=e.registerUpdateListener(n);return()=>{i(),o()}};const sP=$v;var aP=sP,uP=Tr,bm=aP,mx=p;function cP(e,t,n=1e3){let r=mx.useMemo(()=>t||bm.createEmptyHistoryState(),[t]);mx.useEffect(()=>bm.registerHistory(e,r,n),[n,e,r])}kv.createEmptyHistoryState=bm.createEmptyHistoryState;kv.HistoryPlugin=function({externalHistoryState:e}){let[t]=uP.useLexicalComposerContext();return cP(t,e),null};const dP=kv;var fP=dP,YE={},hP=Tr,Pa=p,pP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Pa.useLayoutEffect:Pa.useEffect;function mP(e){let[t]=hP.useLexicalComposerContext(),n=Pa.useMemo(()=>e(t),[t,e]),r=Pa.useRef(n.initialValueFn()),[i,o]=Pa.useState(r.current);return pP(()=>{let{initialValueFn:l,subscribe:s}=n,a=l();return r.current!==a&&(r.current=a,o(a)),s(u=>{r.current=u,o(u)})},[n,e]),i}function gP(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}var vP=function(){return mP(gP)};const yP=vP;var xP=yP,wo={},dn=xe;function bv(e,t=!0){return e?!1:(e=XE(),t&&(e=e.trim()),e==="")}function XE(){return dn.$getRoot().getTextContent()}function QE(e){if(!bv(e,!1))return!1;e=dn.$getRoot().getChildren();let t=e.length;if(1<t)return!1;for(let r=0;r<t;r++){var n=e[r];if(dn.$isDecoratorNode(n))return!1;if(dn.$isElementNode(n)){if(!dn.$isParagraphNode(n)||n.__indent!==0)return!1;n=n.getChildren();let i=n.length;for(let o=0;o<i;o++)if(!dn.$isTextNode(n[r]))return!1}}return!0}wo.$canShowPlaceholder=QE;wo.$canShowPlaceholderCurry=function(e){return()=>QE(e)};wo.$findTextIntersectionFromCharacters=function(e,t){var n=e.getFirstChild();e=0;e:for(;n!==null;){if(dn.$isElementNode(n)){var r=n.getFirstChild();if(r!==null){n=r;continue}}else if(dn.$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=bv;wo.$isRootTextContentEmptyCurry=function(e,t){return()=>bv(e,t)};wo.$rootTextContent=XE;wo.registerLexicalTextEntity=function(e,t,n,r){let i=l=>{const s=dn.$createTextNode(l.getTextContent());s.setFormat(l.getFormat()),l.replace(s)},o=e.registerNodeTransform(dn.TextNode,l=>{if(l.isSimpleText()){var s=l.getPreviousSibling(),a=l.getTextContent(),u=l;if(dn.$isTextNode(s)){var c=s.getTextContent(),d=t(c+a);if(s instanceof n){if(d===null||s.getLatest().__mode!==0){i(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(),dn.$isTextNode(c)){if(d=u.getTextContent()+c.getTextContent(),d=t(d),d===null){c instanceof n?i(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&&dn.$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?i(l):s.length>a.end?l.splitText(a.end):(s=l.getPreviousSibling(),dn.$isTextNode(s)&&s.isTextEntity()&&(i(s),i(l)),s=l.getNextSibling(),dn.$isTextNode(s)&&s.isTextEntity()&&(i(s),l instanceof n&&i(l)))}),[o,e]};const _P=wo;var wP=_P,JE={},yc=xe;JE.registerDragonSupport=function(e){let t=window.location.origin,n=r=>{if(r.origin===t){var i=e.getRootElement();if(document.activeElement===i&&(i=r.data,typeof i=="string")){try{var o=JSON.parse(i)}catch{return}if(o&&o.protocol==="nuanria_messaging"&&o.type==="request"&&(o=o.payload)&&o.functionId==="makeChanges"&&(o=o.args)){const[l,s,a,u,c]=o;e.update(()=>{const d=yc.$getSelection();if(yc.$isRangeSelection(d)){var f=d.anchor;let h=f.getNode(),m=0,g=0;yc.$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()),yc.$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 SP=JE;var EP=SP,Jr={},Si={},Tv={},gx=lo,CP=Ft,Fl=xe;function qE(e,t,n,r=null){let i=r!=null?t.isSelected(r):!0,o=Fl.$isElementNode(t)&&t.excludeFromCopy("html");var l=t;r!==null&&(l=gx.$cloneWithProperties(t),l=Fl.$isTextNode(l)&&r!=null?gx.$sliceSelectedTextNodeContent(r,l):l);let s=Fl.$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=qE(e,f,c,r);!i&&Fl.$isElementNode(t)&&h&&t.extractWithChild(f,r,"html")&&(i=!0)}return i&&!o?(CP.isHTMLElement(a)&&a.append(c),n.append(a),u&&(e=u.call(l,a))&&a.replaceWith(e)):n.append(c),i}let eC=new Set(["STYLE","SCRIPT"]);function tC(e,t,n=new Map,r){let i=[];if(eC.has(e.nodeName))return i;let o=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,o=Array.isArray(a)?a[a.length-1]:a,o!==null){for(var[,u]of n)if(o=u(o,r),!o)break;o&&i.push(...Array.isArray(a)?a:[o])}s.forChild!=null&&n.set(e.nodeName,s.forChild)}for(e=e.childNodes,r=[],u=0;u<e.length;u++)r.push(...tC(e[u],t,new Map(n),o));return l!=null&&(r=l(r)),o==null?i=i.concat(r):Fl.$isElementNode(o)&&o.append(...r),i}Tv.$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=Fl.$getRoot().getChildren();for(let i=0;i<r.length;i++)qE(e,r[i],n,t);return n.innerHTML};Tv.$generateNodesFromDOM=function(e,t){t=t.body?t.body.childNodes:[];let n=[];for(let i=0;i<t.length;i++){var r=t[i];eC.has(r.nodeName)||(r=tC(r,e),r!==null&&(n=n.concat(r)))}return n};const kP=Tv;var $P=kP,nC=$P,Tm=lo,Ql=Ft,pe=xe;function li(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 rC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function iC(e){let t=pe.$getSelection();if(t==null)throw Error("Expected valid LexicalSelection");return pe.$isRangeSelection(t)&&t.isCollapsed()||t.getNodes().length===0?"":nC.$generateHtmlFromNodes(e,t)}function oC(e){let t=pe.$getSelection();if(t==null)throw Error("Expected valid LexicalSelection");return pe.$isRangeSelection(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(sC(e,t))}function Nm(e,t,n){(pe.DEPRECATED_$isGridSelection(n)||Ql.$findMatchingParent(n.anchor.getNode(),r=>pe.DEPRECATED_$isGridCellNode(r))!==null&&Ql.$findMatchingParent(n.focus.getNode(),r=>pe.DEPRECATED_$isGridCellNode(r))!==null)&&t.length===1&&pe.DEPRECATED_$isGridNode(t[0])?TP(t,n,!1,e):bP(t,n)}function bP(e,t){let n=[],r=null;for(let i=0;i<e.length;i++){let o=e[i],l=pe.$isLineBreakNode(o);if(l||pe.$isDecoratorNode(o)&&o.isInline()||pe.$isElementNode(o)&&o.isInline()||pe.$isTextNode(o)||o.isParentRequired()){if(r===null&&(r=o.createParentElementNode(),n.push(r),l))continue;r!==null&&r.append(o)}else n.push(o),r=null}pe.$isRangeSelection(t)?t.insertNodes(n):pe.DEPRECATED_$isGridSelection(t)&&(e=t.anchor.getNode(),pe.DEPRECATED_$isGridCellNode(e)||li(41),e.append(...n))}function TP(e,t,n,r){e.length===1&&pe.DEPRECATED_$isGridNode(e[0])||li(42);var i=e[0];e=i.getChildren(),n=i.getFirstChildOrThrow().getChildrenSize();var o=i.getChildrenSize(),l=Ql.$findMatchingParent(t.anchor.getNode(),h=>pe.DEPRECATED_$isGridCellNode(h));t=(i=l&&Ql.$findMatchingParent(l,h=>pe.DEPRECATED_$isGridRowNode(h)))&&Ql.$findMatchingParent(i,h=>pe.DEPRECATED_$isGridNode(h)),pe.DEPRECATED_$isGridCellNode(l)&&pe.DEPRECATED_$isGridRowNode(i)&&pe.DEPRECATED_$isGridNode(t)||li(43);var s=i.getIndexWithinParent(),a=Math.min(t.getChildrenSize()-1,s+o-1);o=l.getIndexWithinParent(),l=Math.min(i.getChildrenSize()-1,o+n-1),n=Math.min(o,l),i=Math.min(s,a),o=Math.max(o,l),s=Math.max(s,a),a=t.getChildren(),l=0;let u,c;for(let h=i;h<=s;h++){var d=a[h];pe.DEPRECATED_$isGridRowNode(d)||li(24);var f=e[l];pe.DEPRECATED_$isGridRowNode(f)||li(24),d=d.getChildren(),f=f.getChildren();let m=0;for(let g=n;g<=o;g++){let w=d[g];pe.DEPRECATED_$isGridCellNode(w)||li(25);let v=f[m];pe.DEPRECATED_$isGridCellNode(v)||li(25),h===i&&g===n?u=w.getKey():h===s&&g===o&&(c=w.getKey());let y=w.getChildren();v.getChildren().forEach(_=>{pe.$isTextNode(_)&&pe.$createParagraphNode().append(_),w.append(_)}),y.forEach(_=>_.remove()),m++}l++}u&&c&&(e=pe.DEPRECATED_$createGridSelection(),e.set(t.getKey(),u,c),pe.$setSelection(e),r.dispatchCommand(pe.SELECTION_CHANGE_COMMAND,void 0))}function lC(e,t,n,r=[]){let i=t!=null?n.isSelected(t):!0,o=pe.$isElementNode(n)&&n.excludeFromCopy("html");var l=n;if(t!==null){var s=Tm.$cloneWithProperties(n);l=s=pe.$isTextNode(s)&&t!=null?Tm.$sliceSelectedTextNodeContent(t,s):s}let a=pe.$isElementNode(l)?l.getChildren():[];var u=l;s=u.exportJSON();var c=u.constructor;s.type!==c.getType()&&li(58,c.name);let d=s.children;for(pe.$isElementNode(u)&&(Array.isArray(d)||li(59,c.name)),pe.$isTextNode(l)&&(l=l.__text,0<l.length?s.text=l:i=!1),l=0;l<a.length;l++)u=a[l],c=lC(e,t,u,s.children),!i&&pe.$isElementNode(n)&&c&&n.extractWithChild(u,t,"clone")&&(i=!0);if(i&&!o)r.push(s);else if(Array.isArray(s.children))for(e=0;e<s.children.length;e++)r.push(s.children[e]);return i}function sC(e,t){let n=[],r=pe.$getRoot().getChildren();for(let i=0;i<r.length;i++)lC(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function aC(e){let t=[];for(let n=0;n<e.length;n++){let r=pe.$parseSerializedNode(e[n]);pe.$isTextNode(r)&&Tm.$addNodeStyle(r),t.push(r)}return t}let yl=null;function vx(e,t){var n=rC?(e._window||window).getSelection():null;if(!n)return!1;var r=n.anchorNode;if(n=n.focusNode,r!==null&&n!==null&&!pe.isSelectionWithinEditor(e,r,n)||(t.preventDefault(),t=t.clipboardData,r=pe.$getSelection(),t===null||r===null))return!1;n=iC(e),e=oC(e);let i="";return r!==null&&(i=r.getTextContent()),n!==null&&t.setData("text/html",n),e!==null&&t.setData("application/x-lexical-editor",e),t.setData("text/plain",i),!0}Si.$generateJSONFromSelectedNodes=sC;Si.$generateNodesFromSerializedNodes=aC;Si.$getHtmlContent=iC;Si.$getLexicalContent=oC;Si.$insertDataTransferForPlainText=function(e,t){e=e.getData("text/plain")||e.getData("text/uri-list"),e!=null&&t.insertRawText(e)};Si.$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=aC(l.nodes);return Nm(n,s,t)}}catch{}if(r=e.getData("text/html"))try{var i=new DOMParser().parseFromString(r,"text/html"),o=nC.$generateNodesFromDOM(n,i);return Nm(n,o,t)}catch{}if(e=e.getData("text/plain")||e.getData("text/uri-list"),e!=null)if(pe.$isRangeSelection(t))for(e=e.split(/(\r?\n|\t)/),n=e.length,i=0;i<n;i++)o=e[i],o===`
|
|
128
128
|
`||o===`\r
|
|
129
|
-
`?t.insertParagraph():o===" "?t.insertNodes([pe.$createTabNode()]):t.insertText(o);else t.insertRawText(e)};Si.$insertGeneratedNodes=Nm;Si.copyToClipboard=async function(e,t){if(vl!==null)return!1;if(t!==null)return new Promise(l=>{e.update(()=>{l(vx(e,t))})});var n=e.getRootElement();let r=e._window==null?window.document:e._window.document,i=rC?(e._window||window).getSelection():null;if(n===null||i===null)return!1;let o=r.createElement("span");return o.style.cssText="position: fixed; top: -1000px;",o.append(r.createTextNode("#")),n.append(o),n=new Range,n.setStart(o,0),n.setEnd(o,1),i.removeAllRanges(),i.addRange(n),new Promise(l=>{let s=e.registerCommand(pe.COPY_COMMAND,a=>(Xl.objectKlassEquals(a,ClipboardEvent)&&(s(),vl!==null&&(window.clearTimeout(vl),vl=null),l(vx(e,a))),!0),pe.COMMAND_PRIORITY_CRITICAL);vl=window.setTimeout(()=>{s(),vl=null,l(!1)},50),r.execCommand("copy"),o.remove()})};const NP=Si;var RP=NP,zd=RP,xc=lo,jr=Ft,P=we;function yx(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 Ps=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",OP=Ps&&"documentMode"in document?document.documentMode:null,PP=Ps&&"InputEvent"in window&&!OP?"getTargetRanges"in new window.InputEvent("input"):!1,AP=Ps&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),MP=Ps&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,DP=Ps&&/^(?=.*Chrome).*/i.test(navigator.userAgent),IP=Ps&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!DP,Rm=P.createCommand("DRAG_DROP_PASTE_FILE"),Nv=class uC extends P.ElementNode{static getType(){return"quote"}static clone(t){return new uC(t.__key)}constructor(t){super(t)}createDOM(t){let n=document.createElement("blockquote");return jr.addClassNamesToElement(n,t.theme.quote),n}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:LP,priority:0})}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&jr.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=Rv();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(t,n){t=P.$createParagraphNode();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=P.$createParagraphNode();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}};function Rv(){return P.$applyNodeReplacement(new Nv)}let Ov=class cC extends P.ElementNode{static getType(){return"heading"}static clone(t){return new cC(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&&jr.addClassNamesToElement(r,t[n]),r}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:yl,priority:0}),h2:()=>({conversion:yl,priority:0}),h3:()=>({conversion:yl,priority:0}),h4:()=>({conversion:yl,priority:0}),h5:()=>({conversion:yl,priority:0}),h6:()=>({conversion:yl,priority:0}),p:t=>(t=t.firstChild,t!==null&&xx(t)?{conversion:()=>({node:null}),priority:3}:null),span:t=>xx(t)?{conversion:()=>({node:Fl("h1")}),priority:3}:null}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&jr.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=Fl(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()?Fl(this.getTag()):P.$createParagraphNode();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=this.isEmpty()?P.$createParagraphNode():Fl(this.getTag());return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}extractWithChild(){return!0}};function xx(e){return e.nodeName.toLowerCase()==="span"?e.style.fontSize==="26pt":!1}function yl(e){let t=e.nodeName.toLowerCase(),n=null;return(t==="h1"||t==="h2"||t==="h3"||t==="h4"||t==="h5"||t==="h6")&&(n=Fl(t),e.style!==null&&n.setFormat(e.style.textAlign)),{node:n}}function LP(e){let t=Rv();return e.style!==null&&t.setFormat(e.style.textAlign),{node:t}}function Fl(e){return P.$applyNodeReplacement(new Ov(e))}function jP(e,t){e.preventDefault(),t.update(()=>{let n=P.$getSelection(),r=e instanceof InputEvent||e instanceof KeyboardEvent?null:e.clipboardData;r!=null&&(P.$isRangeSelection(n)||P.DEPRECATED_$isGridSelection(n))&&zd.$insertDataTransferForRichText(r,n,t)},{tag:"paste"})}async function zP(e,t){await zd.copyToClipboard(t,jr.objectKlassEquals(e,ClipboardEvent)?e:null),t.update(()=>{let n=P.$getSelection();P.$isRangeSelection(n)?n.removeText():P.$isNodeSelection(n)&&n.getNodes().forEach(r=>r.remove())})}function da(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 _x(e){var t=P.$getSelection();if(!P.$isRangeSelection(t))return!1;let n=new Set;t=t.getNodes();for(let o=0;o<t.length;o++){var r=t[o],i=r.getKey();n.has(i)||(r=jr.$getNearestBlockElementAncestorOrThrow(r),i=r.getKey(),r.canIndent()&&!n.has(i)&&(n.add(i),e(r)))}return 0<n.size}function _c(e){return e=P.$getNearestNodeFromDOMNode(e),P.$isDecoratorNode(e)}Jr.$createHeadingNode=Fl;Jr.$createQuoteNode=Rv;Jr.$isHeadingNode=function(e){return e instanceof Ov};Jr.$isQuoteNode=function(e){return e instanceof Nv};Jr.DRAG_DROP_PASTE=Rm;Jr.HeadingNode=Ov;Jr.QuoteNode=Nv;Jr.eventFiles=da;Jr.registerRichText=function(e){return jr.mergeRegister(e.registerCommand(P.CLICK_COMMAND,()=>{const t=P.$getSelection();return P.$isNodeSelection(t)?(t.clear(),!0):!1},0),e.registerCommand(P.DELETE_CHARACTER_COMMAND,t=>{const n=P.$getSelection();return P.$isRangeSelection(n)?(n.deleteCharacter(t),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.DELETE_WORD_COMMAND,t=>{const n=P.$getSelection();return P.$isRangeSelection(n)?(n.deleteWord(t),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.DELETE_LINE_COMMAND,t=>{const n=P.$getSelection();return P.$isRangeSelection(n)?(n.deleteLine(t),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.CONTROLLED_TEXT_INSERTION_COMMAND,t=>{const n=P.$getSelection();if(typeof t=="string")P.$isRangeSelection(n)?n.insertText(t):P.DEPRECATED_$isGridSelection(n);else{if(!P.$isRangeSelection(n)&&!P.DEPRECATED_$isGridSelection(n))return!1;const r=t.dataTransfer;r!=null?zd.$insertDataTransferForRichText(r,n,e):P.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.REMOVE_TEXT_COMMAND,()=>{const t=P.$getSelection();return P.$isRangeSelection(t)?(t.removeText(),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.FORMAT_TEXT_COMMAND,t=>{const n=P.$getSelection();return P.$isRangeSelection(n)?(n.formatText(t),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.FORMAT_ELEMENT_COMMAND,t=>{var n=P.$getSelection();if(!P.$isRangeSelection(n)&&!P.$isNodeSelection(n))return!1;n=n.getNodes();for(const r of n)n=jr.$findMatchingParent(r,i=>P.$isElementNode(i)&&!i.isInline()),n!==null&&n.setFormat(t);return!0},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.INSERT_LINE_BREAK_COMMAND,t=>{const n=P.$getSelection();return P.$isRangeSelection(n)?(n.insertLineBreak(t),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.INSERT_PARAGRAPH_COMMAND,()=>{const t=P.$getSelection();return P.$isRangeSelection(t)?(t.insertParagraph(),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.INSERT_TAB_COMMAND,()=>(P.$insertNodes([P.$createTabNode()]),!0),P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.INDENT_CONTENT_COMMAND,()=>_x(t=>{const n=t.getIndent();t.setIndent(n+1)}),P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.OUTDENT_CONTENT_COMMAND,()=>_x(t=>{const n=t.getIndent();0<n&&t.setIndent(n-1)}),P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_ARROW_UP_COMMAND,t=>{var n=P.$getSelection();if(P.$isNodeSelection(n)&&!_c(t.target)){if(t=n.getNodes(),0<t.length)return t[0].selectPrevious(),!0}else if(P.$isRangeSelection(n)&&(n=P.$getAdjacentNode(n.focus,!0),!t.shiftKey&&P.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline()))return n.selectPrevious(),t.preventDefault(),!0;return!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_ARROW_DOWN_COMMAND,t=>{var n=P.$getSelection();if(P.$isNodeSelection(n)){if(t=n.getNodes(),0<t.length)return t[0].selectNext(0,0),!0}else if(P.$isRangeSelection(n)){let r=n.focus;if(r.key==="root"&&r.offset===P.$getRoot().getChildrenSize())return t.preventDefault(),!0;if(n=P.$getAdjacentNode(n.focus,!1),!t.shiftKey&&P.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),t.preventDefault(),!0}return!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_ARROW_LEFT_COMMAND,t=>{const n=P.$getSelection();if(P.$isNodeSelection(n)){var r=n.getNodes();if(0<r.length)return t.preventDefault(),r[0].selectPrevious(),!0}return P.$isRangeSelection(n)&&xc.$shouldOverrideDefaultCharacterSelection(n,!0)?(r=t.shiftKey,t.preventDefault(),xc.$moveCharacter(n,r,!0),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_ARROW_RIGHT_COMMAND,t=>{const n=P.$getSelection();if(P.$isNodeSelection(n)&&!_c(t.target)){var r=n.getNodes();if(0<r.length)return t.preventDefault(),r[0].selectNext(0,0),!0}return P.$isRangeSelection(n)?(r=t.shiftKey,xc.$shouldOverrideDefaultCharacterSelection(n,!1)?(t.preventDefault(),xc.$moveCharacter(n,r,!1),!0):!1):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_BACKSPACE_COMMAND,t=>{if(_c(t.target))return!1;const n=P.$getSelection();if(!P.$isRangeSelection(n))return!1;t.preventDefault(),{anchor:t}=n;const r=t.getNode();return n.isCollapsed()&&t.offset===0&&!P.$isRootNode(r)&&0<jr.$getNearestBlockElementAncestorOrThrow(r).getIndent()?e.dispatchCommand(P.OUTDENT_CONTENT_COMMAND,void 0):e.dispatchCommand(P.DELETE_CHARACTER_COMMAND,!0)},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_DELETE_COMMAND,t=>{if(_c(t.target))return!1;const n=P.$getSelection();return P.$isRangeSelection(n)?(t.preventDefault(),e.dispatchCommand(P.DELETE_CHARACTER_COMMAND,!1)):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_ENTER_COMMAND,t=>{const n=P.$getSelection();if(!P.$isRangeSelection(n))return!1;if(t!==null){if((MP||AP||IP)&&PP)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(P.INSERT_LINE_BREAK_COMMAND,!1)}return e.dispatchCommand(P.INSERT_PARAGRAPH_COMMAND,void 0)},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_ESCAPE_COMMAND,()=>{const t=P.$getSelection();return P.$isRangeSelection(t)?(e.blur(),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.DROP_COMMAND,t=>{const[,n]=da(t);if(0<n.length){var r=yx(t.clientX,t.clientY);if(r!==null){const{offset:o,node:l}=r;var i=P.$getNearestNodeFromDOMNode(l);if(i!==null){if(r=P.$createRangeSelection(),P.$isTextNode(i))r.anchor.set(i.getKey(),o,"text"),r.focus.set(i.getKey(),o,"text");else{const s=i.getParentOrThrow().getKey();i=i.getIndexWithinParent()+1,r.anchor.set(s,i,"element"),r.focus.set(s,i,"element")}r=P.$normalizeSelection__EXPERIMENTAL(r),P.$setSelection(r)}e.dispatchCommand(Rm,n)}return t.preventDefault(),!0}return t=P.$getSelection(),!!P.$isRangeSelection(t)},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.DRAGSTART_COMMAND,t=>{[t]=da(t);const n=P.$getSelection();return!(t&&!P.$isRangeSelection(n))},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.DRAGOVER_COMMAND,t=>{var[n]=da(t);const r=P.$getSelection();return n&&!P.$isRangeSelection(r)?!1:(n=yx(t.clientX,t.clientY),n!==null&&(n=P.$getNearestNodeFromDOMNode(n.node),P.$isDecoratorNode(n)&&t.preventDefault()),!0)},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.SELECT_ALL_COMMAND,()=>(P.$selectAll(),!0),P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.COPY_COMMAND,t=>(zd.copyToClipboard(e,jr.objectKlassEquals(t,ClipboardEvent)?t:null),!0),P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.CUT_COMMAND,t=>(zP(t,e),!0),P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.PASTE_COMMAND,t=>{const[,n,r]=da(t);if(0<n.length&&!r)return e.dispatchCommand(Rm,n),!0;if(P.isSelectionCapturedInDecoratorInput(t.target))return!1;const i=P.$getSelection();return P.$isRangeSelection(i)||P.DEPRECATED_$isGridSelection(i)?(jP(t,e),!0):!1},P.COMMAND_PRIORITY_EDITOR))};const FP=Jr;var Oa=FP,dC=Tr,BP=xP,Jn=p,UP=wP,fC=Ft,wx=Gr,WP=EP,VP=Oa,Pv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Jn.useLayoutEffect:Jn.useEffect;function Sx(e){return e.getEditorState().read(UP.$canShowPlaceholderCurry(e.isComposing()))}function HP(e){let[t,n]=Jn.useState(()=>Sx(e));return Pv(()=>{function r(){let i=Sx(e);n(i)}return r(),fC.mergeRegister(e.registerUpdateListener(()=>{r()}),e.registerEditableListener(()=>{r()}))},[e]),t}function KP(e,t){let[n,r]=Jn.useState(()=>e.getDecorators());return Pv(()=>e.registerDecoratorListener(i=>{wx.flushSync(()=>{r(i)})}),[e]),Jn.useEffect(()=>{r(e.getDecorators())},[e]),Jn.useMemo(()=>{let i=[],o=Object.keys(n);for(let l=0;l<o.length;l++){let s=o[l],a=Jn.createElement(t,{onError:c=>e._onError(c)},Jn.createElement(Jn.Suspense,{fallback:null},n[s])),u=e.getElementByKey(s);u!==null&&i.push(wx.createPortal(a,u,s))}return i},[t,n,e])}function ZP(e){Pv(()=>fC.mergeRegister(VP.registerRichText(e),WP.registerDragonSupport(e)),[e])}function GP({content:e}){var[t]=dC.useLexicalComposerContext();t=HP(t);let n=BP();return t?typeof e=="function"?e(n):e:null}YE.RichTextPlugin=function({contentEditable:e,placeholder:t,ErrorBoundary:n}){let[r]=dC.useLexicalComposerContext();return n=KP(r,n),ZP(r),Jn.createElement(Jn.Fragment,null,e,Jn.createElement(GP,{content:t}),n)};const YP=YE;var XP=YP,hC={},ni=ji,QP=Tr,pC=p,JP=Ft,Js=we;function qP(e){pC.useEffect(()=>JP.mergeRegister(e.registerCommand(ni.INSERT_ORDERED_LIST_COMMAND,()=>(ni.insertList(e,"number"),!0),Js.COMMAND_PRIORITY_LOW),e.registerCommand(ni.INSERT_UNORDERED_LIST_COMMAND,()=>(ni.insertList(e,"bullet"),!0),Js.COMMAND_PRIORITY_LOW),e.registerCommand(ni.REMOVE_LIST_COMMAND,()=>(ni.removeList(e),!0),Js.COMMAND_PRIORITY_LOW),e.registerCommand(Js.INSERT_PARAGRAPH_COMMAND,()=>!!ni.$handleListInsertParagraph(),Js.COMMAND_PRIORITY_LOW)),[e])}hC.ListPlugin=function(){let[e]=QP.useLexicalComposerContext();return pC.useEffect(()=>{if(!e.hasNodes([ni.ListNode,ni.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[e]),qP(e),null};const eA=hC;var tA=eA,mC={},Ei={},gC=Ft,Ur=we;let nA=new Set(["http:","https:","mailto:","sms:","tel:"]);class As extends Ur.ElementNode{static getType(){return"link"}static clone(t){return new As(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t,n={},r){super(r);let{target:i=null,rel:o=null,title:l=null}=n;this.__url=t,this.__target=i,this.__rel=o,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),gC.addClassNamesToElement(n,t.theme.link),n}updateDOM(t,n){let r=this.__url,i=this.__target,o=this.__rel,l=this.__title;return r!==t.__url&&(n.href=r),i!==t.__target&&(i?n.target=i:n.removeAttribute("target")),o!==t.__rel&&(o?n.rel=o:n.removeAttribute("rel")),l!==t.__title&&(l?n.title=l:n.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:rA,priority:1})}}static importJSON(t){let n=au(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(!nA.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),Ur.$isElementNode(t)?(n=au(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(!Ur.$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 rA(e){let t=null;if(gC.isHTMLAnchorElement(e)){let n=e.textContent;n!==null&&n!==""&&(t=au(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function au(e,t){return Ur.$applyNodeReplacement(new As(e,t))}function No(e){return e instanceof As}class ju extends As{static getType(){return"autolink"}static clone(t){return new ju(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}static importJSON(t){let n=Om(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),Ur.$isElementNode(t)?(n=Om(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),t.append(n),n):null}}function Om(e,t){return Ur.$applyNodeReplacement(new ju(e,t))}let iA=Ur.createCommand("TOGGLE_LINK_COMMAND");function oA(e,t){for(;e!==null&&(e=e.getParent())!==null&&!t(e););return e}Ei.$createAutoLinkNode=Om;Ei.$createLinkNode=au;Ei.$isAutoLinkNode=function(e){return e instanceof ju};Ei.$isLinkNode=No;Ei.AutoLinkNode=ju;Ei.LinkNode=As;Ei.TOGGLE_LINK_COMMAND=iA;Ei.toggleLink=function(e,t={}){let{target:n,title:r}=t,i=t.rel===void 0?"noreferrer":t.rel;if(t=Ur.$getSelection(),Ur.$isRangeSelection(t))if(t=t.extract(),e===null)t.forEach(l=>{if(l=l.getParent(),No(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 o=t[0];if(o=No(o)?o:oA(o,No),o!==null){o.setURL(e),n!==void 0&&o.setTarget(n),i!==null&&o.setRel(i),r!==void 0&&o.setTitle(r);return}}let l=null,s=null;t.forEach(a=>{var u=a.getParent();if(u!==s&&u!==null&&(!Ur.$isElementNode(a)||a.isInline()))if(No(u))s=u,u.setURL(e),n!==void 0&&u.setTarget(n),i!==null&&s.setRel(i),r!==void 0&&s.setTitle(r);else if(u.is(l)||(l=u,s=au(e,{rel:i,target:n}),No(u)?a.getPreviousSibling()===null?u.insertBefore(s):u.insertAfter(s):a.insertBefore(s)),No(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 lA=Ei;var fs=lA,xl=fs,sA=Tr,aA=Ft,_l=we,uA=p;mC.LinkPlugin=function({validateUrl:e}){let[t]=sA.useLexicalComposerContext();return uA.useEffect(()=>{if(!t.hasNodes([xl.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return aA.mergeRegister(t.registerCommand(xl.TOGGLE_LINK_COMMAND,n=>{if(n===null)return xl.toggleLink(n),!0;if(typeof n=="string")return e===void 0||e(n)?(xl.toggleLink(n),!0):!1;let{url:r,target:i,rel:o,title:l}=n;return xl.toggleLink(r,{rel:o,target:i,title:l}),!0},_l.COMMAND_PRIORITY_LOW),e!==void 0?t.registerCommand(_l.PASTE_COMMAND,n=>{let r=_l.$getSelection();if(!_l.$isRangeSelection(r)||r.isCollapsed()||!(n instanceof ClipboardEvent)||n.clipboardData==null)return!1;let i=n.clipboardData.getData("text");return e(i)?r.getNodes().some(o=>_l.$isElementNode(o))?!1:(t.dispatchCommand(xl.TOGGLE_LINK_COMMAND,i),n.preventDefault(),!0):!1},_l.COMMAND_PRIORITY_LOW):()=>{})},[t,e]),null};const cA=mC;var dA=cA;function fA({ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:n,ariaDescribedBy:r,ariaExpanded:i,ariaLabel:o,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[_]=Tr.useLexicalComposerContext(),[w,E]=p.useState(!1),$=p.useCallback(C=>{var N;_.setRootElement(C);const T=(N=document.getElementById("val-ui"))==null?void 0:N.shadowRoot;if(T&&"getSelection"in T){_._window=T;return}},[_]);return p.useLayoutEffect(()=>(E(_.isEditable()),_.registerEditableListener(C=>{E(C)})),[_]),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"?!!i:void 0,"aria-label":o,"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:$,role:h,spellCheck:m,style:g,tabIndex:S})}function hA({className:e}){return x.jsx(fA,{className:e})}class zu extends we.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 zu({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 vC(t)}createDOM(){return document.createElement("div")}updateDOM(){return!1}decorate(){return x.jsx(pA,{src:this.__src,altText:this.__altText,empty:this.__empty,height:this.__height,nodeKey:this.getKey()})}}function pA(e){return x.jsx("img",{src:e.src})}function vC(e){return new zu(e)}function mA(){const[e]=Tr.useLexicalComposerContext();return p.useEffect(()=>{e.focus()},[e]),null}const yC=we.createCommand("INSERT_IMAGE_COMMAND");function gA(){const[e]=Tr.useLexicalComposerContext();return p.useEffect(()=>{if(!e.hasNodes([zu]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return Ft.mergeRegister(e.registerCommand(yC,t=>{const n=vC(t);return we.$insertNodes([n]),we.$isRootOrShadowRoot(n.getParentOrThrow())&&Ft.$wrapNodeInElement(n,we.$createParagraphNode).selectEnd(),!0},we.COMMAND_PRIORITY_EDITOR))},[e]),null}const vA=({className:e})=>x.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:[x.jsx("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),x.jsx("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]}),yA=vA,xA=({className:e})=>x.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:[x.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),x.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),x.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]}),_A=xA,wA=({className:e})=>x.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:x.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"})}),SA=wA,EA=({variant:e="primary",onClick:t,children:n,icon:r,disabled:i=!1})=>x.jsx("button",{disabled:i,className:wf("font-sans font-[12px] tracking-[0.04em] py-1 px-2 rounded whitespace-nowrap group relative text-primary",{"font-bold":e==="primary","text-fill disabled:bg-fill disabled:text-background":e==="primary","border border-primary text-primary hover:border-highlight hover:text-highlight disabled:bg-fill disabled:text-background":e!=="primary"}),onClick:t,children:x.jsxs("span",{className:"flex flex-row items-center justify-center gap-2",children:[r&&r,n]})}),Ro=EA,CA=({className:e})=>x.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",className:e,children:[x.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"}),x.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"})]}),kA=CA,xC=re.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 Av(){return re.useContext(xC)}const $A=({options:e,onChange:t,label:n,icon:r})=>{const[i,o]=p.useState(!1),l=p.useRef(null),[s,a]=p.useState(0),{windowSize:u}=Av(),c=()=>{o(!i)},d=(f,h)=>{a(h),t(f),o(!1)};return p.useEffect(()=>{const f=h=>{i&&l.current&&!l.current.contains(h.target)&&o(!1)};return document.addEventListener("click",f),()=>{document.removeEventListener("click",f)}},[]),x.jsx("div",{className:"text-[12px]",ref:l,children:x.jsx(Ro,{onClick:f=>{f.preventDefault(),c()},icon:x.jsx(kA,{className:`rotate-[-90deg] transition-transform duration-150 ease-in-out ${i?"":"rotate-[90deg]"}`}),children:x.jsxs("div",{className:"relative",children:[x.jsxs("span",{className:"flex flex-row items-center justify-center gap-1",children:[n,r&&r]}),i&&x.jsx("div",{className:"absolute -top-[4px] overflow-scroll shadow-lg -left-2 text-primary w-fit z-overlay",style:{maxHeight:u==null?void 0:u.innerHeight},children:x.jsx("div",{className:"flex flex-col ",children:e==null?void 0:e.map((f,h)=>x.jsx("button",{onClick:m=>{m.preventDefault(),d(f,h)},className:`text-left px-2 py-1 hover:text-highlight ${h===s&&"font-bold truncate"}`,children:f},f))})})]})})})},bA=$A,TA=new TextEncoder;function _C(e){return new Promise((t,n)=>{var o;const r=(o=e.currentTarget.files)==null?void 0:o[0],i=new FileReader;i.addEventListener("load",()=>{const l=i.result;if(typeof l=="string"){const s=new Image;s.addEventListener("load",()=>{const a=jn.getSHA256Hash(TA.encode(l));if(s.naturalWidth&&s.naturalHeight){const u=ev(l);t({src:l,width:s.naturalWidth,height:s.naturalHeight,filename:r==null?void 0:r.name,sha256:a,mimeType:u,fileExt:u&&tv(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&&i.readAsDataURL(r)})}function wC(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),i=e.focus.getNode();return r===i?r:e.isBackward()?lo.$isAtNodeEnd(n)?r:i:lo.$isAtNodeEnd(t)?r:i}function NA(){const[e]=Tr.useLexicalComposerContext();return p.useEffect(()=>Ft.mergeRegister(e.registerCommand(we.CLICK_COMMAND,t=>{const n=we.$getSelection();if(we.$isRangeSelection(n)){const r=wC(n),i=Ft.$findMatchingParent(r,fs.$isLinkNode);if(fs.$isLinkNode(i)&&(t.metaKey||t.ctrlKey))return window.open(i.getURL(),"_blank"),!0}return!1},we.COMMAND_PRIORITY_LOW)),[]),null}var SC={exports:{}},RA="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",OA=RA,PA=OA;function EC(){}function CC(){}CC.resetWarningCache=EC;var AA=function(){function e(r,i,o,l,s,a){if(a!==PA){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:CC,resetWarningCache:EC};return n.PropTypes=n,n};SC.exports=AA();var MA=SC.exports;const tr=$u(MA);function Pm(){return Pm=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},Pm.apply(this,arguments)}function DA(e,t){if(e==null)return{};var n=IA(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Mv=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=e.size,o=i===void 0?24:i,l=DA(e,["color","size"]);return re.createElement("svg",Pm({ref:t,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),re.createElement("polyline",{points:"20 6 9 17 4 12"}))});Mv.propTypes={color:tr.string,size:tr.oneOfType([tr.string,tr.number])};Mv.displayName="Check";const LA=Mv;function Am(){return Am=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},Am.apply(this,arguments)}function jA(e,t){if(e==null)return{};var n=zA(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Dv=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=e.size,o=i===void 0?24:i,l=jA(e,["color","size"]);return re.createElement("svg",Am({ref:t,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),re.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"}),re.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"}))});Dv.propTypes={color:tr.string,size:tr.oneOfType([tr.string,tr.number])};Dv.displayName="Link";const FA=Dv;function Mm(){return Mm=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},Mm.apply(this,arguments)}function BA(e,t){if(e==null)return{};var n=UA(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Iv=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=e.size,o=i===void 0?24:i,l=BA(e,["color","size"]);return re.createElement("svg",Mm({ref:t,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),re.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});Iv.propTypes={color:tr.string,size:tr.oneOfType([tr.string,tr.number])};Iv.displayName="X";const WA=Iv,VA=({fontSizes:e,fontsFamilies:t,onEditor:n,colors:r})=>{const[i]=Tr.useLexicalComposerContext();p.useEffect(()=>{n&&n(i)},[i]);const[o,l]=p.useState(i),[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[_,w]=p.useState(null),E=R=>{i.dispatchCommand(fs.TOGGLE_LINK_COMMAND,R)},$={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"},C={};for(const R in $)C[$[R]]=R;const T=p.useCallback(()=>{const R=we.$getSelection();if(we.$isRangeSelection(R)){const D=R.anchor.getNode();let F=D.getKey()==="root"?D:Ft.$findMatchingParent(D,A=>{const k=A.getParent();return k!==null&&we.$isRootOrShadowRoot(k)});F===null&&(F=D.getTopLevelElementOrThrow());const se=wC(R),V=Ft.$findMatchingParent(se,fs.$isLinkNode);if(V!==null){const A=V.getURL();w(A)}else w(null);const K=F.getKey(),O=o.getElementByKey(K);if(c(R.hasFormat("bold")),f(R.hasFormat("italic")),m(R.hasFormat("strikethrough")),S(R.hasFormat("underline")),O!==null)if(a(K),ji.$isListNode(F)){const A=Ft.$getNearestNodeOfType(D,ji.ListNode),k=A?A.getListType():F.getListType();y(k)}else{const A=Oa.$isHeadingNode(F)?F.getTag():F.getType();A in $&&y(A)}}},[o]);p.useEffect(()=>Ft.mergeRegister(i.registerUpdateListener(({editorState:R})=>{R.read(()=>{T()})})),[T,o,i]),p.useEffect(()=>i.registerCommand(we.SELECTION_CHANGE_COMMAND,(R,D)=>(T(),l(D),!1),we.COMMAND_PRIORITY_CRITICAL),[i,T]);const N=R=>{["h1","h2","h3","h4","h5","h6"].includes(R)?v!==R&&i.update(()=>{const D=we.$getSelection();we.$isRangeSelection(D)&&lo.$setBlocksType(D,()=>Oa.$createHeadingNode(R))}):R==="paragraph"&&v!=="paragraph"?i.update(()=>{const D=we.$getSelection();(we.$isRangeSelection(D)||we.DEPRECATED_$isGridSelection(D))&&lo.$setBlocksType(D,()=>we.$createParagraphNode())}):R==="number"&&v!=="number"?i.dispatchCommand(ji.INSERT_ORDERED_LIST_COMMAND,void 0):R==="bullet"&&v!=="bullet"?i.dispatchCommand(ji.INSERT_UNORDERED_LIST_COMMAND,void 0):i.dispatchCommand(ji.REMOVE_LIST_COMMAND,void 0)};return p.useCallback(()=>{i.update(()=>{const R=we.$getSelection();if(we.$isRangeSelection(R)){const D=R.anchor,F=R.focus,se=R.getNodes();if(D.key===F.key&&D.offset===F.offset)return;se.forEach((V,K)=>{we.$isTextNode(V)?(K===0&&D.offset!==0&&(V=V.splitText(D.offset)[1]||V),K===se.length-1&&(V=V.splitText(F.offset)[0]||V),V.__style!==""&&V.setStyle(""),V.__format!==0&&(V.setFormat(0),Ft.$getNearestBlockElementAncestorOrThrow(V).setFormat(""))):Oa.$isHeadingNode(V)&&V.replace(we.$createParagraphNode(),!0)})}})},[o]),x.jsxs("div",{className:"sticky top-0 flex flex-col px-4 py-2 border-b backdrop-blur-3xl bg-background/10 border-highlight",children:[x.jsxs("div",{className:"flex flex-row gap-1",children:[x.jsx(bA,{options:Object.values($),label:$[v]??v+" (not supported)",onChange:R=>{N(C[R])}}),x.jsx(Ro,{variant:"primary",onClick:R=>{R.preventDefault(),i.dispatchCommand(we.FORMAT_TEXT_COMMAND,"bold")},active:u,icon:x.jsx(yA,{className:`${u&&"stroke-[3px]"}`})}),x.jsx(Ro,{active:h,onClick:R=>{R.preventDefault(),i.dispatchCommand(we.FORMAT_TEXT_COMMAND,"strikethrough")},icon:x.jsx(SA,{className:`${h&&"stroke-[2px]"}`})}),x.jsx(Ro,{active:d,onClick:R=>{R.preventDefault(),i.dispatchCommand(we.FORMAT_TEXT_COMMAND,"italic")},icon:x.jsx(_A,{className:`${d&&"stroke-[3px]"}`})}),x.jsx(Ro,{active:_!==null,onClick:R=>{R.preventDefault(),w(""),E("")},icon:x.jsx(FA,{width:12,height:12,className:`${_!==null&&"stroke-[3px]"}`})}),x.jsxs("label",{className:"flex items-center justify-center cursor-pointer",children:[x.jsx(gS,{}),x.jsx("input",{type:"file",hidden:!0,onChange:R=>{R.preventDefault(),_C(R).then(D=>{i.dispatchCommand(yC,{...D})}).catch(D=>{console.error("Error reading image",D)})}})]})]}),_!==null&&x.jsxs("div",{className:"flex flex-row p-2",children:[x.jsx("input",{type:"text",placeholder:"Enter URL",className:"w-1/3 px-2 text-primary",value:_,onChange:R=>{R.preventDefault(),w(R.target.value)}}),x.jsx(Ro,{variant:"primary",onClick:R=>{R.preventDefault(),E(_||null)},icon:x.jsx(LA,{size:14})}),x.jsx(Ro,{variant:"primary",onClick:R=>{R.preventDefault(),E(null)},icon:x.jsx(WA,{size:14})})]})]})},HA=VA;function KA(e){console.error(e)}const ZA=28,GA=({richtext:e,onEditor:t})=>{const{windowSize:n}=Av(),i={namespace:"val",editorState:o=>{o.setEditorState(o.parseEditorState({root:LR($S(e))}))},nodes:[Oa.HeadingNode,zu,ji.ListNode,ji.ListItemNode,fs.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:KA};return x.jsxs(XO.LexicalComposer,{initialConfig:i,children:[x.jsx(mA,{}),x.jsx(HA,{onEditor:t}),x.jsx(XP.RichTextPlugin,{contentEditable:x.jsx("div",{className:"font-sans border-b text-primary border-highlight",style:{minHeight:n!=null&&n.innerHeight?(n==null?void 0:n.innerHeight)-ZA:void 0},children:x.jsx(hA,{className:"p-4 outline-none bg-fill"})}),placeholder:x.jsx("div",{className:"",children:"Enter some text..."}),ErrorBoundary:rP}),x.jsx(dA.LinkPlugin,{}),x.jsx(NA,{}),x.jsx(tA.ListPlugin,{}),x.jsx(gA,{}),x.jsx(fP.HistoryPlugin,{})]})};var YA={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 XA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kn=(e,t)=>{const n=p.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:l,children:s,...a},u)=>p.createElement("svg",{ref:u,...YA,width:i,height:i,stroke:r,strokeWidth:l?Number(o)*24/Number(i):o,className:`lucide lucide-${XA(e)}`,...a},[...t.map(([c,d])=>p.createElement(c,d)),...(Array.isArray(s)?s:[s])||[]]));return n.displayName=`${e}`,n},QA=Kn("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),kC=Kn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),JA=Kn("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Ex=Kn("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"}]]),qA=Kn("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"}]]),e5=Kn("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"}]]),t5=Kn("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),n5=Kn("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]),r5=Kn("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]),i5=Kn("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]),o5=Kn("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),l5=Kn("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"}]]),s5=Kn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Lv="p-1 border rounded-full shadow border-accent",Cx="valbuild:urlBeforeNavigation";function a5({api:e,patches:t,onCommit:n}){const{theme:r,setTheme:i,editMode:o,setEditMode:l,session:s}=Av();if(s.status==="success"&&s.data.mode==="unauthorized")return x.jsxs(kx,{href:e.getLoginUrl(window.location.href),children:[x.jsx("span",{children:"Login"}),x.jsx(Ex,{size:18})]});if(s.status==="success"&&!s.data.enabled)return x.jsxs(kx,{href:e.getEnableUrl(window.location.href),children:[x.jsx("span",{children:"Enable"}),x.jsx(Ex,{size:18})]});const[a,u]=p.useState();return p.useEffect(()=>{let c=0;for(const d in t)c+=t[d].length;u(c)},[t]),x.jsxs(u5,{children:[x.jsx(wc,{active:o==="hover",onClick:()=>{l(c=>c==="hover"?"off":"hover")},children:x.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:o==="hover"?x.jsx(n5,{size:18}):x.jsx(r5,{size:18})})}),x.jsx(wc,{onClick:()=>{i(r==="dark"?"light":"dark")},children:x.jsxs("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:[r==="dark"&&x.jsx(l5,{size:15}),r==="light"&&x.jsx(t5,{size:15})]})}),x.jsx(wc,{active:o==="full",onClick:()=>{if(o!=="full")localStorage.setItem(Cx,window.location.href),window.location.href=e.getEditUrl();else if(o==="full"){const c=localStorage.getItem(Cx);window.location.href=c||"/"}},children:x.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:o==="full"?x.jsx(e5,{size:15}):x.jsx(qA,{size:15})})}),a!==void 0&&s.status==="success"&&s.data.mode==="proxy"&&x.jsx(wc,{onClick:()=>{a>0?e.postCommit({patches:t}).then(c=>{jo.isErr(c)?(console.error(c.error),alert("Could not commit patches: "+c.error.message)):(console.log("Committed patches: ",c.value),n())}):alert("No patches to commit")},children:x.jsxs("div",{className:"relative h-[24px] w-[24px] flex justify-center items-center",children:[x.jsx("div",{className:"absolute -right-[10px] -top-[10px] border border-border rounded-full px-1 font-sans text-xs bg-card text-accent",children:a}),x.jsx(o5,{size:18})]})}),x.jsx("a",{className:Lv,href:e.getDisableUrl(window.location.href),children:x.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:x.jsx(i5,{size:18})})})]})}function kx({href:e,children:t}){return x.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:x.jsx("a",{className:Lv,href:e,children:x.jsx("div",{className:"flex items-center justify-center px-2 gap-x-2",children:t})})})}function u5({children:e}){return x.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 wc({active:e,onClick:t,children:n}){return x.jsx("button",{className:wf(Lv,{"bg-accent drop-shadow-[0px_0px_12px_rgba(56,205,152,0.60)]":e}),onClick:t,children:n})}function c5(e,t){const[n,r]=p.useState({}),[i,o]=p.useState(0);return p.useEffect(()=>{e.status==="success"&&e.data.mode==="proxy"&&t.getPatches({}).then(l=>{if(jo.isOk(l)){const s={};for(const a in l.value)s[a]=l.value[a].map(u=>u.patch_id);r(s)}else console.error("Could not load patches",l.error)})},[e,i]),{patches:n,setPatchResetId:o}}function d5(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=i=>{localStorage.getItem("val-theme")||n(i.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)}]}var Ie;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const l of i)o[l]=l;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),l={};for(const s of o)l[s]=i[s];return e.objectValues(l)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const l in i)Object.prototype.hasOwnProperty.call(i,l)&&o.push(l);return o},e.find=(i,o)=>{for(const l of i)if(o(l))return l},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(l=>typeof l=="string"?`'${l}'`:l).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(Ie||(Ie={}));var Dm;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Dm||(Dm={}));const Q=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zi=e=>{switch(typeof e){case"undefined":return Q.undefined;case"string":return Q.string;case"number":return isNaN(e)?Q.nan:Q.number;case"boolean":return Q.boolean;case"function":return Q.function;case"bigint":return Q.bigint;case"symbol":return Q.symbol;case"object":return Array.isArray(e)?Q.array:e===null?Q.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Q.promise:typeof Map<"u"&&e instanceof Map?Q.map:typeof Set<"u"&&e instanceof Set?Q.set:typeof Date<"u"&&e instanceof Date?Q.date:Q.object;default:return Q.unknown}},W=Ie.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),f5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Er extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const l of o.issues)if(l.code==="invalid_union")l.unionErrors.map(i);else if(l.code==="invalid_return_type")i(l.returnTypeError);else if(l.code==="invalid_arguments")i(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let s=r,a=0;for(;a<l.path.length;){const u=l.path[a];a===l.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(n(l))):s[u]=s[u]||{_errors:[]},s=s[u],a++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Er.create=e=>new Er(e);const uu=(e,t)=>{let n;switch(e.code){case W.invalid_type:e.received===Q.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case W.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ie.jsonStringifyReplacer)}`;break;case W.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ie.joinValues(e.keys,", ")}`;break;case W.invalid_union:n="Invalid input";break;case W.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ie.joinValues(e.options)}`;break;case W.invalid_enum_value:n=`Invalid enum value. Expected ${Ie.joinValues(e.options)}, received '${e.received}'`;break;case W.invalid_arguments:n="Invalid function arguments";break;case W.invalid_return_type:n="Invalid function return type";break;case W.invalid_date:n="Invalid date";break;case W.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ie.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case W.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case W.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case W.custom:n="Invalid input";break;case W.invalid_intersection_types:n="Intersection results could not be merged";break;case W.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case W.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ie.assertNever(e)}return{message:n}};let $C=uu;function h5(e){$C=e}function Fd(){return $C}const Bd=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],l={...i,path:o};let s="";const a=r.filter(u=>!!u).slice().reverse();for(const u of a)s=u(l,{data:t,defaultError:s}).message;return{...i,path:o,message:i.message||s}},p5=[];function q(e,t){const n=Bd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Fd(),uu].filter(r=>!!r)});e.common.issues.push(n)}class on{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return ge;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return on.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:l}=i;if(o.status==="aborted"||l.status==="aborted")return ge;o.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof l.value<"u"||i.alwaysSet)&&(r[o.value]=l.value)}return{status:t.value,value:r}}}const ge=Object.freeze({status:"aborted"}),bC=e=>({status:"dirty",value:e}),yn=e=>({status:"valid",value:e}),Im=e=>e.status==="aborted",Lm=e=>e.status==="dirty",cu=e=>e.status==="valid",Ud=e=>typeof Promise<"u"&&e instanceof Promise;var ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ce||(ce={}));class Hr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const $x=(e,t)=>{if(cu(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Er(e.common.issues);return this._error=n,this._error}}};function _e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(l,s)=>l.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}class Ce{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return zi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:zi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new on,ctx:{common:t.parent.common,data:t.data,parsedType:zi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ud(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zi(t)},o=this._parseSync({data:t,path:i.path,parent:i});return $x(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zi(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(Ud(i)?i:Promise.resolve(i));return $x(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const l=t(i),s=()=>o.addIssue({code:W.custom,...r(i)});return typeof Promise<"u"&&l instanceof Promise?l.then(a=>a?!0:(s(),!1)):l?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new br({schema:this,typeName:de.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return ci.create(this,this._def)}nullable(){return el.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Cr.create(this,this._def)}promise(){return ps.create(this,this._def)}or(t){return pu.create([this,t],this._def)}and(t){return mu.create(this,t,this._def)}transform(t){return new br({..._e(this._def),schema:this,typeName:de.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new _u({..._e(this._def),innerType:this,defaultValue:n,typeName:de.ZodDefault})}brand(){return new NC({typeName:de.ZodBranded,type:this,..._e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Kd({..._e(this._def),innerType:this,catchValue:n,typeName:de.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Fu.create(this,t)}readonly(){return Gd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const m5=/^c[^\s-]{8,}$/i,g5=/^[a-z][a-z0-9]*$/,v5=/^[0-9A-HJKMNP-TV-Z]{26}$/,y5=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,x5=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Fh;const w5=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,S5=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,E5=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function C5(e,t){return!!((t==="v4"||!t)&&w5.test(e)||(t==="v6"||!t)&&S5.test(e))}class _r extends Ce{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Q.string){const o=this._getOrReturnCtx(t);return q(o,{code:W.invalid_type,expected:Q.string,received:o.parsedType}),ge}const r=new on;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),q(i,{code:W.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),q(i,{code:W.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const l=t.data.length>o.value,s=t.data.length<o.value;(l||s)&&(i=this._getOrReturnCtx(t,i),l?q(i,{code:W.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&q(i,{code:W.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")x5.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"email",code:W.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Fh||(Fh=new RegExp(_5,"u")),Fh.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"emoji",code:W.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")y5.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"uuid",code:W.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")m5.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"cuid",code:W.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")g5.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"cuid2",code:W.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")v5.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"ulid",code:W.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),q(i,{validation:"url",code:W.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"regex",code:W.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),q(i,{code:W.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),q(i,{code:W.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),q(i,{code:W.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?E5(o).test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{code:W.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?C5(t.data,o.version)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"ip",code:W.invalid_string,message:o.message}),r.dirty()):Ie.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:W.invalid_string,...ce.errToObj(r)})}_addCheck(t){return new _r({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ce.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...ce.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ce.errToObj(n)})}nonempty(t){return this.min(1,ce.errToObj(t))}trim(){return new _r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}_r.create=e=>{var t;return new _r({checks:[],typeName:de.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};function k5(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),l=parseInt(t.toFixed(i).replace(".",""));return o%l/Math.pow(10,i)}class ao extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Q.number){const o=this._getOrReturnCtx(t);return q(o,{code:W.invalid_type,expected:Q.number,received:o.parsedType}),ge}let r;const i=new on;for(const o of this._def.checks)o.kind==="int"?Ie.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),q(r,{code:W.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),q(r,{code:W.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),q(r,{code:W.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?k5(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),q(r,{code:W.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),q(r,{code:W.not_finite,message:o.message}),i.dirty()):Ie.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,i){return new ao({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(i)}]})}_addCheck(t){return new ao({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ie.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ao.create=e=>new ao({checks:[],typeName:de.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class uo extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Q.bigint){const o=this._getOrReturnCtx(t);return q(o,{code:W.invalid_type,expected:Q.bigint,received:o.parsedType}),ge}let r;const i=new on;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),q(r,{code:W.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),q(r,{code:W.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),q(r,{code:W.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Ie.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,i){return new uo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(i)}]})}_addCheck(t){return new uo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}uo.create=e=>{var t;return new uo({checks:[],typeName:de.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,..._e(e)})};class du extends Ce{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Q.boolean){const r=this._getOrReturnCtx(t);return q(r,{code:W.invalid_type,expected:Q.boolean,received:r.parsedType}),ge}return yn(t.data)}}du.create=e=>new du({typeName:de.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,..._e(e)});class Jo extends Ce{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Q.date){const o=this._getOrReturnCtx(t);return q(o,{code:W.invalid_type,expected:Q.date,received:o.parsedType}),ge}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return q(o,{code:W.invalid_date}),ge}const r=new on;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),q(i,{code:W.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),q(i,{code:W.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ie.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Jo({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ce.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Jo.create=e=>new Jo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:de.ZodDate,..._e(e)});class Wd extends Ce{_parse(t){if(this._getType(t)!==Q.symbol){const r=this._getOrReturnCtx(t);return q(r,{code:W.invalid_type,expected:Q.symbol,received:r.parsedType}),ge}return yn(t.data)}}Wd.create=e=>new Wd({typeName:de.ZodSymbol,..._e(e)});class fu extends Ce{_parse(t){if(this._getType(t)!==Q.undefined){const r=this._getOrReturnCtx(t);return q(r,{code:W.invalid_type,expected:Q.undefined,received:r.parsedType}),ge}return yn(t.data)}}fu.create=e=>new fu({typeName:de.ZodUndefined,..._e(e)});class hu extends Ce{_parse(t){if(this._getType(t)!==Q.null){const r=this._getOrReturnCtx(t);return q(r,{code:W.invalid_type,expected:Q.null,received:r.parsedType}),ge}return yn(t.data)}}hu.create=e=>new hu({typeName:de.ZodNull,..._e(e)});class hs extends Ce{constructor(){super(...arguments),this._any=!0}_parse(t){return yn(t.data)}}hs.create=e=>new hs({typeName:de.ZodAny,..._e(e)});class Uo extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(t){return yn(t.data)}}Uo.create=e=>new Uo({typeName:de.ZodUnknown,..._e(e)});class mi extends Ce{_parse(t){const n=this._getOrReturnCtx(t);return q(n,{code:W.invalid_type,expected:Q.never,received:n.parsedType}),ge}}mi.create=e=>new mi({typeName:de.ZodNever,..._e(e)});class Vd extends Ce{_parse(t){if(this._getType(t)!==Q.undefined){const r=this._getOrReturnCtx(t);return q(r,{code:W.invalid_type,expected:Q.void,received:r.parsedType}),ge}return yn(t.data)}}Vd.create=e=>new Vd({typeName:de.ZodVoid,..._e(e)});class Cr extends Ce{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Q.array)return q(n,{code:W.invalid_type,expected:Q.array,received:n.parsedType}),ge;if(i.exactLength!==null){const l=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(l||s)&&(q(n,{code:l?W.too_big:W.too_small,minimum:s?i.exactLength.value:void 0,maximum:l?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(q(n,{code:W.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(q(n,{code:W.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,s)=>i.type._parseAsync(new Hr(n,l,n.path,s)))).then(l=>on.mergeArray(r,l));const o=[...n.data].map((l,s)=>i.type._parseSync(new Hr(n,l,n.path,s)));return on.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Cr({...this._def,minLength:{value:t,message:ce.toString(n)}})}max(t,n){return new Cr({...this._def,maxLength:{value:t,message:ce.toString(n)}})}length(t,n){return new Cr({...this._def,exactLength:{value:t,message:ce.toString(n)}})}nonempty(t){return this.min(1,t)}}Cr.create=(e,t)=>new Cr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:de.ZodArray,..._e(t)});function kl(e){if(e instanceof ct){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ci.create(kl(r))}return new ct({...e._def,shape:()=>t})}else return e instanceof Cr?new Cr({...e._def,type:kl(e.element)}):e instanceof ci?ci.create(kl(e.unwrap())):e instanceof el?el.create(kl(e.unwrap())):e instanceof Kr?Kr.create(e.items.map(t=>kl(t))):e}class ct extends Ce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ie.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Q.object){const u=this._getOrReturnCtx(t);return q(u,{code:W.invalid_type,expected:Q.object,received:u.parsedType}),ge}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:l}=this._getCached(),s=[];if(!(this._def.catchall instanceof mi&&this._def.unknownKeys==="strip"))for(const u in i.data)l.includes(u)||s.push(u);const a=[];for(const u of l){const c=o[u],d=i.data[u];a.push({key:{status:"valid",value:u},value:c._parse(new Hr(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof mi){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of s)a.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")s.length>0&&(q(i,{code:W.unrecognized_keys,keys:s}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of s){const d=i.data[c];a.push({key:{status:"valid",value:c},value:u._parse(new Hr(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of a){const d=await c.key;u.push({key:d,value:await c.value,alwaysSet:c.alwaysSet})}return u}).then(u=>on.mergeObjectSync(r,u)):on.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(t){return ce.errToObj,new ct({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,l,s;const a=(l=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&l!==void 0?l:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ce.errToObj(t).message)!==null&&s!==void 0?s:a}:{message:a}}}:{}})}strip(){return new ct({...this._def,unknownKeys:"strip"})}passthrough(){return new ct({...this._def,unknownKeys:"passthrough"})}extend(t){return new ct({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ct({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:de.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ct({...this._def,catchall:t})}pick(t){const n={};return Ie.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ct({...this._def,shape:()=>n})}omit(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ct({...this._def,shape:()=>n})}deepPartial(){return kl(this)}partial(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new ct({...this._def,shape:()=>n})}required(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof ci;)o=o._def.innerType;n[r]=o}}),new ct({...this._def,shape:()=>n})}keyof(){return TC(Ie.objectKeys(this.shape))}}ct.create=(e,t)=>new ct({shape:()=>e,unknownKeys:"strip",catchall:mi.create(),typeName:de.ZodObject,..._e(t)});ct.strictCreate=(e,t)=>new ct({shape:()=>e,unknownKeys:"strict",catchall:mi.create(),typeName:de.ZodObject,..._e(t)});ct.lazycreate=(e,t)=>new ct({shape:e,unknownKeys:"strip",catchall:mi.create(),typeName:de.ZodObject,..._e(t)});class pu extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const l=o.map(s=>new Er(s.ctx.common.issues));return q(n,{code:W.invalid_union,unionErrors:l}),ge}if(n.common.async)return Promise.all(r.map(async o=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(i);{let o;const l=[];for(const a of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=a._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:u}),u.common.issues.length&&l.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=l.map(a=>new Er(a));return q(n,{code:W.invalid_union,unionErrors:s}),ge}}get options(){return this._def.options}}pu.create=(e,t)=>new pu({options:e,typeName:de.ZodUnion,..._e(t)});const Hc=e=>e instanceof vu?Hc(e.schema):e instanceof br?Hc(e.innerType()):e instanceof yu?[e.value]:e instanceof co?e.options:e instanceof xu?Object.keys(e.enum):e instanceof _u?Hc(e._def.innerType):e instanceof fu?[void 0]:e instanceof hu?[null]:null;class Lf extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Q.object)return q(n,{code:W.invalid_type,expected:Q.object,received:n.parsedType}),ge;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(q(n,{code:W.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ge)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const l=Hc(o.shape[t]);if(!l)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of l){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new Lf({typeName:de.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,..._e(r)})}}function jm(e,t){const n=zi(e),r=zi(t);if(e===t)return{valid:!0,data:e};if(n===Q.object&&r===Q.object){const i=Ie.objectKeys(t),o=Ie.objectKeys(e).filter(s=>i.indexOf(s)!==-1),l={...e,...t};for(const s of o){const a=jm(e[s],t[s]);if(!a.valid)return{valid:!1};l[s]=a.data}return{valid:!0,data:l}}else if(n===Q.array&&r===Q.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const l=e[o],s=t[o],a=jm(l,s);if(!a.valid)return{valid:!1};i.push(a.data)}return{valid:!0,data:i}}else return n===Q.date&&r===Q.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class mu extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,l)=>{if(Im(o)||Im(l))return ge;const s=jm(o.value,l.value);return s.valid?((Lm(o)||Lm(l))&&n.dirty(),{status:n.value,value:s.data}):(q(r,{code:W.invalid_intersection_types}),ge)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,l])=>i(o,l)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}mu.create=(e,t,n)=>new mu({left:e,right:t,typeName:de.ZodIntersection,..._e(n)});class Kr extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Q.array)return q(r,{code:W.invalid_type,expected:Q.array,received:r.parsedType}),ge;if(r.data.length<this._def.items.length)return q(r,{code:W.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ge;!this._def.rest&&r.data.length>this._def.items.length&&(q(r,{code:W.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((l,s)=>{const a=this._def.items[s]||this._def.rest;return a?a._parse(new Hr(r,l,r.path,s)):null}).filter(l=>!!l);return r.common.async?Promise.all(o).then(l=>on.mergeArray(n,l)):on.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Kr({...this._def,rest:t})}}Kr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Kr({items:e,typeName:de.ZodTuple,rest:null,..._e(t)})};class gu extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Q.object)return q(r,{code:W.invalid_type,expected:Q.object,received:r.parsedType}),ge;const i=[],o=this._def.keyType,l=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new Hr(r,s,r.path,s)),value:l._parse(new Hr(r,r.data[s],r.path,s))});return r.common.async?on.mergeObjectAsync(n,i):on.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ce?new gu({keyType:t,valueType:n,typeName:de.ZodRecord,..._e(r)}):new gu({keyType:_r.create(),valueType:t,typeName:de.ZodRecord,..._e(n)})}}class Hd extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Q.map)return q(r,{code:W.invalid_type,expected:Q.map,received:r.parsedType}),ge;const i=this._def.keyType,o=this._def.valueType,l=[...r.data.entries()].map(([s,a],u)=>({key:i._parse(new Hr(r,s,r.path,[u,"key"])),value:o._parse(new Hr(r,a,r.path,[u,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const a of l){const u=await a.key,c=await a.value;if(u.status==="aborted"||c.status==="aborted")return ge;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const a of l){const u=a.key,c=a.value;if(u.status==="aborted"||c.status==="aborted")return ge;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}}}}Hd.create=(e,t,n)=>new Hd({valueType:t,keyType:e,typeName:de.ZodMap,..._e(n)});class qo extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Q.set)return q(r,{code:W.invalid_type,expected:Q.set,received:r.parsedType}),ge;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(q(r,{code:W.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(q(r,{code:W.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function l(a){const u=new Set;for(const c of a){if(c.status==="aborted")return ge;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const s=[...r.data.values()].map((a,u)=>o._parse(new Hr(r,a,r.path,u)));return r.common.async?Promise.all(s).then(a=>l(a)):l(s)}min(t,n){return new qo({...this._def,minSize:{value:t,message:ce.toString(n)}})}max(t,n){return new qo({...this._def,maxSize:{value:t,message:ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}qo.create=(e,t)=>new qo({valueType:e,minSize:null,maxSize:null,typeName:de.ZodSet,..._e(t)});class Ql extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Q.function)return q(n,{code:W.invalid_type,expected:Q.function,received:n.parsedType}),ge;function r(s,a){return Bd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Fd(),uu].filter(u=>!!u),issueData:{code:W.invalid_arguments,argumentsError:a}})}function i(s,a){return Bd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Fd(),uu].filter(u=>!!u),issueData:{code:W.invalid_return_type,returnTypeError:a}})}const o={errorMap:n.common.contextualErrorMap},l=n.data;if(this._def.returns instanceof ps){const s=this;return yn(async function(...a){const u=new Er([]),c=await s._def.args.parseAsync(a,o).catch(h=>{throw u.addIssue(r(a,h)),u}),d=await Reflect.apply(l,this,c);return await s._def.returns._def.type.parseAsync(d,o).catch(h=>{throw u.addIssue(i(d,h)),u})})}else{const s=this;return yn(function(...a){const u=s._def.args.safeParse(a,o);if(!u.success)throw new Er([r(a,u.error)]);const c=Reflect.apply(l,this,u.data),d=s._def.returns.safeParse(c,o);if(!d.success)throw new Er([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ql({...this._def,args:Kr.create(t).rest(Uo.create())})}returns(t){return new Ql({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ql({args:t||Kr.create([]).rest(Uo.create()),returns:n||Uo.create(),typeName:de.ZodFunction,..._e(r)})}}class vu extends Ce{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}vu.create=(e,t)=>new vu({getter:e,typeName:de.ZodLazy,..._e(t)});class yu extends Ce{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return q(n,{received:n.data,code:W.invalid_literal,expected:this._def.value}),ge}return{status:"valid",value:t.data}}get value(){return this._def.value}}yu.create=(e,t)=>new yu({value:e,typeName:de.ZodLiteral,..._e(t)});function TC(e,t){return new co({values:e,typeName:de.ZodEnum,..._e(t)})}class co extends Ce{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return q(n,{expected:Ie.joinValues(r),received:n.parsedType,code:W.invalid_type}),ge}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return q(n,{received:n.data,code:W.invalid_enum_value,options:r}),ge}return yn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return co.create(t)}exclude(t){return co.create(this.options.filter(n=>!t.includes(n)))}}co.create=TC;class xu extends Ce{_parse(t){const n=Ie.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Q.string&&r.parsedType!==Q.number){const i=Ie.objectValues(n);return q(r,{expected:Ie.joinValues(i),received:r.parsedType,code:W.invalid_type}),ge}if(n.indexOf(t.data)===-1){const i=Ie.objectValues(n);return q(r,{received:r.data,code:W.invalid_enum_value,options:i}),ge}return yn(t.data)}get enum(){return this._def.values}}xu.create=(e,t)=>new xu({values:e,typeName:de.ZodNativeEnum,..._e(t)});class ps extends Ce{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Q.promise&&n.common.async===!1)return q(n,{code:W.invalid_type,expected:Q.promise,received:n.parsedType}),ge;const r=n.parsedType===Q.promise?n.data:Promise.resolve(n.data);return yn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ps.create=(e,t)=>new ps({type:e,typeName:de.ZodPromise,..._e(t)});class br extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===de.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:l=>{q(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const l=i.transform(r.data,o);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(l).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:l,path:r.path,parent:r})}if(i.type==="refinement"){const l=s=>{const a=i.refinement(s,o);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ge:(s.status==="dirty"&&n.dirty(),l(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?ge:(s.status==="dirty"&&n.dirty(),l(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!cu(l))return l;const s=i.transform(l.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>cu(l)?Promise.resolve(i.transform(l.value,o)).then(s=>({status:n.value,value:s})):l);Ie.assertNever(i)}}br.create=(e,t,n)=>new br({schema:e,typeName:de.ZodEffects,effect:t,..._e(n)});br.createWithPreprocess=(e,t,n)=>new br({schema:t,effect:{type:"preprocess",transform:e},typeName:de.ZodEffects,..._e(n)});class ci extends Ce{_parse(t){return this._getType(t)===Q.undefined?yn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ci.create=(e,t)=>new ci({innerType:e,typeName:de.ZodOptional,..._e(t)});class el extends Ce{_parse(t){return this._getType(t)===Q.null?yn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}el.create=(e,t)=>new el({innerType:e,typeName:de.ZodNullable,..._e(t)});class _u extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Q.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}_u.create=(e,t)=>new _u({innerType:e,typeName:de.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,..._e(t)});class Kd extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ud(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Er(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Er(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Kd.create=(e,t)=>new Kd({innerType:e,typeName:de.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,..._e(t)});class Zd extends Ce{_parse(t){if(this._getType(t)!==Q.nan){const r=this._getOrReturnCtx(t);return q(r,{code:W.invalid_type,expected:Q.nan,received:r.parsedType}),ge}return{status:"valid",value:t.data}}}Zd.create=e=>new Zd({typeName:de.ZodNaN,..._e(e)});const $5=Symbol("zod_brand");class NC extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Fu extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ge:o.status==="dirty"?(n.dirty(),bC(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ge:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new Fu({in:t,out:n,typeName:de.ZodPipeline})}}class Gd extends Ce{_parse(t){const n=this._def.innerType._parse(t);return cu(n)&&(n.value=Object.freeze(n.value)),n}}Gd.create=(e,t)=>new Gd({innerType:e,typeName:de.ZodReadonly,..._e(t)});const RC=(e,t={},n)=>e?hs.create().superRefine((r,i)=>{var o,l;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,a=(l=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&l!==void 0?l:!0,u=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...u,fatal:a})}}):hs.create(),b5={object:ct.lazycreate};var de;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(de||(de={}));const T5=(e,t={message:`Input not instance of ${e.name}`})=>RC(n=>n instanceof e,t),OC=_r.create,PC=ao.create,N5=Zd.create,R5=uo.create,AC=du.create,O5=Jo.create,P5=Wd.create,A5=fu.create,M5=hu.create,D5=hs.create,I5=Uo.create,L5=mi.create,j5=Vd.create,z5=Cr.create,F5=ct.create,B5=ct.strictCreate,U5=pu.create,W5=Lf.create,V5=mu.create,H5=Kr.create,K5=gu.create,Z5=Hd.create,G5=qo.create,Y5=Ql.create,X5=vu.create,Q5=yu.create,J5=co.create,q5=xu.create,e3=ps.create,bx=br.create,t3=ci.create,n3=el.create,r3=br.createWithPreprocess,i3=Fu.create,o3=()=>OC().optional(),l3=()=>PC().optional(),s3=()=>AC().optional(),a3={string:e=>_r.create({...e,coerce:!0}),number:e=>ao.create({...e,coerce:!0}),boolean:e=>du.create({...e,coerce:!0}),bigint:e=>uo.create({...e,coerce:!0}),date:e=>Jo.create({...e,coerce:!0})},u3=ge;var Cn=Object.freeze({__proto__:null,defaultErrorMap:uu,setErrorMap:h5,getErrorMap:Fd,makeIssue:Bd,EMPTY_PATH:p5,addIssueToContext:q,ParseStatus:on,INVALID:ge,DIRTY:bC,OK:yn,isAborted:Im,isDirty:Lm,isValid:cu,isAsync:Ud,get util(){return Ie},get objectUtil(){return Dm},ZodParsedType:Q,getParsedType:zi,ZodType:Ce,ZodString:_r,ZodNumber:ao,ZodBigInt:uo,ZodBoolean:du,ZodDate:Jo,ZodSymbol:Wd,ZodUndefined:fu,ZodNull:hu,ZodAny:hs,ZodUnknown:Uo,ZodNever:mi,ZodVoid:Vd,ZodArray:Cr,ZodObject:ct,ZodUnion:pu,ZodDiscriminatedUnion:Lf,ZodIntersection:mu,ZodTuple:Kr,ZodRecord:gu,ZodMap:Hd,ZodSet:qo,ZodFunction:Ql,ZodLazy:vu,ZodLiteral:yu,ZodEnum:co,ZodNativeEnum:xu,ZodPromise:ps,ZodEffects:br,ZodTransformer:br,ZodOptional:ci,ZodNullable:el,ZodDefault:_u,ZodCatch:Kd,ZodNaN:Zd,BRAND:$5,ZodBranded:NC,ZodPipeline:Fu,ZodReadonly:Gd,custom:RC,Schema:Ce,ZodSchema:Ce,late:b5,get ZodFirstPartyTypeKind(){return de},coerce:a3,any:D5,array:z5,bigint:R5,boolean:AC,date:O5,discriminatedUnion:W5,effect:bx,enum:J5,function:Y5,instanceof:T5,intersection:V5,lazy:X5,literal:Q5,map:Z5,nan:N5,nativeEnum:q5,never:L5,null:M5,nullable:n3,number:PC,object:F5,oboolean:s3,onumber:l3,optional:t3,ostring:o3,pipeline:i3,preprocess:r3,promise:e3,record:K5,set:G5,strictObject:B5,string:OC,symbol:P5,transformer:bx,tuple:H5,undefined:A5,union:U5,unknown:I5,void:j5,NEVER:u3,ZodIssueCode:W,quotelessJson:f5,ZodError:Er});const c3=Cn.union([Cn.object({id:Cn.string(),mode:Cn.literal("proxy"),full_name:Cn.string().optional().nullable(),username:Cn.string().optional().nullable(),avatar_url:Cn.string().url().optional().nullable(),enabled:Cn.boolean()}),Cn.object({mode:Cn.literal("local"),enabled:Cn.boolean().optional()}),Cn.object({mode:Cn.literal("unauthorized"),enabled:Cn.boolean().optional()})]);function d3(e){const[t,n]=p.useState({status:"not-asked"}),[r,i]=p.useState(0);return p.useEffect(()=>{n({status:"loading"}),e.getSession().then(async o=>{try{if(jo.isOk(o)){const l=o.value;n({status:"success",data:c3.parse(l)})}else o.error.statusCode===401?n({status:"success",data:{mode:"unauthorized"}}):r<3?setTimeout(()=>{i(r+1)},200*r):n({status:"error",error:"Could not fetch session"})}catch(l){console.error("Could not authorize:",l),n({status:"error",error:"Got an error while trying to get session"})}})},[r]),t}const Tx=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Nx=uS,f3=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Nx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=o==null?void 0:o[u];if(c===null)return null;const f=Tx(c)||Tx(d);return i[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({...o,...s}[g]):{...o,...s}[g]===S})?[...u,d,f]:u},[]);return Nx(e,l,a,n==null?void 0:n.class,n==null?void 0:n.className)},h3=f3("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"}}),MC=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const l=r?as:"button";return x.jsx(l,{className:xt(h3({variant:t,size:n,className:e})),ref:o,...i})});MC.displayName="Button";const jv=p.forwardRef(({className:e,type:t,...n},r)=>x.jsx("input",{type:t,className:xt("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}));jv.displayName="Input";function DC(e){const t=e+"CollectionProvider",[n,r]=ol(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=h=>{const{scope:m,children:g}=h,S=re.useRef(null),v=re.useRef(new Map).current;return re.createElement(i,{scope:m,itemMap:v,collectionRef:S},g)},s=e+"CollectionSlot",a=re.forwardRef((h,m)=>{const{scope:g,children:S}=h,v=o(s,g),y=st(m,v.collectionRef);return re.createElement(as,{ref:y},S)}),u=e+"CollectionItemSlot",c="data-radix-collection-item",d=re.forwardRef((h,m)=>{const{scope:g,children:S,...v}=h,y=re.useRef(null),_=st(m,y),w=o(u,g);return re.useEffect(()=>(w.itemMap.set(y,{ref:y,...v}),()=>void w.itemMap.delete(y))),re.createElement(as,{[c]:"",ref:_},S)});function f(h){const m=o(e+"CollectionConsumer",h);return re.useCallback(()=>{const S=m.collectionRef.current;if(!S)return[];const v=Array.from(S.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((w,E)=>v.indexOf(w.ref.current)-v.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:l,Slot:a,ItemSlot:d},f,r]}function p3(e,t=globalThis==null?void 0:globalThis.document){const n=en(e);p.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const zm="dismissableLayer.update",m3="dismissableLayer.pointerDownOutside",g3="dismissableLayer.focusOutside";let Rx;const v3=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),y3=p.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:s,onDismiss:a,...u}=e,c=p.useContext(v3),[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=st(t,T=>f(T)),S=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=S.indexOf(v),_=d?S.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,E=_>=y,$=x3(T=>{const N=T.target,R=[...c.branches].some(D=>D.contains(N));!E||R||(o==null||o(T),s==null||s(T),T.defaultPrevented||a==null||a())},h),C=_3(T=>{const N=T.target;[...c.branches].some(D=>D.contains(N))||(l==null||l(T),s==null||s(T),T.defaultPrevented||a==null||a())},h);return p3(T=>{_===c.layers.size-1&&(i==null||i(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},h),p.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Rx=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Ox(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Rx)}},[d,h,r,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Ox())},[d,c]),p.useEffect(()=>{const T=()=>m({});return document.addEventListener(zm,T),()=>document.removeEventListener(zm,T)},[]),p.createElement(Ke.div,ie({},u,{ref:g,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:nt(e.onFocusCapture,C.onFocusCapture),onBlurCapture:nt(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:nt(e.onPointerDownCapture,$.onPointerDownCapture)}))});function x3(e,t=globalThis==null?void 0:globalThis.document){const n=en(e),r=p.useRef(!1),i=p.useRef(()=>{});return p.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let c=function(){IC(m3,n,u,{discrete:!0})};var a=c;const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function _3(e,t=globalThis==null?void 0:globalThis.document){const n=en(e),r=p.useRef(!1);return p.useEffect(()=>{const i=o=>{o.target&&!r.current&&IC(g3,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ox(){const e=new CustomEvent(zm);document.dispatchEvent(e)}function IC(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?qN(i,o):i.dispatchEvent(o)}let Bh=0;function w3(){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:Px()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Px()),Bh++,()=>{Bh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Bh--}},[])}function Px(){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 Uh="focusScope.autoFocusOnMount",Wh="focusScope.autoFocusOnUnmount",Ax={bubbles:!1,cancelable:!0},S3=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[s,a]=p.useState(null),u=en(i),c=en(o),d=p.useRef(null),f=st(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($){if(h.paused||!s)return;const C=$.target;s.contains(C)?d.current=C:Oi(d.current,{select:!0})},_=function($){if(h.paused||!s)return;const C=$.relatedTarget;C!==null&&(s.contains(C)||Oi(d.current,{select:!0}))},w=function($){if(document.activeElement===document.body)for(const T of $)T.removedNodes.length>0&&Oi(s)};var g=y,S=_,v=w;document.addEventListener("focusin",y),document.addEventListener("focusout",_);const E=new MutationObserver(w);return s&&E.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",_),E.disconnect()}}},[r,s,h.paused]),p.useEffect(()=>{if(s){Dx.add(h);const g=document.activeElement;if(!s.contains(g)){const v=new CustomEvent(Uh,Ax);s.addEventListener(Uh,u),s.dispatchEvent(v),v.defaultPrevented||(E3(T3(LC(s)),{select:!0}),document.activeElement===g&&Oi(s))}return()=>{s.removeEventListener(Uh,u),setTimeout(()=>{const v=new CustomEvent(Wh,Ax);s.addEventListener(Wh,c),s.dispatchEvent(v),v.defaultPrevented||Oi(g??document.body,{select:!0}),s.removeEventListener(Wh,c),Dx.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,[_,w]=C3(y);_&&w?!g.shiftKey&&v===w?(g.preventDefault(),n&&Oi(_,{select:!0})):g.shiftKey&&v===_&&(g.preventDefault(),n&&Oi(w,{select:!0})):v===y&&g.preventDefault()}},[n,r,h.paused]);return p.createElement(Ke.div,ie({tabIndex:-1},l,{ref:f,onKeyDown:m}))});function E3(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Oi(r,{select:t}),document.activeElement!==n)return}function C3(e){const t=LC(e),n=Mx(t,e),r=Mx(t.reverse(),e);return[n,r]}function LC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Mx(e,t){for(const n of e)if(!k3(n,{upTo:t}))return n}function k3(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 $3(e){return e instanceof HTMLInputElement&&"select"in e}function Oi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$3(e)&&t&&e.select()}}const Dx=b3();function b3(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ix(e,t),e.unshift(t)},remove(t){var n;e=Ix(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Ix(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function T3(e){return e.filter(t=>t.tagName!=="A")}const N3=P_.useId||(()=>{});let R3=0;function jf(e){const[t,n]=p.useState(N3());return Un(()=>{e||n(r=>r??String(R3++))},[e]),e||(t?`radix-${t}`:"")}const O3=["top","right","bottom","left"],fo=Math.min,Dn=Math.max,Yd=Math.round,Sc=Math.floor,ho=e=>({x:e,y:e}),P3={left:"right",right:"left",bottom:"top",top:"bottom"},A3={start:"end",end:"start"};function Fm(e,t,n){return Dn(e,fo(t,n))}function gi(e,t){return typeof e=="function"?e(t):e}function vi(e){return e.split("-")[0]}function Ms(e){return e.split("-")[1]}function zv(e){return e==="x"?"y":"x"}function Fv(e){return e==="y"?"height":"width"}function Ds(e){return["top","bottom"].includes(vi(e))?"y":"x"}function Bv(e){return zv(Ds(e))}function M3(e,t,n){n===void 0&&(n=!1);const r=Ms(e),i=Bv(e),o=Fv(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Xd(l)),[l,Xd(l)]}function D3(e){const t=Xd(e);return[Bm(e),t,Bm(t)]}function Bm(e){return e.replace(/start|end/g,t=>A3[t])}function I3(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:l;default:return[]}}function L3(e,t,n,r){const i=Ms(e);let o=I3(vi(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(Bm)))),o}function Xd(e){return e.replace(/left|right|bottom|top/g,t=>P3[t])}function j3(e){return{top:0,right:0,bottom:0,left:0,...e}}function jC(e){return typeof e!="number"?j3(e):{top:e,right:e,bottom:e,left:e}}function Qd(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Lx(e,t,n){let{reference:r,floating:i}=e;const o=Ds(t),l=Bv(t),s=Fv(l),a=vi(t),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let h;switch(a){case"top":h={x:c,y:r.y-i.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-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Ms(t)){case"start":h[l]-=f*(n&&u?-1:1);break;case"end":h[l]+=f*(n&&u?-1:1);break}return h}const z3=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,s=o.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=Lx(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:_,data:w,reset:E}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:l,elements:{reference:e,floating:t}});if(c=y??c,d=_??d,h={...h,[S]:{...h[S],...w}},E&&m<=50){m++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(u=E.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:c,y:d}=Lx(u,f,a)),g=-1;continue}}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function wu(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=gi(t,e),m=jC(h),S=s[f?d==="floating"?"reference":"floating":d],v=Qd(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(S)))==null||n?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:a})),y=d==="floating"?{...l.floating,x:r,y:i}:l.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),w=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},E=Qd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:_,strategy:a}):y);return{top:(v.top-E.top+m.top)/w.y,bottom:(E.bottom-v.bottom+m.bottom)/w.y,left:(v.left-E.left+m.left)/w.x,right:(E.right-v.right+m.right)/w.x}}const jx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:s,middlewareData:a}=t,{element:u,padding:c=0}=gi(e,t)||{};if(u==null)return{};const d=jC(c),f={x:n,y:r},h=Bv(i),m=Fv(h),g=await l.getDimensions(u),S=h==="y",v=S?"top":"left",y=S?"bottom":"right",_=S?"clientHeight":"clientWidth",w=o.reference[m]+o.reference[h]-f[h]-o.floating[m],E=f[h]-o.reference[h],$=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let C=$?$[_]:0;(!C||!await(l.isElement==null?void 0:l.isElement($)))&&(C=s.floating[_]||o.floating[m]);const T=w/2-E/2,N=C/2-g[m]/2-1,R=fo(d[v],N),D=fo(d[y],N),F=R,se=C-g[m]-D,V=C/2-g[m]/2+T,K=Fm(F,V,se),O=!a.arrow&&Ms(i)!=null&&V!=K&&o.reference[m]/2-(V<F?R:D)-g[m]/2<0,A=O?V<F?V-F:V-se:0;return{[h]:f[h]+A,data:{[h]:K,centerOffset:V-K-A,...O&&{alignmentOffset:A}},reset:O}}}),F3=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,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}=gi(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const v=vi(i),y=vi(s)===s,_=await(a.isRTL==null?void 0:a.isRTL(u.floating)),w=f||(y||!g?[Xd(s)]:D3(s));!f&&m!=="none"&&w.push(...L3(s,g,m,_));const E=[s,...w],$=await wu(t,S),C=[];let T=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&C.push($[v]),d){const F=M3(i,l,_);C.push($[F[0]],$[F[1]])}if(T=[...T,{placement:i,overflows:C}],!C.every(F=>F<=0)){var N,R;const F=(((N=o.flip)==null?void 0:N.index)||0)+1,se=E[F];if(se)return{data:{index:F,overflows:T},reset:{placement:se}};let V=(R=T.filter(K=>K.overflows[0]<=0).sort((K,O)=>K.overflows[1]-O.overflows[1])[0])==null?void 0:R.placement;if(!V)switch(h){case"bestFit":{var D;const K=(D=T.map(O=>[O.placement,O.overflows.filter(A=>A>0).reduce((A,k)=>A+k,0)]).sort((O,A)=>O[1]-A[1])[0])==null?void 0:D[0];K&&(V=K);break}case"initialPlacement":V=s;break}if(i!==V)return{reset:{placement:V}}}return{}}}};function zx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fx(e){return O3.some(t=>e[t]>=0)}const B3=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=gi(e,t);switch(r){case"referenceHidden":{const o=await wu(t,{...i,elementContext:"reference"}),l=zx(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Fx(l)}}}case"escaped":{const o=await wu(t,{...i,altBoundary:!0}),l=zx(o,n.floating);return{data:{escapedOffsets:l,escaped:Fx(l)}}}default:return{}}}}};async function U3(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=vi(n),s=Ms(n),a=Ds(n)==="y",u=["left","top"].includes(l)?-1:1,c=o&&a?-1:1,d=gi(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 W3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await U3(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},V3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:s={fn:S=>{let{x:v,y}=S;return{x:v,y}}},...a}=gi(e,t),u={x:n,y:r},c=await wu(t,a),d=Ds(vi(i)),f=zv(d);let h=u[f],m=u[d];if(o){const S=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+c[S],_=h-c[v];h=Fm(y,h,_)}if(l){const S=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+c[S],_=m-c[v];m=Fm(y,m,_)}const g=s.fn({...t,[f]:h,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},H3=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:s=0,mainAxis:a=!0,crossAxis:u=!0}=gi(e,t),c={x:n,y:r},d=Ds(i),f=zv(d);let h=c[f],m=c[d];const g=gi(s,t),S=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){const _=f==="y"?"height":"width",w=o.reference[f]-o.floating[_]+S.mainAxis,E=o.reference[f]+o.reference[_]-S.mainAxis;h<w?h=w:h>E&&(h=E)}if(u){var v,y;const _=f==="y"?"width":"height",w=["top","left"].includes(vi(i)),E=o.reference[d]-o.floating[_]+(w&&((v=l.offset)==null?void 0:v[d])||0)+(w?0:S.crossAxis),$=o.reference[d]+o.reference[_]+(w?0:((y=l.offset)==null?void 0:y[d])||0)-(w?S.crossAxis:0);m<E?m=E:m>$&&(m=$)}return{[f]:h,[d]:m}}}},K3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:l=()=>{},...s}=gi(e,t),a=await wu(t,s),u=vi(n),c=Ms(n),d=Ds(n)==="y",{width:f,height:h}=r.floating;let m,g;u==="top"||u==="bottom"?(m=u,g=c===(await(i.isRTL==null?void 0:i.isRTL(o.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 _=S,w=v;if(d){const $=f-a.left-a.right;w=c||y?fo(v,$):$}else{const $=h-a.top-a.bottom;_=c||y?fo(S,$):$}if(y&&!c){const $=Dn(a.left,0),C=Dn(a.right,0),T=Dn(a.top,0),N=Dn(a.bottom,0);d?w=f-2*($!==0||C!==0?$+C:Dn(a.left,a.right)):_=h-2*(T!==0||N!==0?T+N:Dn(a.top,a.bottom))}await l({...t,availableWidth:w,availableHeight:_});const E=await i.getDimensions(o.floating);return f!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function po(e){return zC(e)?(e.nodeName||"").toLowerCase():"#document"}function Fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ci(e){var t;return(t=(zC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zC(e){return e instanceof Node||e instanceof Fn(e).Node}function yi(e){return e instanceof Element||e instanceof Fn(e).Element}function Zr(e){return e instanceof HTMLElement||e instanceof Fn(e).HTMLElement}function Bx(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fn(e).ShadowRoot}function Bu(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=or(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Z3(e){return["table","td","th"].includes(po(e))}function Uv(e){const t=Wv(),n=or(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 G3(e){let t=ms(e);for(;Zr(t)&&!zf(t);){if(Uv(t))return t;t=ms(t)}return null}function Wv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zf(e){return["html","body","#document"].includes(po(e))}function or(e){return Fn(e).getComputedStyle(e)}function Ff(e){return yi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ms(e){if(po(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bx(e)&&e.host||Ci(e);return Bx(t)?t.host:t}function FC(e){const t=ms(e);return zf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zr(t)&&Bu(t)?t:FC(t)}function Su(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=FC(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Fn(i);return o?t.concat(l,l.visualViewport||[],Bu(i)?i:[],l.frameElement&&n?Su(l.frameElement):[]):t.concat(i,Su(i,[],n))}function BC(e){const t=or(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Zr(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,s=Yd(n)!==o||Yd(r)!==l;return s&&(n=o,r=l),{width:n,height:r,$:s}}function Vv(e){return yi(e)?e:e.contextElement}function Jl(e){const t=Vv(e);if(!Zr(t))return ho(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=BC(t);let l=(o?Yd(n.width):n.width)/r,s=(o?Yd(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const Y3=ho(0);function UC(e){const t=Fn(e);return!Wv()||!t.visualViewport?Y3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function X3(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fn(e)?!1:t}function tl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Vv(e);let l=ho(1);t&&(r?yi(r)&&(l=Jl(r)):l=Jl(e));const s=X3(o,n,r)?UC(o):ho(0);let a=(i.left+s.x)/l.x,u=(i.top+s.y)/l.y,c=i.width/l.x,d=i.height/l.y;if(o){const f=Fn(o),h=r&&yi(r)?Fn(r):r;let m=f.frameElement;for(;m&&r&&h!==f;){const g=Jl(m),S=m.getBoundingClientRect(),v=or(m),y=S.left+(m.clientLeft+parseFloat(v.paddingLeft))*g.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+=_,m=Fn(m).frameElement}}return Qd({width:c,height:d,x:a,y:u})}function Q3(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Zr(n),o=Ci(n);if(n===o)return t;let l={scrollLeft:0,scrollTop:0},s=ho(1);const a=ho(0);if((i||!i&&r!=="fixed")&&((po(n)!=="body"||Bu(o))&&(l=Ff(n)),Zr(n))){const u=tl(n);s=Jl(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 J3(e){return Array.from(e.getClientRects())}function WC(e){return tl(Ci(e)).left+Ff(e).scrollLeft}function q3(e){const t=Ci(e),n=Ff(e),r=e.ownerDocument.body,i=Dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+WC(e);const s=-n.scrollTop;return or(r).direction==="rtl"&&(l+=Dn(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:s}}function eM(e,t){const n=Fn(e),r=Ci(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,s=0,a=0;if(i){o=i.width,l=i.height;const u=Wv();(!u||u&&t==="fixed")&&(s=i.offsetLeft,a=i.offsetTop)}return{width:o,height:l,x:s,y:a}}function tM(e,t){const n=tl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Zr(e)?Jl(e):ho(1),l=e.clientWidth*o.x,s=e.clientHeight*o.y,a=i*o.x,u=r*o.y;return{width:l,height:s,x:a,y:u}}function Ux(e,t,n){let r;if(t==="viewport")r=eM(e,n);else if(t==="document")r=q3(Ci(e));else if(yi(t))r=tM(t,n);else{const i=UC(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Qd(r)}function VC(e,t){const n=ms(e);return n===t||!yi(n)||zf(n)?!1:or(n).position==="fixed"||VC(n,t)}function nM(e,t){const n=t.get(e);if(n)return n;let r=Su(e,[],!1).filter(s=>yi(s)&&po(s)!=="body"),i=null;const o=or(e).position==="fixed";let l=o?ms(e):e;for(;yi(l)&&!zf(l);){const s=or(l),a=Uv(l);!a&&s.position==="fixed"&&(i=null),(o?!a&&!i:!a&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Bu(l)&&!a&&VC(e,l))?r=r.filter(c=>c!==l):i=s,l=ms(l)}return t.set(e,r),r}function rM(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?nM(t,this._c):[].concat(n),r],s=l[0],a=l.reduce((u,c)=>{const d=Ux(t,c,i);return u.top=Dn(d.top,u.top),u.right=fo(d.right,u.right),u.bottom=fo(d.bottom,u.bottom),u.left=Dn(d.left,u.left),u},Ux(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function iM(e){return BC(e)}function oM(e,t,n){const r=Zr(t),i=Ci(t),o=n==="fixed",l=tl(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const a=ho(0);if(r||!r&&!o)if((po(t)!=="body"||Bu(i))&&(s=Ff(t)),r){const u=tl(t,!0,o,t);a.x=u.x+t.clientLeft,a.y=u.y+t.clientTop}else i&&(a.x=WC(i));return{x:l.left+s.scrollLeft-a.x,y:l.top+s.scrollTop-a.y,width:l.width,height:l.height}}function Wx(e,t){return!Zr(e)||or(e).position==="fixed"?null:t?t(e):e.offsetParent}function HC(e,t){const n=Fn(e);if(!Zr(e))return n;let r=Wx(e,t);for(;r&&Z3(r)&&or(r).position==="static";)r=Wx(r,t);return r&&(po(r)==="html"||po(r)==="body"&&or(r).position==="static"&&!Uv(r))?n:r||G3(e)||n}const lM=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||HC,o=this.getDimensions;return{reference:oM(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function sM(e){return or(e).direction==="rtl"}const aM={convertOffsetParentRelativeRectToViewportRelativeRect:Q3,getDocumentElement:Ci,getClippingRect:rM,getOffsetParent:HC,getElementRects:lM,getClientRects:J3,getDimensions:iM,getScale:Jl,isElement:yi,isRTL:sM};function uM(e,t){let n=null,r;const i=Ci(e);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function l(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),o();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const h=Sc(c),m=Sc(i.clientWidth-(u+d)),g=Sc(i.clientHeight-(c+f)),S=Sc(u),y={rootMargin:-h+"px "+-m+"px "+-g+"px "+-S+"px",threshold:Dn(0,fo(1,a))||1};let _=!0;function w(E){const $=E[0].intersectionRatio;if($!==a){if(!_)return l();$?l(!1,$):r=setTimeout(()=>{l(!1,1e-7)},100)}_=!1}try{n=new IntersectionObserver(w,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return l(!0),o}function cM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=Vv(e),c=i||o?[...u?Su(u):[],...Su(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const d=u&&s?uM(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?tl(e):null;a&&S();function S(){const v=tl(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=>{i&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,a&&cancelAnimationFrame(m)}}const dM=(e,t,n)=>{const r=new Map,i={platform:aM,...n},o={...i.platform,_c:r};return z3(e,t,{...i,platform:o})},fM=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?jx({element:r.current,padding:i}).fn(n):{}:r?jx({element:r,padding:i}).fn(n):{}}}};var Kc=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Jd(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,i;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(!Jd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Jd(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function KC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vx(e,t){const n=KC(e);return Math.round(t*n)/n}function Hx(e){const t=p.useRef(e);return Kc(()=>{t.current=e}),t}function hM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,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);Jd(f,r)||h(r);const[m,g]=p.useState(null),[S,v]=p.useState(null),y=p.useCallback(O=>{O!=$.current&&($.current=O,g(O))},[g]),_=p.useCallback(O=>{O!==C.current&&(C.current=O,v(O))},[v]),w=o||m,E=l||S,$=p.useRef(null),C=p.useRef(null),T=p.useRef(c),N=Hx(a),R=Hx(i),D=p.useCallback(()=>{if(!$.current||!C.current)return;const O={placement:t,strategy:n,middleware:f};R.current&&(O.platform=R.current),dM($.current,C.current,O).then(A=>{const k={...A,isPositioned:!0};F.current&&!Jd(T.current,k)&&(T.current=k,Gr.flushSync(()=>{d(k)}))})},[f,t,n,R]);Kc(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[u]);const F=p.useRef(!1);Kc(()=>(F.current=!0,()=>{F.current=!1}),[]),Kc(()=>{if(w&&($.current=w),E&&(C.current=E),w&&E){if(N.current)return N.current(w,E,D);D()}},[w,E,D,N]);const se=p.useMemo(()=>({reference:$,floating:C,setReference:y,setFloating:_}),[y,_]),V=p.useMemo(()=>({reference:w,floating:E}),[w,E]),K=p.useMemo(()=>{const O={position:n,left:0,top:0};if(!V.floating)return O;const A=Vx(V.floating,c.x),k=Vx(V.floating,c.y);return s?{...O,transform:"translate("+A+"px, "+k+"px)",...KC(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:k}},[n,s,V.floating,c.x,c.y]);return p.useMemo(()=>({...c,update:D,refs:se,elements:V,floatingStyles:K}),[c,D,se,V,K])}function ZC(e){const[t,n]=p.useState(void 0);return Un(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,s;if("borderBoxSize"in o){const a=o.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 GC="Popper",[YC,XC]=ol(GC),[pM,QC]=YC(GC),mM=e=>{const{__scopePopper:t,children:n}=e,[r,i]=p.useState(null);return p.createElement(pM,{scope:t,anchor:r,onAnchorChange:i},n)},gM="PopperAnchor",vM=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=QC(gM,n),l=p.useRef(null),s=st(t,l);return p.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:p.createElement(Ke.div,ie({},i,{ref:s}))}),JC="PopperContent",[yM,TL]=YC(JC),xM=p.forwardRef((e,t)=>{var n,r,i,o,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:_="partial",hideWhenDetached:w=!1,updatePositionStrategy:E="optimized",onPlaced:$,...C}=e,T=QC(JC,c),[N,R]=p.useState(null),D=st(t,Sn=>R(Sn)),[F,se]=p.useState(null),V=ZC(F),K=(n=V==null?void 0:V.width)!==null&&n!==void 0?n:0,O=(r=V==null?void 0:V.height)!==null&&r!==void 0?r:0,A=d+(h!=="center"?"-"+h:""),k=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},j=Array.isArray(v)?v:[v],L=j.length>0,Z={padding:k,boundary:j.filter(_M),altBoundary:L},{refs:ne,floatingStyles:ke,placement:ve,isPositioned:We,middlewareData:Fe}=hM({strategy:"fixed",placement:A,whileElementsMounted:(...Sn)=>cM(...Sn,{animationFrame:E==="always"}),elements:{reference:T.anchor},middleware:[W3({mainAxis:f+O,alignmentAxis:m}),S&&V3({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?H3():void 0,...Z}),S&&F3({...Z}),K3({...Z,apply:({elements:Sn,rects:ur,availableWidth:je,availableHeight:Tt})=>{const{width:at,height:ln}=ur.reference,En=Sn.floating.style;En.setProperty("--radix-popper-available-width",`${je}px`),En.setProperty("--radix-popper-available-height",`${Tt}px`),En.setProperty("--radix-popper-anchor-width",`${at}px`),En.setProperty("--radix-popper-anchor-height",`${ln}px`)}}),F&&fM({element:F,padding:g}),wM({arrowWidth:K,arrowHeight:O}),w&&B3({strategy:"referenceHidden",...Z})]}),[te,Le]=qC(ve),be=en($);Un(()=>{We&&(be==null||be())},[We,be]);const Re=(i=Fe.arrow)===null||i===void 0?void 0:i.x,Se=(o=Fe.arrow)===null||o===void 0?void 0:o.y,De=((l=Fe.arrow)===null||l===void 0?void 0:l.centerOffset)!==0,[Qe,Wt]=p.useState();return Un(()=>{N&&Wt(window.getComputedStyle(N).zIndex)},[N]),p.createElement("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...ke,transform:We?ke.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Qe,"--radix-popper-transform-origin":[(s=Fe.transformOrigin)===null||s===void 0?void 0:s.x,(a=Fe.transformOrigin)===null||a===void 0?void 0:a.y].join(" ")},dir:e.dir},p.createElement(yM,{scope:c,placedSide:te,onArrowChange:se,arrowX:Re,arrowY:Se,shouldHideArrow:De},p.createElement(Ke.div,ie({"data-side":te,"data-align":Le},C,{ref:D,style:{...C.style,animation:We?void 0:"none",opacity:(u=Fe.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function _M(e){return e!==null}const wM=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,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]=qC(s),S={start:"0%",center:"50%",end:"100%"}[g],v=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+f/2,y=((o=(l=u.arrow)===null||l===void 0?void 0:l.y)!==null&&o!==void 0?o:0)+h/2;let _="",w="";return m==="bottom"?(_=d?S:`${v}px`,w=`${-h}px`):m==="top"?(_=d?S:`${v}px`,w=`${a.floating.height+h}px`):m==="right"?(_=`${-h}px`,w=d?S:`${y}px`):m==="left"&&(_=`${a.floating.width+h}px`,w=d?S:`${y}px`),{data:{x:_,y:w}}}});function qC(e){const[t,n="center"]=e.split("-");return[t,n]}const SM=mM,EM=vM,CM=xM,kM=p.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?Iw.createPortal(p.createElement(Ke.div,ie({},i,{ref:t})),r):null});function gs({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=$M({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:r,s=en(n),a=p.useCallback(u=>{if(o){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else i(u)},[o,e,i,s]);return[l,a]}function $M({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,i=p.useRef(r),o=en(t);return p.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function ek(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 bM=p.forwardRef((e,t)=>p.createElement(Ke.span,ie({},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 TM=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wl=new WeakMap,Ec=new WeakMap,Cc={},Vh=0,tk=function(e){return e&&(e.host||tk(e.parentNode))},NM=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tk(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})},RM=function(e,t,n,r){var i=NM(t,Array.isArray(e)?e:[e]);Cc[n]||(Cc[n]=new WeakMap);var o=Cc[n],l=[],s=new Set,a=new Set(i),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};i.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=(wl.get(f)||0)+1,S=(o.get(f)||0)+1;wl.set(f,g),o.set(f,S),l.push(f),g===1&&m&&Ec.set(f,!0),S===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}})};return c(t),s.clear(),Vh++,function(){l.forEach(function(d){var f=wl.get(d)-1,h=o.get(d)-1;wl.set(d,f),o.set(d,h),f||(Ec.has(d)||d.removeAttribute(r),Ec.delete(d)),h||d.removeAttribute(n)}),Vh--,Vh||(wl=new WeakMap,wl=new WeakMap,Ec=new WeakMap,Cc={})}},OM=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||TM(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),RM(r,i,n,"aria-hidden")):function(){return null}},Dr=function(){return Dr=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Dr.apply(this,arguments)};function nk(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function PM(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Zc="right-scroll-bar-position",Gc="width-before-scroll-bar",AM="with-scroll-bars-hidden",MM="--removed-body-scroll-bar-size";function DM(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function IM(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function LM(e,t){return IM(t||null,function(n){return e.forEach(function(r){return DM(r,n)})})}function jM(e){return e}function zM(e,t){t===void 0&&(t=jM);var n=[],r=!1,i={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(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(s){return s!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var s=n;n=[],s.forEach(o),l=n}var a=function(){var c=l;l=[],c.forEach(o)},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 i}function FM(e){e===void 0&&(e={});var t=zM(null);return t.options=Dr({async:!0,ssr:!1},e),t}var rk=function(e){var t=e.sideCar,n=nk(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,Dr({},n))};rk.isSideCarExport=!0;function BM(e,t){return e.useMedium(t),rk}var ik=FM(),Hh=function(){},Bf=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:Hh,onWheelCapture:Hh,onTouchMoveCapture:Hh}),i=r[0],o=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=nk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=f,w=LM([n,t]),E=Dr(Dr({},y),i);return p.createElement(p.Fragment,null,c&&p.createElement(_,{sideCar:ik,removeScrollBar:u,shards:d,noIsolation:h,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n}),l?p.cloneElement(p.Children.only(s),Dr(Dr({},E),{ref:w})):p.createElement(v,Dr({},E,{className:a,ref:w}),s))});Bf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bf.classNames={fullWidth:Gc,zeroRight:Zc};var Kx,UM=function(){if(Kx)return Kx;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function WM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=UM();return t&&e.setAttribute("nonce",t),e}function VM(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function HM(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var KM=function(){var e=0,t=null;return{add:function(n){e==0&&(t=WM())&&(VM(t,n),HM(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ZM=function(){var e=KM();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ok=function(){var e=ZM(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},GM={left:0,top:0,right:0,gap:0},Kh=function(e){return parseInt(e||"",10)||0},YM=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Kh(n),Kh(r),Kh(i)]},XM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return GM;var t=YM(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])}},QM=ok(),JM=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
130
|
-
.`.concat(
|
|
129
|
+
`?t.insertParagraph():o===" "?t.insertNodes([pe.$createTabNode()]):t.insertText(o);else t.insertRawText(e)};Si.$insertGeneratedNodes=Nm;Si.copyToClipboard=async function(e,t){if(yl!==null)return!1;if(t!==null)return new Promise(l=>{e.update(()=>{l(vx(e,t))})});var n=e.getRootElement();let r=e._window==null?window.document:e._window.document,i=rC?(e._window||window).getSelection():null;if(n===null||i===null)return!1;let o=r.createElement("span");return o.style.cssText="position: fixed; top: -1000px;",o.append(r.createTextNode("#")),n.append(o),n=new Range,n.setStart(o,0),n.setEnd(o,1),i.removeAllRanges(),i.addRange(n),new Promise(l=>{let s=e.registerCommand(pe.COPY_COMMAND,a=>(Ql.objectKlassEquals(a,ClipboardEvent)&&(s(),yl!==null&&(window.clearTimeout(yl),yl=null),l(vx(e,a))),!0),pe.COMMAND_PRIORITY_CRITICAL);yl=window.setTimeout(()=>{s(),yl=null,l(!1)},50),r.execCommand("copy"),o.remove()})};const NP=Si;var RP=NP,zd=RP,xc=lo,jr=Ft,P=xe;function yx(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 As=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",OP=As&&"documentMode"in document?document.documentMode:null,PP=As&&"InputEvent"in window&&!OP?"getTargetRanges"in new window.InputEvent("input"):!1,AP=As&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),MP=As&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,DP=As&&/^(?=.*Chrome).*/i.test(navigator.userAgent),LP=As&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!DP,Rm=P.createCommand("DRAG_DROP_PASTE_FILE"),Nv=class uC extends P.ElementNode{static getType(){return"quote"}static clone(t){return new uC(t.__key)}constructor(t){super(t)}createDOM(t){let n=document.createElement("blockquote");return jr.addClassNamesToElement(n,t.theme.quote),n}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:IP,priority:0})}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&jr.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=Rv();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(t,n){t=P.$createParagraphNode();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=P.$createParagraphNode();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}};function Rv(){return P.$applyNodeReplacement(new Nv)}let Ov=class cC extends P.ElementNode{static getType(){return"heading"}static clone(t){return new cC(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&&jr.addClassNamesToElement(r,t[n]),r}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:xl,priority:0}),h2:()=>({conversion:xl,priority:0}),h3:()=>({conversion:xl,priority:0}),h4:()=>({conversion:xl,priority:0}),h5:()=>({conversion:xl,priority:0}),h6:()=>({conversion:xl,priority:0}),p:t=>(t=t.firstChild,t!==null&&xx(t)?{conversion:()=>({node:null}),priority:3}:null),span:t=>xx(t)?{conversion:()=>({node:Bl("h1")}),priority:3}:null}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&jr.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=Bl(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()?Bl(this.getTag()):P.$createParagraphNode();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=this.isEmpty()?P.$createParagraphNode():Bl(this.getTag());return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}extractWithChild(){return!0}};function xx(e){return e.nodeName.toLowerCase()==="span"?e.style.fontSize==="26pt":!1}function xl(e){let t=e.nodeName.toLowerCase(),n=null;return(t==="h1"||t==="h2"||t==="h3"||t==="h4"||t==="h5"||t==="h6")&&(n=Bl(t),e.style!==null&&n.setFormat(e.style.textAlign)),{node:n}}function IP(e){let t=Rv();return e.style!==null&&t.setFormat(e.style.textAlign),{node:t}}function Bl(e){return P.$applyNodeReplacement(new Ov(e))}function jP(e,t){e.preventDefault(),t.update(()=>{let n=P.$getSelection(),r=e instanceof InputEvent||e instanceof KeyboardEvent?null:e.clipboardData;r!=null&&(P.$isRangeSelection(n)||P.DEPRECATED_$isGridSelection(n))&&zd.$insertDataTransferForRichText(r,n,t)},{tag:"paste"})}async function zP(e,t){await zd.copyToClipboard(t,jr.objectKlassEquals(e,ClipboardEvent)?e:null),t.update(()=>{let n=P.$getSelection();P.$isRangeSelection(n)?n.removeText():P.$isNodeSelection(n)&&n.getNodes().forEach(r=>r.remove())})}function ha(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 _x(e){var t=P.$getSelection();if(!P.$isRangeSelection(t))return!1;let n=new Set;t=t.getNodes();for(let o=0;o<t.length;o++){var r=t[o],i=r.getKey();n.has(i)||(r=jr.$getNearestBlockElementAncestorOrThrow(r),i=r.getKey(),r.canIndent()&&!n.has(i)&&(n.add(i),e(r)))}return 0<n.size}function _c(e){return e=P.$getNearestNodeFromDOMNode(e),P.$isDecoratorNode(e)}Jr.$createHeadingNode=Bl;Jr.$createQuoteNode=Rv;Jr.$isHeadingNode=function(e){return e instanceof Ov};Jr.$isQuoteNode=function(e){return e instanceof Nv};Jr.DRAG_DROP_PASTE=Rm;Jr.HeadingNode=Ov;Jr.QuoteNode=Nv;Jr.eventFiles=ha;Jr.registerRichText=function(e){return jr.mergeRegister(e.registerCommand(P.CLICK_COMMAND,()=>{const t=P.$getSelection();return P.$isNodeSelection(t)?(t.clear(),!0):!1},0),e.registerCommand(P.DELETE_CHARACTER_COMMAND,t=>{const n=P.$getSelection();return P.$isRangeSelection(n)?(n.deleteCharacter(t),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.DELETE_WORD_COMMAND,t=>{const n=P.$getSelection();return P.$isRangeSelection(n)?(n.deleteWord(t),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.DELETE_LINE_COMMAND,t=>{const n=P.$getSelection();return P.$isRangeSelection(n)?(n.deleteLine(t),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.CONTROLLED_TEXT_INSERTION_COMMAND,t=>{const n=P.$getSelection();if(typeof t=="string")P.$isRangeSelection(n)?n.insertText(t):P.DEPRECATED_$isGridSelection(n);else{if(!P.$isRangeSelection(n)&&!P.DEPRECATED_$isGridSelection(n))return!1;const r=t.dataTransfer;r!=null?zd.$insertDataTransferForRichText(r,n,e):P.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.REMOVE_TEXT_COMMAND,()=>{const t=P.$getSelection();return P.$isRangeSelection(t)?(t.removeText(),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.FORMAT_TEXT_COMMAND,t=>{const n=P.$getSelection();return P.$isRangeSelection(n)?(n.formatText(t),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.FORMAT_ELEMENT_COMMAND,t=>{var n=P.$getSelection();if(!P.$isRangeSelection(n)&&!P.$isNodeSelection(n))return!1;n=n.getNodes();for(const r of n)n=jr.$findMatchingParent(r,i=>P.$isElementNode(i)&&!i.isInline()),n!==null&&n.setFormat(t);return!0},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.INSERT_LINE_BREAK_COMMAND,t=>{const n=P.$getSelection();return P.$isRangeSelection(n)?(n.insertLineBreak(t),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.INSERT_PARAGRAPH_COMMAND,()=>{const t=P.$getSelection();return P.$isRangeSelection(t)?(t.insertParagraph(),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.INSERT_TAB_COMMAND,()=>(P.$insertNodes([P.$createTabNode()]),!0),P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.INDENT_CONTENT_COMMAND,()=>_x(t=>{const n=t.getIndent();t.setIndent(n+1)}),P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.OUTDENT_CONTENT_COMMAND,()=>_x(t=>{const n=t.getIndent();0<n&&t.setIndent(n-1)}),P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_ARROW_UP_COMMAND,t=>{var n=P.$getSelection();if(P.$isNodeSelection(n)&&!_c(t.target)){if(t=n.getNodes(),0<t.length)return t[0].selectPrevious(),!0}else if(P.$isRangeSelection(n)&&(n=P.$getAdjacentNode(n.focus,!0),!t.shiftKey&&P.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline()))return n.selectPrevious(),t.preventDefault(),!0;return!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_ARROW_DOWN_COMMAND,t=>{var n=P.$getSelection();if(P.$isNodeSelection(n)){if(t=n.getNodes(),0<t.length)return t[0].selectNext(0,0),!0}else if(P.$isRangeSelection(n)){let r=n.focus;if(r.key==="root"&&r.offset===P.$getRoot().getChildrenSize())return t.preventDefault(),!0;if(n=P.$getAdjacentNode(n.focus,!1),!t.shiftKey&&P.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),t.preventDefault(),!0}return!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_ARROW_LEFT_COMMAND,t=>{const n=P.$getSelection();if(P.$isNodeSelection(n)){var r=n.getNodes();if(0<r.length)return t.preventDefault(),r[0].selectPrevious(),!0}return P.$isRangeSelection(n)&&xc.$shouldOverrideDefaultCharacterSelection(n,!0)?(r=t.shiftKey,t.preventDefault(),xc.$moveCharacter(n,r,!0),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_ARROW_RIGHT_COMMAND,t=>{const n=P.$getSelection();if(P.$isNodeSelection(n)&&!_c(t.target)){var r=n.getNodes();if(0<r.length)return t.preventDefault(),r[0].selectNext(0,0),!0}return P.$isRangeSelection(n)?(r=t.shiftKey,xc.$shouldOverrideDefaultCharacterSelection(n,!1)?(t.preventDefault(),xc.$moveCharacter(n,r,!1),!0):!1):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_BACKSPACE_COMMAND,t=>{if(_c(t.target))return!1;const n=P.$getSelection();if(!P.$isRangeSelection(n))return!1;t.preventDefault(),{anchor:t}=n;const r=t.getNode();return n.isCollapsed()&&t.offset===0&&!P.$isRootNode(r)&&0<jr.$getNearestBlockElementAncestorOrThrow(r).getIndent()?e.dispatchCommand(P.OUTDENT_CONTENT_COMMAND,void 0):e.dispatchCommand(P.DELETE_CHARACTER_COMMAND,!0)},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_DELETE_COMMAND,t=>{if(_c(t.target))return!1;const n=P.$getSelection();return P.$isRangeSelection(n)?(t.preventDefault(),e.dispatchCommand(P.DELETE_CHARACTER_COMMAND,!1)):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_ENTER_COMMAND,t=>{const n=P.$getSelection();if(!P.$isRangeSelection(n))return!1;if(t!==null){if((MP||AP||LP)&&PP)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(P.INSERT_LINE_BREAK_COMMAND,!1)}return e.dispatchCommand(P.INSERT_PARAGRAPH_COMMAND,void 0)},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.KEY_ESCAPE_COMMAND,()=>{const t=P.$getSelection();return P.$isRangeSelection(t)?(e.blur(),!0):!1},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.DROP_COMMAND,t=>{const[,n]=ha(t);if(0<n.length){var r=yx(t.clientX,t.clientY);if(r!==null){const{offset:o,node:l}=r;var i=P.$getNearestNodeFromDOMNode(l);if(i!==null){if(r=P.$createRangeSelection(),P.$isTextNode(i))r.anchor.set(i.getKey(),o,"text"),r.focus.set(i.getKey(),o,"text");else{const s=i.getParentOrThrow().getKey();i=i.getIndexWithinParent()+1,r.anchor.set(s,i,"element"),r.focus.set(s,i,"element")}r=P.$normalizeSelection__EXPERIMENTAL(r),P.$setSelection(r)}e.dispatchCommand(Rm,n)}return t.preventDefault(),!0}return t=P.$getSelection(),!!P.$isRangeSelection(t)},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.DRAGSTART_COMMAND,t=>{[t]=ha(t);const n=P.$getSelection();return!(t&&!P.$isRangeSelection(n))},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.DRAGOVER_COMMAND,t=>{var[n]=ha(t);const r=P.$getSelection();return n&&!P.$isRangeSelection(r)?!1:(n=yx(t.clientX,t.clientY),n!==null&&(n=P.$getNearestNodeFromDOMNode(n.node),P.$isDecoratorNode(n)&&t.preventDefault()),!0)},P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.SELECT_ALL_COMMAND,()=>(P.$selectAll(),!0),P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.COPY_COMMAND,t=>(zd.copyToClipboard(e,jr.objectKlassEquals(t,ClipboardEvent)?t:null),!0),P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.CUT_COMMAND,t=>(zP(t,e),!0),P.COMMAND_PRIORITY_EDITOR),e.registerCommand(P.PASTE_COMMAND,t=>{const[,n,r]=ha(t);if(0<n.length&&!r)return e.dispatchCommand(Rm,n),!0;if(P.isSelectionCapturedInDecoratorInput(t.target))return!1;const i=P.$getSelection();return P.$isRangeSelection(i)||P.DEPRECATED_$isGridSelection(i)?(jP(t,e),!0):!1},P.COMMAND_PRIORITY_EDITOR))};const FP=Jr;var Aa=FP,dC=Tr,BP=xP,Jn=p,UP=wP,fC=Ft,wx=Gr,WP=EP,VP=Aa,Pv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Jn.useLayoutEffect:Jn.useEffect;function Sx(e){return e.getEditorState().read(UP.$canShowPlaceholderCurry(e.isComposing()))}function HP(e){let[t,n]=Jn.useState(()=>Sx(e));return Pv(()=>{function r(){let i=Sx(e);n(i)}return r(),fC.mergeRegister(e.registerUpdateListener(()=>{r()}),e.registerEditableListener(()=>{r()}))},[e]),t}function KP(e,t){let[n,r]=Jn.useState(()=>e.getDecorators());return Pv(()=>e.registerDecoratorListener(i=>{wx.flushSync(()=>{r(i)})}),[e]),Jn.useEffect(()=>{r(e.getDecorators())},[e]),Jn.useMemo(()=>{let i=[],o=Object.keys(n);for(let l=0;l<o.length;l++){let s=o[l],a=Jn.createElement(t,{onError:c=>e._onError(c)},Jn.createElement(Jn.Suspense,{fallback:null},n[s])),u=e.getElementByKey(s);u!==null&&i.push(wx.createPortal(a,u,s))}return i},[t,n,e])}function ZP(e){Pv(()=>fC.mergeRegister(VP.registerRichText(e),WP.registerDragonSupport(e)),[e])}function GP({content:e}){var[t]=dC.useLexicalComposerContext();t=HP(t);let n=BP();return t?typeof e=="function"?e(n):e:null}YE.RichTextPlugin=function({contentEditable:e,placeholder:t,ErrorBoundary:n}){let[r]=dC.useLexicalComposerContext();return n=KP(r,n),ZP(r),Jn.createElement(Jn.Fragment,null,e,Jn.createElement(GP,{content:t}),n)};const YP=YE;var XP=YP,hC={},ni=ji,QP=Tr,pC=p,JP=Ft,ea=xe;function qP(e){pC.useEffect(()=>JP.mergeRegister(e.registerCommand(ni.INSERT_ORDERED_LIST_COMMAND,()=>(ni.insertList(e,"number"),!0),ea.COMMAND_PRIORITY_LOW),e.registerCommand(ni.INSERT_UNORDERED_LIST_COMMAND,()=>(ni.insertList(e,"bullet"),!0),ea.COMMAND_PRIORITY_LOW),e.registerCommand(ni.REMOVE_LIST_COMMAND,()=>(ni.removeList(e),!0),ea.COMMAND_PRIORITY_LOW),e.registerCommand(ea.INSERT_PARAGRAPH_COMMAND,()=>!!ni.$handleListInsertParagraph(),ea.COMMAND_PRIORITY_LOW)),[e])}hC.ListPlugin=function(){let[e]=QP.useLexicalComposerContext();return pC.useEffect(()=>{if(!e.hasNodes([ni.ListNode,ni.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[e]),qP(e),null};const eA=hC;var tA=eA,mC={},Ei={},gC=Ft,Ur=xe;let nA=new Set(["http:","https:","mailto:","sms:","tel:"]);class Ms extends Ur.ElementNode{static getType(){return"link"}static clone(t){return new Ms(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t,n={},r){super(r);let{target:i=null,rel:o=null,title:l=null}=n;this.__url=t,this.__target=i,this.__rel=o,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),gC.addClassNamesToElement(n,t.theme.link),n}updateDOM(t,n){let r=this.__url,i=this.__target,o=this.__rel,l=this.__title;return r!==t.__url&&(n.href=r),i!==t.__target&&(i?n.target=i:n.removeAttribute("target")),o!==t.__rel&&(o?n.rel=o:n.removeAttribute("rel")),l!==t.__title&&(l?n.title=l:n.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:rA,priority:1})}}static importJSON(t){let n=cu(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(!nA.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),Ur.$isElementNode(t)?(n=cu(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(!Ur.$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 rA(e){let t=null;if(gC.isHTMLAnchorElement(e)){let n=e.textContent;n!==null&&n!==""&&(t=cu(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function cu(e,t){return Ur.$applyNodeReplacement(new Ms(e,t))}function No(e){return e instanceof Ms}class Fu extends Ms{static getType(){return"autolink"}static clone(t){return new Fu(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}static importJSON(t){let n=Om(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),Ur.$isElementNode(t)?(n=Om(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),t.append(n),n):null}}function Om(e,t){return Ur.$applyNodeReplacement(new Fu(e,t))}let iA=Ur.createCommand("TOGGLE_LINK_COMMAND");function oA(e,t){for(;e!==null&&(e=e.getParent())!==null&&!t(e););return e}Ei.$createAutoLinkNode=Om;Ei.$createLinkNode=cu;Ei.$isAutoLinkNode=function(e){return e instanceof Fu};Ei.$isLinkNode=No;Ei.AutoLinkNode=Fu;Ei.LinkNode=Ms;Ei.TOGGLE_LINK_COMMAND=iA;Ei.toggleLink=function(e,t={}){let{target:n,title:r}=t,i=t.rel===void 0?"noreferrer":t.rel;if(t=Ur.$getSelection(),Ur.$isRangeSelection(t))if(t=t.extract(),e===null)t.forEach(l=>{if(l=l.getParent(),No(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 o=t[0];if(o=No(o)?o:oA(o,No),o!==null){o.setURL(e),n!==void 0&&o.setTarget(n),i!==null&&o.setRel(i),r!==void 0&&o.setTitle(r);return}}let l=null,s=null;t.forEach(a=>{var u=a.getParent();if(u!==s&&u!==null&&(!Ur.$isElementNode(a)||a.isInline()))if(No(u))s=u,u.setURL(e),n!==void 0&&u.setTarget(n),i!==null&&s.setRel(i),r!==void 0&&s.setTitle(r);else if(u.is(l)||(l=u,s=cu(e,{rel:i,target:n}),No(u)?a.getPreviousSibling()===null?u.insertBefore(s):u.insertAfter(s):a.insertBefore(s)),No(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 lA=Ei;var Jo=lA,_l=Jo,sA=Tr,aA=Ft,wl=xe,uA=p;mC.LinkPlugin=function({validateUrl:e}){let[t]=sA.useLexicalComposerContext();return uA.useEffect(()=>{if(!t.hasNodes([_l.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return aA.mergeRegister(t.registerCommand(_l.TOGGLE_LINK_COMMAND,n=>{if(n===null)return _l.toggleLink(n),!0;if(typeof n=="string")return e===void 0||e(n)?(_l.toggleLink(n),!0):!1;let{url:r,target:i,rel:o,title:l}=n;return _l.toggleLink(r,{rel:o,target:i,title:l}),!0},wl.COMMAND_PRIORITY_LOW),e!==void 0?t.registerCommand(wl.PASTE_COMMAND,n=>{let r=wl.$getSelection();if(!wl.$isRangeSelection(r)||r.isCollapsed()||!(n instanceof ClipboardEvent)||n.clipboardData==null)return!1;let i=n.clipboardData.getData("text");return e(i)?r.getNodes().some(o=>wl.$isElementNode(o))?!1:(t.dispatchCommand(_l.TOGGLE_LINK_COMMAND,i),n.preventDefault(),!0):!1},wl.COMMAND_PRIORITY_LOW):()=>{})},[t,e]),null};const cA=mC;var dA=cA;function fA({ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:n,ariaDescribedBy:r,ariaExpanded:i,ariaLabel:o,ariaLabelledBy:l,ariaMultiline:s,ariaOwns:a,ariaRequired:u,autoCapitalize:c,className:d,id:f,role:h="textbox",spellCheck:m=!0,style:g,tabIndex:w,"data-testid":v,...y}){const[_]=Tr.useLexicalComposerContext(),[S,E]=p.useState(!1),$=p.useCallback(C=>{var N;_.setRootElement(C);const T=(N=document.getElementById("val-ui"))==null?void 0:N.shadowRoot;if(T&&"getSelection"in T){_._window=T;return}},[_]);return p.useLayoutEffect(()=>(E(_.isEditable()),_.registerEditableListener(C=>{E(C)})),[_]),x.jsx("div",{...y,"aria-activedescendant":S?e:void 0,"aria-autocomplete":S?t:"none","aria-controls":S?n:void 0,"aria-describedby":r,"aria-expanded":S&&h==="combobox"?!!i:void 0,"aria-label":o,"aria-labelledby":l,"aria-multiline":s,"aria-owns":S?a:void 0,"aria-readonly":S?void 0:!0,"aria-required":u,autoCapitalize:c,className:d,contentEditable:S,"data-testid":v,id:f,ref:$,role:h,spellCheck:m,style:g,tabIndex:w})}function hA({className:e}){return x.jsx(fA,{className:e})}class Ds extends xe.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 Ds({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 vC(t)}createDOM(){return document.createElement("div")}updateDOM(){return!1}decorate(){return x.jsx(pA,{src:this.__src,altText:this.__altText,empty:this.__empty,height:this.__height,nodeKey:this.getKey()})}}function pA(e){return x.jsx("img",{src:e.src})}function vC(e){return new Ds(e)}function mA(){const[e]=Tr.useLexicalComposerContext();return p.useEffect(()=>{e.focus()},[e]),null}const yC=xe.createCommand("INSERT_IMAGE_COMMAND");function gA(){const[e]=Tr.useLexicalComposerContext();return p.useEffect(()=>{if(!e.hasNodes([Ds]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return Ft.mergeRegister(e.registerCommand(yC,t=>{const n=vC(t);return xe.$insertNodes([n]),xe.$isRootOrShadowRoot(n.getParentOrThrow())&&Ft.$wrapNodeInElement(n,xe.$createParagraphNode).selectEnd(),!0},xe.COMMAND_PRIORITY_EDITOR))},[e]),null}const vA=({className:e})=>x.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:[x.jsx("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),x.jsx("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]}),yA=vA,xA=({className:e})=>x.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:[x.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),x.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),x.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]}),_A=xA,wA=({className:e})=>x.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:x.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"})}),SA=wA,EA=({variant:e="primary",onClick:t,children:n,icon:r,disabled:i=!1})=>x.jsx("button",{disabled:i,className:wf("font-sans font-[12px] tracking-[0.04em] py-1 px-2 rounded whitespace-nowrap group relative text-primary",{"font-bold":e==="primary","text-fill disabled:bg-fill disabled:text-background":e==="primary","border border-primary text-primary hover:border-highlight hover:text-highlight disabled:bg-fill disabled:text-background":e!=="primary"}),onClick:t,children:x.jsxs("span",{className:"flex flex-row items-center justify-center gap-2",children:[r&&r,n]})}),Ro=EA,CA=({className:e})=>x.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",className:e,children:[x.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"}),x.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"})]}),kA=CA,xC=re.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 Av(){return re.useContext(xC)}const $A=({options:e,onChange:t,label:n,icon:r})=>{const[i,o]=p.useState(!1),l=p.useRef(null),[s,a]=p.useState(0),{windowSize:u}=Av(),c=()=>{o(!i)},d=(f,h)=>{a(h),t(f),o(!1)};return p.useEffect(()=>{const f=h=>{i&&l.current&&!l.current.contains(h.target)&&o(!1)};return document.addEventListener("click",f),()=>{document.removeEventListener("click",f)}},[]),x.jsx("div",{className:"text-[12px]",ref:l,children:x.jsx(Ro,{onClick:f=>{f.preventDefault(),c()},icon:x.jsx(kA,{className:`rotate-[-90deg] transition-transform duration-150 ease-in-out ${i?"":"rotate-[90deg]"}`}),children:x.jsxs("div",{className:"relative",children:[x.jsxs("span",{className:"flex flex-row items-center justify-center gap-1",children:[n,r&&r]}),i&&x.jsx("div",{className:"absolute -top-[4px] overflow-scroll shadow-lg -left-2 text-primary w-fit z-overlay",style:{maxHeight:u==null?void 0:u.innerHeight},children:x.jsx("div",{className:"flex flex-col ",children:e==null?void 0:e.map((f,h)=>x.jsx("button",{onClick:m=>{m.preventDefault(),d(f,h)},className:`text-left px-2 py-1 hover:text-highlight ${h===s&&"font-bold truncate"}`,children:f},f))})})]})})})},bA=$A,TA=new TextEncoder;function _C(e){return new Promise((t,n)=>{var o;const r=(o=e.currentTarget.files)==null?void 0:o[0],i=new FileReader;i.addEventListener("load",()=>{const l=i.result;if(typeof l=="string"){const s=new Image;s.addEventListener("load",()=>{const a=jn.getSHA256Hash(TA.encode(l));if(s.naturalWidth&&s.naturalHeight){const u=Sv(l);t({src:l,width:s.naturalWidth,height:s.naturalHeight,filename:r==null?void 0:r.name,sha256:a,mimeType:u,fileExt:u&&Ev(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&&i.readAsDataURL(r)})}function wC(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),i=e.focus.getNode();return r===i?r:e.isBackward()?lo.$isAtNodeEnd(n)?r:i:lo.$isAtNodeEnd(t)?r:i}function NA(){const[e]=Tr.useLexicalComposerContext();return p.useEffect(()=>Ft.mergeRegister(e.registerCommand(xe.CLICK_COMMAND,t=>{const n=xe.$getSelection();if(xe.$isRangeSelection(n)){const r=wC(n),i=Ft.$findMatchingParent(r,Jo.$isLinkNode);if(Jo.$isLinkNode(i)&&(t.metaKey||t.ctrlKey))return window.open(i.getURL(),"_blank"),!0}return!1},xe.COMMAND_PRIORITY_LOW)),[]),null}var SC={exports:{}},RA="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",OA=RA,PA=OA;function EC(){}function CC(){}CC.resetWarningCache=EC;var AA=function(){function e(r,i,o,l,s,a){if(a!==PA){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:CC,resetWarningCache:EC};return n.PropTypes=n,n};SC.exports=AA();var MA=SC.exports;const tr=Tu(MA);function Pm(){return Pm=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},Pm.apply(this,arguments)}function DA(e,t){if(e==null)return{};var n=LA(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Mv=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=e.size,o=i===void 0?24:i,l=DA(e,["color","size"]);return re.createElement("svg",Pm({ref:t,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),re.createElement("polyline",{points:"20 6 9 17 4 12"}))});Mv.propTypes={color:tr.string,size:tr.oneOfType([tr.string,tr.number])};Mv.displayName="Check";const IA=Mv;function Am(){return Am=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},Am.apply(this,arguments)}function jA(e,t){if(e==null)return{};var n=zA(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Dv=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=e.size,o=i===void 0?24:i,l=jA(e,["color","size"]);return re.createElement("svg",Am({ref:t,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),re.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"}),re.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"}))});Dv.propTypes={color:tr.string,size:tr.oneOfType([tr.string,tr.number])};Dv.displayName="Link";const FA=Dv;function Mm(){return Mm=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},Mm.apply(this,arguments)}function BA(e,t){if(e==null)return{};var n=UA(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Lv=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=e.size,o=i===void 0?24:i,l=BA(e,["color","size"]);return re.createElement("svg",Mm({ref:t,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),re.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});Lv.propTypes={color:tr.string,size:tr.oneOfType([tr.string,tr.number])};Lv.displayName="X";const WA=Lv,VA=({fontSizes:e,fontsFamilies:t,onEditor:n,colors:r})=>{const[i]=Tr.useLexicalComposerContext();p.useEffect(()=>{n&&n(i)},[i]);const[o,l]=p.useState(i),[s,a]=p.useState(null),[u,c]=p.useState(!1),[d,f]=p.useState(!1),[h,m]=p.useState(!1),[g,w]=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[_,S]=p.useState(null),E=R=>{i.dispatchCommand(Jo.TOGGLE_LINK_COMMAND,R)},$={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"},C={};for(const R in $)C[$[R]]=R;const T=p.useCallback(()=>{const R=xe.$getSelection();if(xe.$isRangeSelection(R)){const D=R.anchor.getNode();let F=D.getKey()==="root"?D:Ft.$findMatchingParent(D,A=>{const k=A.getParent();return k!==null&&xe.$isRootOrShadowRoot(k)});F===null&&(F=D.getTopLevelElementOrThrow());const se=wC(R),V=Ft.$findMatchingParent(se,Jo.$isLinkNode);if(V!==null){const A=V.getURL();S(A)}else S(null);const K=F.getKey(),O=o.getElementByKey(K);if(c(R.hasFormat("bold")),f(R.hasFormat("italic")),m(R.hasFormat("strikethrough")),w(R.hasFormat("underline")),O!==null)if(a(K),ji.$isListNode(F)){const A=Ft.$getNearestNodeOfType(D,ji.ListNode),k=A?A.getListType():F.getListType();y(k)}else{const A=Aa.$isHeadingNode(F)?F.getTag():F.getType();A in $&&y(A)}}},[o]);p.useEffect(()=>Ft.mergeRegister(i.registerUpdateListener(({editorState:R})=>{R.read(()=>{T()})})),[T,o,i]),p.useEffect(()=>i.registerCommand(xe.SELECTION_CHANGE_COMMAND,(R,D)=>(T(),l(D),!1),xe.COMMAND_PRIORITY_CRITICAL),[i,T]);const N=R=>{["h1","h2","h3","h4","h5","h6"].includes(R)?v!==R&&i.update(()=>{const D=xe.$getSelection();xe.$isRangeSelection(D)&&lo.$setBlocksType(D,()=>Aa.$createHeadingNode(R))}):R==="paragraph"&&v!=="paragraph"?i.update(()=>{const D=xe.$getSelection();(xe.$isRangeSelection(D)||xe.DEPRECATED_$isGridSelection(D))&&lo.$setBlocksType(D,()=>xe.$createParagraphNode())}):R==="number"&&v!=="number"?i.dispatchCommand(ji.INSERT_ORDERED_LIST_COMMAND,void 0):R==="bullet"&&v!=="bullet"?i.dispatchCommand(ji.INSERT_UNORDERED_LIST_COMMAND,void 0):i.dispatchCommand(ji.REMOVE_LIST_COMMAND,void 0)};return p.useCallback(()=>{i.update(()=>{const R=xe.$getSelection();if(xe.$isRangeSelection(R)){const D=R.anchor,F=R.focus,se=R.getNodes();if(D.key===F.key&&D.offset===F.offset)return;se.forEach((V,K)=>{xe.$isTextNode(V)?(K===0&&D.offset!==0&&(V=V.splitText(D.offset)[1]||V),K===se.length-1&&(V=V.splitText(F.offset)[0]||V),V.__style!==""&&V.setStyle(""),V.__format!==0&&(V.setFormat(0),Ft.$getNearestBlockElementAncestorOrThrow(V).setFormat(""))):Aa.$isHeadingNode(V)&&V.replace(xe.$createParagraphNode(),!0)})}})},[o]),x.jsxs("div",{className:"sticky top-0 flex flex-col px-4 py-2 border-b bg-background border-highlight",children:[x.jsxs("div",{className:"flex flex-row gap-1",children:[x.jsx(bA,{options:Object.values($),label:$[v]??v+" (not supported)",onChange:R=>{N(C[R])}}),x.jsx(Ro,{variant:"primary",onClick:R=>{R.preventDefault(),i.dispatchCommand(xe.FORMAT_TEXT_COMMAND,"bold")},active:u,icon:x.jsx(yA,{className:`${u&&"stroke-[3px]"}`})}),x.jsx(Ro,{active:h,onClick:R=>{R.preventDefault(),i.dispatchCommand(xe.FORMAT_TEXT_COMMAND,"strikethrough")},icon:x.jsx(SA,{className:`${h&&"stroke-[2px]"}`})}),x.jsx(Ro,{active:d,onClick:R=>{R.preventDefault(),i.dispatchCommand(xe.FORMAT_TEXT_COMMAND,"italic")},icon:x.jsx(_A,{className:`${d&&"stroke-[3px]"}`})}),x.jsx(Ro,{active:_!==null,onClick:R=>{R.preventDefault(),S(""),E("")},icon:x.jsx(FA,{width:12,height:12,className:`${_!==null&&"stroke-[3px]"}`})}),x.jsxs("label",{className:"flex items-center justify-center cursor-pointer",children:[x.jsx(gS,{}),x.jsx("input",{type:"file",hidden:!0,onChange:R=>{R.preventDefault(),_C(R).then(D=>{i.dispatchCommand(yC,{...D})}).catch(D=>{console.error("Error reading image",D)})}})]})]}),_!==null&&x.jsxs("div",{className:"flex flex-row p-2",children:[x.jsx("input",{type:"text",placeholder:"Enter URL",className:"w-1/3 px-2 bg-background text-primary",value:_,onChange:R=>{R.preventDefault(),S(R.target.value)}}),x.jsx(Ro,{variant:"primary",onClick:R=>{R.preventDefault(),E(_||null)},icon:x.jsx(IA,{size:14})}),x.jsx(Ro,{variant:"primary",onClick:R=>{R.preventDefault(),E(null)},icon:x.jsx(WA,{size:14})})]})]})},HA=VA;function KA(e){console.error(e)}const ZA=28,GA=({richtext:e,onEditor:t})=>{const{windowSize:n}=Av(),i={namespace:"val",editorState:o=>{o.setEditorState(o.parseEditorState({root:CO(PE(e))}))},nodes:[Aa.HeadingNode,Ds,ji.ListNode,ji.ListItemNode,Jo.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:KA};return x.jsxs(XO.LexicalComposer,{initialConfig:i,children:[x.jsx(mA,{}),x.jsx(HA,{onEditor:t}),x.jsx(XP.RichTextPlugin,{contentEditable:x.jsx("div",{className:"font-sans border-b text-primary border-highlight",style:{minHeight:n!=null&&n.innerHeight?(n==null?void 0:n.innerHeight)-ZA:void 0},children:x.jsx(hA,{className:"p-4 outline-none bg-fill"})}),placeholder:x.jsx("div",{className:"",children:"Enter some text..."}),ErrorBoundary:rP}),x.jsx(dA.LinkPlugin,{}),x.jsx(NA,{}),x.jsx(tA.ListPlugin,{}),x.jsx(gA,{}),x.jsx(fP.HistoryPlugin,{})]})};var YA={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 XA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kn=(e,t)=>{const n=p.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:l,children:s,...a},u)=>p.createElement("svg",{ref:u,...YA,width:i,height:i,stroke:r,strokeWidth:l?Number(o)*24/Number(i):o,className:`lucide lucide-${XA(e)}`,...a},[...t.map(([c,d])=>p.createElement(c,d)),...(Array.isArray(s)?s:[s])||[]]));return n.displayName=`${e}`,n},QA=Kn("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),kC=Kn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),JA=Kn("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Ex=Kn("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"}]]),qA=Kn("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"}]]),e5=Kn("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"}]]),t5=Kn("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),n5=Kn("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]),r5=Kn("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]),i5=Kn("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]),o5=Kn("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),l5=Kn("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"}]]),s5=Kn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Iv="p-1 border rounded-full shadow border-accent",Cx="valbuild:urlBeforeNavigation";function a5({api:e,patches:t,onCommit:n}){const{theme:r,setTheme:i,editMode:o,setEditMode:l,session:s}=Av();if(s.status==="success"&&s.data.mode==="unauthorized")return x.jsxs(kx,{href:e.getLoginUrl(window.location.href),children:[x.jsx("span",{children:"Login"}),x.jsx(Ex,{size:18})]});if(s.status==="success"&&!s.data.enabled)return x.jsxs(kx,{href:e.getEnableUrl(window.location.href),children:[x.jsx("span",{children:"Enable"}),x.jsx(Ex,{size:18})]});const[a,u]=p.useState();return p.useEffect(()=>{let c=0;for(const d in t)c+=t[d].length;u(c)},[t]),x.jsxs(u5,{children:[x.jsx(wc,{active:o==="hover",onClick:()=>{l(c=>c==="hover"?"off":"hover")},children:x.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:o==="hover"?x.jsx(n5,{size:18}):x.jsx(r5,{size:18})})}),x.jsx(wc,{onClick:()=>{i(r==="dark"?"light":"dark")},children:x.jsxs("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:[r==="dark"&&x.jsx(l5,{size:15}),r==="light"&&x.jsx(t5,{size:15})]})}),x.jsx(wc,{active:o==="full",onClick:()=>{if(o!=="full")localStorage.setItem(Cx,window.location.href),window.location.href=e.getEditUrl();else if(o==="full"){const c=localStorage.getItem(Cx);window.location.href=c||"/"}},children:x.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:o==="full"?x.jsx(e5,{size:15}):x.jsx(qA,{size:15})})}),a!==void 0&&s.status==="success"&&s.data.mode==="proxy"&&x.jsx(wc,{onClick:()=>{a>0?e.postCommit({patches:t}).then(c=>{jo.isErr(c)?(console.error(c.error),alert("Could not commit patches: "+c.error.message)):(console.log("Committed patches: ",c.value),n())}):alert("No patches to commit")},children:x.jsxs("div",{className:"relative h-[24px] w-[24px] flex justify-center items-center",children:[x.jsx("div",{className:"absolute -right-[10px] -top-[10px] border border-border rounded-full px-1 font-sans text-xs bg-card text-accent",children:a}),x.jsx(o5,{size:18})]})}),x.jsx("a",{className:Iv,href:e.getDisableUrl(window.location.href),children:x.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:x.jsx(i5,{size:18})})})]})}function kx({href:e,children:t}){return x.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:x.jsx("a",{className:Iv,href:e,children:x.jsx("div",{className:"flex items-center justify-center px-2 gap-x-2",children:t})})})}function u5({children:e}){return x.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 wc({active:e,onClick:t,children:n}){return x.jsx("button",{className:wf(Iv,{"bg-accent drop-shadow-[0px_0px_12px_rgba(56,205,152,0.60)]":e}),onClick:t,children:n})}function c5(e,t){const[n,r]=p.useState({}),[i,o]=p.useState(0);return p.useEffect(()=>{e.status==="success"&&e.data.mode==="proxy"&&t.getPatches({}).then(l=>{if(jo.isOk(l)){const s={};for(const a in l.value)s[a]=l.value[a].map(u=>u.patch_id);r(s)}else console.error("Could not load patches",l.error)})},[e,i]),{patches:n,setPatchResetId:o}}function d5(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=i=>{localStorage.getItem("val-theme")||n(i.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)}]}var Le;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const l of i)o[l]=l;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),l={};for(const s of o)l[s]=i[s];return e.objectValues(l)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const l in i)Object.prototype.hasOwnProperty.call(i,l)&&o.push(l);return o},e.find=(i,o)=>{for(const l of i)if(o(l))return l},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(l=>typeof l=="string"?`'${l}'`:l).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(Le||(Le={}));var Dm;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Dm||(Dm={}));const Q=Le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zi=e=>{switch(typeof e){case"undefined":return Q.undefined;case"string":return Q.string;case"number":return isNaN(e)?Q.nan:Q.number;case"boolean":return Q.boolean;case"function":return Q.function;case"bigint":return Q.bigint;case"symbol":return Q.symbol;case"object":return Array.isArray(e)?Q.array:e===null?Q.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Q.promise:typeof Map<"u"&&e instanceof Map?Q.map:typeof Set<"u"&&e instanceof Set?Q.set:typeof Date<"u"&&e instanceof Date?Q.date:Q.object;default:return Q.unknown}},W=Le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),f5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Er extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const l of o.issues)if(l.code==="invalid_union")l.unionErrors.map(i);else if(l.code==="invalid_return_type")i(l.returnTypeError);else if(l.code==="invalid_arguments")i(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let s=r,a=0;for(;a<l.path.length;){const u=l.path[a];a===l.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(n(l))):s[u]=s[u]||{_errors:[]},s=s[u],a++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Er.create=e=>new Er(e);const du=(e,t)=>{let n;switch(e.code){case W.invalid_type:e.received===Q.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case W.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Le.jsonStringifyReplacer)}`;break;case W.unrecognized_keys:n=`Unrecognized key(s) in object: ${Le.joinValues(e.keys,", ")}`;break;case W.invalid_union:n="Invalid input";break;case W.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Le.joinValues(e.options)}`;break;case W.invalid_enum_value:n=`Invalid enum value. Expected ${Le.joinValues(e.options)}, received '${e.received}'`;break;case W.invalid_arguments:n="Invalid function arguments";break;case W.invalid_return_type:n="Invalid function return type";break;case W.invalid_date:n="Invalid date";break;case W.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Le.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case W.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case W.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case W.custom:n="Invalid input";break;case W.invalid_intersection_types:n="Intersection results could not be merged";break;case W.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case W.not_finite:n="Number must be finite";break;default:n=t.defaultError,Le.assertNever(e)}return{message:n}};let $C=du;function h5(e){$C=e}function Fd(){return $C}const Bd=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],l={...i,path:o};let s="";const a=r.filter(u=>!!u).slice().reverse();for(const u of a)s=u(l,{data:t,defaultError:s}).message;return{...i,path:o,message:i.message||s}},p5=[];function q(e,t){const n=Bd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Fd(),du].filter(r=>!!r)});e.common.issues.push(n)}class on{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return ge;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return on.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:l}=i;if(o.status==="aborted"||l.status==="aborted")return ge;o.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof l.value<"u"||i.alwaysSet)&&(r[o.value]=l.value)}return{status:t.value,value:r}}}const ge=Object.freeze({status:"aborted"}),bC=e=>({status:"dirty",value:e}),yn=e=>({status:"valid",value:e}),Lm=e=>e.status==="aborted",Im=e=>e.status==="dirty",fu=e=>e.status==="valid",Ud=e=>typeof Promise<"u"&&e instanceof Promise;var ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ce||(ce={}));class Hr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const $x=(e,t)=>{if(fu(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Er(e.common.issues);return this._error=n,this._error}}};function we(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(l,s)=>l.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}class Ce{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return zi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:zi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new on,ctx:{common:t.parent.common,data:t.data,parsedType:zi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ud(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zi(t)},o=this._parseSync({data:t,path:i.path,parent:i});return $x(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zi(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(Ud(i)?i:Promise.resolve(i));return $x(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const l=t(i),s=()=>o.addIssue({code:W.custom,...r(i)});return typeof Promise<"u"&&l instanceof Promise?l.then(a=>a?!0:(s(),!1)):l?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new br({schema:this,typeName:de.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return ci.create(this,this._def)}nullable(){return tl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Cr.create(this,this._def)}promise(){return ps.create(this,this._def)}or(t){return gu.create([this,t],this._def)}and(t){return vu.create(this,t,this._def)}transform(t){return new br({...we(this._def),schema:this,typeName:de.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Su({...we(this._def),innerType:this,defaultValue:n,typeName:de.ZodDefault})}brand(){return new NC({typeName:de.ZodBranded,type:this,...we(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Kd({...we(this._def),innerType:this,catchValue:n,typeName:de.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Bu.create(this,t)}readonly(){return Gd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const m5=/^c[^\s-]{8,}$/i,g5=/^[a-z][a-z0-9]*$/,v5=/^[0-9A-HJKMNP-TV-Z]{26}$/,y5=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,x5=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Fh;const w5=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,S5=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,E5=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function C5(e,t){return!!((t==="v4"||!t)&&w5.test(e)||(t==="v6"||!t)&&S5.test(e))}class _r extends Ce{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Q.string){const o=this._getOrReturnCtx(t);return q(o,{code:W.invalid_type,expected:Q.string,received:o.parsedType}),ge}const r=new on;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),q(i,{code:W.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),q(i,{code:W.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const l=t.data.length>o.value,s=t.data.length<o.value;(l||s)&&(i=this._getOrReturnCtx(t,i),l?q(i,{code:W.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&q(i,{code:W.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")x5.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"email",code:W.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Fh||(Fh=new RegExp(_5,"u")),Fh.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"emoji",code:W.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")y5.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"uuid",code:W.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")m5.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"cuid",code:W.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")g5.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"cuid2",code:W.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")v5.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"ulid",code:W.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),q(i,{validation:"url",code:W.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"regex",code:W.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),q(i,{code:W.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),q(i,{code:W.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),q(i,{code:W.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?E5(o).test(t.data)||(i=this._getOrReturnCtx(t,i),q(i,{code:W.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?C5(t.data,o.version)||(i=this._getOrReturnCtx(t,i),q(i,{validation:"ip",code:W.invalid_string,message:o.message}),r.dirty()):Le.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:W.invalid_string,...ce.errToObj(r)})}_addCheck(t){return new _r({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ce.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...ce.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ce.errToObj(n)})}nonempty(t){return this.min(1,ce.errToObj(t))}trim(){return new _r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}_r.create=e=>{var t;return new _r({checks:[],typeName:de.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...we(e)})};function k5(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),l=parseInt(t.toFixed(i).replace(".",""));return o%l/Math.pow(10,i)}class ao extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Q.number){const o=this._getOrReturnCtx(t);return q(o,{code:W.invalid_type,expected:Q.number,received:o.parsedType}),ge}let r;const i=new on;for(const o of this._def.checks)o.kind==="int"?Le.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),q(r,{code:W.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),q(r,{code:W.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),q(r,{code:W.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?k5(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),q(r,{code:W.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),q(r,{code:W.not_finite,message:o.message}),i.dirty()):Le.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,i){return new ao({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(i)}]})}_addCheck(t){return new ao({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Le.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ao.create=e=>new ao({checks:[],typeName:de.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...we(e)});class uo extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Q.bigint){const o=this._getOrReturnCtx(t);return q(o,{code:W.invalid_type,expected:Q.bigint,received:o.parsedType}),ge}let r;const i=new on;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),q(r,{code:W.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),q(r,{code:W.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),q(r,{code:W.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Le.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,i){return new uo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(i)}]})}_addCheck(t){return new uo({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}uo.create=e=>{var t;return new uo({checks:[],typeName:de.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...we(e)})};class hu extends Ce{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Q.boolean){const r=this._getOrReturnCtx(t);return q(r,{code:W.invalid_type,expected:Q.boolean,received:r.parsedType}),ge}return yn(t.data)}}hu.create=e=>new hu({typeName:de.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...we(e)});class qo extends Ce{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Q.date){const o=this._getOrReturnCtx(t);return q(o,{code:W.invalid_type,expected:Q.date,received:o.parsedType}),ge}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return q(o,{code:W.invalid_date}),ge}const r=new on;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),q(i,{code:W.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),q(i,{code:W.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Le.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new qo({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ce.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}qo.create=e=>new qo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:de.ZodDate,...we(e)});class Wd extends Ce{_parse(t){if(this._getType(t)!==Q.symbol){const r=this._getOrReturnCtx(t);return q(r,{code:W.invalid_type,expected:Q.symbol,received:r.parsedType}),ge}return yn(t.data)}}Wd.create=e=>new Wd({typeName:de.ZodSymbol,...we(e)});class pu extends Ce{_parse(t){if(this._getType(t)!==Q.undefined){const r=this._getOrReturnCtx(t);return q(r,{code:W.invalid_type,expected:Q.undefined,received:r.parsedType}),ge}return yn(t.data)}}pu.create=e=>new pu({typeName:de.ZodUndefined,...we(e)});class mu extends Ce{_parse(t){if(this._getType(t)!==Q.null){const r=this._getOrReturnCtx(t);return q(r,{code:W.invalid_type,expected:Q.null,received:r.parsedType}),ge}return yn(t.data)}}mu.create=e=>new mu({typeName:de.ZodNull,...we(e)});class hs extends Ce{constructor(){super(...arguments),this._any=!0}_parse(t){return yn(t.data)}}hs.create=e=>new hs({typeName:de.ZodAny,...we(e)});class Uo extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(t){return yn(t.data)}}Uo.create=e=>new Uo({typeName:de.ZodUnknown,...we(e)});class mi extends Ce{_parse(t){const n=this._getOrReturnCtx(t);return q(n,{code:W.invalid_type,expected:Q.never,received:n.parsedType}),ge}}mi.create=e=>new mi({typeName:de.ZodNever,...we(e)});class Vd extends Ce{_parse(t){if(this._getType(t)!==Q.undefined){const r=this._getOrReturnCtx(t);return q(r,{code:W.invalid_type,expected:Q.void,received:r.parsedType}),ge}return yn(t.data)}}Vd.create=e=>new Vd({typeName:de.ZodVoid,...we(e)});class Cr extends Ce{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Q.array)return q(n,{code:W.invalid_type,expected:Q.array,received:n.parsedType}),ge;if(i.exactLength!==null){const l=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(l||s)&&(q(n,{code:l?W.too_big:W.too_small,minimum:s?i.exactLength.value:void 0,maximum:l?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(q(n,{code:W.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(q(n,{code:W.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,s)=>i.type._parseAsync(new Hr(n,l,n.path,s)))).then(l=>on.mergeArray(r,l));const o=[...n.data].map((l,s)=>i.type._parseSync(new Hr(n,l,n.path,s)));return on.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Cr({...this._def,minLength:{value:t,message:ce.toString(n)}})}max(t,n){return new Cr({...this._def,maxLength:{value:t,message:ce.toString(n)}})}length(t,n){return new Cr({...this._def,exactLength:{value:t,message:ce.toString(n)}})}nonempty(t){return this.min(1,t)}}Cr.create=(e,t)=>new Cr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:de.ZodArray,...we(t)});function $l(e){if(e instanceof ct){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ci.create($l(r))}return new ct({...e._def,shape:()=>t})}else return e instanceof Cr?new Cr({...e._def,type:$l(e.element)}):e instanceof ci?ci.create($l(e.unwrap())):e instanceof tl?tl.create($l(e.unwrap())):e instanceof Kr?Kr.create(e.items.map(t=>$l(t))):e}class ct extends Ce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Le.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Q.object){const u=this._getOrReturnCtx(t);return q(u,{code:W.invalid_type,expected:Q.object,received:u.parsedType}),ge}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:l}=this._getCached(),s=[];if(!(this._def.catchall instanceof mi&&this._def.unknownKeys==="strip"))for(const u in i.data)l.includes(u)||s.push(u);const a=[];for(const u of l){const c=o[u],d=i.data[u];a.push({key:{status:"valid",value:u},value:c._parse(new Hr(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof mi){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of s)a.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")s.length>0&&(q(i,{code:W.unrecognized_keys,keys:s}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of s){const d=i.data[c];a.push({key:{status:"valid",value:c},value:u._parse(new Hr(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of a){const d=await c.key;u.push({key:d,value:await c.value,alwaysSet:c.alwaysSet})}return u}).then(u=>on.mergeObjectSync(r,u)):on.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(t){return ce.errToObj,new ct({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,l,s;const a=(l=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&l!==void 0?l:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=ce.errToObj(t).message)!==null&&s!==void 0?s:a}:{message:a}}}:{}})}strip(){return new ct({...this._def,unknownKeys:"strip"})}passthrough(){return new ct({...this._def,unknownKeys:"passthrough"})}extend(t){return new ct({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ct({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:de.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ct({...this._def,catchall:t})}pick(t){const n={};return Le.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ct({...this._def,shape:()=>n})}omit(t){const n={};return Le.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ct({...this._def,shape:()=>n})}deepPartial(){return $l(this)}partial(t){const n={};return Le.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new ct({...this._def,shape:()=>n})}required(t){const n={};return Le.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof ci;)o=o._def.innerType;n[r]=o}}),new ct({...this._def,shape:()=>n})}keyof(){return TC(Le.objectKeys(this.shape))}}ct.create=(e,t)=>new ct({shape:()=>e,unknownKeys:"strip",catchall:mi.create(),typeName:de.ZodObject,...we(t)});ct.strictCreate=(e,t)=>new ct({shape:()=>e,unknownKeys:"strict",catchall:mi.create(),typeName:de.ZodObject,...we(t)});ct.lazycreate=(e,t)=>new ct({shape:e,unknownKeys:"strip",catchall:mi.create(),typeName:de.ZodObject,...we(t)});class gu extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const l=o.map(s=>new Er(s.ctx.common.issues));return q(n,{code:W.invalid_union,unionErrors:l}),ge}if(n.common.async)return Promise.all(r.map(async o=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(i);{let o;const l=[];for(const a of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=a._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:u}),u.common.issues.length&&l.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=l.map(a=>new Er(a));return q(n,{code:W.invalid_union,unionErrors:s}),ge}}get options(){return this._def.options}}gu.create=(e,t)=>new gu({options:e,typeName:de.ZodUnion,...we(t)});const Hc=e=>e instanceof xu?Hc(e.schema):e instanceof br?Hc(e.innerType()):e instanceof _u?[e.value]:e instanceof co?e.options:e instanceof wu?Object.keys(e.enum):e instanceof Su?Hc(e._def.innerType):e instanceof pu?[void 0]:e instanceof mu?[null]:null;class If extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Q.object)return q(n,{code:W.invalid_type,expected:Q.object,received:n.parsedType}),ge;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(q(n,{code:W.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ge)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const l=Hc(o.shape[t]);if(!l)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of l){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new If({typeName:de.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...we(r)})}}function jm(e,t){const n=zi(e),r=zi(t);if(e===t)return{valid:!0,data:e};if(n===Q.object&&r===Q.object){const i=Le.objectKeys(t),o=Le.objectKeys(e).filter(s=>i.indexOf(s)!==-1),l={...e,...t};for(const s of o){const a=jm(e[s],t[s]);if(!a.valid)return{valid:!1};l[s]=a.data}return{valid:!0,data:l}}else if(n===Q.array&&r===Q.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const l=e[o],s=t[o],a=jm(l,s);if(!a.valid)return{valid:!1};i.push(a.data)}return{valid:!0,data:i}}else return n===Q.date&&r===Q.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class vu extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,l)=>{if(Lm(o)||Lm(l))return ge;const s=jm(o.value,l.value);return s.valid?((Im(o)||Im(l))&&n.dirty(),{status:n.value,value:s.data}):(q(r,{code:W.invalid_intersection_types}),ge)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,l])=>i(o,l)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}vu.create=(e,t,n)=>new vu({left:e,right:t,typeName:de.ZodIntersection,...we(n)});class Kr extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Q.array)return q(r,{code:W.invalid_type,expected:Q.array,received:r.parsedType}),ge;if(r.data.length<this._def.items.length)return q(r,{code:W.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ge;!this._def.rest&&r.data.length>this._def.items.length&&(q(r,{code:W.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((l,s)=>{const a=this._def.items[s]||this._def.rest;return a?a._parse(new Hr(r,l,r.path,s)):null}).filter(l=>!!l);return r.common.async?Promise.all(o).then(l=>on.mergeArray(n,l)):on.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Kr({...this._def,rest:t})}}Kr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Kr({items:e,typeName:de.ZodTuple,rest:null,...we(t)})};class yu extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Q.object)return q(r,{code:W.invalid_type,expected:Q.object,received:r.parsedType}),ge;const i=[],o=this._def.keyType,l=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new Hr(r,s,r.path,s)),value:l._parse(new Hr(r,r.data[s],r.path,s))});return r.common.async?on.mergeObjectAsync(n,i):on.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ce?new yu({keyType:t,valueType:n,typeName:de.ZodRecord,...we(r)}):new yu({keyType:_r.create(),valueType:t,typeName:de.ZodRecord,...we(n)})}}class Hd extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Q.map)return q(r,{code:W.invalid_type,expected:Q.map,received:r.parsedType}),ge;const i=this._def.keyType,o=this._def.valueType,l=[...r.data.entries()].map(([s,a],u)=>({key:i._parse(new Hr(r,s,r.path,[u,"key"])),value:o._parse(new Hr(r,a,r.path,[u,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const a of l){const u=await a.key,c=await a.value;if(u.status==="aborted"||c.status==="aborted")return ge;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const a of l){const u=a.key,c=a.value;if(u.status==="aborted"||c.status==="aborted")return ge;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}}}}Hd.create=(e,t,n)=>new Hd({valueType:t,keyType:e,typeName:de.ZodMap,...we(n)});class el extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Q.set)return q(r,{code:W.invalid_type,expected:Q.set,received:r.parsedType}),ge;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(q(r,{code:W.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(q(r,{code:W.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function l(a){const u=new Set;for(const c of a){if(c.status==="aborted")return ge;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const s=[...r.data.values()].map((a,u)=>o._parse(new Hr(r,a,r.path,u)));return r.common.async?Promise.all(s).then(a=>l(a)):l(s)}min(t,n){return new el({...this._def,minSize:{value:t,message:ce.toString(n)}})}max(t,n){return new el({...this._def,maxSize:{value:t,message:ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}el.create=(e,t)=>new el({valueType:e,minSize:null,maxSize:null,typeName:de.ZodSet,...we(t)});class Jl extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Q.function)return q(n,{code:W.invalid_type,expected:Q.function,received:n.parsedType}),ge;function r(s,a){return Bd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Fd(),du].filter(u=>!!u),issueData:{code:W.invalid_arguments,argumentsError:a}})}function i(s,a){return Bd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Fd(),du].filter(u=>!!u),issueData:{code:W.invalid_return_type,returnTypeError:a}})}const o={errorMap:n.common.contextualErrorMap},l=n.data;if(this._def.returns instanceof ps){const s=this;return yn(async function(...a){const u=new Er([]),c=await s._def.args.parseAsync(a,o).catch(h=>{throw u.addIssue(r(a,h)),u}),d=await Reflect.apply(l,this,c);return await s._def.returns._def.type.parseAsync(d,o).catch(h=>{throw u.addIssue(i(d,h)),u})})}else{const s=this;return yn(function(...a){const u=s._def.args.safeParse(a,o);if(!u.success)throw new Er([r(a,u.error)]);const c=Reflect.apply(l,this,u.data),d=s._def.returns.safeParse(c,o);if(!d.success)throw new Er([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Jl({...this._def,args:Kr.create(t).rest(Uo.create())})}returns(t){return new Jl({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Jl({args:t||Kr.create([]).rest(Uo.create()),returns:n||Uo.create(),typeName:de.ZodFunction,...we(r)})}}class xu extends Ce{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}xu.create=(e,t)=>new xu({getter:e,typeName:de.ZodLazy,...we(t)});class _u extends Ce{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return q(n,{received:n.data,code:W.invalid_literal,expected:this._def.value}),ge}return{status:"valid",value:t.data}}get value(){return this._def.value}}_u.create=(e,t)=>new _u({value:e,typeName:de.ZodLiteral,...we(t)});function TC(e,t){return new co({values:e,typeName:de.ZodEnum,...we(t)})}class co extends Ce{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return q(n,{expected:Le.joinValues(r),received:n.parsedType,code:W.invalid_type}),ge}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return q(n,{received:n.data,code:W.invalid_enum_value,options:r}),ge}return yn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return co.create(t)}exclude(t){return co.create(this.options.filter(n=>!t.includes(n)))}}co.create=TC;class wu extends Ce{_parse(t){const n=Le.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Q.string&&r.parsedType!==Q.number){const i=Le.objectValues(n);return q(r,{expected:Le.joinValues(i),received:r.parsedType,code:W.invalid_type}),ge}if(n.indexOf(t.data)===-1){const i=Le.objectValues(n);return q(r,{received:r.data,code:W.invalid_enum_value,options:i}),ge}return yn(t.data)}get enum(){return this._def.values}}wu.create=(e,t)=>new wu({values:e,typeName:de.ZodNativeEnum,...we(t)});class ps extends Ce{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Q.promise&&n.common.async===!1)return q(n,{code:W.invalid_type,expected:Q.promise,received:n.parsedType}),ge;const r=n.parsedType===Q.promise?n.data:Promise.resolve(n.data);return yn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ps.create=(e,t)=>new ps({type:e,typeName:de.ZodPromise,...we(t)});class br extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===de.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:l=>{q(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const l=i.transform(r.data,o);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(l).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:l,path:r.path,parent:r})}if(i.type==="refinement"){const l=s=>{const a=i.refinement(s,o);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ge:(s.status==="dirty"&&n.dirty(),l(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?ge:(s.status==="dirty"&&n.dirty(),l(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!fu(l))return l;const s=i.transform(l.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>fu(l)?Promise.resolve(i.transform(l.value,o)).then(s=>({status:n.value,value:s})):l);Le.assertNever(i)}}br.create=(e,t,n)=>new br({schema:e,typeName:de.ZodEffects,effect:t,...we(n)});br.createWithPreprocess=(e,t,n)=>new br({schema:t,effect:{type:"preprocess",transform:e},typeName:de.ZodEffects,...we(n)});class ci extends Ce{_parse(t){return this._getType(t)===Q.undefined?yn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ci.create=(e,t)=>new ci({innerType:e,typeName:de.ZodOptional,...we(t)});class tl extends Ce{_parse(t){return this._getType(t)===Q.null?yn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}tl.create=(e,t)=>new tl({innerType:e,typeName:de.ZodNullable,...we(t)});class Su extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Q.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Su.create=(e,t)=>new Su({innerType:e,typeName:de.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...we(t)});class Kd extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ud(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Er(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Er(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Kd.create=(e,t)=>new Kd({innerType:e,typeName:de.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...we(t)});class Zd extends Ce{_parse(t){if(this._getType(t)!==Q.nan){const r=this._getOrReturnCtx(t);return q(r,{code:W.invalid_type,expected:Q.nan,received:r.parsedType}),ge}return{status:"valid",value:t.data}}}Zd.create=e=>new Zd({typeName:de.ZodNaN,...we(e)});const $5=Symbol("zod_brand");class NC extends Ce{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Bu extends Ce{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ge:o.status==="dirty"?(n.dirty(),bC(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ge:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new Bu({in:t,out:n,typeName:de.ZodPipeline})}}class Gd extends Ce{_parse(t){const n=this._def.innerType._parse(t);return fu(n)&&(n.value=Object.freeze(n.value)),n}}Gd.create=(e,t)=>new Gd({innerType:e,typeName:de.ZodReadonly,...we(t)});const RC=(e,t={},n)=>e?hs.create().superRefine((r,i)=>{var o,l;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,a=(l=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&l!==void 0?l:!0,u=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...u,fatal:a})}}):hs.create(),b5={object:ct.lazycreate};var de;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(de||(de={}));const T5=(e,t={message:`Input not instance of ${e.name}`})=>RC(n=>n instanceof e,t),OC=_r.create,PC=ao.create,N5=Zd.create,R5=uo.create,AC=hu.create,O5=qo.create,P5=Wd.create,A5=pu.create,M5=mu.create,D5=hs.create,L5=Uo.create,I5=mi.create,j5=Vd.create,z5=Cr.create,F5=ct.create,B5=ct.strictCreate,U5=gu.create,W5=If.create,V5=vu.create,H5=Kr.create,K5=yu.create,Z5=Hd.create,G5=el.create,Y5=Jl.create,X5=xu.create,Q5=_u.create,J5=co.create,q5=wu.create,eM=ps.create,bx=br.create,tM=ci.create,nM=tl.create,rM=br.createWithPreprocess,iM=Bu.create,oM=()=>OC().optional(),lM=()=>PC().optional(),sM=()=>AC().optional(),aM={string:e=>_r.create({...e,coerce:!0}),number:e=>ao.create({...e,coerce:!0}),boolean:e=>hu.create({...e,coerce:!0}),bigint:e=>uo.create({...e,coerce:!0}),date:e=>qo.create({...e,coerce:!0})},uM=ge;var Cn=Object.freeze({__proto__:null,defaultErrorMap:du,setErrorMap:h5,getErrorMap:Fd,makeIssue:Bd,EMPTY_PATH:p5,addIssueToContext:q,ParseStatus:on,INVALID:ge,DIRTY:bC,OK:yn,isAborted:Lm,isDirty:Im,isValid:fu,isAsync:Ud,get util(){return Le},get objectUtil(){return Dm},ZodParsedType:Q,getParsedType:zi,ZodType:Ce,ZodString:_r,ZodNumber:ao,ZodBigInt:uo,ZodBoolean:hu,ZodDate:qo,ZodSymbol:Wd,ZodUndefined:pu,ZodNull:mu,ZodAny:hs,ZodUnknown:Uo,ZodNever:mi,ZodVoid:Vd,ZodArray:Cr,ZodObject:ct,ZodUnion:gu,ZodDiscriminatedUnion:If,ZodIntersection:vu,ZodTuple:Kr,ZodRecord:yu,ZodMap:Hd,ZodSet:el,ZodFunction:Jl,ZodLazy:xu,ZodLiteral:_u,ZodEnum:co,ZodNativeEnum:wu,ZodPromise:ps,ZodEffects:br,ZodTransformer:br,ZodOptional:ci,ZodNullable:tl,ZodDefault:Su,ZodCatch:Kd,ZodNaN:Zd,BRAND:$5,ZodBranded:NC,ZodPipeline:Bu,ZodReadonly:Gd,custom:RC,Schema:Ce,ZodSchema:Ce,late:b5,get ZodFirstPartyTypeKind(){return de},coerce:aM,any:D5,array:z5,bigint:R5,boolean:AC,date:O5,discriminatedUnion:W5,effect:bx,enum:J5,function:Y5,instanceof:T5,intersection:V5,lazy:X5,literal:Q5,map:Z5,nan:N5,nativeEnum:q5,never:I5,null:M5,nullable:nM,number:PC,object:F5,oboolean:sM,onumber:lM,optional:tM,ostring:oM,pipeline:iM,preprocess:rM,promise:eM,record:K5,set:G5,strictObject:B5,string:OC,symbol:P5,transformer:bx,tuple:H5,undefined:A5,union:U5,unknown:L5,void:j5,NEVER:uM,ZodIssueCode:W,quotelessJson:f5,ZodError:Er});const cM=Cn.union([Cn.object({id:Cn.string(),mode:Cn.literal("proxy"),full_name:Cn.string().optional().nullable(),username:Cn.string().optional().nullable(),avatar_url:Cn.string().url().optional().nullable(),enabled:Cn.boolean()}),Cn.object({mode:Cn.literal("local"),enabled:Cn.boolean().optional()}),Cn.object({mode:Cn.literal("unauthorized"),enabled:Cn.boolean().optional()})]);function dM(e){const[t,n]=p.useState({status:"not-asked"}),[r,i]=p.useState(0);return p.useEffect(()=>{n({status:"loading"}),e.getSession().then(async o=>{try{if(jo.isOk(o)){const l=o.value;n({status:"success",data:cM.parse(l)})}else o.error.statusCode===401?n({status:"success",data:{mode:"unauthorized"}}):r<3?setTimeout(()=>{i(r+1)},200*r):n({status:"error",error:"Could not fetch session"})}catch(l){console.error("Could not authorize:",l),n({status:"error",error:"Got an error while trying to get session"})}})},[r]),t}const Tx=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Nx=uS,fM=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Nx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=o==null?void 0:o[u];if(c===null)return null;const f=Tx(c)||Tx(d);return i[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,w]=m;return Array.isArray(w)?w.includes({...o,...s}[g]):{...o,...s}[g]===w})?[...u,d,f]:u},[]);return Nx(e,l,a,n==null?void 0:n.class,n==null?void 0:n.className)},hM=fM("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"}}),MC=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const l=r?us:"button";return x.jsx(l,{className:xt(hM({variant:t,size:n,className:e})),ref:o,...i})});MC.displayName="Button";const jv=p.forwardRef(({className:e,type:t,...n},r)=>x.jsx("input",{type:t,className:xt("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}));jv.displayName="Input";function DC(e){const t=e+"CollectionProvider",[n,r]=ll(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=h=>{const{scope:m,children:g}=h,w=re.useRef(null),v=re.useRef(new Map).current;return re.createElement(i,{scope:m,itemMap:v,collectionRef:w},g)},s=e+"CollectionSlot",a=re.forwardRef((h,m)=>{const{scope:g,children:w}=h,v=o(s,g),y=st(m,v.collectionRef);return re.createElement(us,{ref:y},w)}),u=e+"CollectionItemSlot",c="data-radix-collection-item",d=re.forwardRef((h,m)=>{const{scope:g,children:w,...v}=h,y=re.useRef(null),_=st(m,y),S=o(u,g);return re.useEffect(()=>(S.itemMap.set(y,{ref:y,...v}),()=>void S.itemMap.delete(y))),re.createElement(us,{[c]:"",ref:_},w)});function f(h){const m=o(e+"CollectionConsumer",h);return re.useCallback(()=>{const w=m.collectionRef.current;if(!w)return[];const v=Array.from(w.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((S,E)=>v.indexOf(S.ref.current)-v.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:l,Slot:a,ItemSlot:d},f,r]}function pM(e,t=globalThis==null?void 0:globalThis.document){const n=en(e);p.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const zm="dismissableLayer.update",mM="dismissableLayer.pointerDownOutside",gM="dismissableLayer.focusOutside";let Rx;const vM=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yM=p.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:s,onDismiss:a,...u}=e,c=p.useContext(vM),[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=st(t,T=>f(T)),w=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=w.indexOf(v),_=d?w.indexOf(d):-1,S=c.layersWithOutsidePointerEventsDisabled.size>0,E=_>=y,$=xM(T=>{const N=T.target,R=[...c.branches].some(D=>D.contains(N));!E||R||(o==null||o(T),s==null||s(T),T.defaultPrevented||a==null||a())},h),C=_M(T=>{const N=T.target;[...c.branches].some(D=>D.contains(N))||(l==null||l(T),s==null||s(T),T.defaultPrevented||a==null||a())},h);return pM(T=>{_===c.layers.size-1&&(i==null||i(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},h),p.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Rx=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Ox(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Rx)}},[d,h,r,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Ox())},[d,c]),p.useEffect(()=>{const T=()=>m({});return document.addEventListener(zm,T),()=>document.removeEventListener(zm,T)},[]),p.createElement(Ke.div,ie({},u,{ref:g,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:nt(e.onFocusCapture,C.onFocusCapture),onBlurCapture:nt(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:nt(e.onPointerDownCapture,$.onPointerDownCapture)}))});function xM(e,t=globalThis==null?void 0:globalThis.document){const n=en(e),r=p.useRef(!1),i=p.useRef(()=>{});return p.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let c=function(){LC(mM,n,u,{discrete:!0})};var a=c;const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function _M(e,t=globalThis==null?void 0:globalThis.document){const n=en(e),r=p.useRef(!1);return p.useEffect(()=>{const i=o=>{o.target&&!r.current&&LC(gM,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ox(){const e=new CustomEvent(zm);document.dispatchEvent(e)}function LC(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?qN(i,o):i.dispatchEvent(o)}let Bh=0;function wM(){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:Px()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Px()),Bh++,()=>{Bh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Bh--}},[])}function Px(){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 Uh="focusScope.autoFocusOnMount",Wh="focusScope.autoFocusOnUnmount",Ax={bubbles:!1,cancelable:!0},SM=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[s,a]=p.useState(null),u=en(i),c=en(o),d=p.useRef(null),f=st(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($){if(h.paused||!s)return;const C=$.target;s.contains(C)?d.current=C:Oi(d.current,{select:!0})},_=function($){if(h.paused||!s)return;const C=$.relatedTarget;C!==null&&(s.contains(C)||Oi(d.current,{select:!0}))},S=function($){if(document.activeElement===document.body)for(const T of $)T.removedNodes.length>0&&Oi(s)};var g=y,w=_,v=S;document.addEventListener("focusin",y),document.addEventListener("focusout",_);const E=new MutationObserver(S);return s&&E.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",_),E.disconnect()}}},[r,s,h.paused]),p.useEffect(()=>{if(s){Dx.add(h);const g=document.activeElement;if(!s.contains(g)){const v=new CustomEvent(Uh,Ax);s.addEventListener(Uh,u),s.dispatchEvent(v),v.defaultPrevented||(EM(TM(IC(s)),{select:!0}),document.activeElement===g&&Oi(s))}return()=>{s.removeEventListener(Uh,u),setTimeout(()=>{const v=new CustomEvent(Wh,Ax);s.addEventListener(Wh,c),s.dispatchEvent(v),v.defaultPrevented||Oi(g??document.body,{select:!0}),s.removeEventListener(Wh,c),Dx.remove(h)},0)}}},[s,u,c,h]);const m=p.useCallback(g=>{if(!n&&!r||h.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(w&&v){const y=g.currentTarget,[_,S]=CM(y);_&&S?!g.shiftKey&&v===S?(g.preventDefault(),n&&Oi(_,{select:!0})):g.shiftKey&&v===_&&(g.preventDefault(),n&&Oi(S,{select:!0})):v===y&&g.preventDefault()}},[n,r,h.paused]);return p.createElement(Ke.div,ie({tabIndex:-1},l,{ref:f,onKeyDown:m}))});function EM(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Oi(r,{select:t}),document.activeElement!==n)return}function CM(e){const t=IC(e),n=Mx(t,e),r=Mx(t.reverse(),e);return[n,r]}function IC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Mx(e,t){for(const n of e)if(!kM(n,{upTo:t}))return n}function kM(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 $M(e){return e instanceof HTMLInputElement&&"select"in e}function Oi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$M(e)&&t&&e.select()}}const Dx=bM();function bM(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Lx(e,t),e.unshift(t)},remove(t){var n;e=Lx(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Lx(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function TM(e){return e.filter(t=>t.tagName!=="A")}const NM=P_.useId||(()=>{});let RM=0;function jf(e){const[t,n]=p.useState(NM());return Un(()=>{e||n(r=>r??String(RM++))},[e]),e||(t?`radix-${t}`:"")}const OM=["top","right","bottom","left"],fo=Math.min,Dn=Math.max,Yd=Math.round,Sc=Math.floor,ho=e=>({x:e,y:e}),PM={left:"right",right:"left",bottom:"top",top:"bottom"},AM={start:"end",end:"start"};function Fm(e,t,n){return Dn(e,fo(t,n))}function gi(e,t){return typeof e=="function"?e(t):e}function vi(e){return e.split("-")[0]}function Ls(e){return e.split("-")[1]}function zv(e){return e==="x"?"y":"x"}function Fv(e){return e==="y"?"height":"width"}function Is(e){return["top","bottom"].includes(vi(e))?"y":"x"}function Bv(e){return zv(Is(e))}function MM(e,t,n){n===void 0&&(n=!1);const r=Ls(e),i=Bv(e),o=Fv(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Xd(l)),[l,Xd(l)]}function DM(e){const t=Xd(e);return[Bm(e),t,Bm(t)]}function Bm(e){return e.replace(/start|end/g,t=>AM[t])}function LM(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:l;default:return[]}}function IM(e,t,n,r){const i=Ls(e);let o=LM(vi(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(Bm)))),o}function Xd(e){return e.replace(/left|right|bottom|top/g,t=>PM[t])}function jM(e){return{top:0,right:0,bottom:0,left:0,...e}}function jC(e){return typeof e!="number"?jM(e):{top:e,right:e,bottom:e,left:e}}function Qd(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ix(e,t,n){let{reference:r,floating:i}=e;const o=Is(t),l=Bv(t),s=Fv(l),a=vi(t),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let h;switch(a){case"top":h={x:c,y:r.y-i.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-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Ls(t)){case"start":h[l]-=f*(n&&u?-1:1);break;case"end":h[l]+=f*(n&&u?-1:1);break}return h}const zM=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,s=o.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=Ix(u,r,a),f=r,h={},m=0;for(let g=0;g<s.length;g++){const{name:w,fn:v}=s[g],{x:y,y:_,data:S,reset:E}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:l,elements:{reference:e,floating:t}});if(c=y??c,d=_??d,h={...h,[w]:{...h[w],...S}},E&&m<=50){m++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(u=E.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:c,y:d}=Ix(u,f,a)),g=-1;continue}}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function Eu(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=gi(t,e),m=jC(h),w=s[f?d==="floating"?"reference":"floating":d],v=Qd(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:a})),y=d==="floating"?{...l.floating,x:r,y:i}:l.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),S=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},E=Qd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:_,strategy:a}):y);return{top:(v.top-E.top+m.top)/S.y,bottom:(E.bottom-v.bottom+m.bottom)/S.y,left:(v.left-E.left+m.left)/S.x,right:(E.right-v.right+m.right)/S.x}}const jx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:s,middlewareData:a}=t,{element:u,padding:c=0}=gi(e,t)||{};if(u==null)return{};const d=jC(c),f={x:n,y:r},h=Bv(i),m=Fv(h),g=await l.getDimensions(u),w=h==="y",v=w?"top":"left",y=w?"bottom":"right",_=w?"clientHeight":"clientWidth",S=o.reference[m]+o.reference[h]-f[h]-o.floating[m],E=f[h]-o.reference[h],$=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let C=$?$[_]:0;(!C||!await(l.isElement==null?void 0:l.isElement($)))&&(C=s.floating[_]||o.floating[m]);const T=S/2-E/2,N=C/2-g[m]/2-1,R=fo(d[v],N),D=fo(d[y],N),F=R,se=C-g[m]-D,V=C/2-g[m]/2+T,K=Fm(F,V,se),O=!a.arrow&&Ls(i)!=null&&V!=K&&o.reference[m]/2-(V<F?R:D)-g[m]/2<0,A=O?V<F?V-F:V-se:0;return{[h]:f[h]+A,data:{[h]:K,centerOffset:V-K-A,...O&&{alignmentOffset:A}},reset:O}}}),FM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,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,...w}=gi(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const v=vi(i),y=vi(s)===s,_=await(a.isRTL==null?void 0:a.isRTL(u.floating)),S=f||(y||!g?[Xd(s)]:DM(s));!f&&m!=="none"&&S.push(...IM(s,g,m,_));const E=[s,...S],$=await Eu(t,w),C=[];let T=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&C.push($[v]),d){const F=MM(i,l,_);C.push($[F[0]],$[F[1]])}if(T=[...T,{placement:i,overflows:C}],!C.every(F=>F<=0)){var N,R;const F=(((N=o.flip)==null?void 0:N.index)||0)+1,se=E[F];if(se)return{data:{index:F,overflows:T},reset:{placement:se}};let V=(R=T.filter(K=>K.overflows[0]<=0).sort((K,O)=>K.overflows[1]-O.overflows[1])[0])==null?void 0:R.placement;if(!V)switch(h){case"bestFit":{var D;const K=(D=T.map(O=>[O.placement,O.overflows.filter(A=>A>0).reduce((A,k)=>A+k,0)]).sort((O,A)=>O[1]-A[1])[0])==null?void 0:D[0];K&&(V=K);break}case"initialPlacement":V=s;break}if(i!==V)return{reset:{placement:V}}}return{}}}};function zx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fx(e){return OM.some(t=>e[t]>=0)}const BM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=gi(e,t);switch(r){case"referenceHidden":{const o=await Eu(t,{...i,elementContext:"reference"}),l=zx(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Fx(l)}}}case"escaped":{const o=await Eu(t,{...i,altBoundary:!0}),l=zx(o,n.floating);return{data:{escapedOffsets:l,escaped:Fx(l)}}}default:return{}}}}};async function UM(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=vi(n),s=Ls(n),a=Is(n)==="y",u=["left","top"].includes(l)?-1:1,c=o&&a?-1:1,d=gi(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 WM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await UM(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},VM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:s={fn:w=>{let{x:v,y}=w;return{x:v,y}}},...a}=gi(e,t),u={x:n,y:r},c=await Eu(t,a),d=Is(vi(i)),f=zv(d);let h=u[f],m=u[d];if(o){const w=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+c[w],_=h-c[v];h=Fm(y,h,_)}if(l){const w=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+c[w],_=m-c[v];m=Fm(y,m,_)}const g=s.fn({...t,[f]:h,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},HM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:s=0,mainAxis:a=!0,crossAxis:u=!0}=gi(e,t),c={x:n,y:r},d=Is(i),f=zv(d);let h=c[f],m=c[d];const g=gi(s,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){const _=f==="y"?"height":"width",S=o.reference[f]-o.floating[_]+w.mainAxis,E=o.reference[f]+o.reference[_]-w.mainAxis;h<S?h=S:h>E&&(h=E)}if(u){var v,y;const _=f==="y"?"width":"height",S=["top","left"].includes(vi(i)),E=o.reference[d]-o.floating[_]+(S&&((v=l.offset)==null?void 0:v[d])||0)+(S?0:w.crossAxis),$=o.reference[d]+o.reference[_]+(S?0:((y=l.offset)==null?void 0:y[d])||0)-(S?w.crossAxis:0);m<E?m=E:m>$&&(m=$)}return{[f]:h,[d]:m}}}},KM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:l=()=>{},...s}=gi(e,t),a=await Eu(t,s),u=vi(n),c=Ls(n),d=Is(n)==="y",{width:f,height:h}=r.floating;let m,g;u==="top"||u==="bottom"?(m=u,g=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(g=u,m=c==="end"?"top":"bottom");const w=h-a[m],v=f-a[g],y=!t.middlewareData.shift;let _=w,S=v;if(d){const $=f-a.left-a.right;S=c||y?fo(v,$):$}else{const $=h-a.top-a.bottom;_=c||y?fo(w,$):$}if(y&&!c){const $=Dn(a.left,0),C=Dn(a.right,0),T=Dn(a.top,0),N=Dn(a.bottom,0);d?S=f-2*($!==0||C!==0?$+C:Dn(a.left,a.right)):_=h-2*(T!==0||N!==0?T+N:Dn(a.top,a.bottom))}await l({...t,availableWidth:S,availableHeight:_});const E=await i.getDimensions(o.floating);return f!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function po(e){return zC(e)?(e.nodeName||"").toLowerCase():"#document"}function Fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ci(e){var t;return(t=(zC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zC(e){return e instanceof Node||e instanceof Fn(e).Node}function yi(e){return e instanceof Element||e instanceof Fn(e).Element}function Zr(e){return e instanceof HTMLElement||e instanceof Fn(e).HTMLElement}function Bx(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fn(e).ShadowRoot}function Uu(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=or(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function ZM(e){return["table","td","th"].includes(po(e))}function Uv(e){const t=Wv(),n=or(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 GM(e){let t=ms(e);for(;Zr(t)&&!zf(t);){if(Uv(t))return t;t=ms(t)}return null}function Wv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zf(e){return["html","body","#document"].includes(po(e))}function or(e){return Fn(e).getComputedStyle(e)}function Ff(e){return yi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ms(e){if(po(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bx(e)&&e.host||Ci(e);return Bx(t)?t.host:t}function FC(e){const t=ms(e);return zf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zr(t)&&Uu(t)?t:FC(t)}function Cu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=FC(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Fn(i);return o?t.concat(l,l.visualViewport||[],Uu(i)?i:[],l.frameElement&&n?Cu(l.frameElement):[]):t.concat(i,Cu(i,[],n))}function BC(e){const t=or(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Zr(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,s=Yd(n)!==o||Yd(r)!==l;return s&&(n=o,r=l),{width:n,height:r,$:s}}function Vv(e){return yi(e)?e:e.contextElement}function ql(e){const t=Vv(e);if(!Zr(t))return ho(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=BC(t);let l=(o?Yd(n.width):n.width)/r,s=(o?Yd(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const YM=ho(0);function UC(e){const t=Fn(e);return!Wv()||!t.visualViewport?YM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function XM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fn(e)?!1:t}function nl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Vv(e);let l=ho(1);t&&(r?yi(r)&&(l=ql(r)):l=ql(e));const s=XM(o,n,r)?UC(o):ho(0);let a=(i.left+s.x)/l.x,u=(i.top+s.y)/l.y,c=i.width/l.x,d=i.height/l.y;if(o){const f=Fn(o),h=r&&yi(r)?Fn(r):r;let m=f.frameElement;for(;m&&r&&h!==f;){const g=ql(m),w=m.getBoundingClientRect(),v=or(m),y=w.left+(m.clientLeft+parseFloat(v.paddingLeft))*g.x,_=w.top+(m.clientTop+parseFloat(v.paddingTop))*g.y;a*=g.x,u*=g.y,c*=g.x,d*=g.y,a+=y,u+=_,m=Fn(m).frameElement}}return Qd({width:c,height:d,x:a,y:u})}function QM(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Zr(n),o=Ci(n);if(n===o)return t;let l={scrollLeft:0,scrollTop:0},s=ho(1);const a=ho(0);if((i||!i&&r!=="fixed")&&((po(n)!=="body"||Uu(o))&&(l=Ff(n)),Zr(n))){const u=nl(n);s=ql(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 JM(e){return Array.from(e.getClientRects())}function WC(e){return nl(Ci(e)).left+Ff(e).scrollLeft}function qM(e){const t=Ci(e),n=Ff(e),r=e.ownerDocument.body,i=Dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+WC(e);const s=-n.scrollTop;return or(r).direction==="rtl"&&(l+=Dn(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:s}}function e3(e,t){const n=Fn(e),r=Ci(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,s=0,a=0;if(i){o=i.width,l=i.height;const u=Wv();(!u||u&&t==="fixed")&&(s=i.offsetLeft,a=i.offsetTop)}return{width:o,height:l,x:s,y:a}}function t3(e,t){const n=nl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Zr(e)?ql(e):ho(1),l=e.clientWidth*o.x,s=e.clientHeight*o.y,a=i*o.x,u=r*o.y;return{width:l,height:s,x:a,y:u}}function Ux(e,t,n){let r;if(t==="viewport")r=e3(e,n);else if(t==="document")r=qM(Ci(e));else if(yi(t))r=t3(t,n);else{const i=UC(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Qd(r)}function VC(e,t){const n=ms(e);return n===t||!yi(n)||zf(n)?!1:or(n).position==="fixed"||VC(n,t)}function n3(e,t){const n=t.get(e);if(n)return n;let r=Cu(e,[],!1).filter(s=>yi(s)&&po(s)!=="body"),i=null;const o=or(e).position==="fixed";let l=o?ms(e):e;for(;yi(l)&&!zf(l);){const s=or(l),a=Uv(l);!a&&s.position==="fixed"&&(i=null),(o?!a&&!i:!a&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Uu(l)&&!a&&VC(e,l))?r=r.filter(c=>c!==l):i=s,l=ms(l)}return t.set(e,r),r}function r3(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?n3(t,this._c):[].concat(n),r],s=l[0],a=l.reduce((u,c)=>{const d=Ux(t,c,i);return u.top=Dn(d.top,u.top),u.right=fo(d.right,u.right),u.bottom=fo(d.bottom,u.bottom),u.left=Dn(d.left,u.left),u},Ux(t,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function i3(e){return BC(e)}function o3(e,t,n){const r=Zr(t),i=Ci(t),o=n==="fixed",l=nl(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const a=ho(0);if(r||!r&&!o)if((po(t)!=="body"||Uu(i))&&(s=Ff(t)),r){const u=nl(t,!0,o,t);a.x=u.x+t.clientLeft,a.y=u.y+t.clientTop}else i&&(a.x=WC(i));return{x:l.left+s.scrollLeft-a.x,y:l.top+s.scrollTop-a.y,width:l.width,height:l.height}}function Wx(e,t){return!Zr(e)||or(e).position==="fixed"?null:t?t(e):e.offsetParent}function HC(e,t){const n=Fn(e);if(!Zr(e))return n;let r=Wx(e,t);for(;r&&ZM(r)&&or(r).position==="static";)r=Wx(r,t);return r&&(po(r)==="html"||po(r)==="body"&&or(r).position==="static"&&!Uv(r))?n:r||GM(e)||n}const l3=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||HC,o=this.getDimensions;return{reference:o3(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function s3(e){return or(e).direction==="rtl"}const a3={convertOffsetParentRelativeRectToViewportRelativeRect:QM,getDocumentElement:Ci,getClippingRect:r3,getOffsetParent:HC,getElementRects:l3,getClientRects:JM,getDimensions:i3,getScale:ql,isElement:yi,isRTL:s3};function u3(e,t){let n=null,r;const i=Ci(e);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function l(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),o();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const h=Sc(c),m=Sc(i.clientWidth-(u+d)),g=Sc(i.clientHeight-(c+f)),w=Sc(u),y={rootMargin:-h+"px "+-m+"px "+-g+"px "+-w+"px",threshold:Dn(0,fo(1,a))||1};let _=!0;function S(E){const $=E[0].intersectionRatio;if($!==a){if(!_)return l();$?l(!1,$):r=setTimeout(()=>{l(!1,1e-7)},100)}_=!1}try{n=new IntersectionObserver(S,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return l(!0),o}function c3(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=Vv(e),c=i||o?[...u?Cu(u):[],...Cu(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const d=u&&s?u3(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?nl(e):null;a&&w();function w(){const v=nl(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(w)}return n(),()=>{c.forEach(v=>{i&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,a&&cancelAnimationFrame(m)}}const d3=(e,t,n)=>{const r=new Map,i={platform:a3,...n},o={...i.platform,_c:r};return zM(e,t,{...i,platform:o})},f3=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?jx({element:r.current,padding:i}).fn(n):{}:r?jx({element:r,padding:i}).fn(n):{}}}};var Kc=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Jd(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,i;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(!Jd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Jd(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function KC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vx(e,t){const n=KC(e);return Math.round(t*n)/n}function Hx(e){const t=p.useRef(e);return Kc(()=>{t.current=e}),t}function h3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,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);Jd(f,r)||h(r);const[m,g]=p.useState(null),[w,v]=p.useState(null),y=p.useCallback(O=>{O!=$.current&&($.current=O,g(O))},[g]),_=p.useCallback(O=>{O!==C.current&&(C.current=O,v(O))},[v]),S=o||m,E=l||w,$=p.useRef(null),C=p.useRef(null),T=p.useRef(c),N=Hx(a),R=Hx(i),D=p.useCallback(()=>{if(!$.current||!C.current)return;const O={placement:t,strategy:n,middleware:f};R.current&&(O.platform=R.current),d3($.current,C.current,O).then(A=>{const k={...A,isPositioned:!0};F.current&&!Jd(T.current,k)&&(T.current=k,Gr.flushSync(()=>{d(k)}))})},[f,t,n,R]);Kc(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[u]);const F=p.useRef(!1);Kc(()=>(F.current=!0,()=>{F.current=!1}),[]),Kc(()=>{if(S&&($.current=S),E&&(C.current=E),S&&E){if(N.current)return N.current(S,E,D);D()}},[S,E,D,N]);const se=p.useMemo(()=>({reference:$,floating:C,setReference:y,setFloating:_}),[y,_]),V=p.useMemo(()=>({reference:S,floating:E}),[S,E]),K=p.useMemo(()=>{const O={position:n,left:0,top:0};if(!V.floating)return O;const A=Vx(V.floating,c.x),k=Vx(V.floating,c.y);return s?{...O,transform:"translate("+A+"px, "+k+"px)",...KC(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:k}},[n,s,V.floating,c.x,c.y]);return p.useMemo(()=>({...c,update:D,refs:se,elements:V,floatingStyles:K}),[c,D,se,V,K])}function ZC(e){const[t,n]=p.useState(void 0);return Un(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,s;if("borderBoxSize"in o){const a=o.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 GC="Popper",[YC,XC]=ll(GC),[p3,QC]=YC(GC),m3=e=>{const{__scopePopper:t,children:n}=e,[r,i]=p.useState(null);return p.createElement(p3,{scope:t,anchor:r,onAnchorChange:i},n)},g3="PopperAnchor",v3=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=QC(g3,n),l=p.useRef(null),s=st(t,l);return p.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:p.createElement(Ke.div,ie({},i,{ref:s}))}),JC="PopperContent",[y3,NI]=YC(JC),x3=p.forwardRef((e,t)=>{var n,r,i,o,l,s,a,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:w=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:_="partial",hideWhenDetached:S=!1,updatePositionStrategy:E="optimized",onPlaced:$,...C}=e,T=QC(JC,c),[N,R]=p.useState(null),D=st(t,Sn=>R(Sn)),[F,se]=p.useState(null),V=ZC(F),K=(n=V==null?void 0:V.width)!==null&&n!==void 0?n:0,O=(r=V==null?void 0:V.height)!==null&&r!==void 0?r:0,A=d+(h!=="center"?"-"+h:""),k=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},j=Array.isArray(v)?v:[v],I=j.length>0,Z={padding:k,boundary:j.filter(_3),altBoundary:I},{refs:ne,floatingStyles:ke,placement:ve,isPositioned:We,middlewareData:Fe}=h3({strategy:"fixed",placement:A,whileElementsMounted:(...Sn)=>c3(...Sn,{animationFrame:E==="always"}),elements:{reference:T.anchor},middleware:[WM({mainAxis:f+O,alignmentAxis:m}),w&&VM({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?HM():void 0,...Z}),w&&FM({...Z}),KM({...Z,apply:({elements:Sn,rects:ur,availableWidth:je,availableHeight:Tt})=>{const{width:at,height:ln}=ur.reference,En=Sn.floating.style;En.setProperty("--radix-popper-available-width",`${je}px`),En.setProperty("--radix-popper-available-height",`${Tt}px`),En.setProperty("--radix-popper-anchor-width",`${at}px`),En.setProperty("--radix-popper-anchor-height",`${ln}px`)}}),F&&f3({element:F,padding:g}),w3({arrowWidth:K,arrowHeight:O}),S&&BM({strategy:"referenceHidden",...Z})]}),[te,Ie]=qC(ve),be=en($);Un(()=>{We&&(be==null||be())},[We,be]);const Re=(i=Fe.arrow)===null||i===void 0?void 0:i.x,Se=(o=Fe.arrow)===null||o===void 0?void 0:o.y,De=((l=Fe.arrow)===null||l===void 0?void 0:l.centerOffset)!==0,[Qe,Wt]=p.useState();return Un(()=>{N&&Wt(window.getComputedStyle(N).zIndex)},[N]),p.createElement("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...ke,transform:We?ke.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Qe,"--radix-popper-transform-origin":[(s=Fe.transformOrigin)===null||s===void 0?void 0:s.x,(a=Fe.transformOrigin)===null||a===void 0?void 0:a.y].join(" ")},dir:e.dir},p.createElement(y3,{scope:c,placedSide:te,onArrowChange:se,arrowX:Re,arrowY:Se,shouldHideArrow:De},p.createElement(Ke.div,ie({"data-side":te,"data-align":Ie},C,{ref:D,style:{...C.style,animation:We?void 0:"none",opacity:(u=Fe.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function _3(e){return e!==null}const w3=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,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]=qC(s),w={start:"0%",center:"50%",end:"100%"}[g],v=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+f/2,y=((o=(l=u.arrow)===null||l===void 0?void 0:l.y)!==null&&o!==void 0?o:0)+h/2;let _="",S="";return m==="bottom"?(_=d?w:`${v}px`,S=`${-h}px`):m==="top"?(_=d?w:`${v}px`,S=`${a.floating.height+h}px`):m==="right"?(_=`${-h}px`,S=d?w:`${y}px`):m==="left"&&(_=`${a.floating.width+h}px`,S=d?w:`${y}px`),{data:{x:_,y:S}}}});function qC(e){const[t,n="center"]=e.split("-");return[t,n]}const S3=m3,E3=v3,C3=x3,k3=p.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?Lw.createPortal(p.createElement(Ke.div,ie({},i,{ref:t})),r):null});function gs({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=$3({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:r,s=en(n),a=p.useCallback(u=>{if(o){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else i(u)},[o,e,i,s]);return[l,a]}function $3({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,i=p.useRef(r),o=en(t);return p.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function ek(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 b3=p.forwardRef((e,t)=>p.createElement(Ke.span,ie({},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 T3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Sl=new WeakMap,Ec=new WeakMap,Cc={},Vh=0,tk=function(e){return e&&(e.host||tk(e.parentNode))},N3=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tk(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})},R3=function(e,t,n,r){var i=N3(t,Array.isArray(e)?e:[e]);Cc[n]||(Cc[n]=new WeakMap);var o=Cc[n],l=[],s=new Set,a=new Set(i),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};i.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=(Sl.get(f)||0)+1,w=(o.get(f)||0)+1;Sl.set(f,g),o.set(f,w),l.push(f),g===1&&m&&Ec.set(f,!0),w===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}})};return c(t),s.clear(),Vh++,function(){l.forEach(function(d){var f=Sl.get(d)-1,h=o.get(d)-1;Sl.set(d,f),o.set(d,h),f||(Ec.has(d)||d.removeAttribute(r),Ec.delete(d)),h||d.removeAttribute(n)}),Vh--,Vh||(Sl=new WeakMap,Sl=new WeakMap,Ec=new WeakMap,Cc={})}},O3=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||T3(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),R3(r,i,n,"aria-hidden")):function(){return null}},Dr=function(){return Dr=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Dr.apply(this,arguments)};function nk(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function P3(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Zc="right-scroll-bar-position",Gc="width-before-scroll-bar",A3="with-scroll-bars-hidden",M3="--removed-body-scroll-bar-size";function D3(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function L3(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function I3(e,t){return L3(t||null,function(n){return e.forEach(function(r){return D3(r,n)})})}function j3(e){return e}function z3(e,t){t===void 0&&(t=j3);var n=[],r=!1,i={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(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(s){return s!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var s=n;n=[],s.forEach(o),l=n}var a=function(){var c=l;l=[],c.forEach(o)},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 i}function F3(e){e===void 0&&(e={});var t=z3(null);return t.options=Dr({async:!0,ssr:!1},e),t}var rk=function(e){var t=e.sideCar,n=nk(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,Dr({},n))};rk.isSideCarExport=!0;function B3(e,t){return e.useMedium(t),rk}var ik=F3(),Hh=function(){},Bf=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:Hh,onWheelCapture:Hh,onTouchMoveCapture:Hh}),i=r[0],o=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,w=e.as,v=w===void 0?"div":w,y=nk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=f,S=I3([n,t]),E=Dr(Dr({},y),i);return p.createElement(p.Fragment,null,c&&p.createElement(_,{sideCar:ik,removeScrollBar:u,shards:d,noIsolation:h,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n}),l?p.cloneElement(p.Children.only(s),Dr(Dr({},E),{ref:S})):p.createElement(v,Dr({},E,{className:a,ref:S}),s))});Bf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bf.classNames={fullWidth:Gc,zeroRight:Zc};var Kx,U3=function(){if(Kx)return Kx;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function W3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=U3();return t&&e.setAttribute("nonce",t),e}function V3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function H3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var K3=function(){var e=0,t=null;return{add:function(n){e==0&&(t=W3())&&(V3(t,n),H3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Z3=function(){var e=K3();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ok=function(){var e=Z3(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},G3={left:0,top:0,right:0,gap:0},Kh=function(e){return parseInt(e||"",10)||0},Y3=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Kh(n),Kh(r),Kh(i)]},X3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return G3;var t=Y3(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])}},Q3=ok(),J3=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
130
|
+
.`.concat(A3,` {
|
|
131
131
|
overflow: hidden `).concat(r,`;
|
|
132
132
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
133
133
|
}
|
|
@@ -161,12 +161,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
body {
|
|
164
|
-
`).concat(
|
|
164
|
+
`).concat(M3,": ").concat(s,`px;
|
|
165
165
|
}
|
|
166
|
-
`)},
|
|
166
|
+
`)},q3=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=p.useMemo(function(){return X3(i)},[i]);return p.createElement(Q3,{styles:J3(o,!t,i,n?"":"!important")})},Um=!1;if(typeof window<"u")try{var kc=Object.defineProperty({},"passive",{get:function(){return Um=!0,!0}});window.addEventListener("test",kc,kc),window.removeEventListener("test",kc,kc)}catch{Um=!1}var El=Um?{passive:!1}:!1,e4=function(e){return e.tagName==="TEXTAREA"},lk=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!e4(e)&&n[t]==="visible")},t4=function(e){return lk(e,"overflowY")},n4=function(e){return lk(e,"overflowX")},Zx=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=sk(e,n);if(r){var i=ak(e,n),o=i[1],l=i[2];if(o>l)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},r4=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},i4=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},sk=function(e,t){return e==="v"?t4(t):n4(t)},ak=function(e,t){return e==="v"?r4(t):i4(t)},o4=function(e,t){return e==="h"&&t==="rtl"?-1:1},l4=function(e,t,n,r,i){var o=o4(e,window.getComputedStyle(t).direction),l=o*r,s=n.target,a=t.contains(s),u=!1,c=l>0,d=0,f=0;do{var h=ak(e,s),m=h[0],g=h[1],w=h[2],v=g-w-o*m;(m||v)&&sk(e,s)&&(d+=v,f+=m),s=s.parentNode}while(!a&&s!==document.body||a&&(t.contains(s)||t===s));return(c&&(i&&d===0||!i&&l>d)||!c&&(i&&f===0||!i&&-l>f))&&(u=!0),u},$c=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Gx=function(e){return[e.deltaX,e.deltaY]},Yx=function(e){return e&&"current"in e?e.current:e},s4=function(e,t){return e[0]===t[0]&&e[1]===t[1]},a4=function(e){return`
|
|
167
167
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
168
168
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
169
|
-
`)},u4=0,El=[];function c4(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),i=p.useState(u4++)[0],o=p.useState(function(){return ok()})[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(i));var g=PM([e.lockRef.current],(e.shards||[]).map(Yx),!0).filter(Boolean);return g.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[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=$c(g),y=n.current,_="deltaX"in g?g.deltaX:y[0]-v[0],w="deltaY"in g?g.deltaY:y[1]-v[1],E,$=g.target,C=Math.abs(_)>Math.abs(w)?"h":"v";if("touches"in g&&C==="h"&&$.type==="range")return!1;var T=Zx(C,$);if(!T)return!0;if(T?E=C:(E=C==="v"?"h":"v",T=Zx(C,$)),!T)return!1;if(!r.current&&"changedTouches"in g&&(_||w)&&(r.current=E),!E)return!0;var N=r.current||E;return l4(N,S,g,N==="h"?_:w,!0)},[]),a=p.useCallback(function(g){var S=g;if(!(!El.length||El[El.length-1]!==o)){var v="deltaY"in S?Gx(S):$c(S),y=t.current.filter(function(E){return E.name===S.type&&E.target===S.target&&s4(E.delta,v)})[0];if(y&&y.should){S.cancelable&&S.preventDefault();return}if(!y){var _=(l.current.shards||[]).map(Yx).filter(Boolean).filter(function(E){return E.contains(S.target)}),w=_.length>0?s(S,_[0]):!l.current.noIsolation;w&&S.cancelable&&S.preventDefault()}}},[]),u=p.useCallback(function(g,S,v,y){var _={name:g,delta:S,target:v,should:y};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(w){return w!==_})},1)},[]),c=p.useCallback(function(g){n.current=$c(g),r.current=void 0},[]),d=p.useCallback(function(g){u(g.type,Gx(g),g.target,s(g,e.lockRef.current))},[]),f=p.useCallback(function(g){u(g.type,$c(g),g.target,s(g,e.lockRef.current))},[]);p.useEffect(function(){return El.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",a,Sl),document.addEventListener("touchmove",a,Sl),document.addEventListener("touchstart",c,Sl),function(){El=El.filter(function(g){return g!==o}),document.removeEventListener("wheel",a,Sl),document.removeEventListener("touchmove",a,Sl),document.removeEventListener("touchstart",c,Sl)}},[]);var h=e.removeScrollBar,m=e.inert;return p.createElement(p.Fragment,null,m?p.createElement(o,{styles:a4(i)}):null,h?p.createElement(qM,{gapMode:"margin"}):null)}const d4=BM(ik,c4);var uk=p.forwardRef(function(e,t){return p.createElement(Bf,Dr({},e,{ref:t,sideCar:d4}))});uk.classNames=Bf.classNames;const f4=uk,h4=[" ","Enter","ArrowUp","ArrowDown"],p4=[" ","Enter"],Uf="Select",[Wf,Hv,m4]=DC(Uf),[Is,NL]=ol(Uf,[m4,XC]),Kv=XC(),[g4,cl]=Is(Uf),[v4,y4]=Is(Uf),x4=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:l,defaultValue:s,onValueChange:a,dir:u,name:c,autoComplete:d,disabled:f,required:h}=e,m=Kv(t),[g,S]=p.useState(null),[v,y]=p.useState(null),[_,w]=p.useState(!1),E=Gg(u),[$=!1,C]=gs({prop:r,defaultProp:i,onChange:o}),[T,N]=gs({prop:l,defaultProp:s,onChange:a}),R=p.useRef(null),D=g?!!g.closest("form"):!0,[F,se]=p.useState(new Set),V=Array.from(F).map(K=>K.props.value).join(";");return p.createElement(SM,m,p.createElement(g4,{required:h,scope:t,trigger:g,onTriggerChange:S,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:_,onValueNodeHasChildrenChange:w,contentId:jf(),value:T,onValueChange:N,open:$,onOpenChange:C,dir:E,triggerPointerDownPosRef:R,disabled:f},p.createElement(Wf.Provider,{scope:t},p.createElement(v4,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(K=>{se(O=>new Set(O).add(K))},[]),onNativeOptionRemove:p.useCallback(K=>{se(O=>{const A=new Set(O);return A.delete(K),A})},[])},n)),D?p.createElement(hk,{key:V,"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:T,onChange:K=>N(K.target.value),disabled:f},T===void 0?p.createElement("option",{value:""}):null,Array.from(F)):null))},_4="SelectTrigger",w4=p.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Kv(n),l=cl(_4,n),s=l.disabled||r,a=st(t,l.onTriggerChange),u=Hv(n),[c,d,f]=pk(m=>{const g=u().filter(y=>!y.disabled),S=g.find(y=>y.value===l.value),v=mk(g,m,S);v!==void 0&&l.onValueChange(v.value)}),h=()=>{s||(l.onOpenChange(!0),f())};return p.createElement(EM,ie({asChild:!0},o),p.createElement(Ke.button,ie({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":fk(l.value)?"":void 0},i,{ref:a,onClick:nt(i.onClick,m=>{m.currentTarget.focus()}),onPointerDown:nt(i.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:nt(i.onKeyDown,m=>{const g=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&d(m.key),!(g&&m.key===" ")&&h4.includes(m.key)&&(h(),m.preventDefault())})})))}),S4="SelectValue",E4=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...s}=e,a=cl(S4,n),{onValueNodeHasChildrenChange:u}=a,c=o!==void 0,d=st(t,a.onValueNodeChange);return Un(()=>{u(c)},[u,c]),p.createElement(Ke.span,ie({},s,{ref:d,style:{pointerEvents:"none"}}),fk(a.value)?p.createElement(p.Fragment,null,l):o)}),C4=p.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return p.createElement(Ke.span,ie({"aria-hidden":!0},i,{ref:t}),r||"▼")}),k4=e=>p.createElement(kM,ie({asChild:!0},e)),vs="SelectContent",$4=p.forwardRef((e,t)=>{const n=cl(vs,e.__scopeSelect),[r,i]=p.useState();if(Un(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Gr.createPortal(p.createElement(ck,{scope:e.__scopeSelect},p.createElement(Wf.Slot,{scope:e.__scopeSelect},p.createElement("div",null,e.children))),o):null}return p.createElement(b4,ie({},e,{ref:t}))}),ri=10,[ck,Vf]=Is(vs),b4=p.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,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=cl(vs,n),[_,w]=p.useState(null),[E,$]=p.useState(null),C=st(t,te=>w(te)),[T,N]=p.useState(null),[R,D]=p.useState(null),F=Hv(n),[se,V]=p.useState(!1),K=p.useRef(!1);p.useEffect(()=>{if(_)return OM(_)},[_]),w3();const O=p.useCallback(te=>{const[Le,...be]=F().map(De=>De.ref.current),[Re]=be.slice(-1),Se=document.activeElement;for(const De of te)if(De===Se||(De==null||De.scrollIntoView({block:"nearest"}),De===Le&&E&&(E.scrollTop=0),De===Re&&E&&(E.scrollTop=E.scrollHeight),De==null||De.focus(),document.activeElement!==Se))return},[F,E]),A=p.useCallback(()=>O([T,_]),[O,T,_]);p.useEffect(()=>{se&&A()},[se,A]);const{onOpenChange:k,triggerPointerDownPosRef:j}=y;p.useEffect(()=>{if(_){let te={x:0,y:0};const Le=Re=>{var Se,De,Qe,Wt;te={x:Math.abs(Math.round(Re.pageX)-((Se=(De=j.current)===null||De===void 0?void 0:De.x)!==null&&Se!==void 0?Se:0)),y:Math.abs(Math.round(Re.pageY)-((Qe=(Wt=j.current)===null||Wt===void 0?void 0:Wt.y)!==null&&Qe!==void 0?Qe:0))}},be=Re=>{te.x<=10&&te.y<=10?Re.preventDefault():_.contains(Re.target)||k(!1),document.removeEventListener("pointermove",Le),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",Le),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Le),document.removeEventListener("pointerup",be,{capture:!0})}}},[_,k,j]),p.useEffect(()=>{const te=()=>k(!1);return window.addEventListener("blur",te),window.addEventListener("resize",te),()=>{window.removeEventListener("blur",te),window.removeEventListener("resize",te)}},[k]);const[L,Z]=pk(te=>{const Le=F().filter(Se=>!Se.disabled),be=Le.find(Se=>Se.ref.current===document.activeElement),Re=mk(Le,te,be);Re&&setTimeout(()=>Re.ref.current.focus())}),ne=p.useCallback((te,Le,be)=>{const Re=!K.current&&!be;(y.value!==void 0&&y.value===Le||Re)&&(N(te),Re&&(K.current=!0))},[y.value]),ke=p.useCallback(()=>_==null?void 0:_.focus(),[_]),ve=p.useCallback((te,Le,be)=>{const Re=!K.current&&!be;(y.value!==void 0&&y.value===Le||Re)&&D(te)},[y.value]),We=r==="popper"?Xx:T4,Fe=We===Xx?{side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:m,hideWhenDetached:g,avoidCollisions:S}:{};return p.createElement(ck,{scope:n,content:_,viewport:E,onViewportChange:$,itemRefCallback:ne,selectedItem:T,onItemLeave:ke,itemTextRefCallback:ve,focusSelectedItem:A,selectedItemText:R,position:r,isPositioned:se,searchRef:L},p.createElement(f4,{as,allowPinchZoom:!0},p.createElement(S3,{asChild:!0,trapped:y.open,onMountAutoFocus:te=>{te.preventDefault()},onUnmountAutoFocus:nt(i,te=>{var Le;(Le=y.trigger)===null||Le===void 0||Le.focus({preventScroll:!0}),te.preventDefault()})},p.createElement(y3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:te=>te.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},p.createElement(We,ie({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:te=>te.preventDefault()},v,Fe,{onPlaced:()=>V(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:nt(v.onKeyDown,te=>{const Le=te.ctrlKey||te.altKey||te.metaKey;if(te.key==="Tab"&&te.preventDefault(),!Le&&te.key.length===1&&Z(te.key),["ArrowUp","ArrowDown","Home","End"].includes(te.key)){let Re=F().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(te.key)&&(Re=Re.slice().reverse()),["ArrowUp","ArrowDown"].includes(te.key)){const Se=te.target,De=Re.indexOf(Se);Re=Re.slice(De+1)}setTimeout(()=>O(Re)),te.preventDefault()}})}))))))}),T4=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=cl(vs,n),l=Vf(vs,n),[s,a]=p.useState(null),[u,c]=p.useState(null),d=st(t,C=>c(C)),f=Hv(n),h=p.useRef(!1),m=p.useRef(!0),{viewport:g,selectedItem:S,selectedItemText:v,focusSelectedItem:y}=l,_=p.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&u&&g&&S&&v){const C=o.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),N=o.valueNode.getBoundingClientRect(),R=v.getBoundingClientRect();if(o.dir!=="rtl"){const Se=R.left-T.left,De=N.left-Se,Qe=C.left-De,Wt=C.width+Qe,Sn=Math.max(Wt,T.width),ur=window.innerWidth-ri,je=Yp(De,[ri,ur-Sn]);s.style.minWidth=Wt+"px",s.style.left=je+"px"}else{const Se=T.right-R.right,De=window.innerWidth-N.right-Se,Qe=window.innerWidth-C.right-De,Wt=C.width+Qe,Sn=Math.max(Wt,T.width),ur=window.innerWidth-ri,je=Yp(De,[ri,ur-Sn]);s.style.minWidth=Wt+"px",s.style.right=je+"px"}const D=f(),F=window.innerHeight-ri*2,se=g.scrollHeight,V=window.getComputedStyle(u),K=parseInt(V.borderTopWidth,10),O=parseInt(V.paddingTop,10),A=parseInt(V.borderBottomWidth,10),k=parseInt(V.paddingBottom,10),j=K+O+se+k+A,L=Math.min(S.offsetHeight*5,j),Z=window.getComputedStyle(g),ne=parseInt(Z.paddingTop,10),ke=parseInt(Z.paddingBottom,10),ve=C.top+C.height/2-ri,We=F-ve,Fe=S.offsetHeight/2,te=S.offsetTop+Fe,Le=K+O+te,be=j-Le;if(Le<=ve){const Se=S===D[D.length-1].ref.current;s.style.bottom="0px";const De=u.clientHeight-g.offsetTop-g.offsetHeight,Qe=Math.max(We,Fe+(Se?ke:0)+De+A),Wt=Le+Qe;s.style.height=Wt+"px"}else{const Se=S===D[0].ref.current;s.style.top="0px";const Qe=Math.max(ve,K+g.offsetTop+(Se?ne:0)+Fe)+be;s.style.height=Qe+"px",g.scrollTop=Le-ve+g.offsetTop}s.style.margin=`${ri}px 0`,s.style.minHeight=L+"px",s.style.maxHeight=F+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,o.trigger,o.valueNode,s,u,g,S,v,o.dir,r]);Un(()=>_(),[_]);const[w,E]=p.useState();Un(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const $=p.useCallback(C=>{C&&m.current===!0&&(_(),y==null||y(),m.current=!1)},[_,y]);return p.createElement(N4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:$},p.createElement("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},p.createElement(Ke.div,ie({},i,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),Xx=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=ri,...o}=e,l=Kv(n);return p.createElement(CM,ie({},l,o,{ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.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)"}}))}),[N4,R4]=Is(vs,{}),Qx="SelectViewport",O4=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Vf(Qx,n),o=R4(Qx,n),l=st(t,i.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(Wf.Slot,{scope:n},p.createElement(Ke.div,ie({"data-radix-select-viewport":"",role:"presentation"},r,{ref:l,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:nt(r.onScroll,a=>{const u=a.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&c){const f=Math.abs(s.current-u.scrollTop);if(f>0){const h=window.innerHeight-ri*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),_=v-y;c.style.height=y+"px",c.style.bottom==="0px"&&(u.scrollTop=_>0?_:0,c.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),P4="SelectGroup",[RL,A4]=Is(P4),M4="SelectLabel",D4=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=A4(M4,n);return p.createElement(Ke.div,ie({id:i.id},r,{ref:t}))}),Wm="SelectItem",[I4,dk]=Is(Wm),L4=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...l}=e,s=cl(Wm,n),a=Vf(Wm,n),u=s.value===r,[c,d]=p.useState(o??""),[f,h]=p.useState(!1),m=st(t,v=>{var y;return(y=a.itemRefCallback)===null||y===void 0?void 0:y.call(a,v,r,i)}),g=jf(),S=()=>{i||(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(I4,{scope:n,value:r,disabled:i,textId:g,isSelected:u,onItemTextChange:p.useCallback(v=>{d(y=>{var _;return y||((_=v==null?void 0:v.textContent)!==null&&_!==void 0?_:"").trim()})},[])},p.createElement(Wf.ItemSlot,{scope:n,value:r,disabled:i,textValue:c},p.createElement(Ke.div,ie({role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},l,{ref:m,onFocus:nt(l.onFocus,()=>h(!0)),onBlur:nt(l.onBlur,()=>h(!1)),onPointerUp:nt(l.onPointerUp,S),onPointerMove:nt(l.onPointerMove,v=>{if(i){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}else v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:nt(l.onPointerLeave,v=>{if(v.currentTarget===document.activeElement){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}}),onKeyDown:nt(l.onKeyDown,v=>{var y;((y=a.searchRef)===null||y===void 0?void 0:y.current)!==""&&v.key===" "||(p4.includes(v.key)&&S(),v.key===" "&&v.preventDefault())})}))))}),bc="SelectItemText",j4=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,l=cl(bc,n),s=Vf(bc,n),a=dk(bc,n),u=y4(bc,n),[c,d]=p.useState(null),f=st(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 Un(()=>(g(m),()=>S(m)),[g,S,m]),p.createElement(p.Fragment,null,p.createElement(Ke.span,ie({id:a.textId},o,{ref:f})),a.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Gr.createPortal(o.children,l.valueNode):null)}),z4="SelectItemIndicator",F4=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return dk(z4,n).isSelected?p.createElement(Ke.span,ie({"aria-hidden":!0},r,{ref:t})):null}),B4=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.createElement(Ke.div,ie({"aria-hidden":!0},r,{ref:t}))});function fk(e){return e===""||e===void 0}const hk=p.forwardRef((e,t)=>{const{value:n,...r}=e,i=p.useRef(null),o=st(t,i),l=ek(n);return p.useEffect(()=>{const s=i.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(bM,{asChild:!0},p.createElement("select",ie({},r,{ref:o,defaultValue:n})))});hk.displayName="BubbleSelect";function pk(e){const t=en(e),n=p.useRef(""),r=p.useRef(0),i=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]),o=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function mk(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=U4(e,Math.max(o,0));i.length===1&&(l=l.filter(u=>u!==n));const a=l.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return a!==n?a:void 0}function U4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const W4=x4,gk=w4,V4=E4,H4=C4,K4=k4,vk=$4,Z4=O4,yk=D4,xk=L4,G4=j4,Y4=F4,_k=B4,X4=W4,Q4=V4,wk=p.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(gk,{ref:r,className:xt("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,x.jsx(H4,{asChild:!0,children:x.jsx(kC,{className:"w-4 h-4 opacity-50"})})]}));wk.displayName=gk.displayName;const Sk=p.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>x.jsx(K4,{children:x.jsx(vk,{ref:i,className:xt("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:x.jsx(Z4,{className:xt("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Sk.displayName=vk.displayName;const J4=p.forwardRef(({className:e,...t},n)=>x.jsx(yk,{ref:n,className:xt("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));J4.displayName=yk.displayName;const Ek=p.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(xk,{ref:r,className:xt("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:[x.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(Y4,{children:x.jsx(QA,{className:"w-4 h-4"})})}),x.jsx(G4,{children:t})]}));Ek.displayName=xk.displayName;const q4=p.forwardRef(({className:e,...t},n)=>x.jsx(_k,{ref:n,className:xt("-mx-1 my-1 h-px bg-muted",e),...t}));q4.displayName=_k.displayName;function Ck({path:e,disabled:t,source:n,schema:r,registerPatchCallback:i,onSubmit:o}){return(typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="string"?x.jsx(nD,{defaultValue:n,disabled:t,registerPatchCallback:i,onSubmit:o}):(typeof n=="number"||n===null)&&(r==null?void 0:r.type)==="number"?x.jsx(t_,{defaultValue:n,disabled:t,registerPatchCallback:i,onSubmit:o}):(typeof n=="number"||typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="keyOf"?x.jsx(e_,{defaultValue:n,disabled:t,registerPatchCallback:i,onSubmit:o,selector:r.selector}):(typeof n=="number"||n===null)&&(r==null?void 0:r.type)==="number"?x.jsx(t_,{defaultValue:n,disabled:t,registerPatchCallback:i,onSubmit:o}):(typeof n=="number"||typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="keyOf"?x.jsx(e_,{defaultValue:n,disabled:t,registerPatchCallback:i,onSubmit:o,selector:r.selector}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="richtext"?x.jsx(tD,{registerPatchCallback:i,onSubmit:o,defaultValue:n}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="image"?x.jsx(eD,{path:e,registerPatchCallback:i,onSubmit:o,defaultValue:n}):x.jsxs("div",{children:["Unsupported schema: ",r.type]})}function Jx(e,t,n,r){if(!t||!r)return[];const i=r.sha256.slice(0,5),o=function(){const l=ev(t)??"unknown",s=tv(l);if(n){let a=n.split(".").slice(0,-1).join(".")||n;const u=a.lastIndexOf("_");return a.slice(u+1,a.length)===i&&(a=a.slice(0,u)),`/public/${a}_${i}.${s}`}return`/public/${r.sha256}.${s}`}();return[{value:{[Rn]:o,[nn]:"file",metadata:r},op:"replace",path:e},{value:t,op:"file",path:e,filePath:o}]}function eD({path:e,defaultValue:t,onSubmit:n,registerPatchCallback:r}){const[i,o]=p.useState(null),[l,s]=p.useState(!1),[a,u]=p.useState(),[c,d]=p.useState();return p.useEffect(()=>{d(t&&jn.convertFileSource(t).url)},[t]),p.useEffect(()=>{r&&r(async f=>Jx(f,(i==null?void 0:i.src)??null,(i==null?void 0:i.filename)??null,a))},[i,t]),x.jsxs(Uu,{children:[x.jsx("div",{className:"max-w-4xl p-4",children:x.jsxs("label",{htmlFor:`img_input:${e}`,className:"",children:[i||c?x.jsx("img",{src:(i==null?void 0:i.src)||c}):x.jsx("div",{children:"Empty"}),x.jsx("input",{id:`img_input:${e}`,type:"file",hidden:!0,onChange:f=>{_C(f).then(h=>{o({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),o(null),u(void 0)})}})]})},e),n&&i&&x.jsx(Wu,{loading:l,onClick:()=>{s(!0),n(f=>Promise.resolve(Jx(f,i.src,i.filename??null,a))).finally(()=>{s(!1),o(null),u(void 0)})}})]})}function qx(e,t){const{templateStrings:n,exprs:r,files:i}=t?$R(t.getEditorState().toJSON().root):{[nn]:"richtext",templateStrings:[""],exprs:[],files:{}};return[{op:"replace",path:e,value:{templateStrings:n,exprs:r,[nn]:"richtext"}},...Object.entries(i).map(([o,l])=>({op:"file",path:e,filePath:o,value:l}))]}function tD({defaultValue:e,onSubmit:t,registerPatchCallback:n}){const[r,i]=p.useState(null),[o,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(async u=>qx(u,r))},[r]),x.jsxs(Uu,{children:[x.jsx(GA,{onEditor:u=>{i(u)},richtext:e||{children:[],[nn]:"root"}}),t&&o&&x.jsx(Wu,{loading:s||!r,onClick:()=>{r&&(a(!0),t(async u=>qx(u,r)).finally(()=>{a(!1),l(!1)}))}})]})}function e_({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r,selector:i}){const o=EI(i),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"])})(o),[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]),x.jsxs(Uu,{children:[x.jsxs(X4,{defaultValue:a.toString(),disabled:c,onValueChange:h=>{u(f(h))},children:[x.jsx(wk,{children:x.jsx(Q4,{placeholder:"Select a value"})}),x.jsx(Sk,{children:s.values.map(h=>x.jsx(Ek,{value:h.toString(),children:h.toString()},h))})]}),r&&t!==a&&x.jsx(Wu,{loading:c,onClick:()=>{d(!0),r(async h=>[{op:"replace",path:h,value:a}]).finally(()=>{d(!1)})}})]})}function t_({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r}){const[i,o]=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}]})},[]),x.jsxs(Uu,{children:[x.jsx(jv,{ref:a,disabled:l,defaultValue:i??0,onChange:u=>o(Number(u.target.value)),type:"number"}),r&&t!==i&&x.jsx(Wu,{loading: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)})}})]})}function nD({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r}){const[i,o]=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)||""}]})},[]),x.jsxs(Uu,{children:[x.jsx(jv,{ref:a,disabled:l,defaultValue:i??"",onChange:u=>o(u.target.value)}),r&&t!==i&&x.jsx(Wu,{loading: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)})}})]})}function Uu({children:e}){return x.jsx("div",{className:"relative p-4 border rounded border-card",children:e})}function Wu({loading:e,onClick:t}){return x.jsx("div",{className:"sticky bottom-0",children:x.jsx("div",{className:"flex justify-end w-full py-2",children:x.jsx(MC,{disabled:e,onClick:t,children:e?"Saving...":"Save"})})})}const rD=({className:e})=>x.jsxs("svg",{width:"58",height:"34",viewBox:"0 0 58 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[x.jsx("g",{filter:"url(#filter0_d_21_1677)",children:x.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"})}),x.jsx("g",{filter:"url(#filter1_i_21_1677)",children:x.jsx("circle",{cx:"11.4656",cy:"23.7595",r:"2.18557",fill:"currentColor"})}),x.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"}),x.jsxs("defs",{children:[x.jsxs("filter",{id:"filter0_d_21_1677",x:"0.124722",y:"0.124722",width:"22.7729",height:"33.6097",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[x.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),x.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"}),x.jsx("feOffset",{}),x.jsx("feGaussianBlur",{stdDeviation:"2.43764"}),x.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),x.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"}),x.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_21_1677"}),x.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_21_1677",result:"shape"})]}),x.jsxs("filter",{id:"filter1_i_21_1677",x:"9.28003",y:"21.5739",width:"4.37112",height:"4.37112",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[x.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),x.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),x.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"}),x.jsx("feOffset",{}),x.jsx("feGaussianBlur",{stdDeviation:"0.546392"}),x.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),x.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"}),x.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_21_1677"})]})]})]}),kk=rD,$k="Switch",[iD,OL]=ol($k),[oD,lD]=iD($k),sD=p.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:l,disabled:s,value:a="on",onCheckedChange:u,...c}=e,[d,f]=p.useState(null),h=st(t,y=>f(y)),m=p.useRef(!1),g=d?!!d.closest("form"):!0,[S=!1,v]=gs({prop:i,defaultProp:o,onChange:u});return p.createElement(oD,{scope:n,checked:S,disabled:s},p.createElement(Ke.button,ie({type:"button",role:"switch","aria-checked":S,"aria-required":l,"data-state":bk(S),"data-disabled":s?"":void 0,disabled:s,value:a},c,{ref:h,onClick:nt(e.onClick,y=>{v(_=>!_),g&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})),g&&p.createElement(cD,{control:d,bubbles:!m.current,name:r,value:a,checked:S,required:l,disabled:s,style:{transform:"translateX(-100%)"}}))}),aD="SwitchThumb",uD=p.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=lD(aD,n);return p.createElement(Ke.span,ie({"data-state":bk(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),cD=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=p.useRef(null),l=ek(n),s=ZC(t);return p.useEffect(()=>{const a=o.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",ie({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function bk(e){return e?"checked":"unchecked"}const Tk=sD,dD=uD,Vm=p.forwardRef(({className:e,...t},n)=>x.jsx(Tk,{className:xt("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:x.jsx(dD,{className:xt("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")})}));Vm.displayName=Tk.displayName;const Zv=p.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:xt("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Zv.displayName="Card";const fD=p.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:xt("flex flex-col space-y-1.5 p-6",e),...t}));fD.displayName="CardHeader";const hD=p.forwardRef(({className:e,...t},n)=>x.jsx("h3",{ref:n,className:xt("text-2xl font-semibold leading-none tracking-tight",e),...t}));hD.displayName="CardTitle";const pD=p.forwardRef(({className:e,...t},n)=>x.jsx("p",{ref:n,className:xt("text-sm text-muted-foreground",e),...t}));pD.displayName="CardDescription";const mD=p.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:xt("p-6 pt-0",e),...t}));mD.displayName="CardContent";const gD=p.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:xt("flex items-center p-6 pt-0",e),...t}));gD.displayName="CardFooter";/**
|
|
169
|
+
`)},u4=0,Cl=[];function c4(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),i=p.useState(u4++)[0],o=p.useState(function(){return ok()})[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(i));var g=P3([e.lockRef.current],(e.shards||[]).map(Yx),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(g,w){if("touches"in g&&g.touches.length===2)return!l.current.allowPinchZoom;var v=$c(g),y=n.current,_="deltaX"in g?g.deltaX:y[0]-v[0],S="deltaY"in g?g.deltaY:y[1]-v[1],E,$=g.target,C=Math.abs(_)>Math.abs(S)?"h":"v";if("touches"in g&&C==="h"&&$.type==="range")return!1;var T=Zx(C,$);if(!T)return!0;if(T?E=C:(E=C==="v"?"h":"v",T=Zx(C,$)),!T)return!1;if(!r.current&&"changedTouches"in g&&(_||S)&&(r.current=E),!E)return!0;var N=r.current||E;return l4(N,w,g,N==="h"?_:S,!0)},[]),a=p.useCallback(function(g){var w=g;if(!(!Cl.length||Cl[Cl.length-1]!==o)){var v="deltaY"in w?Gx(w):$c(w),y=t.current.filter(function(E){return E.name===w.type&&E.target===w.target&&s4(E.delta,v)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}if(!y){var _=(l.current.shards||[]).map(Yx).filter(Boolean).filter(function(E){return E.contains(w.target)}),S=_.length>0?s(w,_[0]):!l.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),u=p.useCallback(function(g,w,v,y){var _={name:g,delta:w,target:v,should:y};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(S){return S!==_})},1)},[]),c=p.useCallback(function(g){n.current=$c(g),r.current=void 0},[]),d=p.useCallback(function(g){u(g.type,Gx(g),g.target,s(g,e.lockRef.current))},[]),f=p.useCallback(function(g){u(g.type,$c(g),g.target,s(g,e.lockRef.current))},[]);p.useEffect(function(){return Cl.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",a,El),document.addEventListener("touchmove",a,El),document.addEventListener("touchstart",c,El),function(){Cl=Cl.filter(function(g){return g!==o}),document.removeEventListener("wheel",a,El),document.removeEventListener("touchmove",a,El),document.removeEventListener("touchstart",c,El)}},[]);var h=e.removeScrollBar,m=e.inert;return p.createElement(p.Fragment,null,m?p.createElement(o,{styles:a4(i)}):null,h?p.createElement(q3,{gapMode:"margin"}):null)}const d4=B3(ik,c4);var uk=p.forwardRef(function(e,t){return p.createElement(Bf,Dr({},e,{ref:t,sideCar:d4}))});uk.classNames=Bf.classNames;const f4=uk,h4=[" ","Enter","ArrowUp","ArrowDown"],p4=[" ","Enter"],Uf="Select",[Wf,Hv,m4]=DC(Uf),[js,RI]=ll(Uf,[m4,XC]),Kv=XC(),[g4,dl]=js(Uf),[v4,y4]=js(Uf),x4=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:l,defaultValue:s,onValueChange:a,dir:u,name:c,autoComplete:d,disabled:f,required:h}=e,m=Kv(t),[g,w]=p.useState(null),[v,y]=p.useState(null),[_,S]=p.useState(!1),E=Gg(u),[$=!1,C]=gs({prop:r,defaultProp:i,onChange:o}),[T,N]=gs({prop:l,defaultProp:s,onChange:a}),R=p.useRef(null),D=g?!!g.closest("form"):!0,[F,se]=p.useState(new Set),V=Array.from(F).map(K=>K.props.value).join(";");return p.createElement(S3,m,p.createElement(g4,{required:h,scope:t,trigger:g,onTriggerChange:w,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:_,onValueNodeHasChildrenChange:S,contentId:jf(),value:T,onValueChange:N,open:$,onOpenChange:C,dir:E,triggerPointerDownPosRef:R,disabled:f},p.createElement(Wf.Provider,{scope:t},p.createElement(v4,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(K=>{se(O=>new Set(O).add(K))},[]),onNativeOptionRemove:p.useCallback(K=>{se(O=>{const A=new Set(O);return A.delete(K),A})},[])},n)),D?p.createElement(hk,{key:V,"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:T,onChange:K=>N(K.target.value),disabled:f},T===void 0?p.createElement("option",{value:""}):null,Array.from(F)):null))},_4="SelectTrigger",w4=p.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Kv(n),l=dl(_4,n),s=l.disabled||r,a=st(t,l.onTriggerChange),u=Hv(n),[c,d,f]=pk(m=>{const g=u().filter(y=>!y.disabled),w=g.find(y=>y.value===l.value),v=mk(g,m,w);v!==void 0&&l.onValueChange(v.value)}),h=()=>{s||(l.onOpenChange(!0),f())};return p.createElement(E3,ie({asChild:!0},o),p.createElement(Ke.button,ie({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":fk(l.value)?"":void 0},i,{ref:a,onClick:nt(i.onClick,m=>{m.currentTarget.focus()}),onPointerDown:nt(i.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:nt(i.onKeyDown,m=>{const g=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&d(m.key),!(g&&m.key===" ")&&h4.includes(m.key)&&(h(),m.preventDefault())})})))}),S4="SelectValue",E4=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...s}=e,a=dl(S4,n),{onValueNodeHasChildrenChange:u}=a,c=o!==void 0,d=st(t,a.onValueNodeChange);return Un(()=>{u(c)},[u,c]),p.createElement(Ke.span,ie({},s,{ref:d,style:{pointerEvents:"none"}}),fk(a.value)?p.createElement(p.Fragment,null,l):o)}),C4=p.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return p.createElement(Ke.span,ie({"aria-hidden":!0},i,{ref:t}),r||"▼")}),k4=e=>p.createElement(k3,ie({asChild:!0},e)),vs="SelectContent",$4=p.forwardRef((e,t)=>{const n=dl(vs,e.__scopeSelect),[r,i]=p.useState();if(Un(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Gr.createPortal(p.createElement(ck,{scope:e.__scopeSelect},p.createElement(Wf.Slot,{scope:e.__scopeSelect},p.createElement("div",null,e.children))),o):null}return p.createElement(b4,ie({},e,{ref:t}))}),ri=10,[ck,Vf]=js(vs),b4=p.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:l,side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:m,hideWhenDetached:g,avoidCollisions:w,...v}=e,y=dl(vs,n),[_,S]=p.useState(null),[E,$]=p.useState(null),C=st(t,te=>S(te)),[T,N]=p.useState(null),[R,D]=p.useState(null),F=Hv(n),[se,V]=p.useState(!1),K=p.useRef(!1);p.useEffect(()=>{if(_)return O3(_)},[_]),wM();const O=p.useCallback(te=>{const[Ie,...be]=F().map(De=>De.ref.current),[Re]=be.slice(-1),Se=document.activeElement;for(const De of te)if(De===Se||(De==null||De.scrollIntoView({block:"nearest"}),De===Ie&&E&&(E.scrollTop=0),De===Re&&E&&(E.scrollTop=E.scrollHeight),De==null||De.focus(),document.activeElement!==Se))return},[F,E]),A=p.useCallback(()=>O([T,_]),[O,T,_]);p.useEffect(()=>{se&&A()},[se,A]);const{onOpenChange:k,triggerPointerDownPosRef:j}=y;p.useEffect(()=>{if(_){let te={x:0,y:0};const Ie=Re=>{var Se,De,Qe,Wt;te={x:Math.abs(Math.round(Re.pageX)-((Se=(De=j.current)===null||De===void 0?void 0:De.x)!==null&&Se!==void 0?Se:0)),y:Math.abs(Math.round(Re.pageY)-((Qe=(Wt=j.current)===null||Wt===void 0?void 0:Wt.y)!==null&&Qe!==void 0?Qe:0))}},be=Re=>{te.x<=10&&te.y<=10?Re.preventDefault():_.contains(Re.target)||k(!1),document.removeEventListener("pointermove",Ie),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",Ie),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ie),document.removeEventListener("pointerup",be,{capture:!0})}}},[_,k,j]),p.useEffect(()=>{const te=()=>k(!1);return window.addEventListener("blur",te),window.addEventListener("resize",te),()=>{window.removeEventListener("blur",te),window.removeEventListener("resize",te)}},[k]);const[I,Z]=pk(te=>{const Ie=F().filter(Se=>!Se.disabled),be=Ie.find(Se=>Se.ref.current===document.activeElement),Re=mk(Ie,te,be);Re&&setTimeout(()=>Re.ref.current.focus())}),ne=p.useCallback((te,Ie,be)=>{const Re=!K.current&&!be;(y.value!==void 0&&y.value===Ie||Re)&&(N(te),Re&&(K.current=!0))},[y.value]),ke=p.useCallback(()=>_==null?void 0:_.focus(),[_]),ve=p.useCallback((te,Ie,be)=>{const Re=!K.current&&!be;(y.value!==void 0&&y.value===Ie||Re)&&D(te)},[y.value]),We=r==="popper"?Xx:T4,Fe=We===Xx?{side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:m,hideWhenDetached:g,avoidCollisions:w}:{};return p.createElement(ck,{scope:n,content:_,viewport:E,onViewportChange:$,itemRefCallback:ne,selectedItem:T,onItemLeave:ke,itemTextRefCallback:ve,focusSelectedItem:A,selectedItemText:R,position:r,isPositioned:se,searchRef:I},p.createElement(f4,{as:us,allowPinchZoom:!0},p.createElement(SM,{asChild:!0,trapped:y.open,onMountAutoFocus:te=>{te.preventDefault()},onUnmountAutoFocus:nt(i,te=>{var Ie;(Ie=y.trigger)===null||Ie===void 0||Ie.focus({preventScroll:!0}),te.preventDefault()})},p.createElement(yM,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:te=>te.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},p.createElement(We,ie({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:te=>te.preventDefault()},v,Fe,{onPlaced:()=>V(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:nt(v.onKeyDown,te=>{const Ie=te.ctrlKey||te.altKey||te.metaKey;if(te.key==="Tab"&&te.preventDefault(),!Ie&&te.key.length===1&&Z(te.key),["ArrowUp","ArrowDown","Home","End"].includes(te.key)){let Re=F().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(te.key)&&(Re=Re.slice().reverse()),["ArrowUp","ArrowDown"].includes(te.key)){const Se=te.target,De=Re.indexOf(Se);Re=Re.slice(De+1)}setTimeout(()=>O(Re)),te.preventDefault()}})}))))))}),T4=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=dl(vs,n),l=Vf(vs,n),[s,a]=p.useState(null),[u,c]=p.useState(null),d=st(t,C=>c(C)),f=Hv(n),h=p.useRef(!1),m=p.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:v,focusSelectedItem:y}=l,_=p.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&u&&g&&w&&v){const C=o.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),N=o.valueNode.getBoundingClientRect(),R=v.getBoundingClientRect();if(o.dir!=="rtl"){const Se=R.left-T.left,De=N.left-Se,Qe=C.left-De,Wt=C.width+Qe,Sn=Math.max(Wt,T.width),ur=window.innerWidth-ri,je=Yp(De,[ri,ur-Sn]);s.style.minWidth=Wt+"px",s.style.left=je+"px"}else{const Se=T.right-R.right,De=window.innerWidth-N.right-Se,Qe=window.innerWidth-C.right-De,Wt=C.width+Qe,Sn=Math.max(Wt,T.width),ur=window.innerWidth-ri,je=Yp(De,[ri,ur-Sn]);s.style.minWidth=Wt+"px",s.style.right=je+"px"}const D=f(),F=window.innerHeight-ri*2,se=g.scrollHeight,V=window.getComputedStyle(u),K=parseInt(V.borderTopWidth,10),O=parseInt(V.paddingTop,10),A=parseInt(V.borderBottomWidth,10),k=parseInt(V.paddingBottom,10),j=K+O+se+k+A,I=Math.min(w.offsetHeight*5,j),Z=window.getComputedStyle(g),ne=parseInt(Z.paddingTop,10),ke=parseInt(Z.paddingBottom,10),ve=C.top+C.height/2-ri,We=F-ve,Fe=w.offsetHeight/2,te=w.offsetTop+Fe,Ie=K+O+te,be=j-Ie;if(Ie<=ve){const Se=w===D[D.length-1].ref.current;s.style.bottom="0px";const De=u.clientHeight-g.offsetTop-g.offsetHeight,Qe=Math.max(We,Fe+(Se?ke:0)+De+A),Wt=Ie+Qe;s.style.height=Wt+"px"}else{const Se=w===D[0].ref.current;s.style.top="0px";const Qe=Math.max(ve,K+g.offsetTop+(Se?ne:0)+Fe)+be;s.style.height=Qe+"px",g.scrollTop=Ie-ve+g.offsetTop}s.style.margin=`${ri}px 0`,s.style.minHeight=I+"px",s.style.maxHeight=F+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,o.trigger,o.valueNode,s,u,g,w,v,o.dir,r]);Un(()=>_(),[_]);const[S,E]=p.useState();Un(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const $=p.useCallback(C=>{C&&m.current===!0&&(_(),y==null||y(),m.current=!1)},[_,y]);return p.createElement(N4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:$},p.createElement("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S}},p.createElement(Ke.div,ie({},i,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),Xx=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=ri,...o}=e,l=Kv(n);return p.createElement(C3,ie({},l,o,{ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.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)"}}))}),[N4,R4]=js(vs,{}),Qx="SelectViewport",O4=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Vf(Qx,n),o=R4(Qx,n),l=st(t,i.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(Wf.Slot,{scope:n},p.createElement(Ke.div,ie({"data-radix-select-viewport":"",role:"presentation"},r,{ref:l,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:nt(r.onScroll,a=>{const u=a.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&c){const f=Math.abs(s.current-u.scrollTop);if(f>0){const h=window.innerHeight-ri*2,m=parseFloat(c.style.minHeight),g=parseFloat(c.style.height),w=Math.max(m,g);if(w<h){const v=w+f,y=Math.min(h,v),_=v-y;c.style.height=y+"px",c.style.bottom==="0px"&&(u.scrollTop=_>0?_:0,c.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),P4="SelectGroup",[OI,A4]=js(P4),M4="SelectLabel",D4=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=A4(M4,n);return p.createElement(Ke.div,ie({id:i.id},r,{ref:t}))}),Wm="SelectItem",[L4,dk]=js(Wm),I4=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...l}=e,s=dl(Wm,n),a=Vf(Wm,n),u=s.value===r,[c,d]=p.useState(o??""),[f,h]=p.useState(!1),m=st(t,v=>{var y;return(y=a.itemRefCallback)===null||y===void 0?void 0:y.call(a,v,r,i)}),g=jf(),w=()=>{i||(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(L4,{scope:n,value:r,disabled:i,textId:g,isSelected:u,onItemTextChange:p.useCallback(v=>{d(y=>{var _;return y||((_=v==null?void 0:v.textContent)!==null&&_!==void 0?_:"").trim()})},[])},p.createElement(Wf.ItemSlot,{scope:n,value:r,disabled:i,textValue:c},p.createElement(Ke.div,ie({role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},l,{ref:m,onFocus:nt(l.onFocus,()=>h(!0)),onBlur:nt(l.onBlur,()=>h(!1)),onPointerUp:nt(l.onPointerUp,w),onPointerMove:nt(l.onPointerMove,v=>{if(i){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}else v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:nt(l.onPointerLeave,v=>{if(v.currentTarget===document.activeElement){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}}),onKeyDown:nt(l.onKeyDown,v=>{var y;((y=a.searchRef)===null||y===void 0?void 0:y.current)!==""&&v.key===" "||(p4.includes(v.key)&&w(),v.key===" "&&v.preventDefault())})}))))}),bc="SelectItemText",j4=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,l=dl(bc,n),s=Vf(bc,n),a=dk(bc,n),u=y4(bc,n),[c,d]=p.useState(null),f=st(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:w}=u;return Un(()=>(g(m),()=>w(m)),[g,w,m]),p.createElement(p.Fragment,null,p.createElement(Ke.span,ie({id:a.textId},o,{ref:f})),a.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Gr.createPortal(o.children,l.valueNode):null)}),z4="SelectItemIndicator",F4=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return dk(z4,n).isSelected?p.createElement(Ke.span,ie({"aria-hidden":!0},r,{ref:t})):null}),B4=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.createElement(Ke.div,ie({"aria-hidden":!0},r,{ref:t}))});function fk(e){return e===""||e===void 0}const hk=p.forwardRef((e,t)=>{const{value:n,...r}=e,i=p.useRef(null),o=st(t,i),l=ek(n);return p.useEffect(()=>{const s=i.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(b3,{asChild:!0},p.createElement("select",ie({},r,{ref:o,defaultValue:n})))});hk.displayName="BubbleSelect";function pk(e){const t=en(e),n=p.useRef(""),r=p.useRef(0),i=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]),o=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function mk(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=U4(e,Math.max(o,0));i.length===1&&(l=l.filter(u=>u!==n));const a=l.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return a!==n?a:void 0}function U4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const W4=x4,gk=w4,V4=E4,H4=C4,K4=k4,vk=$4,Z4=O4,yk=D4,xk=I4,G4=j4,Y4=F4,_k=B4,X4=W4,Q4=V4,wk=p.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(gk,{ref:r,className:xt("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,x.jsx(H4,{asChild:!0,children:x.jsx(kC,{className:"w-4 h-4 opacity-50"})})]}));wk.displayName=gk.displayName;const Sk=p.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>x.jsx(K4,{children:x.jsx(vk,{ref:i,className:xt("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:x.jsx(Z4,{className:xt("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Sk.displayName=vk.displayName;const J4=p.forwardRef(({className:e,...t},n)=>x.jsx(yk,{ref:n,className:xt("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));J4.displayName=yk.displayName;const Ek=p.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(xk,{ref:r,className:xt("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:[x.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(Y4,{children:x.jsx(QA,{className:"w-4 h-4"})})}),x.jsx(G4,{children:t})]}));Ek.displayName=xk.displayName;const q4=p.forwardRef(({className:e,...t},n)=>x.jsx(_k,{ref:n,className:xt("-mx-1 my-1 h-px bg-muted",e),...t}));q4.displayName=_k.displayName;function Ck({path:e,disabled:t,source:n,schema:r,registerPatchCallback:i,onSubmit:o}){return(typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="string"?x.jsx(rD,{defaultValue:n,disabled:t,registerPatchCallback:i,onSubmit:o}):(typeof n=="number"||n===null)&&(r==null?void 0:r.type)==="number"?x.jsx(t_,{defaultValue:n,disabled:t,registerPatchCallback:i,onSubmit:o}):(typeof n=="number"||typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="keyOf"?x.jsx(e_,{defaultValue:n,disabled:t,registerPatchCallback:i,onSubmit:o,selector:r.selector}):(typeof n=="number"||n===null)&&(r==null?void 0:r.type)==="number"?x.jsx(t_,{defaultValue:n,disabled:t,registerPatchCallback:i,onSubmit:o}):(typeof n=="number"||typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="keyOf"?x.jsx(e_,{defaultValue:n,disabled:t,registerPatchCallback:i,onSubmit:o,selector:r.selector}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="richtext"?x.jsx(nD,{registerPatchCallback:i,onSubmit:o,defaultValue:n}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="image"?x.jsx(tD,{path:e,registerPatchCallback:i,onSubmit:o,defaultValue:n}):x.jsxs("div",{children:["Unsupported schema: ",r.type]})}function Jx(e,t,n,r){if(!t||!r)return[];const i=r.sha256.slice(0,5),o=function(){const l=Sv(t)??"unknown",s=Ev(l);if(n){let a=n.split(".").slice(0,-1).join(".")||n;const u=a.lastIndexOf("_");return a.slice(u+1,a.length)===i&&(a=a.slice(0,u)),`/public/${a}_${i}.${s}`}return`/public/${r.sha256}.${s}`}();return[{value:{[Rn]:o,[nn]:"file",metadata:r},op:"replace",path:e},{value:t,op:"file",path:e,filePath:o}]}function eD(e,t){const n=e+"/metadata";return[{value:t,op:"replace",path:n}]}function tD({path:e,defaultValue:t,onSubmit:n,registerPatchCallback:r}){const[i,o]=p.useState(null),[l,s]=p.useState(!1),[a,u]=p.useState(),[c,d]=p.useState(),[f,h]=p.useState();return p.useEffect(()=>{h(t&&jn.convertFileSource(t).url)},[t]),p.useEffect(()=>{r&&r(async m=>Jx(m,(i==null?void 0:i.src)??null,(i==null?void 0:i.filename)??null,a))},[i,t]),p.useEffect(()=>{var m;if(c)if(a){const g={...a,hotspot:c};u(g)}else t!=null&&t.metadata?u({...t.metadata,hotspot:c}):console.error("Neither image metadata nor value is set");else(m=t==null?void 0:t.metadata)!=null&&m.hotspot&&d(t.metadata.hotspot)},[c,t]),x.jsxs(Wu,{children:[x.jsxs("div",{className:"flex flex-col max-w-4xl p-4 gap-y-4",children:[i||f?x.jsxs("div",{className:"relative",children:[c&&x.jsx("div",{className:"rounded-full h-[20px] w-[20px] bg-accent absolute",style:{top:`${c.y*100}%`,left:`${c.x*100}%`}}),x.jsx("img",{src:(i==null?void 0:i.src)||f,className:"w-full cursor-crosshair",onClick:m=>{const g=m.nativeEvent.offsetX,w=m.nativeEvent.offsetY,v=m.currentTarget.clientWidth,y=m.currentTarget.clientHeight,_=Math.round(g/v*100)/100,S=Math.round(w/y*100)/100;d({x:_,y:S,width:1,height:1})}})]}):x.jsx("div",{children:"Select image below"}),x.jsxs("label",{htmlFor:`img_input:${e}`,className:"",children:[x.jsx("div",{className:"px-1 py-2 text-center rounded-md bg-primary text-background",children:"Update image"}),x.jsx("input",{hidden:!0,id:`img_input:${e}`,type:"file",onChange:m=>{_C(m).then(g=>{o({src:g.src,filename:g.filename}),g.width&&g.height&&g.mimeType?u({sha256:g.sha256,width:g.width,height:g.height,mimeType:g.mimeType,hotspot:c}):(u(void 0),d(void 0))}).catch(g=>{console.error(g.message),o(null),d(void 0),u(void 0)})}})]})]},e),n&&i&&x.jsx(ys,{loading:l,onClick:()=>{s(!0),n(m=>Promise.resolve(Jx(m,i.src,i.filename??null,a))).finally(()=>{s(!1),o(null),u(void 0)})}}),n&&!i&&a&&x.jsx(ys,{loading:l,onClick:()=>{s(!0),n(m=>Promise.resolve(eD(m,a))).finally(()=>{s(!1),o(null),u(void 0)})}})]})}function qx(e,t){const{templateStrings:n,exprs:r,files:i}=t?hO(t.getEditorState().toJSON().root):{[nn]:"richtext",templateStrings:[""],exprs:[],files:{}};return[{op:"replace",path:e,value:{templateStrings:n,exprs:r,[nn]:"richtext"}},...Object.entries(i).map(([o,l])=>({op:"file",path:e,filePath:o,value:l}))]}function nD({defaultValue:e,onSubmit:t,registerPatchCallback:n}){const[r,i]=p.useState(null),[o,l]=p.useState(!1),[s,a]=p.useState(!1);return p.useEffect(()=>{r&&(l(!1),r.registerTextContentListener(()=>{l(!0)}),r.registerDecoratorListener(()=>{l(!0)}),r.registerMutationListener(Jo.LinkNode,()=>{l(!0)}),r.registerMutationListener(Ds,()=>{l(!0)}),r.registerMutationListener(xe.TextNode,()=>{l(!0)}))},[r]),p.useEffect(()=>{r&&n&&n(async u=>qx(u,r))},[r]),x.jsxs(Wu,{children:[x.jsx(GA,{onEditor:u=>{i(u)},richtext:e||{children:[],[nn]:"root"}}),t&&o&&x.jsx(ys,{loading:s||!r,onClick:()=>{r&&(a(!0),t(async u=>qx(u,r)).finally(()=>{a(!1),l(!1)}))}})]})}function e_({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r,selector:i}){const o=CL(i),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"])})(o),[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]),x.jsxs(Wu,{children:[x.jsxs(X4,{defaultValue:a.toString(),disabled:c,onValueChange:h=>{u(f(h))},children:[x.jsx(wk,{children:x.jsx(Q4,{placeholder:"Select a value"})}),x.jsx(Sk,{children:s.values.map(h=>x.jsx(Ek,{value:h.toString(),children:h.toString()},h))})]}),r&&t!==a&&x.jsx(ys,{loading:c,onClick:()=>{d(!0),r(async h=>[{op:"replace",path:h,value:a}]).finally(()=>{d(!1)})}})]})}function t_({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r}){const[i,o]=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}]})},[]),x.jsxs(Wu,{children:[x.jsx(jv,{ref:a,disabled:l,defaultValue:i??0,onChange:u=>o(Number(u.target.value)),type:"number"}),r&&t!==i&&x.jsx(ys,{loading: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)})}})]})}function rD({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r}){const[i,o]=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)||""}]})},[]),x.jsxs(Wu,{children:[x.jsx(jv,{ref:a,disabled:l,defaultValue:i??"",onChange:u=>o(u.target.value)}),r&&t!==i&&x.jsx(ys,{loading: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)})}})]})}function Wu({children:e}){return x.jsx("div",{className:"relative p-4 border rounded border-card",children:e})}function ys({loading:e,onClick:t}){return x.jsx("div",{className:"sticky bottom-0",children:x.jsx("div",{className:"flex justify-end w-full py-2",children:x.jsx(MC,{disabled:e,onClick:t,children:e?"Saving...":"Save"})})})}const iD=({className:e})=>x.jsxs("svg",{width:"58",height:"34",viewBox:"0 0 58 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[x.jsx("g",{filter:"url(#filter0_d_21_1677)",children:x.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"})}),x.jsx("g",{filter:"url(#filter1_i_21_1677)",children:x.jsx("circle",{cx:"11.4656",cy:"23.7595",r:"2.18557",fill:"currentColor"})}),x.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"}),x.jsxs("defs",{children:[x.jsxs("filter",{id:"filter0_d_21_1677",x:"0.124722",y:"0.124722",width:"22.7729",height:"33.6097",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[x.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),x.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"}),x.jsx("feOffset",{}),x.jsx("feGaussianBlur",{stdDeviation:"2.43764"}),x.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),x.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"}),x.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_21_1677"}),x.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_21_1677",result:"shape"})]}),x.jsxs("filter",{id:"filter1_i_21_1677",x:"9.28003",y:"21.5739",width:"4.37112",height:"4.37112",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[x.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),x.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),x.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"}),x.jsx("feOffset",{}),x.jsx("feGaussianBlur",{stdDeviation:"0.546392"}),x.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),x.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"}),x.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_21_1677"})]})]})]}),kk=iD,$k="Switch",[oD,PI]=ll($k),[lD,sD]=oD($k),aD=p.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:l,disabled:s,value:a="on",onCheckedChange:u,...c}=e,[d,f]=p.useState(null),h=st(t,y=>f(y)),m=p.useRef(!1),g=d?!!d.closest("form"):!0,[w=!1,v]=gs({prop:i,defaultProp:o,onChange:u});return p.createElement(lD,{scope:n,checked:w,disabled:s},p.createElement(Ke.button,ie({type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":bk(w),"data-disabled":s?"":void 0,disabled:s,value:a},c,{ref:h,onClick:nt(e.onClick,y=>{v(_=>!_),g&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})),g&&p.createElement(dD,{control:d,bubbles:!m.current,name:r,value:a,checked:w,required:l,disabled:s,style:{transform:"translateX(-100%)"}}))}),uD="SwitchThumb",cD=p.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=sD(uD,n);return p.createElement(Ke.span,ie({"data-state":bk(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),dD=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=p.useRef(null),l=ek(n),s=ZC(t);return p.useEffect(()=>{const a=o.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",ie({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function bk(e){return e?"checked":"unchecked"}const Tk=aD,fD=cD,Vm=p.forwardRef(({className:e,...t},n)=>x.jsx(Tk,{className:xt("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:x.jsx(fD,{className:xt("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")})}));Vm.displayName=Tk.displayName;const Zv=p.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:xt("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Zv.displayName="Card";const hD=p.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:xt("flex flex-col space-y-1.5 p-6",e),...t}));hD.displayName="CardHeader";const pD=p.forwardRef(({className:e,...t},n)=>x.jsx("h3",{ref:n,className:xt("text-2xl font-semibold leading-none tracking-tight",e),...t}));pD.displayName="CardTitle";const mD=p.forwardRef(({className:e,...t},n)=>x.jsx("p",{ref:n,className:xt("text-sm text-muted-foreground",e),...t}));mD.displayName="CardDescription";const gD=p.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:xt("p-6 pt-0",e),...t}));gD.displayName="CardContent";const vD=p.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:xt("flex items-center p-6 pt-0",e),...t}));vD.displayName="CardFooter";/**
|
|
170
170
|
* @remix-run/router v1.13.0
|
|
171
171
|
*
|
|
172
172
|
* Copyright (c) Remix Software Inc.
|
|
@@ -175,8 +175,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
175
175
|
* LICENSE.md file in the root directory of this source tree.
|
|
176
176
|
*
|
|
177
177
|
* @license MIT
|
|
178
|
-
*/function yt(){return yt=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},yt.apply(this,arguments)}var wt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(wt||(wt={}));const n_="popstate";function vD(e){e===void 0&&(e={});function t(r,i){let{pathname:o,search:l,hash:s}=r.location;return Eu("",{pathname:o,search:l,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Vu(i)}return xD(t,n,null,e)}function Oe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function nl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function yD(){return Math.random().toString(36).substr(2,8)}function r_(e,t){return{usr:e.state,key:e.key,idx:t}}function Eu(e,t,n,r){return n===void 0&&(n=null),yt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ki(t):t,{state:n,key:t&&t.key||r||yD()})}function Vu(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 ki(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 xD(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,s=wt.Pop,a=null,u=c();u==null&&(u=0,l.replaceState(yt({},l.state,{idx:u}),""));function c(){return(l.state||{idx:null}).idx}function d(){s=wt.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=wt.Push;let y=Eu(g.location,S,v);n&&n(y,S),u=c()+1;let _=r_(y,u),w=g.createHref(y);try{l.pushState(_,"",w)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(w)}o&&a&&a({action:s,location:g.location,delta:1})}function h(S,v){s=wt.Replace;let y=Eu(g.location,S,v);n&&n(y,S),u=c();let _=r_(y,u),w=g.createHref(y);l.replaceState(_,"",w),o&&a&&a({action:s,location:g.location,delta:0})}function m(S){let v=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof S=="string"?S:Vu(S);return Oe(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(i,l)},listen(S){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(n_,d),a=S,()=>{i.removeEventListener(n_,d),a=null}},createHref(S){return t(i,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 St;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(St||(St={}));const _D=new Set(["lazy","caseSensitive","path","id","index","children"]);function wD(e){return e.index===!0}function Hm(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let l=[...n,o],s=typeof i.id=="string"?i.id:l.join("-");if(Oe(i.index!==!0||!i.children,"Cannot specify children on an index route"),Oe(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),wD(i)){let a=yt({},i,t(i),{id:s});return r[s]=a,a}else{let a=yt({},i,t(i),{id:s,children:void 0});return r[s]=a,i.children&&(a.children=Hm(i.children,t,l,r)),a}})}function Bl(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?ki(t):t,i=Hu(r.pathname||"/",n);if(i==null)return null;let o=Nk(e);ED(o);let l=null;for(let s=0;l==null&&s<o.length;++s)l=PD(o[s],DD(i));return l}function SD(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function Nk(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,l,s)=>{let a={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};a.relativePath.startsWith("/")&&(Oe(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=eo([r,a.relativePath]),c=n.concat(a);o.children&&o.children.length>0&&(Oe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Nk(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:RD(u,o.index),routesMeta:c})};return e.forEach((o,l)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,l);else for(let a of Rk(o.path))i(o,l,a)}),t}function Rk(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=Rk(r.join("/")),s=[];return s.push(...l.map(a=>a===""?o:[o,a].join("/"))),i&&s.push(...l),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function ED(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:OD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const CD=/^:\w+$/,kD=3,$D=2,bD=1,TD=10,ND=-2,i_=e=>e==="*";function RD(e,t){let n=e.split("/"),r=n.length;return n.some(i_)&&(r+=ND),t&&(r+=$D),n.filter(i=>!i_(i)).reduce((i,o)=>i+(CD.test(o)?kD:o===""?bD:TD),r)}function OD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function PD(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let l=0;l<n.length;++l){let s=n[l],a=l===n.length-1,u=i==="/"?t:t.slice(i.length)||"/",c=AD({path:s.relativePath,caseSensitive:s.caseSensitive,end:a},u);if(!c)return null;Object.assign(r,c.params);let d=s.route;o.push({params:r,pathname:eo([i,c.pathname]),pathnameBase:zD(eo([i,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(i=eo([i,c.pathnameBase]))}return o}function AD(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=MD(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],l=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let g=s[d]||"";l=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[d];return h&&!m?u[f]=void 0:u[f]=ID(m||"",f),u},{}),pathname:o,pathnameBase:l,pattern:e}}function MD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),nl(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=[],i="^"+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:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function DD(e){try{return decodeURI(e)}catch(t){return nl(!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 ID(e,t){try{return decodeURIComponent(e)}catch(n){return nl(!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 Hu(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 LD(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ki(e):e;return{pathname:n?n.startsWith("/")?n:jD(n,t):t,search:FD(r),hash:BD(i)}}function jD(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Zh(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 Ok(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Pk(e){return Ok(e).map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function Ak(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ki(e):(i=yt({},e),Oe(!i.pathname||!i.pathname.includes("?"),Zh("?","pathname","search",i)),Oe(!i.pathname||!i.pathname.includes("#"),Zh("#","pathname","hash",i)),Oe(!i.search||!i.search.includes("#"),Zh("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,s;if(l==null)s=n;else if(r){let d=t[t.length-1].replace(/^\//,"").split("/");if(l.startsWith("..")){let f=l.split("/");for(;f[0]==="..";)f.shift(),d.pop();i.pathname=f.join("/")}s="/"+d.join("/")}else{let d=t.length-1;if(l.startsWith("..")){let f=l.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}s=d>=0?t[d]:"/"}let a=LD(i,s),u=l&&l!=="/"&&l.endsWith("/"),c=(o||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const eo=e=>e.join("/").replace(/\/\/+/g,"/"),zD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),FD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,BD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Gv{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Mk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Dk=["post","put","patch","delete"],UD=new Set(Dk),WD=["get",...Dk],VD=new Set(WD),HD=new Set([301,302,303,307,308]),KD=new Set([307,308]),Gh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ZD={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qs={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ik=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,GD=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Lk="remix-router-transitions";function YD(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;Oe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let b=e.detectErrorBoundary;i=M=>({hasErrorBoundary:b(M)})}else i=GD;let o={},l=Hm(e.routes,i,void 0,o),s,a=e.basename||"/",u=yt({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=Bl(l,e.history.location,a),v=null;if(S==null){let b=Gn(404,{pathname:e.history.location.pathname}),{matches:M,route:z}=f_(l);S=M,v={[z.id]:b}}let y=!S.some(b=>b.route.lazy)&&(!S.some(b=>b.route.loader)||e.hydrationData!=null),_,w={historyAction:e.history.action,location:e.history.location,matches:S,initialized:y,navigation:Gh,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},E=wt.Pop,$=!1,C,T=!1,N=new Map,R=null,D=!1,F=!1,se=[],V=[],K=new Map,O=0,A=-1,k=new Map,j=new Set,L=new Map,Z=new Map,ne=new Set,ke=new Map,ve=new Map,We=!1;function Fe(){if(c=e.history.listen(b=>{let{action:M,location:z,delta:G}=b;if(We){We=!1;return}nl(ve.size===0||G!=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 oe=iy({currentLocation:w.location,nextLocation:z,historyAction:M});if(oe&&G!=null){We=!0,e.history.go(G*-1),Ku(oe,{state:"blocked",location:z,proceed(){Ku(oe,{state:"proceeding",proceed:void 0,reset:void 0,location:z}),e.history.go(G)},reset(){let $e=new Map(w.blockers);$e.set(oe,qs),be({blockers:$e})}});return}return Qe(M,z)}),n){lI(t,N);let b=()=>sI(t,N);t.addEventListener("pagehide",b),R=()=>t.removeEventListener("pagehide",b)}return w.initialized||Qe(wt.Pop,w.location),_}function te(){c&&c(),R&&R(),d.clear(),C&&C.abort(),w.fetchers.forEach((b,M)=>Pn(M)),w.blockers.forEach((b,M)=>ry(M))}function Le(b){return d.add(b),()=>d.delete(b)}function be(b,M){M===void 0&&(M={}),w=yt({},w,b);let z=[],G=[];u.v7_fetcherPersist&&w.fetchers.forEach((oe,$e)=>{oe.state==="idle"&&(ne.has($e)?G.push($e):z.push($e))}),[...d].forEach(oe=>oe(w,{deletedFetchers:G,unstable_viewTransitionOpts:M.viewTransitionOpts,unstable_flushSync:M.flushSync===!0})),u.v7_fetcherPersist&&(z.forEach(oe=>w.fetchers.delete(oe)),G.forEach(oe=>Pn(oe)))}function Re(b,M,z){var G,oe;let{flushSync:$e}=z===void 0?{}:z,he=w.actionData!=null&&w.navigation.formMethod!=null&&vr(w.navigation.formMethod)&&w.navigation.state==="loading"&&((G=b.state)==null?void 0:G._isRedirect)!==!0,fe;M.actionData?Object.keys(M.actionData).length>0?fe=M.actionData:fe=null:he?fe=w.actionData:fe=null;let ae=M.loaderData?d_(w.loaderData,M.loaderData,M.matches||[],M.errors):w.loaderData,Ae=w.blockers;Ae.size>0&&(Ae=new Map(Ae),Ae.forEach((Ze,ut)=>Ae.set(ut,qs)));let Vt=$===!0||w.navigation.formMethod!=null&&vr(w.navigation.formMethod)&&((oe=b.state)==null?void 0:oe._isRedirect)!==!0;s&&(l=s,s=void 0),D||E===wt.Pop||(E===wt.Push?e.history.push(b,b.state):E===wt.Replace&&e.history.replace(b,b.state));let Te;if(E===wt.Pop){let Ze=N.get(w.location.pathname);Ze&&Ze.has(b.pathname)?Te={currentLocation:w.location,nextLocation:b}:N.has(b.pathname)&&(Te={currentLocation:b,nextLocation:w.location})}else if(T){let Ze=N.get(w.location.pathname);Ze?Ze.add(b.pathname):(Ze=new Set([b.pathname]),N.set(w.location.pathname,Ze)),Te={currentLocation:w.location,nextLocation:b}}be(yt({},M,{actionData:fe,loaderData:ae,historyAction:E,location:b,initialized:!0,navigation:Gh,revalidation:"idle",restoreScrollPosition:ly(b,M.matches||w.matches),preventScrollReset:Vt,blockers:Ae}),{viewTransitionOpts:Te,flushSync:$e===!0}),E=wt.Pop,$=!1,T=!1,D=!1,F=!1,se=[],V=[]}async function Se(b,M){if(typeof b=="number"){e.history.go(b);return}let z=Km(w.location,w.matches,a,u.v7_prependBasename,b,M==null?void 0:M.fromRouteId,M==null?void 0:M.relative),{path:G,submission:oe,error:$e}=o_(u.v7_normalizeFormMethod,!1,z,M),he=w.location,fe=Eu(w.location,G,M&&M.state);fe=yt({},fe,e.history.encodeLocation(fe));let ae=M&&M.replace!=null?M.replace:void 0,Ae=wt.Push;ae===!0?Ae=wt.Replace:ae===!1||oe!=null&&vr(oe.formMethod)&&oe.formAction===w.location.pathname+w.location.search&&(Ae=wt.Replace);let Vt=M&&"preventScrollReset"in M?M.preventScrollReset===!0:void 0,Te=(M&&M.unstable_flushSync)===!0,Ze=iy({currentLocation:he,nextLocation:fe,historyAction:Ae});if(Ze){Ku(Ze,{state:"blocked",location:fe,proceed(){Ku(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:fe}),Se(b,M)},reset(){let ut=new Map(w.blockers);ut.set(Ze,qs),be({blockers:ut})}});return}return await Qe(Ae,fe,{submission:oe,pendingError:$e,preventScrollReset:Vt,replace:M&&M.replace,enableViewTransition:M&&M.unstable_viewTransition,flushSync:Te})}function De(){if(En(),be({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Qe(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Qe(E||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation})}}async function Qe(b,M,z){C&&C.abort(),C=null,E=b,D=(z&&z.startUninterruptedRevalidation)===!0,p$(w.location,w.matches),$=(z&&z.preventScrollReset)===!0,T=(z&&z.enableViewTransition)===!0;let G=s||l,oe=z&&z.overrideNavigation,$e=Bl(G,M,a),he=(z&&z.flushSync)===!0;if(!$e){let ut=Gn(404,{pathname:M.pathname}),{matches:an,route:Rr}=f_(G);Qf(),Re(M,{matches:an,loaderData:{},errors:{[Rr.id]:ut}},{flushSync:he});return}if(w.initialized&&!F&&eI(w.location,M)&&!(z&&z.submission&&vr(z.submission.formMethod))){Re(M,{matches:$e},{flushSync:he});return}C=new AbortController;let fe=ta(e.history,M,C.signal,z&&z.submission),ae,Ae;if(z&&z.pendingError)Ae={[Pa($e).route.id]:z.pendingError};else if(z&&z.submission&&vr(z.submission.formMethod)){let ut=await Wt(fe,M,z.submission,$e,{replace:z.replace,flushSync:he});if(ut.shortCircuited)return;ae=ut.pendingActionData,Ae=ut.pendingActionError,oe=Yh(M,z.submission),he=!1,fe=new Request(fe.url,{signal:fe.signal})}let{shortCircuited:Vt,loaderData:Te,errors:Ze}=await Sn(fe,M,$e,oe,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,he,ae,Ae);Vt||(C=null,Re(M,yt({matches:$e},ae?{actionData:ae}:{},{loaderData:Te,errors:Ze})))}async function Wt(b,M,z,G,oe){oe===void 0&&(oe={}),En();let $e=iI(M,z);be({navigation:$e},{flushSync:oe.flushSync===!0});let he,fe=Gm(G,M);if(!fe.route.action&&!fe.route.lazy)he={type:St.error,error:Gn(405,{method:b.method,pathname:M.pathname,routeId:fe.route.id})};else if(he=await ea("action",b,fe,G,o,i,a),b.signal.aborted)return{shortCircuited:!0};if(ql(he)){let ae;return oe&&oe.replace!=null?ae=oe.replace:ae=he.location===w.location.pathname+w.location.search,await at(w,he,{submission:z,replace:ae}),{shortCircuited:!0}}if(Aa(he)){let ae=Pa(G,fe.route.id);return(oe&&oe.replace)!==!0&&(E=wt.Push),{pendingActionData:{},pendingActionError:{[ae.route.id]:he.error}}}if(Do(he))throw Gn(400,{type:"defer-action"});return{pendingActionData:{[fe.route.id]:he.data}}}async function Sn(b,M,z,G,oe,$e,he,fe,ae,Ae){let Vt=G||Yh(M,oe),Te=oe||$e||m_(Vt),Ze=s||l,[ut,an]=l_(e.history,w,z,Te,M,F,se,V,ne,L,j,Ze,a,ae,Ae);if(Qf(Ge=>!(z&&z.some(Zn=>Zn.route.id===Ge))||ut&&ut.some(Zn=>Zn.route.id===Ge)),A=++O,ut.length===0&&an.length===0){let Ge=Eo();return Re(M,yt({matches:z,loaderData:{},errors:Ae||null},ae?{actionData:ae}:{},Ge?{fetchers:new Map(w.fetchers)}:{}),{flushSync:fe}),{shortCircuited:!0}}if(!D){an.forEach(Zn=>{let kt=w.fetchers.get(Zn.key),Co=na(void 0,kt?kt.data:void 0);w.fetchers.set(Zn.key,Co)});let Ge=ae||w.actionData;be(yt({navigation:Vt},Ge?Object.keys(Ge).length===0?{actionData:null}:{actionData:Ge}:{},an.length>0?{fetchers:new Map(w.fetchers)}:{}),{flushSync:fe})}an.forEach(Ge=>{K.has(Ge.key)&>(Ge.key),Ge.controller&&K.set(Ge.key,Ge.controller)});let Rr=()=>an.forEach(Ge=>gt(Ge.key));C&&C.signal.addEventListener("abort",Rr);let{results:js,loaderResults:Jf,fetcherResults:fl}=await ln(w.matches,z,ut,an,b);if(b.signal.aborted)return{shortCircuited:!0};C&&C.signal.removeEventListener("abort",Rr),an.forEach(Ge=>K.delete(Ge.key));let cr=h_(js);if(cr){if(cr.idx>=ut.length){let Ge=an[cr.idx-ut.length].key;j.add(Ge)}return await at(w,cr.result,{replace:he}),{shortCircuited:!0}}let{loaderData:Zu,errors:qf}=c_(w,z,ut,Jf,Ae,an,fl,ke);ke.forEach((Ge,Zn)=>{Ge.subscribe(kt=>{(kt||Ge.done)&&ke.delete(Zn)})});let eh=Eo(),th=Ls(A),hl=eh||th||an.length>0;return yt({loaderData:Zu,errors:qf},hl?{fetchers:new Map(w.fetchers)}:{})}function ur(b,M,z,G){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.");K.has(b)&>(b);let oe=(G&&G.unstable_flushSync)===!0,$e=s||l,he=Km(w.location,w.matches,a,u.v7_prependBasename,z,M,G==null?void 0:G.relative),fe=Bl($e,he,a);if(!fe){At(b,M,Gn(404,{pathname:he}),{flushSync:oe});return}let{path:ae,submission:Ae,error:Vt}=o_(u.v7_normalizeFormMethod,!0,he,G);if(Vt){At(b,M,Vt,{flushSync:oe});return}let Te=Gm(fe,ae);if($=(G&&G.preventScrollReset)===!0,Ae&&vr(Ae.formMethod)){je(b,M,ae,Te,fe,oe,Ae);return}L.set(b,{routeId:M,path:ae}),Tt(b,M,ae,Te,fe,oe,Ae)}async function je(b,M,z,G,oe,$e,he){if(En(),L.delete(b),!G.route.action&&!G.route.lazy){let kt=Gn(405,{method:he.formMethod,pathname:z,routeId:M});At(b,M,kt,{flushSync:$e});return}let fe=w.fetchers.get(b);_t(b,oI(he,fe),{flushSync:$e});let ae=new AbortController,Ae=ta(e.history,z,ae.signal,he);K.set(b,ae);let Vt=O,Te=await ea("action",Ae,G,oe,o,i,a);if(Ae.signal.aborted){K.get(b)===ae&&K.delete(b);return}if(ne.has(b)){_t(b,Pi(void 0));return}if(ql(Te))if(K.delete(b),A>Vt){_t(b,Pi(void 0));return}else return j.add(b),_t(b,na(he)),at(w,Te,{fetcherSubmission:he});if(Aa(Te)){At(b,M,Te.error);return}if(Do(Te))throw Gn(400,{type:"defer-action"});let Ze=w.navigation.location||w.location,ut=ta(e.history,Ze,ae.signal),an=s||l,Rr=w.navigation.state!=="idle"?Bl(an,w.navigation.location,a):w.matches;Oe(Rr,"Didn't find any matches after fetcher action");let js=++O;k.set(b,js);let Jf=na(he,Te.data);w.fetchers.set(b,Jf);let[fl,cr]=l_(e.history,w,Rr,he,Ze,F,se,V,ne,L,j,an,a,{[G.route.id]:Te.data},void 0);cr.filter(kt=>kt.key!==b).forEach(kt=>{let Co=kt.key,sy=w.fetchers.get(Co),g$=na(void 0,sy?sy.data:void 0);w.fetchers.set(Co,g$),K.has(Co)&>(Co),kt.controller&&K.set(Co,kt.controller)}),be({fetchers:new Map(w.fetchers)});let Zu=()=>cr.forEach(kt=>gt(kt.key));ae.signal.addEventListener("abort",Zu);let{results:qf,loaderResults:eh,fetcherResults:th}=await ln(w.matches,Rr,fl,cr,ut);if(ae.signal.aborted)return;ae.signal.removeEventListener("abort",Zu),k.delete(b),K.delete(b),cr.forEach(kt=>K.delete(kt.key));let hl=h_(qf);if(hl){if(hl.idx>=fl.length){let kt=cr[hl.idx-fl.length].key;j.add(kt)}return at(w,hl.result)}let{loaderData:Ge,errors:Zn}=c_(w,w.matches,fl,eh,void 0,cr,th,ke);if(w.fetchers.has(b)){let kt=Pi(Te.data);w.fetchers.set(b,kt)}Ls(js),w.navigation.state==="loading"&&js>A?(Oe(E,"Expected pending action"),C&&C.abort(),Re(w.navigation.location,{matches:Rr,loaderData:Ge,errors:Zn,fetchers:new Map(w.fetchers)})):(be({errors:Zn,loaderData:d_(w.loaderData,Ge,Rr,Zn),fetchers:new Map(w.fetchers)}),F=!1)}async function Tt(b,M,z,G,oe,$e,he){let fe=w.fetchers.get(b);_t(b,na(he,fe?fe.data:void 0),{flushSync:$e});let ae=new AbortController,Ae=ta(e.history,z,ae.signal);K.set(b,ae);let Vt=O,Te=await ea("loader",Ae,G,oe,o,i,a);if(Do(Te)&&(Te=await Fk(Te,Ae.signal,!0)||Te),K.get(b)===ae&&K.delete(b),!Ae.signal.aborted){if(ne.has(b)){_t(b,Pi(void 0));return}if(ql(Te))if(A>Vt){_t(b,Pi(void 0));return}else{j.add(b),await at(w,Te);return}if(Aa(Te)){At(b,M,Te.error);return}Oe(!Do(Te),"Unhandled fetcher deferred data"),_t(b,Pi(Te.data))}}async function at(b,M,z){let{submission:G,fetcherSubmission:oe,replace:$e}=z===void 0?{}:z;M.revalidate&&(F=!0);let he=Eu(b.location,M.location,{_isRedirect:!0});if(Oe(he,"Expected a location on the redirect navigation"),n){let Ze=!1;if(M.reloadDocument)Ze=!0;else if(Ik.test(M.location)){const ut=e.history.createURL(M.location);Ze=ut.origin!==t.location.origin||Hu(ut.pathname,a)==null}if(Ze){$e?t.location.replace(M.location):t.location.assign(M.location);return}}C=null;let fe=$e===!0?wt.Replace:wt.Push,{formMethod:ae,formAction:Ae,formEncType:Vt}=b.navigation;!G&&!oe&&ae&&Ae&&Vt&&(G=m_(b.navigation));let Te=G||oe;if(KD.has(M.status)&&Te&&vr(Te.formMethod))await Qe(fe,he,{submission:yt({},Te,{formAction:M.location}),preventScrollReset:$});else{let Ze=Yh(he,G);await Qe(fe,he,{overrideNavigation:Ze,fetcherSubmission:oe,preventScrollReset:$})}}async function ln(b,M,z,G,oe){let $e=await Promise.all([...z.map(ae=>ea("loader",oe,ae,M,o,i,a)),...G.map(ae=>ae.matches&&ae.match&&ae.controller?ea("loader",ta(e.history,ae.path,ae.controller.signal),ae.match,ae.matches,o,i,a):{type:St.error,error:Gn(404,{pathname:ae.path})})]),he=$e.slice(0,z.length),fe=$e.slice(z.length);return await Promise.all([p_(b,z,he,he.map(()=>oe.signal),!1,w.loaderData),p_(b,G.map(ae=>ae.match),fe,G.map(ae=>ae.controller?ae.controller.signal:null),!0)]),{results:$e,loaderResults:he,fetcherResults:fe}}function En(){F=!0,se.push(...Qf()),L.forEach((b,M)=>{K.has(M)&&(V.push(M),gt(M))})}function _t(b,M,z){z===void 0&&(z={}),w.fetchers.set(b,M),be({fetchers:new Map(w.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function At(b,M,z,G){G===void 0&&(G={});let oe=Pa(w.matches,M);Pn(b),be({errors:{[oe.route.id]:z},fetchers:new Map(w.fetchers)},{flushSync:(G&&G.flushSync)===!0})}function sn(b){return u.v7_fetcherPersist&&(Z.set(b,(Z.get(b)||0)+1),ne.has(b)&&ne.delete(b)),w.fetchers.get(b)||ZD}function Pn(b){let M=w.fetchers.get(b);K.has(b)&&!(M&&M.state==="loading"&&k.has(b))&>(b),L.delete(b),k.delete(b),j.delete(b),ne.delete(b),w.fetchers.delete(b)}function qr(b){if(u.v7_fetcherPersist){let M=(Z.get(b)||0)-1;M<=0?(Z.delete(b),ne.add(b)):Z.set(b,M)}else Pn(b);be({fetchers:new Map(w.fetchers)})}function gt(b){let M=K.get(b);Oe(M,"Expected fetch controller: "+b),M.abort(),K.delete(b)}function Nr(b){for(let M of b){let z=sn(M),G=Pi(z.data);w.fetchers.set(M,G)}}function Eo(){let b=[],M=!1;for(let z of j){let G=w.fetchers.get(z);Oe(G,"Expected fetcher: "+z),G.state==="loading"&&(j.delete(z),b.push(z),M=!0)}return Nr(b),M}function Ls(b){let M=[];for(let[z,G]of k)if(G<b){let oe=w.fetchers.get(z);Oe(oe,"Expected fetcher: "+z),oe.state==="loading"&&(gt(z),k.delete(z),M.push(z))}return Nr(M),M.length>0}function f$(b,M){let z=w.blockers.get(b)||qs;return ve.get(b)!==M&&ve.set(b,M),z}function ry(b){w.blockers.delete(b),ve.delete(b)}function Ku(b,M){let z=w.blockers.get(b)||qs;Oe(z.state==="unblocked"&&M.state==="blocked"||z.state==="blocked"&&M.state==="blocked"||z.state==="blocked"&&M.state==="proceeding"||z.state==="blocked"&&M.state==="unblocked"||z.state==="proceeding"&&M.state==="unblocked","Invalid blocker state transition: "+z.state+" -> "+M.state);let G=new Map(w.blockers);G.set(b,M),be({blockers:G})}function iy(b){let{currentLocation:M,nextLocation:z,historyAction:G}=b;if(ve.size===0)return;ve.size>1&&nl(!1,"A router only supports one blocker at a time");let oe=Array.from(ve.entries()),[$e,he]=oe[oe.length-1],fe=w.blockers.get($e);if(!(fe&&fe.state==="proceeding")&&he({currentLocation:M,nextLocation:z,historyAction:G}))return $e}function Qf(b){let M=[];return ke.forEach((z,G)=>{(!b||b(G))&&(z.cancel(),M.push(G),ke.delete(G))}),M}function h$(b,M,z){if(f=b,m=M,h=z||null,!g&&w.navigation===Gh){g=!0;let G=ly(w.location,w.matches);G!=null&&be({restoreScrollPosition:G})}return()=>{f=null,m=null,h=null}}function oy(b,M){return h&&h(b,M.map(G=>SD(G,w.loaderData)))||b.key}function p$(b,M){if(f&&m){let z=oy(b,M);f[z]=m()}}function ly(b,M){if(f){let z=oy(b,M),G=f[z];if(typeof G=="number")return G}return null}function m$(b){o={},s=Hm(b,i,void 0,o)}return _={get basename(){return a},get state(){return w},get routes(){return l},get window(){return t},initialize:Fe,subscribe:Le,enableScrollRestoration:h$,navigate:Se,fetch:ur,revalidate:De,createHref:b=>e.history.createHref(b),encodeLocation:b=>e.history.encodeLocation(b),getFetcher:sn,deleteFetcher:qr,dispose:te,getBlocker:f$,deleteBlocker:ry,_internalFetchControllers:K,_internalActiveDeferreds:ke,_internalSetRoutes:m$},_}function XD(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Km(e,t,n,r,i,o,l){let s,a;if(o){s=[];for(let c of t)if(s.push(c),c.route.id===o){a=c;break}}else s=t,a=t[t.length-1];let u=Ak(i||".",Pk(s),Hu(e.pathname,n)||e.pathname,l==="path");return i==null&&(u.search=e.search,u.hash=e.hash),(i==null||i===""||i===".")&&a&&a.route.index&&!Yv(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:eo([n,u.pathname])),Vu(u)}function o_(e,t,n,r){if(!r||!XD(r))return{path:n};if(r.formMethod&&!rI(r.formMethod))return{path:n,error:Gn(405,{method:r.formMethod})};let i=()=>({path:n,error:Gn(400,{type:"invalid-body"})}),o=r.formMethod||"get",l=e?o.toUpperCase():o.toLowerCase(),s=zk(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!vr(l))return i();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+`
|
|
179
|
-
`},""):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(!vr(l))return i();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 i()}}}Oe(typeof FormData=="function","FormData is not available in this environment");let a,u;if(r.formData)a=Zm(r.formData),u=r.formData;else if(r.body instanceof FormData)a=Zm(r.body),u=r.body;else if(r.body instanceof URLSearchParams)a=r.body,u=u_(a);else if(r.body==null)a=new URLSearchParams,u=new FormData;else try{a=new URLSearchParams(r.body),u=u_(a)}catch{return i()}let c={formMethod:l,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(vr(c.formMethod))return{path:n,submission:c};let d=ki(n);return t&&d.search&&Yv(d.search)&&a.append("index",""),d.search="?"+a,{path:Vu(d),submission:c}}function QD(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function l_(e,t,n,r,i,o,l,s,a,u,c,d,f,h,m){let g=m?Object.values(m)[0]:h?Object.values(h)[0]:void 0,S=e.createURL(t.location),v=e.createURL(i),y=m?Object.keys(m)[0]:void 0,w=QD(n,y).filter(($,C)=>{if($.route.lazy)return!0;if($.route.loader==null)return!1;if(JD(t.loaderData,t.matches[C],$)||l.some(R=>R===$.route.id))return!0;let T=t.matches[C],N=$;return s_($,yt({currentUrl:S,currentParams:T.params,nextUrl:v,nextParams:N.params},r,{actionResult:g,defaultShouldRevalidate:o||S.pathname+S.search===v.pathname+v.search||S.search!==v.search||jk(T,N)}))}),E=[];return u.forEach(($,C)=>{if(!n.some(F=>F.route.id===$.routeId)||a.has(C))return;let T=Bl(d,$.path,f);if(!T){E.push({key:C,routeId:$.routeId,path:$.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(C),R=Gm(T,$.path),D=!1;c.has(C)?D=!1:s.includes(C)?D=!0:N&&N.state!=="idle"&&N.data===void 0?D=o:D=s_(R,yt({currentUrl:S,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:g,defaultShouldRevalidate:o})),D&&E.push({key:C,routeId:$.routeId,path:$.path,matches:T,match:R,controller:new AbortController})}),[w,E]}function JD(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function jk(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function s_(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function a_(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Oe(i,"No route found in manifest");let o={};for(let l in r){let a=i[l]!==void 0&&l!=="hasErrorBoundary";nl(!a,'Route "'+i.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&&!_D.has(l)&&(o[l]=r[l])}Object.assign(i,o),Object.assign(i,yt({},t(i),{lazy:void 0}))}async function ea(e,t,n,r,i,o,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}),a_(n.route,o,i)]);if(g)throw g;u=S[0]}else if(await a_(n.route,o,i),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 Gn(405,{method:t.method,pathname:S,routeId:n.route.id})}else return{type:St.data,data:void 0};else if(m)u=await d(m);else{let g=new URL(t.url),S=g.pathname+g.search;throw Gn(404,{pathname:S})}Oe(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=St.error,u=m}finally{c&&t.signal.removeEventListener("abort",c)}if(nI(u)){let m=u.status;if(HD.has(m)){let v=u.headers.get("Location");if(Oe(v,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ik.test(v))v=Km(new URL(t.url),r.slice(0,r.indexOf(n)+1),l,!0,v);else if(!s.isStaticRequest){let y=new URL(t.url),_=v.startsWith("//")?new URL(y.protocol+v):new URL(v),w=Hu(_.pathname,l)!=null;_.origin===y.origin&&w&&(v=_.pathname+_.search+_.hash)}if(s.isStaticRequest)throw u.headers.set("Location",v),u;return{type:St.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===St.error?St.error:St.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===St.error?{type:a,error:new Gv(m,u.statusText,g),headers:u.headers}:{type:St.data,data:g,statusCode:u.status,headers:u.headers}}if(a===St.error)return{type:a,error:u};if(tI(u)){var f,h;return{type:St.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:St.data,data:u}}function ta(e,t,n,r){let i=e.createURL(zk(t)).toString(),o={signal:n};if(r&&vr(r.formMethod)){let{formMethod:l,formEncType:s}=r;o.method=l.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(r.json)):s==="text/plain"?o.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?o.body=Zm(r.formData):o.body=r.formData}return new Request(i,o)}function Zm(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function u_(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function qD(e,t,n,r,i){let o={},l=null,s,a=!1,u={};return n.forEach((c,d)=>{let f=t[d].route.id;if(Oe(!ql(c),"Cannot handle redirect results in processLoaderData"),Aa(c)){let h=Pa(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),o[f]=void 0,a||(a=!0,s=Mk(c.error)?c.error.status:500),c.headers&&(u[f]=c.headers)}else Do(c)?(i.set(f,c.deferredData),o[f]=c.deferredData.data):o[f]=c.data,c.statusCode!=null&&c.statusCode!==200&&!a&&(s=c.statusCode),c.headers&&(u[f]=c.headers)}),r&&(l=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:l,statusCode:s||200,loaderHeaders:u}}function c_(e,t,n,r,i,o,l,s){let{loaderData:a,errors:u}=qD(t,n,r,i,s);for(let c=0;c<o.length;c++){let{key:d,match:f,controller:h}=o[c];Oe(l!==void 0&&l[c]!==void 0,"Did not find corresponding fetcher result");let m=l[c];if(!(h&&h.signal.aborted))if(Aa(m)){let g=Pa(e.matches,f==null?void 0:f.route.id);u&&u[g.route.id]||(u=yt({},u,{[g.route.id]:m.error})),e.fetchers.delete(d)}else if(ql(m))Oe(!1,"Unhandled fetcher revalidation redirect");else if(Do(m))Oe(!1,"Unhandled fetcher deferred data");else{let g=Pi(m.data);e.fetchers.set(d,g)}}return{loaderData:a,errors:u}}function d_(e,t,n,r){let i=yt({},t);for(let o of n){let l=o.route.id;if(t.hasOwnProperty(l)?t[l]!==void 0&&(i[l]=t[l]):e[l]!==void 0&&o.route.loader&&(i[l]=e[l]),r&&r.hasOwnProperty(l))break}return i}function Pa(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 f_(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 Gn(e,t){let{pathname:n,routeId:r,method:i,type:o}=t===void 0?{}:t,l="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(l="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="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",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new Gv(e||500,l,new Error(s),!0)}function h_(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(ql(n))return{result:n,idx:t}}}function zk(e){let t=typeof e=="string"?ki(e):e;return Vu(yt({},t,{hash:""}))}function eI(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Do(e){return e.type===St.deferred}function Aa(e){return e.type===St.error}function ql(e){return(e&&e.type)===St.redirect}function tI(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 nI(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function rI(e){return VD.has(e.toLowerCase())}function vr(e){return UD.has(e.toLowerCase())}async function p_(e,t,n,r,i,o){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&&!jk(u,a)&&(o&&o[a.route.id])!==void 0;if(Do(s)&&(i||c)){let d=r[l];Oe(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await Fk(s,d,i).then(f=>{f&&(n[l]=f||n[l])})}}}async function Fk(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:St.data,data:e.deferredData.unwrappedData}}catch(i){return{type:St.error,error:i}}return{type:St.data,data:e.deferredData.data}}}function Yv(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Gm(e,t){let n=typeof t=="string"?ki(t).search:t.search;if(e[e.length-1].route.index&&Yv(n||""))return e[e.length-1];let r=Ok(e);return r[r.length-1]}function m_(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:l}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,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 Yh(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 iI(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 na(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 oI(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 Pi(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 lI(e,t){try{let n=e.sessionStorage.getItem(Lk);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function sI(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(Lk,JSON.stringify(n))}catch(r){nl(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
|
|
178
|
+
*/function yt(){return yt=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},yt.apply(this,arguments)}var wt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(wt||(wt={}));const n_="popstate";function yD(e){e===void 0&&(e={});function t(r,i){let{pathname:o,search:l,hash:s}=r.location;return ku("",{pathname:o,search:l,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Vu(i)}return _D(t,n,null,e)}function Oe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function rl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xD(){return Math.random().toString(36).substr(2,8)}function r_(e,t){return{usr:e.state,key:e.key,idx:t}}function ku(e,t,n,r){return n===void 0&&(n=null),yt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ki(t):t,{state:n,key:t&&t.key||r||xD()})}function Vu(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 ki(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 _D(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,s=wt.Pop,a=null,u=c();u==null&&(u=0,l.replaceState(yt({},l.state,{idx:u}),""));function c(){return(l.state||{idx:null}).idx}function d(){s=wt.Pop;let w=c(),v=w==null?null:w-u;u=w,a&&a({action:s,location:g.location,delta:v})}function f(w,v){s=wt.Push;let y=ku(g.location,w,v);n&&n(y,w),u=c()+1;let _=r_(y,u),S=g.createHref(y);try{l.pushState(_,"",S)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(S)}o&&a&&a({action:s,location:g.location,delta:1})}function h(w,v){s=wt.Replace;let y=ku(g.location,w,v);n&&n(y,w),u=c();let _=r_(y,u),S=g.createHref(y);l.replaceState(_,"",S),o&&a&&a({action:s,location:g.location,delta:0})}function m(w){let v=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof w=="string"?w:Vu(w);return Oe(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(i,l)},listen(w){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(n_,d),a=w,()=>{i.removeEventListener(n_,d),a=null}},createHref(w){return t(i,w)},createURL:m,encodeLocation(w){let v=m(w);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(w){return l.go(w)}};return g}var St;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(St||(St={}));const wD=new Set(["lazy","caseSensitive","path","id","index","children"]);function SD(e){return e.index===!0}function Hm(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let l=[...n,o],s=typeof i.id=="string"?i.id:l.join("-");if(Oe(i.index!==!0||!i.children,"Cannot specify children on an index route"),Oe(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),SD(i)){let a=yt({},i,t(i),{id:s});return r[s]=a,a}else{let a=yt({},i,t(i),{id:s,children:void 0});return r[s]=a,i.children&&(a.children=Hm(i.children,t,l,r)),a}})}function Ul(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?ki(t):t,i=Hu(r.pathname||"/",n);if(i==null)return null;let o=Nk(e);CD(o);let l=null;for(let s=0;l==null&&s<o.length;++s)l=AD(o[s],LD(i));return l}function ED(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function Nk(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,l,s)=>{let a={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};a.relativePath.startsWith("/")&&(Oe(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=eo([r,a.relativePath]),c=n.concat(a);o.children&&o.children.length>0&&(Oe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Nk(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:OD(u,o.index),routesMeta:c})};return e.forEach((o,l)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,l);else for(let a of Rk(o.path))i(o,l,a)}),t}function Rk(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=Rk(r.join("/")),s=[];return s.push(...l.map(a=>a===""?o:[o,a].join("/"))),i&&s.push(...l),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function CD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:PD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const kD=/^:\w+$/,$D=3,bD=2,TD=1,ND=10,RD=-2,i_=e=>e==="*";function OD(e,t){let n=e.split("/"),r=n.length;return n.some(i_)&&(r+=RD),t&&(r+=bD),n.filter(i=>!i_(i)).reduce((i,o)=>i+(kD.test(o)?$D:o===""?TD:ND),r)}function PD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function AD(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let l=0;l<n.length;++l){let s=n[l],a=l===n.length-1,u=i==="/"?t:t.slice(i.length)||"/",c=MD({path:s.relativePath,caseSensitive:s.caseSensitive,end:a},u);if(!c)return null;Object.assign(r,c.params);let d=s.route;o.push({params:r,pathname:eo([i,c.pathname]),pathnameBase:FD(eo([i,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(i=eo([i,c.pathnameBase]))}return o}function MD(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=DD(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],l=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let g=s[d]||"";l=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[d];return h&&!m?u[f]=void 0:u[f]=ID(m||"",f),u},{}),pathname:o,pathnameBase:l,pattern:e}}function DD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),rl(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=[],i="^"+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:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function LD(e){try{return decodeURI(e)}catch(t){return rl(!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 ID(e,t){try{return decodeURIComponent(e)}catch(n){return rl(!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 Hu(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 jD(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ki(e):e;return{pathname:n?n.startsWith("/")?n:zD(n,t):t,search:BD(r),hash:UD(i)}}function zD(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Zh(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 Ok(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Pk(e){return Ok(e).map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function Ak(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ki(e):(i=yt({},e),Oe(!i.pathname||!i.pathname.includes("?"),Zh("?","pathname","search",i)),Oe(!i.pathname||!i.pathname.includes("#"),Zh("#","pathname","hash",i)),Oe(!i.search||!i.search.includes("#"),Zh("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,s;if(l==null)s=n;else if(r){let d=t[t.length-1].replace(/^\//,"").split("/");if(l.startsWith("..")){let f=l.split("/");for(;f[0]==="..";)f.shift(),d.pop();i.pathname=f.join("/")}s="/"+d.join("/")}else{let d=t.length-1;if(l.startsWith("..")){let f=l.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}s=d>=0?t[d]:"/"}let a=jD(i,s),u=l&&l!=="/"&&l.endsWith("/"),c=(o||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const eo=e=>e.join("/").replace(/\/\/+/g,"/"),FD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),BD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,UD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Gv{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Mk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Dk=["post","put","patch","delete"],WD=new Set(Dk),VD=["get",...Dk],HD=new Set(VD),KD=new Set([301,302,303,307,308]),ZD=new Set([307,308]),Gh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},GD={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ta={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Lk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,YD=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ik="remix-router-transitions";function XD(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;Oe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let b=e.detectErrorBoundary;i=M=>({hasErrorBoundary:b(M)})}else i=YD;let o={},l=Hm(e.routes,i,void 0,o),s,a=e.basename||"/",u=yt({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,w=Ul(l,e.history.location,a),v=null;if(w==null){let b=Gn(404,{pathname:e.history.location.pathname}),{matches:M,route:z}=f_(l);w=M,v={[z.id]:b}}let y=!w.some(b=>b.route.lazy)&&(!w.some(b=>b.route.loader)||e.hydrationData!=null),_,S={historyAction:e.history.action,location:e.history.location,matches:w,initialized:y,navigation:Gh,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},E=wt.Pop,$=!1,C,T=!1,N=new Map,R=null,D=!1,F=!1,se=[],V=[],K=new Map,O=0,A=-1,k=new Map,j=new Set,I=new Map,Z=new Map,ne=new Set,ke=new Map,ve=new Map,We=!1;function Fe(){if(c=e.history.listen(b=>{let{action:M,location:z,delta:G}=b;if(We){We=!1;return}rl(ve.size===0||G!=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 oe=iy({currentLocation:S.location,nextLocation:z,historyAction:M});if(oe&&G!=null){We=!0,e.history.go(G*-1),Ku(oe,{state:"blocked",location:z,proceed(){Ku(oe,{state:"proceeding",proceed:void 0,reset:void 0,location:z}),e.history.go(G)},reset(){let $e=new Map(S.blockers);$e.set(oe,ta),be({blockers:$e})}});return}return Qe(M,z)}),n){sL(t,N);let b=()=>aL(t,N);t.addEventListener("pagehide",b),R=()=>t.removeEventListener("pagehide",b)}return S.initialized||Qe(wt.Pop,S.location),_}function te(){c&&c(),R&&R(),d.clear(),C&&C.abort(),S.fetchers.forEach((b,M)=>Pn(M)),S.blockers.forEach((b,M)=>ry(M))}function Ie(b){return d.add(b),()=>d.delete(b)}function be(b,M){M===void 0&&(M={}),S=yt({},S,b);let z=[],G=[];u.v7_fetcherPersist&&S.fetchers.forEach((oe,$e)=>{oe.state==="idle"&&(ne.has($e)?G.push($e):z.push($e))}),[...d].forEach(oe=>oe(S,{deletedFetchers:G,unstable_viewTransitionOpts:M.viewTransitionOpts,unstable_flushSync:M.flushSync===!0})),u.v7_fetcherPersist&&(z.forEach(oe=>S.fetchers.delete(oe)),G.forEach(oe=>Pn(oe)))}function Re(b,M,z){var G,oe;let{flushSync:$e}=z===void 0?{}:z,he=S.actionData!=null&&S.navigation.formMethod!=null&&vr(S.navigation.formMethod)&&S.navigation.state==="loading"&&((G=b.state)==null?void 0:G._isRedirect)!==!0,fe;M.actionData?Object.keys(M.actionData).length>0?fe=M.actionData:fe=null:he?fe=S.actionData:fe=null;let ae=M.loaderData?d_(S.loaderData,M.loaderData,M.matches||[],M.errors):S.loaderData,Ae=S.blockers;Ae.size>0&&(Ae=new Map(Ae),Ae.forEach((Ze,ut)=>Ae.set(ut,ta)));let Vt=$===!0||S.navigation.formMethod!=null&&vr(S.navigation.formMethod)&&((oe=b.state)==null?void 0:oe._isRedirect)!==!0;s&&(l=s,s=void 0),D||E===wt.Pop||(E===wt.Push?e.history.push(b,b.state):E===wt.Replace&&e.history.replace(b,b.state));let Te;if(E===wt.Pop){let Ze=N.get(S.location.pathname);Ze&&Ze.has(b.pathname)?Te={currentLocation:S.location,nextLocation:b}:N.has(b.pathname)&&(Te={currentLocation:b,nextLocation:S.location})}else if(T){let Ze=N.get(S.location.pathname);Ze?Ze.add(b.pathname):(Ze=new Set([b.pathname]),N.set(S.location.pathname,Ze)),Te={currentLocation:S.location,nextLocation:b}}be(yt({},M,{actionData:fe,loaderData:ae,historyAction:E,location:b,initialized:!0,navigation:Gh,revalidation:"idle",restoreScrollPosition:ly(b,M.matches||S.matches),preventScrollReset:Vt,blockers:Ae}),{viewTransitionOpts:Te,flushSync:$e===!0}),E=wt.Pop,$=!1,T=!1,D=!1,F=!1,se=[],V=[]}async function Se(b,M){if(typeof b=="number"){e.history.go(b);return}let z=Km(S.location,S.matches,a,u.v7_prependBasename,b,M==null?void 0:M.fromRouteId,M==null?void 0:M.relative),{path:G,submission:oe,error:$e}=o_(u.v7_normalizeFormMethod,!1,z,M),he=S.location,fe=ku(S.location,G,M&&M.state);fe=yt({},fe,e.history.encodeLocation(fe));let ae=M&&M.replace!=null?M.replace:void 0,Ae=wt.Push;ae===!0?Ae=wt.Replace:ae===!1||oe!=null&&vr(oe.formMethod)&&oe.formAction===S.location.pathname+S.location.search&&(Ae=wt.Replace);let Vt=M&&"preventScrollReset"in M?M.preventScrollReset===!0:void 0,Te=(M&&M.unstable_flushSync)===!0,Ze=iy({currentLocation:he,nextLocation:fe,historyAction:Ae});if(Ze){Ku(Ze,{state:"blocked",location:fe,proceed(){Ku(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:fe}),Se(b,M)},reset(){let ut=new Map(S.blockers);ut.set(Ze,ta),be({blockers:ut})}});return}return await Qe(Ae,fe,{submission:oe,pendingError:$e,preventScrollReset:Vt,replace:M&&M.replace,enableViewTransition:M&&M.unstable_viewTransition,flushSync:Te})}function De(){if(En(),be({revalidation:"loading"}),S.navigation.state!=="submitting"){if(S.navigation.state==="idle"){Qe(S.historyAction,S.location,{startUninterruptedRevalidation:!0});return}Qe(E||S.historyAction,S.navigation.location,{overrideNavigation:S.navigation})}}async function Qe(b,M,z){C&&C.abort(),C=null,E=b,D=(z&&z.startUninterruptedRevalidation)===!0,p$(S.location,S.matches),$=(z&&z.preventScrollReset)===!0,T=(z&&z.enableViewTransition)===!0;let G=s||l,oe=z&&z.overrideNavigation,$e=Ul(G,M,a),he=(z&&z.flushSync)===!0;if(!$e){let ut=Gn(404,{pathname:M.pathname}),{matches:an,route:Rr}=f_(G);Qf(),Re(M,{matches:an,loaderData:{},errors:{[Rr.id]:ut}},{flushSync:he});return}if(S.initialized&&!F&&tL(S.location,M)&&!(z&&z.submission&&vr(z.submission.formMethod))){Re(M,{matches:$e},{flushSync:he});return}C=new AbortController;let fe=ra(e.history,M,C.signal,z&&z.submission),ae,Ae;if(z&&z.pendingError)Ae={[Ma($e).route.id]:z.pendingError};else if(z&&z.submission&&vr(z.submission.formMethod)){let ut=await Wt(fe,M,z.submission,$e,{replace:z.replace,flushSync:he});if(ut.shortCircuited)return;ae=ut.pendingActionData,Ae=ut.pendingActionError,oe=Yh(M,z.submission),he=!1,fe=new Request(fe.url,{signal:fe.signal})}let{shortCircuited:Vt,loaderData:Te,errors:Ze}=await Sn(fe,M,$e,oe,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,he,ae,Ae);Vt||(C=null,Re(M,yt({matches:$e},ae?{actionData:ae}:{},{loaderData:Te,errors:Ze})))}async function Wt(b,M,z,G,oe){oe===void 0&&(oe={}),En();let $e=oL(M,z);be({navigation:$e},{flushSync:oe.flushSync===!0});let he,fe=Gm(G,M);if(!fe.route.action&&!fe.route.lazy)he={type:St.error,error:Gn(405,{method:b.method,pathname:M.pathname,routeId:fe.route.id})};else if(he=await na("action",b,fe,G,o,i,a),b.signal.aborted)return{shortCircuited:!0};if(es(he)){let ae;return oe&&oe.replace!=null?ae=oe.replace:ae=he.location===S.location.pathname+S.location.search,await at(S,he,{submission:z,replace:ae}),{shortCircuited:!0}}if(Da(he)){let ae=Ma(G,fe.route.id);return(oe&&oe.replace)!==!0&&(E=wt.Push),{pendingActionData:{},pendingActionError:{[ae.route.id]:he.error}}}if(Do(he))throw Gn(400,{type:"defer-action"});return{pendingActionData:{[fe.route.id]:he.data}}}async function Sn(b,M,z,G,oe,$e,he,fe,ae,Ae){let Vt=G||Yh(M,oe),Te=oe||$e||m_(Vt),Ze=s||l,[ut,an]=l_(e.history,S,z,Te,M,F,se,V,ne,I,j,Ze,a,ae,Ae);if(Qf(Ge=>!(z&&z.some(Zn=>Zn.route.id===Ge))||ut&&ut.some(Zn=>Zn.route.id===Ge)),A=++O,ut.length===0&&an.length===0){let Ge=Eo();return Re(M,yt({matches:z,loaderData:{},errors:Ae||null},ae?{actionData:ae}:{},Ge?{fetchers:new Map(S.fetchers)}:{}),{flushSync:fe}),{shortCircuited:!0}}if(!D){an.forEach(Zn=>{let kt=S.fetchers.get(Zn.key),Co=ia(void 0,kt?kt.data:void 0);S.fetchers.set(Zn.key,Co)});let Ge=ae||S.actionData;be(yt({navigation:Vt},Ge?Object.keys(Ge).length===0?{actionData:null}:{actionData:Ge}:{},an.length>0?{fetchers:new Map(S.fetchers)}:{}),{flushSync:fe})}an.forEach(Ge=>{K.has(Ge.key)&>(Ge.key),Ge.controller&&K.set(Ge.key,Ge.controller)});let Rr=()=>an.forEach(Ge=>gt(Ge.key));C&&C.signal.addEventListener("abort",Rr);let{results:Fs,loaderResults:Jf,fetcherResults:hl}=await ln(S.matches,z,ut,an,b);if(b.signal.aborted)return{shortCircuited:!0};C&&C.signal.removeEventListener("abort",Rr),an.forEach(Ge=>K.delete(Ge.key));let cr=h_(Fs);if(cr){if(cr.idx>=ut.length){let Ge=an[cr.idx-ut.length].key;j.add(Ge)}return await at(S,cr.result,{replace:he}),{shortCircuited:!0}}let{loaderData:Zu,errors:qf}=c_(S,z,ut,Jf,Ae,an,hl,ke);ke.forEach((Ge,Zn)=>{Ge.subscribe(kt=>{(kt||Ge.done)&&ke.delete(Zn)})});let eh=Eo(),th=zs(A),pl=eh||th||an.length>0;return yt({loaderData:Zu,errors:qf},pl?{fetchers:new Map(S.fetchers)}:{})}function ur(b,M,z,G){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.");K.has(b)&>(b);let oe=(G&&G.unstable_flushSync)===!0,$e=s||l,he=Km(S.location,S.matches,a,u.v7_prependBasename,z,M,G==null?void 0:G.relative),fe=Ul($e,he,a);if(!fe){At(b,M,Gn(404,{pathname:he}),{flushSync:oe});return}let{path:ae,submission:Ae,error:Vt}=o_(u.v7_normalizeFormMethod,!0,he,G);if(Vt){At(b,M,Vt,{flushSync:oe});return}let Te=Gm(fe,ae);if($=(G&&G.preventScrollReset)===!0,Ae&&vr(Ae.formMethod)){je(b,M,ae,Te,fe,oe,Ae);return}I.set(b,{routeId:M,path:ae}),Tt(b,M,ae,Te,fe,oe,Ae)}async function je(b,M,z,G,oe,$e,he){if(En(),I.delete(b),!G.route.action&&!G.route.lazy){let kt=Gn(405,{method:he.formMethod,pathname:z,routeId:M});At(b,M,kt,{flushSync:$e});return}let fe=S.fetchers.get(b);_t(b,lL(he,fe),{flushSync:$e});let ae=new AbortController,Ae=ra(e.history,z,ae.signal,he);K.set(b,ae);let Vt=O,Te=await na("action",Ae,G,oe,o,i,a);if(Ae.signal.aborted){K.get(b)===ae&&K.delete(b);return}if(ne.has(b)){_t(b,Pi(void 0));return}if(es(Te))if(K.delete(b),A>Vt){_t(b,Pi(void 0));return}else return j.add(b),_t(b,ia(he)),at(S,Te,{fetcherSubmission:he});if(Da(Te)){At(b,M,Te.error);return}if(Do(Te))throw Gn(400,{type:"defer-action"});let Ze=S.navigation.location||S.location,ut=ra(e.history,Ze,ae.signal),an=s||l,Rr=S.navigation.state!=="idle"?Ul(an,S.navigation.location,a):S.matches;Oe(Rr,"Didn't find any matches after fetcher action");let Fs=++O;k.set(b,Fs);let Jf=ia(he,Te.data);S.fetchers.set(b,Jf);let[hl,cr]=l_(e.history,S,Rr,he,Ze,F,se,V,ne,I,j,an,a,{[G.route.id]:Te.data},void 0);cr.filter(kt=>kt.key!==b).forEach(kt=>{let Co=kt.key,sy=S.fetchers.get(Co),g$=ia(void 0,sy?sy.data:void 0);S.fetchers.set(Co,g$),K.has(Co)&>(Co),kt.controller&&K.set(Co,kt.controller)}),be({fetchers:new Map(S.fetchers)});let Zu=()=>cr.forEach(kt=>gt(kt.key));ae.signal.addEventListener("abort",Zu);let{results:qf,loaderResults:eh,fetcherResults:th}=await ln(S.matches,Rr,hl,cr,ut);if(ae.signal.aborted)return;ae.signal.removeEventListener("abort",Zu),k.delete(b),K.delete(b),cr.forEach(kt=>K.delete(kt.key));let pl=h_(qf);if(pl){if(pl.idx>=hl.length){let kt=cr[pl.idx-hl.length].key;j.add(kt)}return at(S,pl.result)}let{loaderData:Ge,errors:Zn}=c_(S,S.matches,hl,eh,void 0,cr,th,ke);if(S.fetchers.has(b)){let kt=Pi(Te.data);S.fetchers.set(b,kt)}zs(Fs),S.navigation.state==="loading"&&Fs>A?(Oe(E,"Expected pending action"),C&&C.abort(),Re(S.navigation.location,{matches:Rr,loaderData:Ge,errors:Zn,fetchers:new Map(S.fetchers)})):(be({errors:Zn,loaderData:d_(S.loaderData,Ge,Rr,Zn),fetchers:new Map(S.fetchers)}),F=!1)}async function Tt(b,M,z,G,oe,$e,he){let fe=S.fetchers.get(b);_t(b,ia(he,fe?fe.data:void 0),{flushSync:$e});let ae=new AbortController,Ae=ra(e.history,z,ae.signal);K.set(b,ae);let Vt=O,Te=await na("loader",Ae,G,oe,o,i,a);if(Do(Te)&&(Te=await Fk(Te,Ae.signal,!0)||Te),K.get(b)===ae&&K.delete(b),!Ae.signal.aborted){if(ne.has(b)){_t(b,Pi(void 0));return}if(es(Te))if(A>Vt){_t(b,Pi(void 0));return}else{j.add(b),await at(S,Te);return}if(Da(Te)){At(b,M,Te.error);return}Oe(!Do(Te),"Unhandled fetcher deferred data"),_t(b,Pi(Te.data))}}async function at(b,M,z){let{submission:G,fetcherSubmission:oe,replace:$e}=z===void 0?{}:z;M.revalidate&&(F=!0);let he=ku(b.location,M.location,{_isRedirect:!0});if(Oe(he,"Expected a location on the redirect navigation"),n){let Ze=!1;if(M.reloadDocument)Ze=!0;else if(Lk.test(M.location)){const ut=e.history.createURL(M.location);Ze=ut.origin!==t.location.origin||Hu(ut.pathname,a)==null}if(Ze){$e?t.location.replace(M.location):t.location.assign(M.location);return}}C=null;let fe=$e===!0?wt.Replace:wt.Push,{formMethod:ae,formAction:Ae,formEncType:Vt}=b.navigation;!G&&!oe&&ae&&Ae&&Vt&&(G=m_(b.navigation));let Te=G||oe;if(ZD.has(M.status)&&Te&&vr(Te.formMethod))await Qe(fe,he,{submission:yt({},Te,{formAction:M.location}),preventScrollReset:$});else{let Ze=Yh(he,G);await Qe(fe,he,{overrideNavigation:Ze,fetcherSubmission:oe,preventScrollReset:$})}}async function ln(b,M,z,G,oe){let $e=await Promise.all([...z.map(ae=>na("loader",oe,ae,M,o,i,a)),...G.map(ae=>ae.matches&&ae.match&&ae.controller?na("loader",ra(e.history,ae.path,ae.controller.signal),ae.match,ae.matches,o,i,a):{type:St.error,error:Gn(404,{pathname:ae.path})})]),he=$e.slice(0,z.length),fe=$e.slice(z.length);return await Promise.all([p_(b,z,he,he.map(()=>oe.signal),!1,S.loaderData),p_(b,G.map(ae=>ae.match),fe,G.map(ae=>ae.controller?ae.controller.signal:null),!0)]),{results:$e,loaderResults:he,fetcherResults:fe}}function En(){F=!0,se.push(...Qf()),I.forEach((b,M)=>{K.has(M)&&(V.push(M),gt(M))})}function _t(b,M,z){z===void 0&&(z={}),S.fetchers.set(b,M),be({fetchers:new Map(S.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function At(b,M,z,G){G===void 0&&(G={});let oe=Ma(S.matches,M);Pn(b),be({errors:{[oe.route.id]:z},fetchers:new Map(S.fetchers)},{flushSync:(G&&G.flushSync)===!0})}function sn(b){return u.v7_fetcherPersist&&(Z.set(b,(Z.get(b)||0)+1),ne.has(b)&&ne.delete(b)),S.fetchers.get(b)||GD}function Pn(b){let M=S.fetchers.get(b);K.has(b)&&!(M&&M.state==="loading"&&k.has(b))&>(b),I.delete(b),k.delete(b),j.delete(b),ne.delete(b),S.fetchers.delete(b)}function qr(b){if(u.v7_fetcherPersist){let M=(Z.get(b)||0)-1;M<=0?(Z.delete(b),ne.add(b)):Z.set(b,M)}else Pn(b);be({fetchers:new Map(S.fetchers)})}function gt(b){let M=K.get(b);Oe(M,"Expected fetch controller: "+b),M.abort(),K.delete(b)}function Nr(b){for(let M of b){let z=sn(M),G=Pi(z.data);S.fetchers.set(M,G)}}function Eo(){let b=[],M=!1;for(let z of j){let G=S.fetchers.get(z);Oe(G,"Expected fetcher: "+z),G.state==="loading"&&(j.delete(z),b.push(z),M=!0)}return Nr(b),M}function zs(b){let M=[];for(let[z,G]of k)if(G<b){let oe=S.fetchers.get(z);Oe(oe,"Expected fetcher: "+z),oe.state==="loading"&&(gt(z),k.delete(z),M.push(z))}return Nr(M),M.length>0}function f$(b,M){let z=S.blockers.get(b)||ta;return ve.get(b)!==M&&ve.set(b,M),z}function ry(b){S.blockers.delete(b),ve.delete(b)}function Ku(b,M){let z=S.blockers.get(b)||ta;Oe(z.state==="unblocked"&&M.state==="blocked"||z.state==="blocked"&&M.state==="blocked"||z.state==="blocked"&&M.state==="proceeding"||z.state==="blocked"&&M.state==="unblocked"||z.state==="proceeding"&&M.state==="unblocked","Invalid blocker state transition: "+z.state+" -> "+M.state);let G=new Map(S.blockers);G.set(b,M),be({blockers:G})}function iy(b){let{currentLocation:M,nextLocation:z,historyAction:G}=b;if(ve.size===0)return;ve.size>1&&rl(!1,"A router only supports one blocker at a time");let oe=Array.from(ve.entries()),[$e,he]=oe[oe.length-1],fe=S.blockers.get($e);if(!(fe&&fe.state==="proceeding")&&he({currentLocation:M,nextLocation:z,historyAction:G}))return $e}function Qf(b){let M=[];return ke.forEach((z,G)=>{(!b||b(G))&&(z.cancel(),M.push(G),ke.delete(G))}),M}function h$(b,M,z){if(f=b,m=M,h=z||null,!g&&S.navigation===Gh){g=!0;let G=ly(S.location,S.matches);G!=null&&be({restoreScrollPosition:G})}return()=>{f=null,m=null,h=null}}function oy(b,M){return h&&h(b,M.map(G=>ED(G,S.loaderData)))||b.key}function p$(b,M){if(f&&m){let z=oy(b,M);f[z]=m()}}function ly(b,M){if(f){let z=oy(b,M),G=f[z];if(typeof G=="number")return G}return null}function m$(b){o={},s=Hm(b,i,void 0,o)}return _={get basename(){return a},get state(){return S},get routes(){return l},get window(){return t},initialize:Fe,subscribe:Ie,enableScrollRestoration:h$,navigate:Se,fetch:ur,revalidate:De,createHref:b=>e.history.createHref(b),encodeLocation:b=>e.history.encodeLocation(b),getFetcher:sn,deleteFetcher:qr,dispose:te,getBlocker:f$,deleteBlocker:ry,_internalFetchControllers:K,_internalActiveDeferreds:ke,_internalSetRoutes:m$},_}function QD(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Km(e,t,n,r,i,o,l){let s,a;if(o){s=[];for(let c of t)if(s.push(c),c.route.id===o){a=c;break}}else s=t,a=t[t.length-1];let u=Ak(i||".",Pk(s),Hu(e.pathname,n)||e.pathname,l==="path");return i==null&&(u.search=e.search,u.hash=e.hash),(i==null||i===""||i===".")&&a&&a.route.index&&!Yv(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:eo([n,u.pathname])),Vu(u)}function o_(e,t,n,r){if(!r||!QD(r))return{path:n};if(r.formMethod&&!iL(r.formMethod))return{path:n,error:Gn(405,{method:r.formMethod})};let i=()=>({path:n,error:Gn(400,{type:"invalid-body"})}),o=r.formMethod||"get",l=e?o.toUpperCase():o.toLowerCase(),s=zk(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!vr(l))return i();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,w]=m;return""+h+g+"="+w+`
|
|
179
|
+
`},""):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(!vr(l))return i();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 i()}}}Oe(typeof FormData=="function","FormData is not available in this environment");let a,u;if(r.formData)a=Zm(r.formData),u=r.formData;else if(r.body instanceof FormData)a=Zm(r.body),u=r.body;else if(r.body instanceof URLSearchParams)a=r.body,u=u_(a);else if(r.body==null)a=new URLSearchParams,u=new FormData;else try{a=new URLSearchParams(r.body),u=u_(a)}catch{return i()}let c={formMethod:l,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(vr(c.formMethod))return{path:n,submission:c};let d=ki(n);return t&&d.search&&Yv(d.search)&&a.append("index",""),d.search="?"+a,{path:Vu(d),submission:c}}function JD(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function l_(e,t,n,r,i,o,l,s,a,u,c,d,f,h,m){let g=m?Object.values(m)[0]:h?Object.values(h)[0]:void 0,w=e.createURL(t.location),v=e.createURL(i),y=m?Object.keys(m)[0]:void 0,S=JD(n,y).filter(($,C)=>{if($.route.lazy)return!0;if($.route.loader==null)return!1;if(qD(t.loaderData,t.matches[C],$)||l.some(R=>R===$.route.id))return!0;let T=t.matches[C],N=$;return s_($,yt({currentUrl:w,currentParams:T.params,nextUrl:v,nextParams:N.params},r,{actionResult:g,defaultShouldRevalidate:o||w.pathname+w.search===v.pathname+v.search||w.search!==v.search||jk(T,N)}))}),E=[];return u.forEach(($,C)=>{if(!n.some(F=>F.route.id===$.routeId)||a.has(C))return;let T=Ul(d,$.path,f);if(!T){E.push({key:C,routeId:$.routeId,path:$.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(C),R=Gm(T,$.path),D=!1;c.has(C)?D=!1:s.includes(C)?D=!0:N&&N.state!=="idle"&&N.data===void 0?D=o:D=s_(R,yt({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:g,defaultShouldRevalidate:o})),D&&E.push({key:C,routeId:$.routeId,path:$.path,matches:T,match:R,controller:new AbortController})}),[S,E]}function qD(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function jk(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function s_(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function a_(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Oe(i,"No route found in manifest");let o={};for(let l in r){let a=i[l]!==void 0&&l!=="hasErrorBoundary";rl(!a,'Route "'+i.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&&!wD.has(l)&&(o[l]=r[l])}Object.assign(i,o),Object.assign(i,yt({},t(i),{lazy:void 0}))}async function na(e,t,n,r,i,o,l,s){s===void 0&&(s={});let a,u,c,d=m=>{let g,w=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}),w])};try{let m=n.route[e];if(n.route.lazy)if(m){let g,w=await Promise.all([d(m).catch(v=>{g=v}),a_(n.route,o,i)]);if(g)throw g;u=w[0]}else if(await a_(n.route,o,i),m=n.route[e],m)u=await d(m);else if(e==="action"){let g=new URL(t.url),w=g.pathname+g.search;throw Gn(405,{method:t.method,pathname:w,routeId:n.route.id})}else return{type:St.data,data:void 0};else if(m)u=await d(m);else{let g=new URL(t.url),w=g.pathname+g.search;throw Gn(404,{pathname:w})}Oe(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=St.error,u=m}finally{c&&t.signal.removeEventListener("abort",c)}if(rL(u)){let m=u.status;if(KD.has(m)){let v=u.headers.get("Location");if(Oe(v,"Redirects returned/thrown from loaders/actions must have a Location header"),!Lk.test(v))v=Km(new URL(t.url),r.slice(0,r.indexOf(n)+1),l,!0,v);else if(!s.isStaticRequest){let y=new URL(t.url),_=v.startsWith("//")?new URL(y.protocol+v):new URL(v),S=Hu(_.pathname,l)!=null;_.origin===y.origin&&S&&(v=_.pathname+_.search+_.hash)}if(s.isStaticRequest)throw u.headers.set("Location",v),u;return{type:St.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===St.error?St.error:St.data,response:u};let g,w=u.headers.get("Content-Type");return w&&/\bapplication\/json\b/.test(w)?g=await u.json():g=await u.text(),a===St.error?{type:a,error:new Gv(m,u.statusText,g),headers:u.headers}:{type:St.data,data:g,statusCode:u.status,headers:u.headers}}if(a===St.error)return{type:a,error:u};if(nL(u)){var f,h;return{type:St.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:St.data,data:u}}function ra(e,t,n,r){let i=e.createURL(zk(t)).toString(),o={signal:n};if(r&&vr(r.formMethod)){let{formMethod:l,formEncType:s}=r;o.method=l.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(r.json)):s==="text/plain"?o.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?o.body=Zm(r.formData):o.body=r.formData}return new Request(i,o)}function Zm(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function u_(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function eL(e,t,n,r,i){let o={},l=null,s,a=!1,u={};return n.forEach((c,d)=>{let f=t[d].route.id;if(Oe(!es(c),"Cannot handle redirect results in processLoaderData"),Da(c)){let h=Ma(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),o[f]=void 0,a||(a=!0,s=Mk(c.error)?c.error.status:500),c.headers&&(u[f]=c.headers)}else Do(c)?(i.set(f,c.deferredData),o[f]=c.deferredData.data):o[f]=c.data,c.statusCode!=null&&c.statusCode!==200&&!a&&(s=c.statusCode),c.headers&&(u[f]=c.headers)}),r&&(l=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:l,statusCode:s||200,loaderHeaders:u}}function c_(e,t,n,r,i,o,l,s){let{loaderData:a,errors:u}=eL(t,n,r,i,s);for(let c=0;c<o.length;c++){let{key:d,match:f,controller:h}=o[c];Oe(l!==void 0&&l[c]!==void 0,"Did not find corresponding fetcher result");let m=l[c];if(!(h&&h.signal.aborted))if(Da(m)){let g=Ma(e.matches,f==null?void 0:f.route.id);u&&u[g.route.id]||(u=yt({},u,{[g.route.id]:m.error})),e.fetchers.delete(d)}else if(es(m))Oe(!1,"Unhandled fetcher revalidation redirect");else if(Do(m))Oe(!1,"Unhandled fetcher deferred data");else{let g=Pi(m.data);e.fetchers.set(d,g)}}return{loaderData:a,errors:u}}function d_(e,t,n,r){let i=yt({},t);for(let o of n){let l=o.route.id;if(t.hasOwnProperty(l)?t[l]!==void 0&&(i[l]=t[l]):e[l]!==void 0&&o.route.loader&&(i[l]=e[l]),r&&r.hasOwnProperty(l))break}return i}function Ma(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 f_(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 Gn(e,t){let{pathname:n,routeId:r,method:i,type:o}=t===void 0?{}:t,l="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(l="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="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",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new Gv(e||500,l,new Error(s),!0)}function h_(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(es(n))return{result:n,idx:t}}}function zk(e){let t=typeof e=="string"?ki(e):e;return Vu(yt({},t,{hash:""}))}function tL(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Do(e){return e.type===St.deferred}function Da(e){return e.type===St.error}function es(e){return(e&&e.type)===St.redirect}function nL(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 rL(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function iL(e){return HD.has(e.toLowerCase())}function vr(e){return WD.has(e.toLowerCase())}async function p_(e,t,n,r,i,o){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&&!jk(u,a)&&(o&&o[a.route.id])!==void 0;if(Do(s)&&(i||c)){let d=r[l];Oe(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await Fk(s,d,i).then(f=>{f&&(n[l]=f||n[l])})}}}async function Fk(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:St.data,data:e.deferredData.unwrappedData}}catch(i){return{type:St.error,error:i}}return{type:St.data,data:e.deferredData.data}}}function Yv(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Gm(e,t){let n=typeof t=="string"?ki(t).search:t.search;if(e[e.length-1].route.index&&Yv(n||""))return e[e.length-1];let r=Ok(e);return r[r.length-1]}function m_(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:l}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,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 Yh(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 oL(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 ia(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 lL(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 Pi(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 sL(e,t){try{let n=e.sessionStorage.getItem(Ik);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function aL(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(Ik,JSON.stringify(n))}catch(r){rl(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
|
|
180
180
|
* React Router v6.20.0
|
|
181
181
|
*
|
|
182
182
|
* Copyright (c) Remix Software Inc.
|
|
@@ -185,11 +185,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
185
185
|
* LICENSE.md file in the root directory of this source tree.
|
|
186
186
|
*
|
|
187
187
|
* @license MIT
|
|
188
|
-
*/function qd(){return qd=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},qd.apply(this,arguments)}const Hf=p.createContext(null),Bk=p.createContext(null),Kf=p.createContext(null),Zf=p.createContext(null),
|
|
188
|
+
*/function qd(){return qd=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},qd.apply(this,arguments)}const Hf=p.createContext(null),Bk=p.createContext(null),Kf=p.createContext(null),Zf=p.createContext(null),fl=p.createContext({outlet:null,matches:[],isDataRoute:!1}),Uk=p.createContext(null);function Gf(){return p.useContext(Zf)!=null}function Wk(){return Gf()||Oe(!1),p.useContext(Zf).location}function Vk(e){p.useContext(Kf).static||p.useLayoutEffect(e)}function Xv(){let{isDataRoute:e}=p.useContext(fl);return e?wL():uL()}function uL(){Gf()||Oe(!1);let e=p.useContext(Hf),{basename:t,navigator:n}=p.useContext(Kf),{matches:r}=p.useContext(fl),{pathname:i}=Wk(),o=JSON.stringify(Pk(r)),l=p.useRef(!1);return Vk(()=>{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=Ak(a,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:eo([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,o,i,e])}function cL(){let{matches:e}=p.useContext(fl),t=e[e.length-1];return t?t.params:{}}function dL(e,t,n){Gf()||Oe(!1);let{navigator:r}=p.useContext(Kf),{matches:i}=p.useContext(fl),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let a=Wk(),u;if(t){var c;let g=typeof t=="string"?ki(t):t;s==="/"||(c=g.pathname)!=null&&c.startsWith(s)||Oe(!1),u=g}else u=a;let d=u.pathname||"/",f=s==="/"?d:d.slice(s.length)||"/",h=Ul(e,{pathname:f}),m=gL(h&&h.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:eo([s,r.encodeLocation?r.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?s:eo([s,r.encodeLocation?r.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,n);return t&&m?p.createElement(Zf.Provider,{value:{location:qd({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:wt.Pop}},m):m}function fL(){let e=_L(),t=Mk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=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:i},n):null,o)}const hL=p.createElement(fL,null);class pL 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(fl.Provider,{value:this.props.routeContext},p.createElement(Uk.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mL(e){let{routeContext:t,match:n,children:r}=e,i=p.useContext(Hf);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(fl.Provider,{value:t},r)}function gL(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,l=(r=n)==null?void 0:r.errors;if(l!=null){let s=o.findIndex(a=>a.route.id&&(l==null?void 0:l[a.route.id]));s>=0||Oe(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.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||hL);let f=t.concat(o.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(mL,{match:a,routeContext:{outlet:s,matches:f,isDataRoute:n!=null},children:m})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?p.createElement(pL,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:h(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):h()},null)}var Hk=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Hk||{}),ef=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}(ef||{});function vL(e){let t=p.useContext(Hf);return t||Oe(!1),t}function yL(e){let t=p.useContext(Bk);return t||Oe(!1),t}function xL(e){let t=p.useContext(fl);return t||Oe(!1),t}function Kk(e){let t=xL(),n=t.matches[t.matches.length-1];return n.route.id||Oe(!1),n.route.id}function _L(){var e;let t=p.useContext(Uk),n=yL(ef.UseRouteError),r=Kk(ef.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function wL(){let{router:e}=vL(Hk.UseNavigateStable),t=Kk(ef.UseNavigateStable),n=p.useRef(!1);return Vk(()=>{n.current=!0}),p.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,qd({fromRouteId:t},o)))},[e,t])}function SL(e){let{basename:t="/",children:n=null,location:r,navigationType:i=wt.Pop,navigator:o,static:l=!1}=e;Gf()&&Oe(!1);let s=t.replace(/^\/*/,"/"),a=p.useMemo(()=>({basename:s,navigator:o,static:l}),[s,o,l]);typeof r=="string"&&(r=ki(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:h="default"}=r,m=p.useMemo(()=>{let g=Hu(u,s);return g==null?null:{location:{pathname:g,search:c,hash:d,state:f,key:h},navigationType:i}},[s,u,c,d,f,h,i]);return m==null?null:p.createElement(Kf.Provider,{value:a},p.createElement(Zf.Provider,{children:n,value:m}))}new Promise(()=>{});function EL(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 Zk=re.createContext(null),CL=e=>{var s,a;const t=re.useContext(Zk),[n,r]=jn.splitModuleIdAndModulePath(e),i=(s=t==null?void 0:t[n])==null?void 0:s.source,o=(a=t==null?void 0:t[n])==null?void 0:a.schema;if(!i||!o)throw Error("Could not find module: "+n);const l=jn.resolvePath(r,i,o);return{moduleId:n,moduleSource:l.source,moduleSchema:l.schema}},kL=({api:e})=>{var C,T;const{"*":t}=cL(),[n,r]=p.useState(null),[i,o]=p.useState(null),[l,s]=p.useState(),[a]=l?jn.splitModuleIdAndModulePath(l):[void 0,void 0],u=a&&((C=n==null?void 0:n[a])==null?void 0:C.source),c=a&&((T=n==null?void 0:n[a])==null?void 0:T.schema),d=Object.entries(n||{}).flatMap(([N,R])=>R.errors?R.errors.fatal?R.errors.fatal.map(D=>({id:N,...D})):[]:[]),f=Object.entries(n||{}).flatMap(([,N])=>N.errors&&N.errors.validation?[N.errors.validation]:[]);if(d&&d.length>0){const N=d.length===1?d[0].message:`Multiple errors detected:
|
|
189
189
|
${d.map((D,F)=>`${F+1}. [${D.id}]: ${D.message}`).join(`
|
|
190
190
|
`)}
|
|
191
191
|
|
|
192
|
-
Showing stack trace of: 1. ${d[0].message}`,R=new Error(N);throw R.stack=d[0].stack,R}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",R=>{let D;try{D=JSON.parse(R.data)}catch{console.error("Failed to parse HMR")}typeof(D==null?void 0:D.hash)=="string"&&(D==null?void 0:D.action)==="built"&&m(D.hash)})}catch(N){console.warn("Failed to initialize HMR",N)}},[]),p.useEffect(()=>{console.log("(Re)-fetching modules"),e.getTree({patch:!0,includeSchema:!0,includeSource:!0}).then(N=>{jo.isOk(N)?r(N.value.modules):(o("Could not load modules: "+N.error.message),console.error(N.error))})},[h]);const g=d3(e),S=Xv(),[v,y]=d5(),{patches:_,setPatchResetId:w}=c5(g,e),E=re.useRef(null),$=p.useCallback(N=>async R=>{const[D,F]=jn.splitModuleIdAndModulePath(N),se=await R(jn.createPatchJSONPath(F));return e.postPatches(D,se).then(V=>{if(jo.isErr(V))throw V.error;if(!h)return w(K=>K+1),e.getTree({treePath:D,patch:!0,includeSchema:!0,includeSource:!0}).then(K=>{jo.isOk(K)?r(O=>({...O,...K.value.modules})):(o("Could not load modules: "+K.error.message),console.error(K.error))})}).catch(V=>{console.error(V)})},[]);return x.jsx(xC.Provider,{value:{theme:v,setTheme:y,api:e,editMode:"full",session:g,highlight:!1,setHighlight:()=>{},setEditMode:()=>{},setWindowSize:()=>{}},children:x.jsxs("div",{id:"val-fullscreen-container",className:"relative font-serif antialiased","data-mode":v,children:[x.jsx("div",{className:"fixed -translate-x-1/2 z-overlay left-1/2 bottom-4",children:x.jsx(a5,{api:e,patches:_,onCommit:()=>w(N=>N+1)})}),x.jsx("div",{id:"val-fullscreen-hover",ref:E}),x.jsx(Gk.Provider,{value:{hoverElem:E==null?void 0:E.current},children:x.jsx("div",{className:"text-primary bg-background",children:x.jsxs(Sa,{children:[x.jsx("div",{className:"px-4 h-[50px] flex items-center justify-center",children:x.jsx(kk,{})}),x.jsx(wa,{className:"px-4",children:n?x.jsx(AI,{paths:Object.keys(n),setSelectedModuleId:N=>{S(N)}}):!i&&x.jsx("div",{className:"py-4",children:"Loading..."})}),x.jsxs("div",{className:"flex items-center justify-start w-full h-[50px] gap-2 font-serif text-xs",children:[x.jsx("button",{onClick:()=>{history.back()},children:x.jsx(JA,{})}),x.jsx("p",{children:l||"/"})]}),x.jsxs("div",{className:"p-4",children:[i&&x.jsxs("div",{className:"text-lg text-destructive-foreground",children:["ERROR: ",i]}),n&&l&&a&&u!==void 0&&c!==void 0&&x.jsx(Zk.Provider,{value:n,children:x.jsx($I,{path:l,source:u,schema:c,setSelectedPath:s,initOnSubmit:$})})]})]})})})]})})},Gk=re.createContext({hoverElem:null}),kI=()=>re.useContext(Gk);function $I({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:i}){const[,o]=jn.splitModuleIdAndModulePath(e),l=jn.resolvePath(o,t,n);if(!l)throw Error("Could not resolve module: "+e);return x.jsx(Yk,{path:e,source:l.source,schema:l.schema,setSelectedPath:r,initOnSubmit:i,top:!0})}function Yk({path:e,source:t,schema:n,setSelectedPath:r,field:i,initOnSubmit:o,top:l}){return t===null||n.opt?x.jsx(RI,{path:e,source:t,schema:n,field:i,initOnSubmit:o,setSelectedPath:r}):n.type==="object"?typeof t!="object"||Ma(t)?x.jsxs("div",{children:["ERROR: expected object, but found ",typeof t]}):x.jsx(Xk,{source:t,path:e,schema:n,initOnSubmit:o,setSelectedPath:r,top:l}):n.type==="array"?typeof t!="object"||!Ma(t)?x.jsxs("div",{children:["ERROR: expected array, but found ",typeof t]}):x.jsx(Qk,{source:t,path:e,schema:n,setSelectedPath:r}):n.type==="record"?typeof t!="object"?x.jsxs("div",{children:["ERROR: expected object for ",n.type,", but found ",typeof t]}):Ma(t)?x.jsxs("div",{children:["ERROR: did not expect array for ",n.type]}):x.jsx(bI,{source:t,path:e,schema:n,setSelectedPath:r}):x.jsxs("div",{className:"py-2 gap-y-4",children:[x.jsx("div",{className:"text-left",children:i||e}),x.jsx(Ck,{path:e,disabled:!1,source:t,schema:n,onSubmit:o(e)})]})}function Xk({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:i,top:o}){return x.jsx("div",{className:wf("flex flex-col gap-y-8",{"border-l-2 border-border pl-6":!o}),children:Object.entries(n.items).map(([l,s])=>{const a=Cu(e,l);return x.jsx(Yk,{path:a,source:t[l],schema:s,setSelectedPath:r,field:l,initOnSubmit:i},a)})},e)}function bI({path:e,source:t,schema:n,setSelectedPath:r}){const i=Xv();return x.jsx("div",{className:"flex flex-col gap-4 p-2",children:Object.entries(t).map(([o,l])=>{const s=Cu(e,o);return x.jsx("button",{onClick:()=>{r(s),i(s)},children:x.jsx(TI,{recordKey:o,path:s,source:l,schema:n.item})},s)})},e)}const Ym=170;function TI({recordKey:e,path:t,source:n,schema:r}){const i=re.useRef(null),[o,l]=p.useState(!1);return p.useEffect(()=>{i.current&&i.current.getBoundingClientRect().height>=Ym&&l(!0)},[]),x.jsxs(Zv,{ref:i,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:Ym},children:[x.jsx("div",{className:"pb-4 font-serif text-left text-accent",children:e}),x.jsx("div",{className:"text-xs",children:x.jsx(Qv,{path:t,source:n,schema:r})}),o&&x.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]},t)}function Qk({path:e,source:t,schema:n,setSelectedPath:r}){const i=Xv();return x.jsx("div",{className:"flex flex-col gap-4 p-2",children:t.map((o,l)=>{const s=Cu(e,l);return x.jsx("button",{onClick:()=>{r(s),i(s)},children:x.jsx(NI,{index:l,path:s,source:o,schema:n.item},s)},s)})},e)}const g_=Ym;function NI({index:e,path:t,source:n,schema:r}){const i=re.useRef(null),[o,l]=p.useState(!1);return p.useEffect(()=>{i.current&&i.current.getBoundingClientRect().height>=g_&&l(!0)},[]),x.jsxs(Zv,{ref:i,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:g_},children:[x.jsx("div",{className:"pb-4 font-serif text-left uppercase text-accent",children:e+1<10?`0${e+1}`:e+1}),x.jsx("div",{className:"text-xs",children:x.jsx(Qv,{path:t,source:n,schema:r})}),o&&x.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]})}function Cu(e,t){const n=jn.createValPathOfItem(e,t);if(!n)throw Error(`Could not create val path: ${e} of ${t==null?void 0:t.toString()}`);return n}function Qv({path:e,source:t,schema:n}){const[r,i]=p.useState(null),{hoverElem:o}=kI();if(n.type==="object")return x.jsx("div",{className:"grid grid-cols-[min-content_1fr] gap-2 text-left",children:Object.entries(n.items).map(([l])=>x.jsxs(p.Fragment,{children:[x.jsxs("span",{className:"text-muted",children:[l,":"]}),x.jsx("span",{children:x.jsx(Qv,{source:(t==null?void 0:t[l])??null,schema:n.items[l],path:Cu(e,l)})})]},Cu(e,l)))},e);if(n.type==="array")return t===null?x.jsx("span",{className:"text-accent",children:"Empty"},e):Array.isArray(t)?x.jsxs("span",{children:[x.jsx("span",{className:"text-accent",children:t.length}),x.jsx("span",{children:t.length===1?" item":" items"})]},e):x.jsx("span",{className:"px-2 bg-destructive text-destructive-foreground",children:"Unknown length"},e);if(n.type==="richtext")return t===null?x.jsx("span",{className:"text-accent",children:"Empty"},e):typeof t!="object"?x.jsxs("div",{className:"p-4 text-destructive-foreground bg-destructive",children:["ERROR: ",typeof t," not an object"]},e):!(nn in t)||t[nn]!=="richtext"?x.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not richtext"},e):x.jsx(MI,{children:$S(t)},e);if(n.type==="string")return t===null?x.jsx("span",{className:"text-accent",children:"Empty"},e):x.jsx("span",{children:t});if(n.type==="image"){if(t===null)return x.jsx("span",{className:"text-accent",children:"Empty"},e);if(typeof t!="object")return x.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: not an object"},e);if(!(Rn in t)||typeof t[Rn]!="string")return x.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not an image"},e);const l=jn.convertFileSource(t).url;return x.jsxs("span",{onMouseOver:s=>{i({x:s.clientX,y:s.clientY})},onMouseLeave:()=>{i(null)},className:"relative flex items-center justify-start gap-1",children:[x.jsx("a",{href:l,className:"overflow-hidden underline truncate ",children:t[Rn]}),r&&o&&Gr.createPortal(x.jsx("img",{className:"absolute z-[5] max-w-[10vw]",style:{left:r.x+10,top:r.y+10},src:l}),o)]},e)}else{if(n.type==="boolean")return t===null?x.jsx("span",{className:"text-accent",children:"Empty"},e):x.jsx("span",{className:"text-accent",children:t?"true":"false"},e);if(n.type==="number")return t===null?x.jsx("span",{className:"text-accent",children:"Empty"},e):x.jsx("span",{className:"text-accent",children:t.toString()});if(n.type==="keyOf")return t===null?x.jsx("span",{className:"text-accent",children:"Empty"},e):x.jsx("span",{className:"text-accent",children:t.toString()},e)}return x.jsxs("div",{children:["TODO: ",n.type]},e)}function RI({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:i,field:o}){const[l,s]=p.useState(t!==null);return x.jsxs("div",{className:"flex flex-col gap-y-6",children:[o?x.jsxs("div",{className:"flex items-center justify-start gap-x-4",children:[x.jsx(Vm,{checked:l,onClick:()=>{s(a=>!a)}}),x.jsx("span",{children:o})]}):x.jsx(Vm,{checked:l,onClick:()=>{s(a=>!a)}}),l&&x.jsx(OI,{source:t,schema:n,path:e,setSelectedPath:r,initOnSubmit:i})]},e)}function OI({source:e,path:t,schema:n,setSelectedPath:r,initOnSubmit:i}){if(n.type==="array"){if(typeof e=="object"&&(e===null||Ma(e)))return x.jsx(Qk,{source:e===null?[]:e,path:t,schema:n,setSelectedPath:r})}else if(n.type==="object"){if(typeof e=="object"&&(e===null||!Ma(e)))return x.jsx(Xk,{source:e,path:t,schema:n,setSelectedPath:r,initOnSubmit:i})}else if(n.type==="richtext"||n.type==="string"||n.type==="image"||n.type==="number"||n.type==="keyOf")return x.jsx(Ck,{path:t,disabled:!1,source:e,schema:n,onSubmit:i(t)},t);return x.jsxs("div",{className:"p-4 bg-destructive text-destructive-foreground",children:["ERROR: unexpected source type ",typeof e," for schema type"," ",n.type]})}function Ma(e){return Array.isArray(e)}function PI(e){const t={};return e.forEach(n=>{const r=n.split("/").filter(o=>o!=="");let i=t;r.forEach(o=>{i[o]||(i[o]={}),i=i[o]})}),t}function AI({paths:e,setSelectedModuleId:t}){const n=PI(e);return x.jsx(vS,{children:Object.entries(n).map(([r,i])=>x.jsx("div",{className:"px-4 py-2",children:x.jsx(Jk,{name:r,tree:i,moduleId:`/${r}`,setSelectedModuleId:t})},`/${r}`))})}function Jk({name:e,tree:t,moduleId:n,setSelectedModuleId:r}){return x.jsxs("div",{children:[x.jsx("button",{onClick:()=>{r(n)},children:e}),Object.entries(t).map(([i,o])=>x.jsx("div",{className:"px-4 py-1",children:x.jsx(Jk,{name:i,tree:o,moduleId:`${n}/${i}`,setSelectedModuleId:r})},`${n}/${i}`))]})}const v_={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 MI({children:e}){const t=e;function n(o,l){const s=v_.tags[o];return s&&l?[l,s].join(" "):s||l}function r(o,l){const s=v_.classes[o];return s&&l?[l,s].join(" "):s||l}function i(o,l){var u,c;if(typeof o=="string")return o;if(o.tag==="p")return x.jsx("p",{className:n("p"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="img")return x.jsx("img",{className:n("img"),src:o.src},l);if(o.tag==="ul")return x.jsx("ul",{className:n("ul"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="ol")return x.jsx("ol",{className:n("ol"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="li")return x.jsx("li",{className:n("li"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="span")return x.jsx("span",{className:o.classes.map(d=>{switch(d){case"bold":return r("bold");case"line-through":return r("lineThrough");case"italic":return r("italic")}}).join(" "),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h1")return x.jsx("h1",{className:n("h1"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h2")return x.jsx("h2",{className:n("h2"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h3")return x.jsx("h3",{className:n("h3"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h4")return x.jsx("h4",{className:n("h4"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h5")return x.jsx("h5",{className:n("h5"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h6")return x.jsx("h6",{className:n("h6"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="br")return x.jsx("br",{},l);if(o.tag==="a")return x.jsx("a",{href:o.href,children:o.children.map((d,f)=>i(d,f))},l);console.error("Unknown tag",o.tag);const a=o.tag;return a!=null&&a.tag?re.createElement(a.tag,{key:l,className:(u=a.class)==null?void 0:u.join(" "),children:(c=a.children)==null?void 0:c.map(i)}):null}return x.jsx("span",{"data-val-path":t.valPath,children:t.children.map((o,l)=>i(o,l))})}const DI=p.createContext(null),Xh={didCatch:!1,error:null};class II extends p.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Xh}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:o,reason:"imperative-api"}),this.setState(Xh)}}componentDidCatch(t,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;if(r&&n.error!==null&&LI(t.resetKeys,i)){var o,l;(o=(l=this.props).onReset)===null||o===void 0||o.call(l,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Xh)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:o,error:l}=this.state;let s=t;if(o){const a={error:l,resetErrorBoundary:this.resetErrorBoundary};if(p.isValidElement(i))s=i;else if(typeof n=="function")s=n(a);else if(r)s=p.createElement(r,a);else throw l}return p.createElement(DI.Provider,{value:{didCatch:o,error:l,resetErrorBoundary:this.resetErrorBoundary}},s)}}function LI(){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 qk="Collapsible",[jI,e$]=ol(qk),[zI,Jv]=jI(qk),FI=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:l,...s}=e,[a=!1,u]=gs({prop:r,defaultProp:i,onChange:l});return p.createElement(zI,{scope:n,disabled:o,contentId:jf(),open:a,onOpenToggle:p.useCallback(()=>u(c=>!c),[u])},p.createElement(Ke.div,ie({"data-state":qv(a),"data-disabled":o?"":void 0},s,{ref:t})))}),BI="CollapsibleTrigger",UI=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Jv(BI,n);return p.createElement(Ke.button,ie({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":qv(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:t,onClick:nt(e.onClick,i.onOpenToggle)}))}),t$="CollapsibleContent",WI=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Jv(t$,e.__scopeCollapsible);return p.createElement(Ss,{present:n||i.open},({present:o})=>p.createElement(VI,ie({},r,{ref:t,present:o})))}),VI=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,l=Jv(t$,n),[s,a]=p.useState(r),u=p.useRef(null),c=st(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)},[]),Un(()=>{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 _=y.getBoundingClientRect();d.current=_.height,h.current=_.width,S.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),a(r)}},[l.open,r]),p.createElement(Ke.div,ie({"data-state":qv(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!g},o,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style}}),g&&i)});function qv(e){return e?"open":"closed"}const HI=FI,KI=UI,ZI=WI,So="Accordion",GI=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ey,YI,XI]=DC(So),[Yf,PL]=ol(So,[XI,e$]),ty=e$(),n$=re.forwardRef((e,t)=>{const{type:n,...r}=e,i=r,o=r;return re.createElement(ey.Provider,{scope:e.__scopeAccordion},n==="multiple"?re.createElement(eL,ie({},o,{ref:t})):re.createElement(qI,ie({},i,{ref:t})))});n$.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[r$,QI]=Yf(So),[i$,JI]=Yf(So,{collapsible:!1}),qI=re.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...l}=e,[s,a]=gs({prop:n,defaultProp:r,onChange:i});return re.createElement(r$,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:a,onItemClose:re.useCallback(()=>o&&a(""),[o,a])},re.createElement(i$,{scope:e.__scopeAccordion,collapsible:o},re.createElement(o$,ie({},l,{ref:t}))))}),eL=re.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[l=[],s]=gs({prop:n,defaultProp:r,onChange:i}),a=re.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=re.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return re.createElement(r$,{scope:e.__scopeAccordion,value:l,onItemOpen:a,onItemClose:u},re.createElement(i$,{scope:e.__scopeAccordion,collapsible:!0},re.createElement(o$,ie({},o,{ref:t}))))}),[tL,Xf]=Yf(So),o$=re.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:o="vertical",...l}=e,s=re.useRef(null),a=st(s,t),u=YI(n),d=Gg(i)==="ltr",f=nt(e.onKeyDown,h=>{var m;if(!GI.includes(h.key))return;const g=h.target,S=u().filter(N=>{var R;return!((R=N.ref.current)!==null&&R!==void 0&&R.disabled)}),v=S.findIndex(N=>N.ref.current===g),y=S.length;if(v===-1)return;h.preventDefault();let _=v;const w=0,E=y-1,$=()=>{_=v+1,_>E&&(_=w)},C=()=>{_=v-1,_<w&&(_=E)};switch(h.key){case"Home":_=w;break;case"End":_=E;break;case"ArrowRight":o==="horizontal"&&(d?$():C());break;case"ArrowDown":o==="vertical"&&$();break;case"ArrowLeft":o==="horizontal"&&(d?C():$());break;case"ArrowUp":o==="vertical"&&C();break}const T=_%y;(m=S[T].ref.current)===null||m===void 0||m.focus()});return re.createElement(tL,{scope:n,disabled:r,direction:i,orientation:o},re.createElement(ey.Slot,{scope:n},re.createElement(Ke.div,ie({},l,{"data-orientation":o,ref:a,onKeyDown:r?void 0:f}))))}),Xm="AccordionItem",[nL,ny]=Yf(Xm),rL=re.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...i}=e,o=Xf(Xm,n),l=QI(Xm,n),s=ty(n),a=jf(),u=r&&l.value.includes(r)||!1,c=o.disabled||e.disabled;return re.createElement(nL,{scope:n,open:u,disabled:c,triggerId:a},re.createElement(HI,ie({"data-orientation":o.orientation,"data-state":l$(u)},s,i,{ref:t,disabled:c,open:u,onOpenChange:d=>{d?l.onItemOpen(r):l.onItemClose(r)}})))}),iL="AccordionHeader",oL=re.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=Xf(So,n),o=ny(iL,n);return re.createElement(Ke.h3,ie({"data-orientation":i.orientation,"data-state":l$(o.open),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),y_="AccordionTrigger",lL=re.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=Xf(So,n),o=ny(y_,n),l=JI(y_,n),s=ty(n);return re.createElement(ey.ItemSlot,{scope:n},re.createElement(KI,ie({"aria-disabled":o.open&&!l.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId},s,r,{ref:t})))}),sL="AccordionContent",aL=re.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=Xf(So,n),o=ny(sL,n),l=ty(n);return re.createElement(ZI,ie({role:"region","aria-labelledby":o.triggerId,"data-orientation":i.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 l$(e){return e?"open":"closed"}const uL=n$,cL=rL,dL=oL,s$=lL,a$=aL,fL=uL,u$=p.forwardRef(({className:e,...t},n)=>x.jsx(cL,{ref:n,className:xt("border-b",e),...t}));u$.displayName="AccordionItem";const c$=p.forwardRef(({className:e,children:t,...n},r)=>x.jsx(dL,{className:"flex",children:x.jsxs(s$,{ref:r,className:xt("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,x.jsx(kC,{className:"w-4 h-4 transition-transform duration-200 shrink-0"})]})}));c$.displayName=s$.displayName;const d$=p.forwardRef(({className:e,children:t,...n},r)=>x.jsx(a$,{ref:r,className:xt("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...n,children:x.jsx("div",{className:"pt-0 pb-4",children:t})}));d$.displayName=a$.displayName;/**
|
|
192
|
+
Showing stack trace of: 1. ${d[0].message}`,R=new Error(N);throw R.stack=d[0].stack,R}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",R=>{let D;try{D=JSON.parse(R.data)}catch{console.error("Failed to parse HMR")}typeof(D==null?void 0:D.hash)=="string"&&(D==null?void 0:D.action)==="built"&&m(D.hash)})}catch(N){console.warn("Failed to initialize HMR",N)}},[]),p.useEffect(()=>{console.log("(Re)-fetching modules"),e.getTree({patch:!0,includeSchema:!0,includeSource:!0}).then(N=>{jo.isOk(N)?r(N.value.modules):(o("Could not load modules: "+N.error.message),console.error(N.error))})},[h]);const g=dM(e),w=Xv(),[v,y]=d5(),{patches:_,setPatchResetId:S}=c5(g,e),E=re.useRef(null),$=p.useCallback(N=>async R=>{const[D,F]=jn.splitModuleIdAndModulePath(N),se=await R(jn.createPatchJSONPath(F));return e.postPatches(D,se).then(V=>{if(jo.isErr(V))throw V.error;if(!h)return S(K=>K+1),e.getTree({treePath:D,patch:!0,includeSchema:!0,includeSource:!0}).then(K=>{jo.isOk(K)?r(O=>({...O,...K.value.modules})):(o("Could not load modules: "+K.error.message),console.error(K.error))})}).catch(V=>{console.error(V)})},[]);return x.jsx(xC.Provider,{value:{theme:v,setTheme:y,api:e,editMode:"full",session:g,highlight:!1,setHighlight:()=>{},setEditMode:()=>{},setWindowSize:()=>{}},children:x.jsxs("div",{id:"val-fullscreen-container",className:"relative font-serif antialiased","data-mode":v,children:[x.jsx("div",{className:"fixed -translate-x-1/2 z-overlay left-1/2 bottom-4",children:x.jsx(a5,{api:e,patches:_,onCommit:()=>S(N=>N+1)})}),x.jsx("div",{id:"val-fullscreen-hover",ref:E}),x.jsx(Gk.Provider,{value:{hoverElem:E==null?void 0:E.current},children:x.jsx("div",{className:"text-primary bg-background",children:x.jsxs(Ca,{children:[x.jsx("div",{className:"px-4 h-[50px] flex items-center justify-center",children:x.jsx(kk,{})}),x.jsx(Ea,{className:"px-4",children:n?x.jsx(ML,{paths:Object.keys(n),setSelectedModuleId:N=>{w(N)}}):!i&&x.jsx("div",{className:"py-4",children:"Loading..."})}),x.jsxs("div",{className:"flex items-center justify-start w-full h-[50px] gap-2 font-serif text-xs",children:[x.jsx("button",{onClick:()=>{history.back()},children:x.jsx(JA,{})}),x.jsx("p",{children:l||"/"})]}),x.jsxs("div",{className:"p-4",children:[i&&x.jsxs("div",{className:"text-lg text-destructive-foreground",children:["ERROR: ",i]}),n&&l&&a&&u!==void 0&&c!==void 0&&x.jsx(Zk.Provider,{value:n,children:x.jsx(bL,{path:l,source:u,schema:c,setSelectedPath:s,initOnSubmit:$})})]})]})})})]})})},Gk=re.createContext({hoverElem:null}),$L=()=>re.useContext(Gk);function bL({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:i}){const[,o]=jn.splitModuleIdAndModulePath(e),l=jn.resolvePath(o,t,n);if(!l)throw Error("Could not resolve module: "+e);return x.jsx(Yk,{path:e,source:l.source,schema:l.schema,setSelectedPath:r,initOnSubmit:i,top:!0})}function Yk({path:e,source:t,schema:n,setSelectedPath:r,field:i,initOnSubmit:o,top:l}){return t===null||n.opt?x.jsx(OL,{path:e,source:t,schema:n,field:i,initOnSubmit:o,setSelectedPath:r}):n.type==="object"?typeof t!="object"||La(t)?x.jsxs("div",{children:["ERROR: expected object, but found ",typeof t]}):x.jsx(Xk,{source:t,path:e,schema:n,initOnSubmit:o,setSelectedPath:r,top:l}):n.type==="array"?typeof t!="object"||!La(t)?x.jsxs("div",{children:["ERROR: expected array, but found ",typeof t]}):x.jsx(Qk,{source:t,path:e,schema:n,setSelectedPath:r}):n.type==="record"?typeof t!="object"?x.jsxs("div",{children:["ERROR: expected object for ",n.type,", but found ",typeof t]}):La(t)?x.jsxs("div",{children:["ERROR: did not expect array for ",n.type]}):x.jsx(TL,{source:t,path:e,schema:n,setSelectedPath:r}):x.jsxs("div",{className:"py-2 gap-y-4",children:[x.jsx("div",{className:"text-left",children:i||e}),x.jsx(Ck,{path:e,disabled:!1,source:t,schema:n,onSubmit:o(e)})]})}function Xk({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:i,top:o}){return x.jsx("div",{className:wf("flex flex-col gap-y-8",{"border-l-2 border-border pl-6":!o}),children:Object.entries(n.items).map(([l,s])=>{const a=$u(e,l);return x.jsx(Yk,{path:a,source:t[l],schema:s,setSelectedPath:r,field:l,initOnSubmit:i},a)})},e)}function TL({path:e,source:t,schema:n,setSelectedPath:r}){const i=Xv();return x.jsx("div",{className:"flex flex-col gap-4 p-2",children:Object.entries(t).map(([o,l])=>{const s=$u(e,o);return x.jsx("button",{onClick:()=>{r(s),i(s)},children:x.jsx(NL,{recordKey:o,path:s,source:l,schema:n.item})},s)})},e)}const Ym=170;function NL({recordKey:e,path:t,source:n,schema:r}){const i=re.useRef(null),[o,l]=p.useState(!1);return p.useEffect(()=>{i.current&&i.current.getBoundingClientRect().height>=Ym&&l(!0)},[]),x.jsxs(Zv,{ref:i,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:Ym},children:[x.jsx("div",{className:"pb-4 font-serif text-left text-accent",children:e}),x.jsx("div",{className:"text-xs",children:x.jsx(Qv,{path:t,source:n,schema:r})}),o&&x.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]},t)}function Qk({path:e,source:t,schema:n,setSelectedPath:r}){const i=Xv();return x.jsx("div",{className:"flex flex-col gap-4 p-2",children:t.map((o,l)=>{const s=$u(e,l);return x.jsx("button",{onClick:()=>{r(s),i(s)},children:x.jsx(RL,{index:l,path:s,source:o,schema:n.item},s)},s)})},e)}const g_=Ym;function RL({index:e,path:t,source:n,schema:r}){const i=re.useRef(null),[o,l]=p.useState(!1);return p.useEffect(()=>{i.current&&i.current.getBoundingClientRect().height>=g_&&l(!0)},[]),x.jsxs(Zv,{ref:i,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:g_},children:[x.jsx("div",{className:"pb-4 font-serif text-left uppercase text-accent",children:e+1<10?`0${e+1}`:e+1}),x.jsx("div",{className:"text-xs",children:x.jsx(Qv,{path:t,source:n,schema:r})}),o&&x.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]})}function $u(e,t){const n=jn.createValPathOfItem(e,t);if(!n)throw Error(`Could not create val path: ${e} of ${t==null?void 0:t.toString()}`);return n}function Qv({path:e,source:t,schema:n}){const[r,i]=p.useState(null),{hoverElem:o}=$L();if(n.type==="object")return x.jsx("div",{className:"grid grid-cols-[min-content_1fr] gap-2 text-left",children:Object.entries(n.items).map(([l])=>x.jsxs(p.Fragment,{children:[x.jsxs("span",{className:"text-muted",children:[l,":"]}),x.jsx("span",{children:x.jsx(Qv,{source:(t==null?void 0:t[l])??null,schema:n.items[l],path:$u(e,l)})})]},$u(e,l)))},e);if(n.type==="array")return t===null?x.jsx("span",{className:"text-accent",children:"Empty"},e):Array.isArray(t)?x.jsxs("span",{children:[x.jsx("span",{className:"text-accent",children:t.length}),x.jsx("span",{children:t.length===1?" item":" items"})]},e):x.jsx("span",{className:"px-2 bg-destructive text-destructive-foreground",children:"Unknown length"},e);if(n.type==="richtext")return t===null?x.jsx("span",{className:"text-accent",children:"Empty"},e):typeof t!="object"?x.jsxs("div",{className:"p-4 text-destructive-foreground bg-destructive",children:["ERROR: ",typeof t," not an object"]},e):!(nn in t)||t[nn]!=="richtext"?x.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not richtext"},e):x.jsx(DL,{children:PE(t)},e);if(n.type==="string")return t===null?x.jsx("span",{className:"text-accent",children:"Empty"},e):x.jsx("span",{children:t});if(n.type==="image"){if(t===null)return x.jsx("span",{className:"text-accent",children:"Empty"},e);if(typeof t!="object")return x.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: not an object"},e);if(!(Rn in t)||typeof t[Rn]!="string")return x.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not an image"},e);const l=jn.convertFileSource(t).url;return x.jsxs("span",{onMouseOver:s=>{i({x:s.clientX,y:s.clientY})},onMouseLeave:()=>{i(null)},className:"relative flex items-center justify-start gap-1",children:[x.jsx("a",{href:l,className:"overflow-hidden underline truncate ",children:t[Rn]}),r&&o&&Gr.createPortal(x.jsx("img",{className:"absolute z-[5] max-w-[10vw]",style:{left:r.x+10,top:r.y+10},src:l}),o)]},e)}else{if(n.type==="boolean")return t===null?x.jsx("span",{className:"text-accent",children:"Empty"},e):x.jsx("span",{className:"text-accent",children:t?"true":"false"},e);if(n.type==="number")return t===null?x.jsx("span",{className:"text-accent",children:"Empty"},e):x.jsx("span",{className:"text-accent",children:t.toString()});if(n.type==="keyOf")return t===null?x.jsx("span",{className:"text-accent",children:"Empty"},e):x.jsx("span",{className:"text-accent",children:t.toString()},e)}return x.jsxs("div",{children:["TODO: ",n.type]},e)}function OL({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:i,field:o}){const[l,s]=p.useState(t!==null);return x.jsxs("div",{className:"flex flex-col gap-y-6",children:[o?x.jsxs("div",{className:"flex items-center justify-start gap-x-4",children:[x.jsx(Vm,{checked:l,onClick:()=>{s(a=>!a)}}),x.jsx("span",{children:o})]}):x.jsx(Vm,{checked:l,onClick:()=>{s(a=>!a)}}),l&&x.jsx(PL,{source:t,schema:n,path:e,setSelectedPath:r,initOnSubmit:i})]},e)}function PL({source:e,path:t,schema:n,setSelectedPath:r,initOnSubmit:i}){if(n.type==="array"){if(typeof e=="object"&&(e===null||La(e)))return x.jsx(Qk,{source:e===null?[]:e,path:t,schema:n,setSelectedPath:r})}else if(n.type==="object"){if(typeof e=="object"&&(e===null||!La(e)))return x.jsx(Xk,{source:e,path:t,schema:n,setSelectedPath:r,initOnSubmit:i})}else if(n.type==="richtext"||n.type==="string"||n.type==="image"||n.type==="number"||n.type==="keyOf")return x.jsx(Ck,{path:t,disabled:!1,source:e,schema:n,onSubmit:i(t)},t);return x.jsxs("div",{className:"p-4 bg-destructive text-destructive-foreground",children:["ERROR: unexpected source type ",typeof e," for schema type"," ",n.type]})}function La(e){return Array.isArray(e)}function AL(e){const t={};return e.forEach(n=>{const r=n.split("/").filter(o=>o!=="");let i=t;r.forEach(o=>{i[o]||(i[o]={}),i=i[o]})}),t}function ML({paths:e,setSelectedModuleId:t}){const n=AL(e);return x.jsx(vS,{children:Object.entries(n).map(([r,i])=>x.jsx("div",{className:"px-4 py-2",children:x.jsx(Jk,{name:r,tree:i,moduleId:`/${r}`,setSelectedModuleId:t})},`/${r}`))})}function Jk({name:e,tree:t,moduleId:n,setSelectedModuleId:r}){return x.jsxs("div",{children:[x.jsx("button",{onClick:()=>{r(n)},children:e}),Object.entries(t).map(([i,o])=>x.jsx("div",{className:"px-4 py-1",children:x.jsx(Jk,{name:i,tree:o,moduleId:`${n}/${i}`,setSelectedModuleId:r})},`${n}/${i}`))]})}const v_={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 DL({children:e}){const t=e;function n(o,l){const s=v_.tags[o];return s&&l?[l,s].join(" "):s||l}function r(o,l){const s=v_.classes[o];return s&&l?[l,s].join(" "):s||l}function i(o,l){var u,c;if(typeof o=="string")return o;if(o.tag==="p")return x.jsx("p",{className:n("p"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="img")return x.jsx("img",{className:n("img"),src:o.src},l);if(o.tag==="ul")return x.jsx("ul",{className:n("ul"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="ol")return x.jsx("ol",{className:n("ol"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="li")return x.jsx("li",{className:n("li"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="span")return x.jsx("span",{className:o.classes.map(d=>{switch(d){case"bold":return r("bold");case"line-through":return r("lineThrough");case"italic":return r("italic")}}).join(" "),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h1")return x.jsx("h1",{className:n("h1"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h2")return x.jsx("h2",{className:n("h2"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h3")return x.jsx("h3",{className:n("h3"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h4")return x.jsx("h4",{className:n("h4"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h5")return x.jsx("h5",{className:n("h5"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h6")return x.jsx("h6",{className:n("h6"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="br")return x.jsx("br",{},l);if(o.tag==="a")return x.jsx("a",{href:o.href,children:o.children.map((d,f)=>i(d,f))},l);console.error("Unknown tag",o.tag);const a=o.tag;return a!=null&&a.tag?re.createElement(a.tag,{key:l,className:(u=a.class)==null?void 0:u.join(" "),children:(c=a.children)==null?void 0:c.map(i)}):null}return x.jsx("span",{"data-val-path":t.valPath,children:t.children.map((o,l)=>i(o,l))})}const LL=p.createContext(null),Xh={didCatch:!1,error:null};class IL extends p.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Xh}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:o,reason:"imperative-api"}),this.setState(Xh)}}componentDidCatch(t,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;if(r&&n.error!==null&&jL(t.resetKeys,i)){var o,l;(o=(l=this.props).onReset)===null||o===void 0||o.call(l,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Xh)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:o,error:l}=this.state;let s=t;if(o){const a={error:l,resetErrorBoundary:this.resetErrorBoundary};if(p.isValidElement(i))s=i;else if(typeof n=="function")s=n(a);else if(r)s=p.createElement(r,a);else throw l}return p.createElement(LL.Provider,{value:{didCatch:o,error:l,resetErrorBoundary:this.resetErrorBoundary}},s)}}function jL(){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 qk="Collapsible",[zL,e$]=ll(qk),[FL,Jv]=zL(qk),BL=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:l,...s}=e,[a=!1,u]=gs({prop:r,defaultProp:i,onChange:l});return p.createElement(FL,{scope:n,disabled:o,contentId:jf(),open:a,onOpenToggle:p.useCallback(()=>u(c=>!c),[u])},p.createElement(Ke.div,ie({"data-state":qv(a),"data-disabled":o?"":void 0},s,{ref:t})))}),UL="CollapsibleTrigger",WL=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Jv(UL,n);return p.createElement(Ke.button,ie({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":qv(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:t,onClick:nt(e.onClick,i.onOpenToggle)}))}),t$="CollapsibleContent",VL=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Jv(t$,e.__scopeCollapsible);return p.createElement(Es,{present:n||i.open},({present:o})=>p.createElement(HL,ie({},r,{ref:t,present:o})))}),HL=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,l=Jv(t$,n),[s,a]=p.useState(r),u=p.useRef(null),c=st(t,u),d=p.useRef(0),f=d.current,h=p.useRef(0),m=h.current,g=l.open||s,w=p.useRef(g),v=p.useRef();return p.useEffect(()=>{const y=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(y)},[]),Un(()=>{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 _=y.getBoundingClientRect();d.current=_.height,h.current=_.width,w.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),a(r)}},[l.open,r]),p.createElement(Ke.div,ie({"data-state":qv(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!g},o,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style}}),g&&i)});function qv(e){return e?"open":"closed"}const KL=BL,ZL=WL,GL=VL,So="Accordion",YL=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ey,XL,QL]=DC(So),[Yf,AI]=ll(So,[QL,e$]),ty=e$(),n$=re.forwardRef((e,t)=>{const{type:n,...r}=e,i=r,o=r;return re.createElement(ey.Provider,{scope:e.__scopeAccordion},n==="multiple"?re.createElement(tI,ie({},o,{ref:t})):re.createElement(eI,ie({},i,{ref:t})))});n$.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[r$,JL]=Yf(So),[i$,qL]=Yf(So,{collapsible:!1}),eI=re.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...l}=e,[s,a]=gs({prop:n,defaultProp:r,onChange:i});return re.createElement(r$,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:a,onItemClose:re.useCallback(()=>o&&a(""),[o,a])},re.createElement(i$,{scope:e.__scopeAccordion,collapsible:o},re.createElement(o$,ie({},l,{ref:t}))))}),tI=re.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[l=[],s]=gs({prop:n,defaultProp:r,onChange:i}),a=re.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=re.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return re.createElement(r$,{scope:e.__scopeAccordion,value:l,onItemOpen:a,onItemClose:u},re.createElement(i$,{scope:e.__scopeAccordion,collapsible:!0},re.createElement(o$,ie({},o,{ref:t}))))}),[nI,Xf]=Yf(So),o$=re.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:o="vertical",...l}=e,s=re.useRef(null),a=st(s,t),u=XL(n),d=Gg(i)==="ltr",f=nt(e.onKeyDown,h=>{var m;if(!YL.includes(h.key))return;const g=h.target,w=u().filter(N=>{var R;return!((R=N.ref.current)!==null&&R!==void 0&&R.disabled)}),v=w.findIndex(N=>N.ref.current===g),y=w.length;if(v===-1)return;h.preventDefault();let _=v;const S=0,E=y-1,$=()=>{_=v+1,_>E&&(_=S)},C=()=>{_=v-1,_<S&&(_=E)};switch(h.key){case"Home":_=S;break;case"End":_=E;break;case"ArrowRight":o==="horizontal"&&(d?$():C());break;case"ArrowDown":o==="vertical"&&$();break;case"ArrowLeft":o==="horizontal"&&(d?C():$());break;case"ArrowUp":o==="vertical"&&C();break}const T=_%y;(m=w[T].ref.current)===null||m===void 0||m.focus()});return re.createElement(nI,{scope:n,disabled:r,direction:i,orientation:o},re.createElement(ey.Slot,{scope:n},re.createElement(Ke.div,ie({},l,{"data-orientation":o,ref:a,onKeyDown:r?void 0:f}))))}),Xm="AccordionItem",[rI,ny]=Yf(Xm),iI=re.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...i}=e,o=Xf(Xm,n),l=JL(Xm,n),s=ty(n),a=jf(),u=r&&l.value.includes(r)||!1,c=o.disabled||e.disabled;return re.createElement(rI,{scope:n,open:u,disabled:c,triggerId:a},re.createElement(KL,ie({"data-orientation":o.orientation,"data-state":l$(u)},s,i,{ref:t,disabled:c,open:u,onOpenChange:d=>{d?l.onItemOpen(r):l.onItemClose(r)}})))}),oI="AccordionHeader",lI=re.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=Xf(So,n),o=ny(oI,n);return re.createElement(Ke.h3,ie({"data-orientation":i.orientation,"data-state":l$(o.open),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),y_="AccordionTrigger",sI=re.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=Xf(So,n),o=ny(y_,n),l=qL(y_,n),s=ty(n);return re.createElement(ey.ItemSlot,{scope:n},re.createElement(ZL,ie({"aria-disabled":o.open&&!l.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId},s,r,{ref:t})))}),aI="AccordionContent",uI=re.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=Xf(So,n),o=ny(aI,n),l=ty(n);return re.createElement(GL,ie({role:"region","aria-labelledby":o.triggerId,"data-orientation":i.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 l$(e){return e?"open":"closed"}const cI=n$,dI=iI,fI=lI,s$=sI,a$=uI,hI=cI,u$=p.forwardRef(({className:e,...t},n)=>x.jsx(dI,{ref:n,className:xt("border-b",e),...t}));u$.displayName="AccordionItem";const c$=p.forwardRef(({className:e,children:t,...n},r)=>x.jsx(fI,{className:"flex",children:x.jsxs(s$,{ref:r,className:xt("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,x.jsx(kC,{className:"w-4 h-4 transition-transform duration-200 shrink-0"})]})}));c$.displayName=s$.displayName;const d$=p.forwardRef(({className:e,children:t,...n},r)=>x.jsx(a$,{ref:r,className:xt("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...n,children:x.jsx("div",{className:"pt-0 pb-4",children:t})}));d$.displayName=a$.displayName;/**
|
|
193
193
|
* React Router DOM v6.20.0
|
|
194
194
|
*
|
|
195
195
|
* Copyright (c) Remix Software Inc.
|
|
@@ -198,4 +198,4 @@ Showing stack trace of: 1. ${d[0].message}`,R=new Error(N);throw R.stack=d[0].st
|
|
|
198
198
|
* LICENSE.md file in the root directory of this source tree.
|
|
199
199
|
*
|
|
200
200
|
* @license MIT
|
|
201
|
-
*/function tf(){return tf=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},tf.apply(this,arguments)}function
|
|
201
|
+
*/function tf(){return tf=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},tf.apply(this,arguments)}function pI(e,t){return XD({basename:t==null?void 0:t.basename,future:tf({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:yD({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||mI(),routes:e,mapRouteProperties:EL,window:t==null?void 0:t.window}).initialize()}function mI(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=tf({},t,{errors:gI(t.errors)})),t}function gI(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new Gv(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let l=new o(i.message);l.stack="",n[r]=l}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const vI=p.createContext({isTransitioning:!1}),yI=p.createContext(new Map),xI="startTransition",x_=P_[xI],_I="flushSync",__=jT[_I];function wI(e){x_?x_(e):e()}function oa(e){__?__(e):e()}class SI{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 EI(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=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(),w=p.useRef(new Map),{v7_startTransition:v}=r||{},y=p.useCallback(C=>{v?wI(C):C()},[v]),_=p.useCallback((C,T)=>{let{deletedFetchers:N,unstable_flushSync:R,unstable_viewTransitionOpts:D}=T;N.forEach(se=>w.current.delete(se)),C.fetchers.forEach((se,V)=>{se.data!==void 0&&w.current.set(V,se.data)});let F=n.window==null||typeof n.window.document.startViewTransition!="function";if(!D||F){R?oa(()=>o(C)):y(()=>o(C));return}if(R){oa(()=>{f&&(c&&c.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:D.currentLocation,nextLocation:D.nextLocation})});let se=n.window.document.startViewTransition(()=>{oa(()=>o(C))});se.finished.finally(()=>{oa(()=>{d(void 0),h(void 0),s(void 0),u({isTransitioning:!1})})}),oa(()=>h(se));return}f?(c&&c.resolve(),f.skipTransition(),g({state:C,currentLocation:D.currentLocation,nextLocation:D.nextLocation})):(s(C),u({isTransitioning:!0,flushSync:!1,currentLocation:D.currentLocation,nextLocation:D.nextLocation}))},[n.window,f,c,w,y]);p.useLayoutEffect(()=>n.subscribe(_),[n,_]),p.useEffect(()=>{a.isTransitioning&&!a.flushSync&&d(new SI)},[a]),p.useEffect(()=>{if(c&&l&&n.window){let C=l,T=c.promise,N=n.window.document.startViewTransition(async()=>{y(()=>o(C)),await T});N.finished.finally(()=>{d(void 0),h(void 0),s(void 0),u({isTransitioning:!1})}),h(N)}},[y,l,c,n.window]),p.useEffect(()=>{c&&l&&i.location.key===l.location.key&&c.resolve()},[c,f,i.location,l]),p.useEffect(()=>{!a.isTransitioning&&m&&(s(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),g(void 0))},[a.isTransitioning,m]);let S=p.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:C=>n.navigate(C),push:(C,T,N)=>n.navigate(C,{state:T,preventScrollReset:N==null?void 0:N.preventScrollReset}),replace:(C,T,N)=>n.navigate(C,{replace:!0,state:T,preventScrollReset:N==null?void 0:N.preventScrollReset})}),[n]),E=n.basename||"/",$=p.useMemo(()=>({router:n,navigator:S,static:!1,basename:E}),[n,S,E]);return p.createElement(p.Fragment,null,p.createElement(Hf.Provider,{value:$},p.createElement(Bk.Provider,{value:i},p.createElement(yI.Provider,{value:w.current},p.createElement(vI.Provider,{value:a},p.createElement(SL,{basename:E,location:i.location,navigationType:i.historyAction,navigator:S},i.initialized?p.createElement(CI,{routes:n.routes,state:i}):t))))),null)}function CI(e){let{routes:t,state:n}=e;return dL(t,void 0,n)}var w_;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(w_||(w_={}));var S_;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(S_||(S_={}));function kI({error:e,resetErrorBoundary:t}){return console.error(e),x.jsx("div",{className:"absolute top-0 left-0 flex items-center justify-center w-screen h-screen bg-card-foreground",children:x.jsx("div",{className:"w-full h-full p-10",children:x.jsxs("div",{className:"w-full h-full p-10 bg-card text-primary",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsxs("div",{className:"flex items-center gap-[0.5em] text-lg font-bold text-center py-2",children:[x.jsx(kk,{})," encountered an error"]}),x.jsx("button",{onClick:t,children:x.jsx(s5,{})})]}),x.jsx("div",{className:"text-4xl font-normal ",children:"Message:"}),x.jsx("pre",{children:e.message}),e.stack&&x.jsx(hI,{type:"single",className:"font-serif",collapsible:!0,defaultValue:"error",children:x.jsxs(u$,{value:"error",children:[x.jsx(c$,{children:"Stack trace:"}),x.jsx(d$,{className:"p-4 bg-popover text-popover-foreground",children:e.stack&&x.jsx("pre",{children:e.stack})})]})})]})})})}function $I(){const e=pI([{path:"/*",element:x.jsx(IL,{fallbackRender:kI,children:x.jsx(kL,{api:new HN("/api/val")})})}],{basename:"/api/val/static/edit"});return x.jsx(EI,{router:e})}Qh.createRoot(document.getElementById("root")).render(re.createElement(re.StrictMode,null,re.createElement($I,null)));
|