@valbuild/ui 0.40.0 → 0.41.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 +494 -560
- package/dist/valbuild-ui.esm.js +494 -560
- package/package.json +3 -3
- package/server/.tmp/assets/index-yF-ezBh3.js +201 -0
- package/server/.tmp/index.html +1 -1
- package/server/dist/valbuild-ui-main.cjs.js +469 -195
- package/server/dist/valbuild-ui-main.esm.js +469 -195
- 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-U4J2Ol5s.js +0 -201
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
var VC=Object.defineProperty;var HC=(e,t,n)=>t in e?VC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Be=(e,t,n)=>(HC(e,typeof t!="symbol"?t+"":t,n),n),KC=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Hd=(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 Xa=(e,t,n)=>(KC(e,t,"access private method"),n);function s1(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a1={exports:{}},Ce={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Pa=Symbol.for("react.element"),GC=Symbol.for("react.portal"),YC=Symbol.for("react.fragment"),XC=Symbol.for("react.strict_mode"),QC=Symbol.for("react.profiler"),JC=Symbol.for("react.provider"),ZC=Symbol.for("react.context"),qC=Symbol.for("react.forward_ref"),e$=Symbol.for("react.suspense"),t$=Symbol.for("react.memo"),n$=Symbol.for("react.lazy"),Jm=Symbol.iterator;function r$(e){return e===null||typeof e!="object"?null:(e=Jm&&e[Jm]||e["@@iterator"],typeof e=="function"?e:null)}var u1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},c1=Object.assign,d1={};function Ll(e,t,n){this.props=e,this.context=t,this.refs=d1,this.updater=n||u1}Ll.prototype.isReactComponent={};Ll.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ll.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f1(){}f1.prototype=Ll.prototype;function jp(e,t,n){this.props=e,this.context=t,this.refs=d1,this.updater=n||u1}var zp=jp.prototype=new f1;zp.constructor=jp;c1(zp,Ll.prototype);zp.isPureReactComponent=!0;var Zm=Array.isArray,h1=Object.prototype.hasOwnProperty,Fp={current:null},p1={key:!0,ref:!0,__self:!0,__source:!0};function g1(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)h1.call(t,r)&&!p1.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var a=Array(s),u=0;u<s;u++)a[u]=arguments[u+2];o.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return{$$typeof:Pa,type:e,key:i,ref:l,props:o,_owner:Fp.current}}function o$(e,t){return{$$typeof:Pa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Bp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Pa}function i$(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var qm=/\/+/g;function Kd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?i$(""+e.key):t.toString(36)}function Ru(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Pa:case GC:l=!0}}if(l)return l=e,o=o(l),e=r===""?"."+Kd(l,0):r,Zm(o)?(n="",e!=null&&(n=e.replace(qm,"$&/")+"/"),Ru(o,t,n,"",function(u){return u})):o!=null&&(Bp(o)&&(o=o$(o,n+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(qm,"$&/")+"/")+e)),t.push(o)),1;if(l=0,r=r===""?".":r+":",Zm(e))for(var s=0;s<e.length;s++){i=e[s];var a=r+Kd(i,s);l+=Ru(i,t,n,a,o)}else if(a=r$(e),typeof a=="function")for(e=a.call(e),s=0;!(i=e.next()).done;)i=i.value,a=r+Kd(i,s++),l+=Ru(i,t,n,a,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function Qa(e,t,n){if(e==null)return e;var r=[],o=0;return Ru(e,r,"","",function(i){return t.call(n,i,o++)}),r}function l$(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 sn={current:null},Pu={transition:null},s$={ReactCurrentDispatcher:sn,ReactCurrentBatchConfig:Pu,ReactCurrentOwner:Fp};Ce.Children={map:Qa,forEach:function(e,t,n){Qa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Qa(e,function(){t++}),t},toArray:function(e){return Qa(e,function(t){return t})||[]},only:function(e){if(!Bp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ce.Component=Ll;Ce.Fragment=YC;Ce.Profiler=QC;Ce.PureComponent=jp;Ce.StrictMode=XC;Ce.Suspense=e$;Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=s$;Ce.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=c1({},e.props),o=e.key,i=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,l=Fp.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(a in t)h1.call(t,a)&&!p1.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:Pa,type:e.type,key:o,ref:i,props:r,_owner:l}};Ce.createContext=function(e){return e={$$typeof:ZC,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:JC,_context:e},e.Consumer=e};Ce.createElement=g1;Ce.createFactory=function(e){var t=g1.bind(null,e);return t.type=e,t};Ce.createRef=function(){return{current:null}};Ce.forwardRef=function(e){return{$$typeof:qC,render:e}};Ce.isValidElement=Bp;Ce.lazy=function(e){return{$$typeof:n$,_payload:{_status:-1,_result:e},_init:l$}};Ce.memo=function(e,t){return{$$typeof:t$,type:e,compare:t===void 0?null:t}};Ce.startTransition=function(e){var t=Pu.transition;Pu.transition={};try{e()}finally{Pu.transition=t}};Ce.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Ce.useCallback=function(e,t){return sn.current.useCallback(e,t)};Ce.useContext=function(e){return sn.current.useContext(e)};Ce.useDebugValue=function(){};Ce.useDeferredValue=function(e){return sn.current.useDeferredValue(e)};Ce.useEffect=function(e,t){return sn.current.useEffect(e,t)};Ce.useId=function(){return sn.current.useId()};Ce.useImperativeHandle=function(e,t,n){return sn.current.useImperativeHandle(e,t,n)};Ce.useInsertionEffect=function(e,t){return sn.current.useInsertionEffect(e,t)};Ce.useLayoutEffect=function(e,t){return sn.current.useLayoutEffect(e,t)};Ce.useMemo=function(e,t){return sn.current.useMemo(e,t)};Ce.useReducer=function(e,t,n){return sn.current.useReducer(e,t,n)};Ce.useRef=function(e){return sn.current.useRef(e)};Ce.useState=function(e){return sn.current.useState(e)};Ce.useSyncExternalStore=function(e,t,n){return sn.current.useSyncExternalStore(e,t,n)};Ce.useTransition=function(){return sn.current.useTransition()};Ce.version="18.2.0";a1.exports=Ce;var p=a1.exports;const ee=Ra(p),m1=s1({__proto__:null,default:ee},[p]);var Ff={},v1={exports:{}},Rn={},y1={exports:{}},x1={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* scheduler.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/(function(e){function t(E,O){var R=E.length;E.push(O);e:for(;0<R;){var F=R-1>>>1,V=E[F];if(0<o(V,O))E[F]=O,E[R]=V,R=F;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var O=E[0],R=E.pop();if(R!==O){E[0]=R;e:for(var F=0,V=E.length,ae=V>>>1;F<ae;){var oe=2*(F+1)-1,$e=E[oe],_e=oe+1,Q=E[_e];if(0>o($e,R))_e<V&&0>o(Q,$e)?(E[F]=Q,E[_e]=R,F=_e):(E[F]=$e,E[oe]=R,F=oe);else if(_e<V&&0>o(Q,R))E[F]=Q,E[_e]=R,F=_e;else break e}}return O}function o(E,O){var R=E.sortIndex-O.sortIndex;return R!==0?R:E.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var a=[],u=[],c=1,d=null,f=3,h=!1,g=!1,m=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(E){for(var O=n(u);O!==null;){if(O.callback===null)r(u);else if(O.startTime<=E)r(u),O.sortIndex=O.expirationTime,t(a,O);else break;O=n(u)}}function S(E){if(m=!1,x(E),!g)if(n(a)!==null)g=!0,C(k);else{var O=n(u);O!==null&&$(S,O.startTime-E)}}function k(E,O){g=!1,m&&(m=!1,v(N),N=-1),h=!0;var R=f;try{for(x(O),d=n(a);d!==null&&(!(d.expirationTime>O)||E&&!j());){var F=d.callback;if(typeof F=="function"){d.callback=null,f=d.priorityLevel;var V=F(d.expirationTime<=O);O=e.unstable_now(),typeof V=="function"?d.callback=V:d===n(a)&&r(a),x(O)}else r(a);d=n(a)}if(d!==null)var ae=!0;else{var oe=n(u);oe!==null&&$(S,oe.startTime-O),ae=!1}return ae}finally{d=null,f=R,h=!1}}var b=!1,T=null,N=-1,D=5,M=-1;function j(){return!(e.unstable_now()-M<D)}function B(){if(T!==null){var E=e.unstable_now();M=E;var O=!0;try{O=T(!0,E)}finally{O?re():(b=!1,T=null)}}else b=!1}var re;if(typeof y=="function")re=function(){y(B)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,Y=H.port2;H.port1.onmessage=B,re=function(){Y.postMessage(null)}}else re=function(){_(B,0)};function C(E){T=E,b||(b=!0,re())}function $(E,O){N=_(function(){E(e.unstable_now())},O)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(E){E.callback=null},e.unstable_continueExecution=function(){g||h||(g=!0,C(k))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(E){switch(f){case 1:case 2:case 3:var O=3;break;default:O=f}var R=f;f=O;try{return E()}finally{f=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,O){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var R=f;f=E;try{return O()}finally{f=R}},e.unstable_scheduleCallback=function(E,O,R){var F=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?F+R:F):R=F,E){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=R+V,E={id:c++,callback:O,priorityLevel:E,startTime:R,expirationTime:V,sortIndex:-1},R>F?(E.sortIndex=R,t(u,E),n(a)===null&&E===n(u)&&(m?(v(N),N=-1):m=!0,$(S,R-F))):(E.sortIndex=V,t(a,E),g||h||(g=!0,C(k))),E},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(E){var O=f;return function(){var R=f;f=O;try{return E.apply(this,arguments)}finally{f=R}}}})(x1);y1.exports=x1;var a$=y1.exports;/**
|
|
18
|
-
* @license React
|
|
19
|
-
* react-dom.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var w1=p,Tn=a$;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 _1=new Set,Js={};function _i(e,t){xl(e,t),xl(e+"Capture",t)}function xl(e,t){for(Js[e]=t,e=0;e<t.length;e++)_1.add(t[e])}var Ur=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bf=Object.prototype.hasOwnProperty,u$=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ev={},tv={};function c$(e){return Bf.call(tv,e)?!0:Bf.call(ev,e)?!1:u$.test(e)?tv[e]=!0:(ev[e]=!0,!1)}function d$(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 f$(e,t,n,r){if(t===null||typeof t>"u"||d$(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 an(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var It={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){It[e]=new an(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];It[t]=new an(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){It[e]=new an(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){It[e]=new an(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){It[e]=new an(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){It[e]=new an(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){It[e]=new an(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){It[e]=new an(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){It[e]=new an(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wp=/[\-:]([a-z])/g;function Up(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Wp,Up);It[t]=new an(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wp,Up);It[t]=new an(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wp,Up);It[t]=new an(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){It[e]=new an(e,1,!1,e.toLowerCase(),null,!1,!1)});It.xlinkHref=new an("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){It[e]=new an(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vp(e,t,n,r){var o=It.hasOwnProperty(t)?It[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(f$(t,n,o,r)&&(n=null),r||o===null?c$(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Qr=w1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ja=Symbol.for("react.element"),Ki=Symbol.for("react.portal"),Gi=Symbol.for("react.fragment"),Hp=Symbol.for("react.strict_mode"),Wf=Symbol.for("react.profiler"),S1=Symbol.for("react.provider"),E1=Symbol.for("react.context"),Kp=Symbol.for("react.forward_ref"),Uf=Symbol.for("react.suspense"),Vf=Symbol.for("react.suspense_list"),Gp=Symbol.for("react.memo"),uo=Symbol.for("react.lazy"),C1=Symbol.for("react.offscreen"),nv=Symbol.iterator;function rs(e){return e===null||typeof e!="object"?null:(e=nv&&e[nv]||e["@@iterator"],typeof e=="function"?e:null)}var rt=Object.assign,Gd;function xs(e){if(Gd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Gd=t&&t[1]||""}return`
|
|
26
|
-
`+Gd+e}var Yd=!1;function Xd(e,t){if(!e||Yd)return"";Yd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
|
27
|
-
`),i=r.stack.split(`
|
|
28
|
-
`),l=o.length-1,s=i.length-1;1<=l&&0<=s&&o[l]!==i[s];)s--;for(;1<=l&&0<=s;l--,s--)if(o[l]!==i[s]){if(l!==1||s!==1)do if(l--,s--,0>s||o[l]!==i[s]){var a=`
|
|
29
|
-
`+o[l].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=l&&0<=s);break}}}finally{Yd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xs(e):""}function h$(e){switch(e.tag){case 5:return xs(e.type);case 16:return xs("Lazy");case 13:return xs("Suspense");case 19:return xs("SuspenseList");case 0:case 2:case 15:return e=Xd(e.type,!1),e;case 11:return e=Xd(e.type.render,!1),e;case 1:return e=Xd(e.type,!0),e;default:return""}}function Hf(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 Gi:return"Fragment";case Ki:return"Portal";case Wf:return"Profiler";case Hp:return"StrictMode";case Uf:return"Suspense";case Vf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E1:return(e.displayName||"Context")+".Consumer";case S1:return(e._context.displayName||"Context")+".Provider";case Kp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gp:return t=e.displayName||null,t!==null?t:Hf(e.type)||"Memo";case uo:t=e._payload,e=e._init;try{return Hf(e(t))}catch{}}return null}function p$(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 Hf(t);case 8:return t===Hp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Po(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function g$(e){var t=$1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Za(e){e._valueTracker||(e._valueTracker=g$(e))}function k1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Qu(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 Kf(e,t){var n=t.checked;return rt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function rv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Po(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 T1(e,t){t=t.checked,t!=null&&Vp(e,"checked",t,!1)}function Gf(e,t){T1(e,t);var n=Po(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")?Yf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Yf(e,t.type,Po(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ov(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Yf(e,t,n){(t!=="number"||Qu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ws=Array.isArray;function al(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Po(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Xf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return rt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function iv(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(U(92));if(ws(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Po(n)}}function b1(e,t){var n=Po(t.value),r=Po(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function lv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function N1(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 Qf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?N1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var qa,R1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(qa=qa||document.createElement("div"),qa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ts={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},m$=["Webkit","ms","Moz","O"];Object.keys(Ts).forEach(function(e){m$.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ts[t]=Ts[e]})});function P1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ts.hasOwnProperty(e)&&Ts[e]?(""+t).trim():t+"px"}function O1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=P1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var v$=rt({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 Jf(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 Zf(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 qf=null;function Yp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var eh=null,ul=null,cl=null;function sv(e){if(e=Ma(e)){if(typeof eh!="function")throw Error(U(280));var t=e.stateNode;t&&(t=qc(t),eh(e.stateNode,e.type,t))}}function A1(e){ul?cl?cl.push(e):cl=[e]:ul=e}function M1(){if(ul){var e=ul,t=cl;if(cl=ul=null,sv(e),t)for(e=0;e<t.length;e++)sv(t[e])}}function L1(e,t){return e(t)}function D1(){}var Qd=!1;function I1(e,t,n){if(Qd)return e(t,n);Qd=!0;try{return L1(e,t,n)}finally{Qd=!1,(ul!==null||cl!==null)&&(D1(),M1())}}function qs(e,t){var n=e.stateNode;if(n===null)return null;var r=qc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var th=!1;if(Ur)try{var os={};Object.defineProperty(os,"passive",{get:function(){th=!0}}),window.addEventListener("test",os,os),window.removeEventListener("test",os,os)}catch{th=!1}function y$(e,t,n,r,o,i,l,s,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var bs=!1,Ju=null,Zu=!1,nh=null,x$={onError:function(e){bs=!0,Ju=e}};function w$(e,t,n,r,o,i,l,s,a){bs=!1,Ju=null,y$.apply(x$,arguments)}function _$(e,t,n,r,o,i,l,s,a){if(w$.apply(this,arguments),bs){if(bs){var u=Ju;bs=!1,Ju=null}else throw Error(U(198));Zu||(Zu=!0,nh=u)}}function Si(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function j1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function av(e){if(Si(e)!==e)throw Error(U(188))}function S$(e){var t=e.alternate;if(!t){if(t=Si(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return av(o),e;if(i===r)return av(o),t;i=i.sibling}throw Error(U(188))}if(n.return!==r.return)n=o,r=i;else{for(var l=!1,s=o.child;s;){if(s===n){l=!0,n=o,r=i;break}if(s===r){l=!0,r=o,n=i;break}s=s.sibling}if(!l){for(s=i.child;s;){if(s===n){l=!0,n=i,r=o;break}if(s===r){l=!0,r=i,n=o;break}s=s.sibling}if(!l)throw Error(U(189))}}if(n.alternate!==r)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function z1(e){return e=S$(e),e!==null?F1(e):null}function F1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=F1(e);if(t!==null)return t;e=e.sibling}return null}var B1=Tn.unstable_scheduleCallback,uv=Tn.unstable_cancelCallback,E$=Tn.unstable_shouldYield,C$=Tn.unstable_requestPaint,ft=Tn.unstable_now,$$=Tn.unstable_getCurrentPriorityLevel,Xp=Tn.unstable_ImmediatePriority,W1=Tn.unstable_UserBlockingPriority,qu=Tn.unstable_NormalPriority,k$=Tn.unstable_LowPriority,U1=Tn.unstable_IdlePriority,Xc=null,yr=null;function T$(e){if(yr&&typeof yr.onCommitFiberRoot=="function")try{yr.onCommitFiberRoot(Xc,e,void 0,(e.current.flags&128)===128)}catch{}}var rr=Math.clz32?Math.clz32:R$,b$=Math.log,N$=Math.LN2;function R$(e){return e>>>=0,e===0?32:31-(b$(e)/N$|0)|0}var eu=64,tu=4194304;function _s(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 ec(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=_s(s):(i&=l,i!==0&&(r=_s(i)))}else l=n&~o,l!==0?r=_s(l):i!==0&&(r=_s(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-rr(t),o=1<<n,r|=e[n],t&=~o;return r}function P$(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 O$(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var l=31-rr(i),s=1<<l,a=o[l];a===-1?(!(s&n)||s&r)&&(o[l]=P$(s,t)):a<=t&&(e.expiredLanes|=s),i&=~s}}function rh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function V1(){var e=eu;return eu<<=1,!(eu&4194240)&&(eu=64),e}function Jd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Oa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-rr(t),e[t]=n}function A$(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-rr(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Qp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-rr(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Ae=0;function H1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var K1,Jp,G1,Y1,X1,oh=!1,nu=[],wo=null,_o=null,So=null,ea=new Map,ta=new Map,ho=[],M$="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function cv(e,t){switch(e){case"focusin":case"focusout":wo=null;break;case"dragenter":case"dragleave":_o=null;break;case"mouseover":case"mouseout":So=null;break;case"pointerover":case"pointerout":ea.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ta.delete(t.pointerId)}}function is(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Ma(t),t!==null&&Jp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function L$(e,t,n,r,o){switch(t){case"focusin":return wo=is(wo,e,t,n,r,o),!0;case"dragenter":return _o=is(_o,e,t,n,r,o),!0;case"mouseover":return So=is(So,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ea.set(i,is(ea.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ta.set(i,is(ta.get(i)||null,e,t,n,r,o)),!0}return!1}function Q1(e){var t=qo(e.target);if(t!==null){var n=Si(t);if(n!==null){if(t=n.tag,t===13){if(t=j1(n),t!==null){e.blockedOn=t,X1(e.priority,function(){G1(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 Ou(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ih(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qf=r,n.target.dispatchEvent(r),qf=null}else return t=Ma(n),t!==null&&Jp(t),e.blockedOn=n,!1;t.shift()}return!0}function dv(e,t,n){Ou(e)&&n.delete(t)}function D$(){oh=!1,wo!==null&&Ou(wo)&&(wo=null),_o!==null&&Ou(_o)&&(_o=null),So!==null&&Ou(So)&&(So=null),ea.forEach(dv),ta.forEach(dv)}function ls(e,t){e.blockedOn===t&&(e.blockedOn=null,oh||(oh=!0,Tn.unstable_scheduleCallback(Tn.unstable_NormalPriority,D$)))}function na(e){function t(o){return ls(o,e)}if(0<nu.length){ls(nu[0],e);for(var n=1;n<nu.length;n++){var r=nu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(wo!==null&&ls(wo,e),_o!==null&&ls(_o,e),So!==null&&ls(So,e),ea.forEach(t),ta.forEach(t),n=0;n<ho.length;n++)r=ho[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ho.length&&(n=ho[0],n.blockedOn===null);)Q1(n),n.blockedOn===null&&ho.shift()}var dl=Qr.ReactCurrentBatchConfig,tc=!0;function I$(e,t,n,r){var o=Ae,i=dl.transition;dl.transition=null;try{Ae=1,Zp(e,t,n,r)}finally{Ae=o,dl.transition=i}}function j$(e,t,n,r){var o=Ae,i=dl.transition;dl.transition=null;try{Ae=4,Zp(e,t,n,r)}finally{Ae=o,dl.transition=i}}function Zp(e,t,n,r){if(tc){var o=ih(e,t,n,r);if(o===null)af(e,t,r,nc,n),cv(e,r);else if(L$(o,e,t,n,r))r.stopPropagation();else if(cv(e,r),t&4&&-1<M$.indexOf(e)){for(;o!==null;){var i=Ma(o);if(i!==null&&K1(i),i=ih(e,t,n,r),i===null&&af(e,t,r,nc,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else af(e,t,r,null,n)}}var nc=null;function ih(e,t,n,r){if(nc=null,e=Yp(r),e=qo(e),e!==null)if(t=Si(e),t===null)e=null;else if(n=t.tag,n===13){if(e=j1(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 nc=e,null}function J1(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($$()){case Xp:return 1;case W1:return 4;case qu:case k$:return 16;case U1:return 536870912;default:return 16}default:return 16}}var mo=null,qp=null,Au=null;function Z1(){if(Au)return Au;var e,t=qp,n=t.length,r,o="value"in mo?mo.value:mo.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===o[i-r];r++);return Au=o.slice(e,1<r?1-r:void 0)}function Mu(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 ru(){return!0}function fv(){return!1}function Pn(e){function t(n,r,o,i,l){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ru:fv,this.isPropagationStopped=fv,this}return rt(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=ru)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ru)},persist:function(){},isPersistent:ru}),t}var Dl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eg=Pn(Dl),Aa=rt({},Dl,{view:0,detail:0}),z$=Pn(Aa),Zd,qd,ss,Qc=rt({},Aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ss&&(ss&&e.type==="mousemove"?(Zd=e.screenX-ss.screenX,qd=e.screenY-ss.screenY):qd=Zd=0,ss=e),Zd)},movementY:function(e){return"movementY"in e?e.movementY:qd}}),hv=Pn(Qc),F$=rt({},Qc,{dataTransfer:0}),B$=Pn(F$),W$=rt({},Aa,{relatedTarget:0}),ef=Pn(W$),U$=rt({},Dl,{animationName:0,elapsedTime:0,pseudoElement:0}),V$=Pn(U$),H$=rt({},Dl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),K$=Pn(H$),G$=rt({},Dl,{data:0}),pv=Pn(G$),Y$={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},X$={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"},Q$={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J$(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Q$[e])?!!t[e]:!1}function tg(){return J$}var Z$=rt({},Aa,{key:function(e){if(e.key){var t=Y$[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Mu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?X$[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tg,charCode:function(e){return e.type==="keypress"?Mu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),q$=Pn(Z$),ek=rt({},Qc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gv=Pn(ek),tk=rt({},Aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tg}),nk=Pn(tk),rk=rt({},Dl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ok=Pn(rk),ik=rt({},Qc,{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}),lk=Pn(ik),sk=[9,13,27,32],ng=Ur&&"CompositionEvent"in window,Ns=null;Ur&&"documentMode"in document&&(Ns=document.documentMode);var ak=Ur&&"TextEvent"in window&&!Ns,q1=Ur&&(!ng||Ns&&8<Ns&&11>=Ns),mv=" ",vv=!1;function ex(e,t){switch(e){case"keyup":return sk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yi=!1;function uk(e,t){switch(e){case"compositionend":return tx(t);case"keypress":return t.which!==32?null:(vv=!0,mv);case"textInput":return e=t.data,e===mv&&vv?null:e;default:return null}}function ck(e,t){if(Yi)return e==="compositionend"||!ng&&ex(e,t)?(e=Z1(),Au=qp=mo=null,Yi=!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 q1&&t.locale!=="ko"?null:t.data;default:return null}}var dk={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function yv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dk[e.type]:t==="textarea"}function nx(e,t,n,r){A1(r),t=rc(t,"onChange"),0<t.length&&(n=new eg("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Rs=null,ra=null;function fk(e){hx(e,0)}function Jc(e){var t=Ji(e);if(k1(t))return e}function hk(e,t){if(e==="change")return t}var rx=!1;if(Ur){var tf;if(Ur){var nf="oninput"in document;if(!nf){var xv=document.createElement("div");xv.setAttribute("oninput","return;"),nf=typeof xv.oninput=="function"}tf=nf}else tf=!1;rx=tf&&(!document.documentMode||9<document.documentMode)}function wv(){Rs&&(Rs.detachEvent("onpropertychange",ox),ra=Rs=null)}function ox(e){if(e.propertyName==="value"&&Jc(ra)){var t=[];nx(t,ra,e,Yp(e)),I1(fk,t)}}function pk(e,t,n){e==="focusin"?(wv(),Rs=t,ra=n,Rs.attachEvent("onpropertychange",ox)):e==="focusout"&&wv()}function gk(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Jc(ra)}function mk(e,t){if(e==="click")return Jc(t)}function vk(e,t){if(e==="input"||e==="change")return Jc(t)}function yk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ir=typeof Object.is=="function"?Object.is:yk;function oa(e,t){if(ir(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Bf.call(t,o)||!ir(e[o],t[o]))return!1}return!0}function _v(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sv(e,t){var n=_v(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_v(n)}}function ix(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ix(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lx(){for(var e=window,t=Qu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Qu(e.document)}return t}function rg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xk(e){var t=lx(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ix(n.ownerDocument.documentElement,n)){if(r!==null&&rg(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Sv(n,i);var l=Sv(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var wk=Ur&&"documentMode"in document&&11>=document.documentMode,Xi=null,lh=null,Ps=null,sh=!1;function Ev(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;sh||Xi==null||Xi!==Qu(r)||(r=Xi,"selectionStart"in r&&rg(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ps&&oa(Ps,r)||(Ps=r,r=rc(lh,"onSelect"),0<r.length&&(t=new eg("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Xi)))}function ou(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qi={animationend:ou("Animation","AnimationEnd"),animationiteration:ou("Animation","AnimationIteration"),animationstart:ou("Animation","AnimationStart"),transitionend:ou("Transition","TransitionEnd")},rf={},sx={};Ur&&(sx=document.createElement("div").style,"AnimationEvent"in window||(delete Qi.animationend.animation,delete Qi.animationiteration.animation,delete Qi.animationstart.animation),"TransitionEvent"in window||delete Qi.transitionend.transition);function Zc(e){if(rf[e])return rf[e];if(!Qi[e])return e;var t=Qi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in sx)return rf[e]=t[n];return e}var ax=Zc("animationend"),ux=Zc("animationiteration"),cx=Zc("animationstart"),dx=Zc("transitionend"),fx=new Map,Cv="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Bo(e,t){fx.set(e,t),_i(t,[e])}for(var of=0;of<Cv.length;of++){var lf=Cv[of],_k=lf.toLowerCase(),Sk=lf[0].toUpperCase()+lf.slice(1);Bo(_k,"on"+Sk)}Bo(ax,"onAnimationEnd");Bo(ux,"onAnimationIteration");Bo(cx,"onAnimationStart");Bo("dblclick","onDoubleClick");Bo("focusin","onFocus");Bo("focusout","onBlur");Bo(dx,"onTransitionEnd");xl("onMouseEnter",["mouseout","mouseover"]);xl("onMouseLeave",["mouseout","mouseover"]);xl("onPointerEnter",["pointerout","pointerover"]);xl("onPointerLeave",["pointerout","pointerover"]);_i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));_i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));_i("onBeforeInput",["compositionend","keypress","textInput","paste"]);_i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));_i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));_i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ss="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(" "),Ek=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ss));function $v(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,_$(r,t,void 0,e),e.currentTarget=null}function hx(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var l=r.length-1;0<=l;l--){var s=r[l],a=s.instance,u=s.currentTarget;if(s=s.listener,a!==i&&o.isPropagationStopped())break e;$v(o,s,u),i=a}else for(l=0;l<r.length;l++){if(s=r[l],a=s.instance,u=s.currentTarget,s=s.listener,a!==i&&o.isPropagationStopped())break e;$v(o,s,u),i=a}}}if(Zu)throw e=nh,Zu=!1,nh=null,e}function Ue(e,t){var n=t[fh];n===void 0&&(n=t[fh]=new Set);var r=e+"__bubble";n.has(r)||(px(t,e,2,!1),n.add(r))}function sf(e,t,n){var r=0;t&&(r|=4),px(n,e,r,t)}var iu="_reactListening"+Math.random().toString(36).slice(2);function ia(e){if(!e[iu]){e[iu]=!0,_1.forEach(function(n){n!=="selectionchange"&&(Ek.has(n)||sf(n,!1,e),sf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[iu]||(t[iu]=!0,sf("selectionchange",!1,t))}}function px(e,t,n,r){switch(J1(t)){case 1:var o=I$;break;case 4:o=j$;break;default:o=Zp}n=o.bind(null,t,n,e),o=void 0,!th||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function af(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var s=r.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&&(a=l.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;l=l.return}for(;s!==null;){if(l=qo(s),l===null)return;if(a=l.tag,a===5||a===6){r=i=l;continue e}s=s.parentNode}}r=r.return}I1(function(){var u=i,c=Yp(n),d=[];e:{var f=fx.get(e);if(f!==void 0){var h=eg,g=e;switch(e){case"keypress":if(Mu(n)===0)break e;case"keydown":case"keyup":h=q$;break;case"focusin":g="focus",h=ef;break;case"focusout":g="blur",h=ef;break;case"beforeblur":case"afterblur":h=ef;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=hv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=B$;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=nk;break;case ax:case ux:case cx:h=V$;break;case dx:h=ok;break;case"scroll":h=z$;break;case"wheel":h=lk;break;case"copy":case"cut":case"paste":h=K$;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=gv}var m=(t&4)!==0,_=!m&&e==="scroll",v=m?f!==null?f+"Capture":null:f;m=[];for(var y=u,x;y!==null;){x=y;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,v!==null&&(S=qs(y,v),S!=null&&m.push(la(y,S,x)))),_)break;y=y.return}0<m.length&&(f=new h(f,g,null,n,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==qf&&(g=n.relatedTarget||n.fromElement)&&(qo(g)||g[Vr]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=u,g=g?qo(g):null,g!==null&&(_=Si(g),g!==_||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=u),h!==g)){if(m=hv,S="onMouseLeave",v="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(m=gv,S="onPointerLeave",v="onPointerEnter",y="pointer"),_=h==null?f:Ji(h),x=g==null?f:Ji(g),f=new m(S,y+"leave",h,n,c),f.target=_,f.relatedTarget=x,S=null,qo(c)===u&&(m=new m(v,y+"enter",g,n,c),m.target=x,m.relatedTarget=_,S=m),_=S,h&&g)t:{for(m=h,v=g,y=0,x=m;x;x=Li(x))y++;for(x=0,S=v;S;S=Li(S))x++;for(;0<y-x;)m=Li(m),y--;for(;0<x-y;)v=Li(v),x--;for(;y--;){if(m===v||v!==null&&m===v.alternate)break t;m=Li(m),v=Li(v)}m=null}else m=null;h!==null&&kv(d,f,h,m,!1),g!==null&&_!==null&&kv(d,_,g,m,!0)}}e:{if(f=u?Ji(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var k=hk;else if(yv(f))if(rx)k=vk;else{k=gk;var b=pk}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=mk);if(k&&(k=k(e,u))){nx(d,k,n,c);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&Yf(f,"number",f.value)}switch(b=u?Ji(u):window,e){case"focusin":(yv(b)||b.contentEditable==="true")&&(Xi=b,lh=u,Ps=null);break;case"focusout":Ps=lh=Xi=null;break;case"mousedown":sh=!0;break;case"contextmenu":case"mouseup":case"dragend":sh=!1,Ev(d,n,c);break;case"selectionchange":if(wk)break;case"keydown":case"keyup":Ev(d,n,c)}var T;if(ng)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Yi?ex(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(q1&&n.locale!=="ko"&&(Yi||N!=="onCompositionStart"?N==="onCompositionEnd"&&Yi&&(T=Z1()):(mo=c,qp="value"in mo?mo.value:mo.textContent,Yi=!0)),b=rc(u,N),0<b.length&&(N=new pv(N,e,null,n,c),d.push({event:N,listeners:b}),T?N.data=T:(T=tx(n),T!==null&&(N.data=T)))),(T=ak?uk(e,n):ck(e,n))&&(u=rc(u,"onBeforeInput"),0<u.length&&(c=new pv("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=T))}hx(d,t)})}function la(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rc(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=qs(e,n),i!=null&&r.unshift(la(e,i,o)),i=qs(e,t),i!=null&&r.push(la(e,i,o))),e=e.return}return r}function Li(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function kv(e,t,n,r,o){for(var i=t._reactName,l=[];n!==null&&n!==r;){var s=n,a=s.alternate,u=s.stateNode;if(a!==null&&a===r)break;s.tag===5&&u!==null&&(s=u,o?(a=qs(n,i),a!=null&&l.unshift(la(n,a,s))):o||(a=qs(n,i),a!=null&&l.push(la(n,a,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var Ck=/\r\n?/g,$k=/\u0000|\uFFFD/g;function Tv(e){return(typeof e=="string"?e:""+e).replace(Ck,`
|
|
30
|
-
`).replace($k,"")}function lu(e,t,n){if(t=Tv(t),Tv(e)!==t&&n)throw Error(U(425))}function oc(){}var ah=null,uh=null;function ch(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 dh=typeof setTimeout=="function"?setTimeout:void 0,kk=typeof clearTimeout=="function"?clearTimeout:void 0,bv=typeof Promise=="function"?Promise:void 0,Tk=typeof queueMicrotask=="function"?queueMicrotask:typeof bv<"u"?function(e){return bv.resolve(null).then(e).catch(bk)}:dh;function bk(e){setTimeout(function(){throw e})}function uf(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),na(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);na(t)}function Eo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Nv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Il=Math.random().toString(36).slice(2),hr="__reactFiber$"+Il,sa="__reactProps$"+Il,Vr="__reactContainer$"+Il,fh="__reactEvents$"+Il,Nk="__reactListeners$"+Il,Rk="__reactHandles$"+Il;function qo(e){var t=e[hr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Vr]||n[hr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Nv(e);e!==null;){if(n=e[hr])return n;e=Nv(e)}return t}e=n,n=e.parentNode}return null}function Ma(e){return e=e[hr]||e[Vr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ji(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function qc(e){return e[sa]||null}var hh=[],Zi=-1;function Wo(e){return{current:e}}function Ge(e){0>Zi||(e.current=hh[Zi],hh[Zi]=null,Zi--)}function ze(e,t){Zi++,hh[Zi]=e.current,e.current=t}var Oo={},Gt=Wo(Oo),pn=Wo(!1),ui=Oo;function wl(e,t){var n=e.type.contextTypes;if(!n)return Oo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function gn(e){return e=e.childContextTypes,e!=null}function ic(){Ge(pn),Ge(Gt)}function Rv(e,t,n){if(Gt.current!==Oo)throw Error(U(168));ze(Gt,t),ze(pn,n)}function gx(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(U(108,p$(e)||"Unknown",o));return rt({},n,r)}function lc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Oo,ui=Gt.current,ze(Gt,e),ze(pn,pn.current),!0}function Pv(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=gx(e,t,ui),r.__reactInternalMemoizedMergedChildContext=e,Ge(pn),Ge(Gt),ze(Gt,e)):Ge(pn),ze(pn,n)}var Ir=null,ed=!1,cf=!1;function mx(e){Ir===null?Ir=[e]:Ir.push(e)}function Pk(e){ed=!0,mx(e)}function Uo(){if(!cf&&Ir!==null){cf=!0;var e=0,t=Ae;try{var n=Ir;for(Ae=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ir=null,ed=!1}catch(o){throw Ir!==null&&(Ir=Ir.slice(e+1)),B1(Xp,Uo),o}finally{Ae=t,cf=!1}}return null}var qi=[],el=0,sc=null,ac=0,Ln=[],Dn=0,ci=null,Fr=1,Br="";function Xo(e,t){qi[el++]=ac,qi[el++]=sc,sc=e,ac=t}function vx(e,t,n){Ln[Dn++]=Fr,Ln[Dn++]=Br,Ln[Dn++]=ci,ci=e;var r=Fr;e=Br;var o=32-rr(r)-1;r&=~(1<<o),n+=1;var i=32-rr(t)+o;if(30<i){var l=o-o%5;i=(r&(1<<l)-1).toString(32),r>>=l,o-=l,Fr=1<<32-rr(t)+o|n<<o|r,Br=i+e}else Fr=1<<i|n<<o|r,Br=e}function og(e){e.return!==null&&(Xo(e,1),vx(e,1,0))}function ig(e){for(;e===sc;)sc=qi[--el],qi[el]=null,ac=qi[--el],qi[el]=null;for(;e===ci;)ci=Ln[--Dn],Ln[Dn]=null,Br=Ln[--Dn],Ln[Dn]=null,Fr=Ln[--Dn],Ln[Dn]=null}var Cn=null,En=null,Ye=!1,er=null;function yx(e,t){var n=zn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ov(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Cn=e,En=Eo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Cn=e,En=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ci!==null?{id:Fr,overflow:Br}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=zn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Cn=e,En=null,!0):!1;default:return!1}}function ph(e){return(e.mode&1)!==0&&(e.flags&128)===0}function gh(e){if(Ye){var t=En;if(t){var n=t;if(!Ov(e,t)){if(ph(e))throw Error(U(418));t=Eo(n.nextSibling);var r=Cn;t&&Ov(e,t)?yx(r,n):(e.flags=e.flags&-4097|2,Ye=!1,Cn=e)}}else{if(ph(e))throw Error(U(418));e.flags=e.flags&-4097|2,Ye=!1,Cn=e}}}function Av(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Cn=e}function su(e){if(e!==Cn)return!1;if(!Ye)return Av(e),Ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ch(e.type,e.memoizedProps)),t&&(t=En)){if(ph(e))throw xx(),Error(U(418));for(;t;)yx(e,t),t=Eo(t.nextSibling)}if(Av(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){En=Eo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}En=null}}else En=Cn?Eo(e.stateNode.nextSibling):null;return!0}function xx(){for(var e=En;e;)e=Eo(e.nextSibling)}function _l(){En=Cn=null,Ye=!1}function lg(e){er===null?er=[e]:er.push(e)}var Ok=Qr.ReactCurrentBatchConfig;function Jn(e,t){if(e&&e.defaultProps){t=rt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var uc=Wo(null),cc=null,tl=null,sg=null;function ag(){sg=tl=cc=null}function ug(e){var t=uc.current;Ge(uc),e._currentValue=t}function mh(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 fl(e,t){cc=e,sg=tl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(hn=!0),e.firstContext=null)}function Wn(e){var t=e._currentValue;if(sg!==e)if(e={context:e,memoizedValue:t,next:null},tl===null){if(cc===null)throw Error(U(308));tl=e,cc.dependencies={lanes:0,firstContext:e}}else tl=tl.next=e;return t}var ei=null;function cg(e){ei===null?ei=[e]:ei.push(e)}function wx(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,cg(t)):(n.next=o.next,o.next=n),t.interleaved=n,Hr(e,r)}function Hr(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 co=!1;function dg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _x(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 Wr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Co(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Te&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Hr(e,n)}return o=r.interleaved,o===null?(t.next=t,cg(r)):(t.next=o.next,o.next=t),r.interleaved=t,Hr(e,n)}function Lu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qp(e,n)}}function Mv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function dc(e,t,n,r){var o=e.updateQueue;co=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var a=s,u=a.next;a.next=null,l===null?i=u:l.next=u,l=a;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==l&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=a))}if(i!==null){var d=o.baseState;l=0,c=u=a=null,s=i;do{var f=s.lane,h=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,m=s;switch(f=t,h=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(h,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(h,d,f):g,f==null)break e;d=rt({},d,f);break e;case 2:co=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=h,a=d):c=c.next=h,l|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(a=d),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);fi|=l,e.lanes=l,e.memoizedState=d}}function Lv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(U(191,o));o.call(r)}}}var Sx=new w1.Component().refs;function vh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:rt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var td={isMounted:function(e){return(e=e._reactInternals)?Si(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ln(),o=ko(e),i=Wr(r,o);i.payload=t,n!=null&&(i.callback=n),t=Co(e,i,o),t!==null&&(or(t,e,o,r),Lu(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ln(),o=ko(e),i=Wr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Co(e,i,o),t!==null&&(or(t,e,o,r),Lu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ln(),r=ko(e),o=Wr(n,r);o.tag=2,t!=null&&(o.callback=t),t=Co(e,o,r),t!==null&&(or(t,e,r,n),Lu(t,e,r))}};function Dv(e,t,n,r,o,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,l):t.prototype&&t.prototype.isPureReactComponent?!oa(n,r)||!oa(o,i):!0}function Ex(e,t,n){var r=!1,o=Oo,i=t.contextType;return typeof i=="object"&&i!==null?i=Wn(i):(o=gn(t)?ui:Gt.current,r=t.contextTypes,i=(r=r!=null)?wl(e,o):Oo),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=td,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Iv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&td.enqueueReplaceState(t,t.state,null)}function yh(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Sx,dg(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Wn(i):(i=gn(t)?ui:Gt.current,o.context=wl(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(vh(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&td.enqueueReplaceState(o,o.state,null),dc(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function as(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(U(309));var r=n.stateNode}if(!r)throw Error(U(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(l){var s=o.refs;s===Sx&&(s=o.refs={}),l===null?delete s[i]:s[i]=l},t._stringRef=i,t)}if(typeof e!="string")throw Error(U(284));if(!n._owner)throw Error(U(290,e))}return e}function au(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function jv(e){var t=e._init;return t(e._payload)}function Cx(e){function t(v,y){if(e){var x=v.deletions;x===null?(v.deletions=[y],v.flags|=16):x.push(y)}}function n(v,y){if(!e)return null;for(;y!==null;)t(v,y),y=y.sibling;return null}function r(v,y){for(v=new Map;y!==null;)y.key!==null?v.set(y.key,y):v.set(y.index,y),y=y.sibling;return v}function o(v,y){return v=To(v,y),v.index=0,v.sibling=null,v}function i(v,y,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<y?(v.flags|=2,y):x):(v.flags|=2,y)):(v.flags|=1048576,y)}function l(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,y,x,S){return y===null||y.tag!==6?(y=vf(x,v.mode,S),y.return=v,y):(y=o(y,x),y.return=v,y)}function a(v,y,x,S){var k=x.type;return k===Gi?c(v,y,x.props.children,S,x.key):y!==null&&(y.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===uo&&jv(k)===y.type)?(S=o(y,x.props),S.ref=as(v,y,x),S.return=v,S):(S=Bu(x.type,x.key,x.props,null,v.mode,S),S.ref=as(v,y,x),S.return=v,S)}function u(v,y,x,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=yf(x,v.mode,S),y.return=v,y):(y=o(y,x.children||[]),y.return=v,y)}function c(v,y,x,S,k){return y===null||y.tag!==7?(y=ii(x,v.mode,S,k),y.return=v,y):(y=o(y,x),y.return=v,y)}function d(v,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=vf(""+y,v.mode,x),y.return=v,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ja:return x=Bu(y.type,y.key,y.props,null,v.mode,x),x.ref=as(v,null,y),x.return=v,x;case Ki:return y=yf(y,v.mode,x),y.return=v,y;case uo:var S=y._init;return d(v,S(y._payload),x)}if(ws(y)||rs(y))return y=ii(y,v.mode,x,null),y.return=v,y;au(v,y)}return null}function f(v,y,x,S){var k=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return k!==null?null:s(v,y,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ja:return x.key===k?a(v,y,x,S):null;case Ki:return x.key===k?u(v,y,x,S):null;case uo:return k=x._init,f(v,y,k(x._payload),S)}if(ws(x)||rs(x))return k!==null?null:c(v,y,x,S,null);au(v,x)}return null}function h(v,y,x,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(x)||null,s(y,v,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ja:return v=v.get(S.key===null?x:S.key)||null,a(y,v,S,k);case Ki:return v=v.get(S.key===null?x:S.key)||null,u(y,v,S,k);case uo:var b=S._init;return h(v,y,x,b(S._payload),k)}if(ws(S)||rs(S))return v=v.get(x)||null,c(y,v,S,k,null);au(y,S)}return null}function g(v,y,x,S){for(var k=null,b=null,T=y,N=y=0,D=null;T!==null&&N<x.length;N++){T.index>N?(D=T,T=null):D=T.sibling;var M=f(v,T,x[N],S);if(M===null){T===null&&(T=D);break}e&&T&&M.alternate===null&&t(v,T),y=i(M,y,N),b===null?k=M:b.sibling=M,b=M,T=D}if(N===x.length)return n(v,T),Ye&&Xo(v,N),k;if(T===null){for(;N<x.length;N++)T=d(v,x[N],S),T!==null&&(y=i(T,y,N),b===null?k=T:b.sibling=T,b=T);return Ye&&Xo(v,N),k}for(T=r(v,T);N<x.length;N++)D=h(T,v,N,x[N],S),D!==null&&(e&&D.alternate!==null&&T.delete(D.key===null?N:D.key),y=i(D,y,N),b===null?k=D:b.sibling=D,b=D);return e&&T.forEach(function(j){return t(v,j)}),Ye&&Xo(v,N),k}function m(v,y,x,S){var k=rs(x);if(typeof k!="function")throw Error(U(150));if(x=k.call(x),x==null)throw Error(U(151));for(var b=k=null,T=y,N=y=0,D=null,M=x.next();T!==null&&!M.done;N++,M=x.next()){T.index>N?(D=T,T=null):D=T.sibling;var j=f(v,T,M.value,S);if(j===null){T===null&&(T=D);break}e&&T&&j.alternate===null&&t(v,T),y=i(j,y,N),b===null?k=j:b.sibling=j,b=j,T=D}if(M.done)return n(v,T),Ye&&Xo(v,N),k;if(T===null){for(;!M.done;N++,M=x.next())M=d(v,M.value,S),M!==null&&(y=i(M,y,N),b===null?k=M:b.sibling=M,b=M);return Ye&&Xo(v,N),k}for(T=r(v,T);!M.done;N++,M=x.next())M=h(T,v,N,M.value,S),M!==null&&(e&&M.alternate!==null&&T.delete(M.key===null?N:M.key),y=i(M,y,N),b===null?k=M:b.sibling=M,b=M);return e&&T.forEach(function(B){return t(v,B)}),Ye&&Xo(v,N),k}function _(v,y,x,S){if(typeof x=="object"&&x!==null&&x.type===Gi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Ja:e:{for(var k=x.key,b=y;b!==null;){if(b.key===k){if(k=x.type,k===Gi){if(b.tag===7){n(v,b.sibling),y=o(b,x.props.children),y.return=v,v=y;break e}}else if(b.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===uo&&jv(k)===b.type){n(v,b.sibling),y=o(b,x.props),y.ref=as(v,b,x),y.return=v,v=y;break e}n(v,b);break}else t(v,b);b=b.sibling}x.type===Gi?(y=ii(x.props.children,v.mode,S,x.key),y.return=v,v=y):(S=Bu(x.type,x.key,x.props,null,v.mode,S),S.ref=as(v,y,x),S.return=v,v=S)}return l(v);case Ki:e:{for(b=x.key;y!==null;){if(y.key===b)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(v,y.sibling),y=o(y,x.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else t(v,y);y=y.sibling}y=yf(x,v.mode,S),y.return=v,v=y}return l(v);case uo:return b=x._init,_(v,y,b(x._payload),S)}if(ws(x))return g(v,y,x,S);if(rs(x))return m(v,y,x,S);au(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(v,y.sibling),y=o(y,x),y.return=v,v=y):(n(v,y),y=vf(x,v.mode,S),y.return=v,v=y),l(v)):n(v,y)}return _}var Sl=Cx(!0),$x=Cx(!1),La={},xr=Wo(La),aa=Wo(La),ua=Wo(La);function ti(e){if(e===La)throw Error(U(174));return e}function fg(e,t){switch(ze(ua,t),ze(aa,e),ze(xr,La),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Qf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Qf(t,e)}Ge(xr),ze(xr,t)}function El(){Ge(xr),Ge(aa),Ge(ua)}function kx(e){ti(ua.current);var t=ti(xr.current),n=Qf(t,e.type);t!==n&&(ze(aa,e),ze(xr,n))}function hg(e){aa.current===e&&(Ge(xr),Ge(aa))}var qe=Wo(0);function fc(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 df=[];function pg(){for(var e=0;e<df.length;e++)df[e]._workInProgressVersionPrimary=null;df.length=0}var Du=Qr.ReactCurrentDispatcher,ff=Qr.ReactCurrentBatchConfig,di=0,tt=null,yt=null,$t=null,hc=!1,Os=!1,ca=0,Ak=0;function jt(){throw Error(U(321))}function gg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ir(e[n],t[n]))return!1;return!0}function mg(e,t,n,r,o,i){if(di=i,tt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Du.current=e===null||e.memoizedState===null?Ik:jk,e=n(r,o),Os){i=0;do{if(Os=!1,ca=0,25<=i)throw Error(U(301));i+=1,$t=yt=null,t.updateQueue=null,Du.current=zk,e=n(r,o)}while(Os)}if(Du.current=pc,t=yt!==null&&yt.next!==null,di=0,$t=yt=tt=null,hc=!1,t)throw Error(U(300));return e}function vg(){var e=ca!==0;return ca=0,e}function dr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?tt.memoizedState=$t=e:$t=$t.next=e,$t}function Un(){if(yt===null){var e=tt.alternate;e=e!==null?e.memoizedState:null}else e=yt.next;var t=$t===null?tt.memoizedState:$t.next;if(t!==null)$t=t,yt=e;else{if(e===null)throw Error(U(310));yt=e,e={memoizedState:yt.memoizedState,baseState:yt.baseState,baseQueue:yt.baseQueue,queue:yt.queue,next:null},$t===null?tt.memoizedState=$t=e:$t=$t.next=e}return $t}function da(e,t){return typeof t=="function"?t(e):t}function hf(e){var t=Un(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=yt,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var s=l=null,a=null,u=i;do{var c=u.lane;if((di&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(s=a=d,l=r):a=a.next=d,tt.lanes|=c,fi|=c}u=u.next}while(u!==null&&u!==i);a===null?l=r:a.next=s,ir(r,t.memoizedState)||(hn=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,tt.lanes|=i,fi|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function pf(e){var t=Un(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var l=o=o.next;do i=e(i,l.action),l=l.next;while(l!==o);ir(i,t.memoizedState)||(hn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Tx(){}function bx(e,t){var n=tt,r=Un(),o=t(),i=!ir(r.memoizedState,o);if(i&&(r.memoizedState=o,hn=!0),r=r.queue,yg(Px.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||$t!==null&&$t.memoizedState.tag&1){if(n.flags|=2048,fa(9,Rx.bind(null,n,r,o,t),void 0,null),Rt===null)throw Error(U(349));di&30||Nx(n,t,o)}return o}function Nx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Rx(e,t,n,r){t.value=n,t.getSnapshot=r,Ox(t)&&Ax(e)}function Px(e,t,n){return n(function(){Ox(t)&&Ax(e)})}function Ox(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ir(e,n)}catch{return!0}}function Ax(e){var t=Hr(e,1);t!==null&&or(t,e,1,-1)}function zv(e){var t=dr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:da,lastRenderedState:e},t.queue=e,e=e.dispatch=Dk.bind(null,tt,e),[t.memoizedState,e]}function fa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.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 Mx(){return Un().memoizedState}function Iu(e,t,n,r){var o=dr();tt.flags|=e,o.memoizedState=fa(1|t,n,void 0,r===void 0?null:r)}function nd(e,t,n,r){var o=Un();r=r===void 0?null:r;var i=void 0;if(yt!==null){var l=yt.memoizedState;if(i=l.destroy,r!==null&&gg(r,l.deps)){o.memoizedState=fa(t,n,i,r);return}}tt.flags|=e,o.memoizedState=fa(1|t,n,i,r)}function Fv(e,t){return Iu(8390656,8,e,t)}function yg(e,t){return nd(2048,8,e,t)}function Lx(e,t){return nd(4,2,e,t)}function Dx(e,t){return nd(4,4,e,t)}function Ix(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 jx(e,t,n){return n=n!=null?n.concat([e]):null,nd(4,4,Ix.bind(null,t,e),n)}function xg(){}function zx(e,t){var n=Un();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Fx(e,t){var n=Un();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Bx(e,t,n){return di&21?(ir(n,t)||(n=V1(),tt.lanes|=n,fi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,hn=!0),e.memoizedState=n)}function Mk(e,t){var n=Ae;Ae=n!==0&&4>n?n:4,e(!0);var r=ff.transition;ff.transition={};try{e(!1),t()}finally{Ae=n,ff.transition=r}}function Wx(){return Un().memoizedState}function Lk(e,t,n){var r=ko(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ux(e))Vx(t,n);else if(n=wx(e,t,n,r),n!==null){var o=ln();or(n,e,r,o),Hx(n,t,r)}}function Dk(e,t,n){var r=ko(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ux(e))Vx(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,ir(s,l)){var a=t.interleaved;a===null?(o.next=o,cg(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=wx(e,t,o,r),n!==null&&(o=ln(),or(n,e,r,o),Hx(n,t,r))}}function Ux(e){var t=e.alternate;return e===tt||t!==null&&t===tt}function Vx(e,t){Os=hc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qp(e,n)}}var pc={readContext:Wn,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useInsertionEffect:jt,useLayoutEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useMutableSource:jt,useSyncExternalStore:jt,useId:jt,unstable_isNewReconciler:!1},Ik={readContext:Wn,useCallback:function(e,t){return dr().memoizedState=[e,t===void 0?null:t],e},useContext:Wn,useEffect:Fv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Iu(4194308,4,Ix.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Iu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Iu(4,2,e,t)},useMemo:function(e,t){var n=dr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=dr();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=Lk.bind(null,tt,e),[r.memoizedState,e]},useRef:function(e){var t=dr();return e={current:e},t.memoizedState=e},useState:zv,useDebugValue:xg,useDeferredValue:function(e){return dr().memoizedState=e},useTransition:function(){var e=zv(!1),t=e[0];return e=Mk.bind(null,e[1]),dr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=tt,o=dr();if(Ye){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Rt===null)throw Error(U(349));di&30||Nx(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Fv(Px.bind(null,r,i,e),[e]),r.flags|=2048,fa(9,Rx.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=dr(),t=Rt.identifierPrefix;if(Ye){var n=Br,r=Fr;n=(r&~(1<<32-rr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ca++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Ak++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},jk={readContext:Wn,useCallback:zx,useContext:Wn,useEffect:yg,useImperativeHandle:jx,useInsertionEffect:Lx,useLayoutEffect:Dx,useMemo:Fx,useReducer:hf,useRef:Mx,useState:function(){return hf(da)},useDebugValue:xg,useDeferredValue:function(e){var t=Un();return Bx(t,yt.memoizedState,e)},useTransition:function(){var e=hf(da)[0],t=Un().memoizedState;return[e,t]},useMutableSource:Tx,useSyncExternalStore:bx,useId:Wx,unstable_isNewReconciler:!1},zk={readContext:Wn,useCallback:zx,useContext:Wn,useEffect:yg,useImperativeHandle:jx,useInsertionEffect:Lx,useLayoutEffect:Dx,useMemo:Fx,useReducer:pf,useRef:Mx,useState:function(){return pf(da)},useDebugValue:xg,useDeferredValue:function(e){var t=Un();return yt===null?t.memoizedState=e:Bx(t,yt.memoizedState,e)},useTransition:function(){var e=pf(da)[0],t=Un().memoizedState;return[e,t]},useMutableSource:Tx,useSyncExternalStore:bx,useId:Wx,unstable_isNewReconciler:!1};function Cl(e,t){try{var n="",r=t;do n+=h$(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
31
|
-
Error generating stack: `+i.message+`
|
|
32
|
-
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function gf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function xh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Fk=typeof WeakMap=="function"?WeakMap:Map;function Kx(e,t,n){n=Wr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){mc||(mc=!0,Nh=r),xh(e,t)},n}function Gx(e,t,n){n=Wr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){xh(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){xh(e,t),typeof r!="function"&&($o===null?$o=new Set([this]):$o.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Bv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fk;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=eT.bind(null,e,t,n),t.then(e,e))}function Wv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Uv(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Wr(-1,1),t.tag=2,Co(n,t,1))),n.lanes|=1),e)}var Bk=Qr.ReactCurrentOwner,hn=!1;function Jt(e,t,n,r){t.child=e===null?$x(t,null,n,r):Sl(t,e.child,n,r)}function Vv(e,t,n,r,o){n=n.render;var i=t.ref;return fl(t,o),r=mg(e,t,n,r,i,o),n=vg(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Kr(e,t,o)):(Ye&&n&&og(t),t.flags|=1,Jt(e,t,r,o),t.child)}function Hv(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Tg(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Yx(e,t,i,r,o)):(e=Bu(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var l=i.memoizedProps;if(n=n.compare,n=n!==null?n:oa,n(l,r)&&e.ref===t.ref)return Kr(e,t,o)}return t.flags|=1,e=To(i,r),e.ref=t.ref,e.return=t,t.child=e}function Yx(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(oa(i,r)&&e.ref===t.ref)if(hn=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(hn=!0);else return t.lanes=e.lanes,Kr(e,t,o)}return wh(e,t,n,r,o)}function Xx(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ze(rl,wn),wn|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ze(rl,wn),wn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ze(rl,wn),wn|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ze(rl,wn),wn|=r;return Jt(e,t,o,n),t.child}function Qx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function wh(e,t,n,r,o){var i=gn(n)?ui:Gt.current;return i=wl(t,i),fl(t,o),n=mg(e,t,n,r,i,o),r=vg(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Kr(e,t,o)):(Ye&&r&&og(t),t.flags|=1,Jt(e,t,n,o),t.child)}function Kv(e,t,n,r,o){if(gn(n)){var i=!0;lc(t)}else i=!1;if(fl(t,o),t.stateNode===null)ju(e,t),Ex(t,n,r),yh(t,n,r,o),r=!0;else if(e===null){var l=t.stateNode,s=t.memoizedProps;l.props=s;var a=l.context,u=n.contextType;typeof u=="object"&&u!==null?u=Wn(u):(u=gn(n)?ui:Gt.current,u=wl(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";d||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==r||a!==u)&&Iv(t,l,r,u),co=!1;var f=t.memoizedState;l.state=f,dc(t,r,l,o),a=t.memoizedState,s!==r||f!==a||pn.current||co?(typeof c=="function"&&(vh(t,n,c,r),a=t.memoizedState),(s=co||Dv(t,n,s,r,f,a,u))?(d||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),l.props=r,l.state=a,l.context=u,r=s):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,_x(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Jn(t.type,s),l.props=u,d=t.pendingProps,f=l.context,a=n.contextType,typeof a=="object"&&a!==null?a=Wn(a):(a=gn(n)?ui:Gt.current,a=wl(t,a));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==d||f!==a)&&Iv(t,l,r,a),co=!1,f=t.memoizedState,l.state=f,dc(t,r,l,o);var g=t.memoizedState;s!==d||f!==g||pn.current||co?(typeof h=="function"&&(vh(t,n,h,r),g=t.memoizedState),(u=co||Dv(t,n,u,r,f,g,a)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,g,a),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,g,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=g),l.props=r,l.state=g,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 _h(e,t,n,r,i,o)}function _h(e,t,n,r,o,i){Qx(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return o&&Pv(t,n,!1),Kr(e,t,i);r=t.stateNode,Bk.current=t;var s=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Sl(t,e.child,null,i),t.child=Sl(t,null,s,i)):Jt(e,t,s,i),t.memoizedState=r.state,o&&Pv(t,n,!0),t.child}function Jx(e){var t=e.stateNode;t.pendingContext?Rv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rv(e,t.context,!1),fg(e,t.containerInfo)}function Gv(e,t,n,r,o){return _l(),lg(o),t.flags|=256,Jt(e,t,n,r),t.child}var Sh={dehydrated:null,treeContext:null,retryLane:0};function Eh(e){return{baseLanes:e,cachePool:null,transitions:null}}function Zx(e,t,n){var r=t.pendingProps,o=qe.current,i=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ze(qe,o&1),e===null)return gh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,i?(r=t.mode,i=t.child,l={mode:"hidden",children:l},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=l):i=id(l,r,0,null),e=ii(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Eh(n),t.memoizedState=Sh,e):wg(t,l));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return Wk(e,t,l,r,s,o,n);if(i){i=r.fallback,l=t.mode,o=e.child,s=o.sibling;var a={mode:"hidden",children:r.children};return!(l&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=To(o,a),r.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=To(s,i):(i=ii(i,l,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,l=e.child.memoizedState,l=l===null?Eh(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~n,t.memoizedState=Sh,r}return i=e.child,e=i.sibling,r=To(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function wg(e,t){return t=id({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function uu(e,t,n,r){return r!==null&&lg(r),Sl(t,e.child,null,n),e=wg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wk(e,t,n,r,o,i,l){if(n)return t.flags&256?(t.flags&=-257,r=gf(Error(U(422))),uu(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=id({mode:"visible",children:r.children},o,0,null),i=ii(i,o,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Sl(t,e.child,null,l),t.child.memoizedState=Eh(l),t.memoizedState=Sh,i);if(!(t.mode&1))return uu(e,t,l,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var s=r.dgst;return r=s,i=Error(U(419)),r=gf(i,r,void 0),uu(e,t,l,r)}if(s=(l&e.childLanes)!==0,hn||s){if(r=Rt,r!==null){switch(l&-l){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|l)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Hr(e,o),or(r,e,o,-1))}return kg(),r=gf(Error(U(421))),uu(e,t,l,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=tT.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,En=Eo(o.nextSibling),Cn=t,Ye=!0,er=null,e!==null&&(Ln[Dn++]=Fr,Ln[Dn++]=Br,Ln[Dn++]=ci,Fr=e.id,Br=e.overflow,ci=t),t=wg(t,r.children),t.flags|=4096,t)}function Yv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),mh(e.return,t,n)}function mf(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function qx(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Jt(e,t,r.children,n),r=qe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yv(e,n,t);else if(e.tag===19)Yv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ze(qe,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&fc(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),mf(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&fc(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}mf(t,!0,n,null,i);break;case"together":mf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ju(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Kr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),fi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=To(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=To(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Uk(e,t,n){switch(t.tag){case 3:Jx(t),_l();break;case 5:kx(t);break;case 1:gn(t.type)&&lc(t);break;case 4:fg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ze(uc,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ze(qe,qe.current&1),t.flags|=128,null):n&t.child.childLanes?Zx(e,t,n):(ze(qe,qe.current&1),e=Kr(e,t,n),e!==null?e.sibling:null);ze(qe,qe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return qx(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ze(qe,qe.current),r)break;return null;case 22:case 23:return t.lanes=0,Xx(e,t,n)}return Kr(e,t,n)}var ew,Ch,tw,nw;ew=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}};Ch=function(){};tw=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ti(xr.current);var i=null;switch(n){case"input":o=Kf(e,o),r=Kf(e,r),i=[];break;case"select":o=rt({},o,{value:void 0}),r=rt({},r,{value:void 0}),i=[];break;case"textarea":o=Xf(e,o),r=Xf(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=oc)}Jf(n,r);var l;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var s=o[u];for(l in s)s.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Js.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(s=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&a!==s&&(a!=null||s!=null))if(u==="style")if(s){for(l in s)!s.hasOwnProperty(l)||a&&a.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in a)a.hasOwnProperty(l)&&s[l]!==a[l]&&(n||(n={}),n[l]=a[l])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Js.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Ue("scroll",e),i||s===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};nw=function(e,t,n,r){n!==r&&(t.flags|=4)};function us(e,t){if(!Ye)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function zt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Vk(e,t,n){var r=t.pendingProps;switch(ig(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(t),null;case 1:return gn(t.type)&&ic(),zt(t),null;case 3:return r=t.stateNode,El(),Ge(pn),Ge(Gt),pg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(su(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,er!==null&&(Oh(er),er=null))),Ch(e,t),zt(t),null;case 5:hg(t);var o=ti(ua.current);if(n=t.type,e!==null&&t.stateNode!=null)tw(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return zt(t),null}if(e=ti(xr.current),su(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[hr]=t,r[sa]=i,e=(t.mode&1)!==0,n){case"dialog":Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":case"embed":Ue("load",r);break;case"video":case"audio":for(o=0;o<Ss.length;o++)Ue(Ss[o],r);break;case"source":Ue("error",r);break;case"img":case"image":case"link":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"input":rv(r,i),Ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Ue("invalid",r);break;case"textarea":iv(r,i),Ue("invalid",r)}Jf(n,i),o=null;for(var l in i)if(i.hasOwnProperty(l)){var s=i[l];l==="children"?typeof s=="string"?r.textContent!==s&&(i.suppressHydrationWarning!==!0&&lu(r.textContent,s,e),o=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&lu(r.textContent,s,e),o=["children",""+s]):Js.hasOwnProperty(l)&&s!=null&&l==="onScroll"&&Ue("scroll",r)}switch(n){case"input":Za(r),ov(r,i,!0);break;case"textarea":Za(r),lv(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=oc)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=N1(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[hr]=t,e[sa]=r,ew(e,t,!1,!1),t.stateNode=e;e:{switch(l=Zf(n,r),n){case"dialog":Ue("cancel",e),Ue("close",e),o=r;break;case"iframe":case"object":case"embed":Ue("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ss.length;o++)Ue(Ss[o],e);o=r;break;case"source":Ue("error",e),o=r;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),o=r;break;case"details":Ue("toggle",e),o=r;break;case"input":rv(e,r),o=Kf(e,r),Ue("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=rt({},r,{value:void 0}),Ue("invalid",e);break;case"textarea":iv(e,r),o=Xf(e,r),Ue("invalid",e);break;default:o=r}Jf(n,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="style"?O1(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&R1(e,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Zs(e,a):typeof a=="number"&&Zs(e,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Js.hasOwnProperty(i)?a!=null&&i==="onScroll"&&Ue("scroll",e):a!=null&&Vp(e,i,a,l))}switch(n){case"input":Za(e),ov(e,r,!1);break;case"textarea":Za(e),lv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Po(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?al(e,!!r.multiple,i,!1):r.defaultValue!=null&&al(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=oc)}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 zt(t),null;case 6:if(e&&t.stateNode!=null)nw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=ti(ua.current),ti(xr.current),su(t)){if(r=t.stateNode,n=t.memoizedProps,r[hr]=t,(i=r.nodeValue!==n)&&(e=Cn,e!==null))switch(e.tag){case 3:lu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&lu(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[hr]=t,t.stateNode=r}return zt(t),null;case 13:if(Ge(qe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ye&&En!==null&&t.mode&1&&!(t.flags&128))xx(),_l(),t.flags|=98560,i=!1;else if(i=su(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[hr]=t}else _l(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zt(t),i=!1}else er!==null&&(Oh(er),er=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||qe.current&1?_t===0&&(_t=3):kg())),t.updateQueue!==null&&(t.flags|=4),zt(t),null);case 4:return El(),Ch(e,t),e===null&&ia(t.stateNode.containerInfo),zt(t),null;case 10:return ug(t.type._context),zt(t),null;case 17:return gn(t.type)&&ic(),zt(t),null;case 19:if(Ge(qe),i=t.memoizedState,i===null)return zt(t),null;if(r=(t.flags&128)!==0,l=i.rendering,l===null)if(r)us(i,!1);else{if(_t!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=fc(e),l!==null){for(t.flags|=128,us(i,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,l=i.alternate,l===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ze(qe,qe.current&1|2),t.child}e=e.sibling}i.tail!==null&&ft()>$l&&(t.flags|=128,r=!0,us(i,!1),t.lanes=4194304)}else{if(!r)if(e=fc(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),us(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Ye)return zt(t),null}else 2*ft()-i.renderingStartTime>$l&&n!==1073741824&&(t.flags|=128,r=!0,us(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ft(),t.sibling=null,n=qe.current,ze(qe,r?n&1|2:n&1),t):(zt(t),null);case 22:case 23:return $g(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?wn&1073741824&&(zt(t),t.subtreeFlags&6&&(t.flags|=8192)):zt(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function Hk(e,t){switch(ig(t),t.tag){case 1:return gn(t.type)&&ic(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return El(),Ge(pn),Ge(Gt),pg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return hg(t),null;case 13:if(Ge(qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));_l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(qe),null;case 4:return El(),null;case 10:return ug(t.type._context),null;case 22:case 23:return $g(),null;case 24:return null;default:return null}}var cu=!1,Bt=!1,Kk=typeof WeakSet=="function"?WeakSet:Set,q=null;function nl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){it(e,t,r)}else n.current=null}function $h(e,t,n){try{n()}catch(r){it(e,t,r)}}var Xv=!1;function Gk(e,t){if(ah=tc,e=lx(),rg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||o!==0&&d.nodeType!==3||(s=l+o),d!==i||r!==0&&d.nodeType!==3||(a=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=l),f===i&&++c===r&&(a=l),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(uh={focusedElem:e,selectionRange:n},tc=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,_=g.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Jn(t.type,m),_);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(S){it(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return g=Xv,Xv=!1,g}function As(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&$h(t,n,i)}o=o.next}while(o!==r)}}function rd(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 kh(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 rw(e){var t=e.alternate;t!==null&&(e.alternate=null,rw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hr],delete t[sa],delete t[fh],delete t[Nk],delete t[Rk])),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 ow(e){return e.tag===5||e.tag===3||e.tag===4}function Qv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ow(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 Th(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=oc));else if(r!==4&&(e=e.child,e!==null))for(Th(e,t,n),e=e.sibling;e!==null;)Th(e,t,n),e=e.sibling}function bh(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(bh(e,t,n),e=e.sibling;e!==null;)bh(e,t,n),e=e.sibling}var Mt=null,Zn=!1;function ro(e,t,n){for(n=n.child;n!==null;)iw(e,t,n),n=n.sibling}function iw(e,t,n){if(yr&&typeof yr.onCommitFiberUnmount=="function")try{yr.onCommitFiberUnmount(Xc,n)}catch{}switch(n.tag){case 5:Bt||nl(n,t);case 6:var r=Mt,o=Zn;Mt=null,ro(e,t,n),Mt=r,Zn=o,Mt!==null&&(Zn?(e=Mt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Mt.removeChild(n.stateNode));break;case 18:Mt!==null&&(Zn?(e=Mt,n=n.stateNode,e.nodeType===8?uf(e.parentNode,n):e.nodeType===1&&uf(e,n),na(e)):uf(Mt,n.stateNode));break;case 4:r=Mt,o=Zn,Mt=n.stateNode.containerInfo,Zn=!0,ro(e,t,n),Mt=r,Zn=o;break;case 0:case 11:case 14:case 15:if(!Bt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&$h(n,t,l),o=o.next}while(o!==r)}ro(e,t,n);break;case 1:if(!Bt&&(nl(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){it(n,t,s)}ro(e,t,n);break;case 21:ro(e,t,n);break;case 22:n.mode&1?(Bt=(r=Bt)||n.memoizedState!==null,ro(e,t,n),Bt=r):ro(e,t,n);break;default:ro(e,t,n)}}function Jv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Kk),t.forEach(function(r){var o=nT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Yn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,l=t,s=l;e:for(;s!==null;){switch(s.tag){case 5:Mt=s.stateNode,Zn=!1;break e;case 3:Mt=s.stateNode.containerInfo,Zn=!0;break e;case 4:Mt=s.stateNode.containerInfo,Zn=!0;break e}s=s.return}if(Mt===null)throw Error(U(160));iw(i,l,o),Mt=null,Zn=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){it(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)lw(t,e),t=t.sibling}function lw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Yn(t,e),cr(e),r&4){try{As(3,e,e.return),rd(3,e)}catch(m){it(e,e.return,m)}try{As(5,e,e.return)}catch(m){it(e,e.return,m)}}break;case 1:Yn(t,e),cr(e),r&512&&n!==null&&nl(n,n.return);break;case 5:if(Yn(t,e),cr(e),r&512&&n!==null&&nl(n,n.return),e.flags&32){var o=e.stateNode;try{Zs(o,"")}catch(m){it(e,e.return,m)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,l=n!==null?n.memoizedProps:i,s=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&T1(o,i),Zf(s,l);var u=Zf(s,i);for(l=0;l<a.length;l+=2){var c=a[l],d=a[l+1];c==="style"?O1(o,d):c==="dangerouslySetInnerHTML"?R1(o,d):c==="children"?Zs(o,d):Vp(o,c,d,u)}switch(s){case"input":Gf(o,i);break;case"textarea":b1(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?al(o,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?al(o,!!i.multiple,i.defaultValue,!0):al(o,!!i.multiple,i.multiple?[]:"",!1))}o[sa]=i}catch(m){it(e,e.return,m)}}break;case 6:if(Yn(t,e),cr(e),r&4){if(e.stateNode===null)throw Error(U(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(m){it(e,e.return,m)}}break;case 3:if(Yn(t,e),cr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{na(t.containerInfo)}catch(m){it(e,e.return,m)}break;case 4:Yn(t,e),cr(e);break;case 13:Yn(t,e),cr(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Eg=ft())),r&4&&Jv(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Bt=(u=Bt)||c,Yn(t,e),Bt=u):Yn(t,e),cr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(q=e,c=e.child;c!==null;){for(d=q=c;q!==null;){switch(f=q,h=f.child,f.tag){case 0:case 11:case 14:case 15:As(4,f,f.return);break;case 1:nl(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){it(r,n,m)}}break;case 5:nl(f,f.return);break;case 22:if(f.memoizedState!==null){qv(d);continue}}h!==null?(h.return=f,q=h):qv(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{o=d.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=d.stateNode,a=d.memoizedProps.style,l=a!=null&&a.hasOwnProperty("display")?a.display:null,s.style.display=P1("display",l))}catch(m){it(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){it(e,e.return,m)}}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:Yn(t,e),cr(e),r&4&&Jv(e);break;case 21:break;default:Yn(t,e),cr(e)}}function cr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ow(n)){var r=n;break e}n=n.return}throw Error(U(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Zs(o,""),r.flags&=-33);var i=Qv(e);bh(e,i,o);break;case 3:case 4:var l=r.stateNode.containerInfo,s=Qv(e);Th(e,s,l);break;default:throw Error(U(161))}}catch(a){it(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Yk(e,t,n){q=e,sw(e)}function sw(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var o=q,i=o.child;if(o.tag===22&&r){var l=o.memoizedState!==null||cu;if(!l){var s=o.alternate,a=s!==null&&s.memoizedState!==null||Bt;s=cu;var u=Bt;if(cu=l,(Bt=a)&&!u)for(q=o;q!==null;)l=q,a=l.child,l.tag===22&&l.memoizedState!==null?ey(o):a!==null?(a.return=l,q=a):ey(o);for(;i!==null;)q=i,sw(i),i=i.sibling;q=o,cu=s,Bt=u}Zv(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,q=i):Zv(e)}}function Zv(e){for(;q!==null;){var t=q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Bt||rd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Bt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Jn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Lv(t,i,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Lv(t,l,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&na(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}Bt||t.flags&512&&kh(t)}catch(f){it(t,t.return,f)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function qv(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}function ey(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rd(4,t)}catch(a){it(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){it(t,o,a)}}var i=t.return;try{kh(t)}catch(a){it(t,i,a)}break;case 5:var l=t.return;try{kh(t)}catch(a){it(t,l,a)}}}catch(a){it(t,t.return,a)}if(t===e){q=null;break}var s=t.sibling;if(s!==null){s.return=t.return,q=s;break}q=t.return}}var Xk=Math.ceil,gc=Qr.ReactCurrentDispatcher,_g=Qr.ReactCurrentOwner,Bn=Qr.ReactCurrentBatchConfig,Te=0,Rt=null,pt=null,Dt=0,wn=0,rl=Wo(0),_t=0,ha=null,fi=0,od=0,Sg=0,Ms=null,fn=null,Eg=0,$l=1/0,Mr=null,mc=!1,Nh=null,$o=null,du=!1,vo=null,vc=0,Ls=0,Rh=null,zu=-1,Fu=0;function ln(){return Te&6?ft():zu!==-1?zu:zu=ft()}function ko(e){return e.mode&1?Te&2&&Dt!==0?Dt&-Dt:Ok.transition!==null?(Fu===0&&(Fu=V1()),Fu):(e=Ae,e!==0||(e=window.event,e=e===void 0?16:J1(e.type)),e):1}function or(e,t,n,r){if(50<Ls)throw Ls=0,Rh=null,Error(U(185));Oa(e,n,r),(!(Te&2)||e!==Rt)&&(e===Rt&&(!(Te&2)&&(od|=n),_t===4&&po(e,Dt)),mn(e,r),n===1&&Te===0&&!(t.mode&1)&&($l=ft()+500,ed&&Uo()))}function mn(e,t){var n=e.callbackNode;O$(e,t);var r=ec(e,e===Rt?Dt:0);if(r===0)n!==null&&uv(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&uv(n),t===1)e.tag===0?Pk(ty.bind(null,e)):mx(ty.bind(null,e)),Tk(function(){!(Te&6)&&Uo()}),n=null;else{switch(H1(r)){case 1:n=Xp;break;case 4:n=W1;break;case 16:n=qu;break;case 536870912:n=U1;break;default:n=qu}n=gw(n,aw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function aw(e,t){if(zu=-1,Fu=0,Te&6)throw Error(U(327));var n=e.callbackNode;if(hl()&&e.callbackNode!==n)return null;var r=ec(e,e===Rt?Dt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=yc(e,r);else{t=r;var o=Te;Te|=2;var i=cw();(Rt!==e||Dt!==t)&&(Mr=null,$l=ft()+500,oi(e,t));do try{Zk();break}catch(s){uw(e,s)}while(!0);ag(),gc.current=i,Te=o,pt!==null?t=0:(Rt=null,Dt=0,t=_t)}if(t!==0){if(t===2&&(o=rh(e),o!==0&&(r=o,t=Ph(e,o))),t===1)throw n=ha,oi(e,0),po(e,r),mn(e,ft()),n;if(t===6)po(e,r);else{if(o=e.current.alternate,!(r&30)&&!Qk(o)&&(t=yc(e,r),t===2&&(i=rh(e),i!==0&&(r=i,t=Ph(e,i))),t===1))throw n=ha,oi(e,0),po(e,r),mn(e,ft()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:Qo(e,fn,Mr);break;case 3:if(po(e,r),(r&130023424)===r&&(t=Eg+500-ft(),10<t)){if(ec(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){ln(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=dh(Qo.bind(null,e,fn,Mr),t);break}Qo(e,fn,Mr);break;case 4:if(po(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var l=31-rr(r);i=1<<l,l=t[l],l>o&&(o=l),r&=~i}if(r=o,r=ft()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Xk(r/1960))-r,10<r){e.timeoutHandle=dh(Qo.bind(null,e,fn,Mr),r);break}Qo(e,fn,Mr);break;case 5:Qo(e,fn,Mr);break;default:throw Error(U(329))}}}return mn(e,ft()),e.callbackNode===n?aw.bind(null,e):null}function Ph(e,t){var n=Ms;return e.current.memoizedState.isDehydrated&&(oi(e,t).flags|=256),e=yc(e,t),e!==2&&(t=fn,fn=n,t!==null&&Oh(t)),e}function Oh(e){fn===null?fn=e:fn.push.apply(fn,e)}function Qk(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!ir(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function po(e,t){for(t&=~Sg,t&=~od,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-rr(t),r=1<<n;e[n]=-1,t&=~r}}function ty(e){if(Te&6)throw Error(U(327));hl();var t=ec(e,0);if(!(t&1))return mn(e,ft()),null;var n=yc(e,t);if(e.tag!==0&&n===2){var r=rh(e);r!==0&&(t=r,n=Ph(e,r))}if(n===1)throw n=ha,oi(e,0),po(e,t),mn(e,ft()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Qo(e,fn,Mr),mn(e,ft()),null}function Cg(e,t){var n=Te;Te|=1;try{return e(t)}finally{Te=n,Te===0&&($l=ft()+500,ed&&Uo())}}function hi(e){vo!==null&&vo.tag===0&&!(Te&6)&&hl();var t=Te;Te|=1;var n=Bn.transition,r=Ae;try{if(Bn.transition=null,Ae=1,e)return e()}finally{Ae=r,Bn.transition=n,Te=t,!(Te&6)&&Uo()}}function $g(){wn=rl.current,Ge(rl)}function oi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,kk(n)),pt!==null)for(n=pt.return;n!==null;){var r=n;switch(ig(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ic();break;case 3:El(),Ge(pn),Ge(Gt),pg();break;case 5:hg(r);break;case 4:El();break;case 13:Ge(qe);break;case 19:Ge(qe);break;case 10:ug(r.type._context);break;case 22:case 23:$g()}n=n.return}if(Rt=e,pt=e=To(e.current,null),Dt=wn=t,_t=0,ha=null,Sg=od=fi=0,fn=Ms=null,ei!==null){for(t=0;t<ei.length;t++)if(n=ei[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var l=i.next;i.next=o,r.next=l}n.pending=r}ei=null}return e}function uw(e,t){do{var n=pt;try{if(ag(),Du.current=pc,hc){for(var r=tt.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}hc=!1}if(di=0,$t=yt=tt=null,Os=!1,ca=0,_g.current=null,n===null||n.return===null){_t=1,ha=t,pt=null;break}e:{var i=e,l=n.return,s=n,a=t;if(t=Dt,s.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Wv(l);if(h!==null){h.flags&=-257,Uv(h,l,s,i,t),h.mode&1&&Bv(i,u,t),t=h,a=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(a),t.updateQueue=m}else g.add(a);break e}else{if(!(t&1)){Bv(i,u,t),kg();break e}a=Error(U(426))}}else if(Ye&&s.mode&1){var _=Wv(l);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Uv(_,l,s,i,t),lg(Cl(a,s));break e}}i=a=Cl(a,s),_t!==4&&(_t=2),Ms===null?Ms=[i]:Ms.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=Kx(i,a,t);Mv(i,v);break e;case 1:s=a;var y=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&($o===null||!$o.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=Gx(i,s,t);Mv(i,S);break e}}i=i.return}while(i!==null)}fw(n)}catch(k){t=k,pt===n&&n!==null&&(pt=n=n.return);continue}break}while(!0)}function cw(){var e=gc.current;return gc.current=pc,e===null?pc:e}function kg(){(_t===0||_t===3||_t===2)&&(_t=4),Rt===null||!(fi&268435455)&&!(od&268435455)||po(Rt,Dt)}function yc(e,t){var n=Te;Te|=2;var r=cw();(Rt!==e||Dt!==t)&&(Mr=null,oi(e,t));do try{Jk();break}catch(o){uw(e,o)}while(!0);if(ag(),Te=n,gc.current=r,pt!==null)throw Error(U(261));return Rt=null,Dt=0,_t}function Jk(){for(;pt!==null;)dw(pt)}function Zk(){for(;pt!==null&&!E$();)dw(pt)}function dw(e){var t=pw(e.alternate,e,wn);e.memoizedProps=e.pendingProps,t===null?fw(e):pt=t,_g.current=null}function fw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Hk(n,t),n!==null){n.flags&=32767,pt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{_t=6,pt=null;return}}else if(n=Vk(n,t,wn),n!==null){pt=n;return}if(t=t.sibling,t!==null){pt=t;return}pt=t=e}while(t!==null);_t===0&&(_t=5)}function Qo(e,t,n){var r=Ae,o=Bn.transition;try{Bn.transition=null,Ae=1,qk(e,t,n,r)}finally{Bn.transition=o,Ae=r}return null}function qk(e,t,n,r){do hl();while(vo!==null);if(Te&6)throw Error(U(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(A$(e,i),e===Rt&&(pt=Rt=null,Dt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||du||(du=!0,gw(qu,function(){return hl(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Bn.transition,Bn.transition=null;var l=Ae;Ae=1;var s=Te;Te|=4,_g.current=null,Gk(e,n),lw(n,e),xk(uh),tc=!!ah,uh=ah=null,e.current=n,Yk(n),C$(),Te=s,Ae=l,Bn.transition=i}else e.current=n;if(du&&(du=!1,vo=e,vc=o),i=e.pendingLanes,i===0&&($o=null),T$(n.stateNode),mn(e,ft()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(mc)throw mc=!1,e=Nh,Nh=null,e;return vc&1&&e.tag!==0&&hl(),i=e.pendingLanes,i&1?e===Rh?Ls++:(Ls=0,Rh=e):Ls=0,Uo(),null}function hl(){if(vo!==null){var e=H1(vc),t=Bn.transition,n=Ae;try{if(Bn.transition=null,Ae=16>e?16:e,vo===null)var r=!1;else{if(e=vo,vo=null,vc=0,Te&6)throw Error(U(331));var o=Te;for(Te|=4,q=e.current;q!==null;){var i=q,l=i.child;if(q.flags&16){var s=i.deletions;if(s!==null){for(var a=0;a<s.length;a++){var u=s[a];for(q=u;q!==null;){var c=q;switch(c.tag){case 0:case 11:case 15:As(8,c,i)}var d=c.child;if(d!==null)d.return=c,q=d;else for(;q!==null;){c=q;var f=c.sibling,h=c.return;if(rw(c),c===u){q=null;break}if(f!==null){f.return=h,q=f;break}q=h}}}var g=i.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var _=m.sibling;m.sibling=null,m=_}while(m!==null)}}q=i}}if(i.subtreeFlags&2064&&l!==null)l.return=i,q=l;else e:for(;q!==null;){if(i=q,i.flags&2048)switch(i.tag){case 0:case 11:case 15:As(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,q=v;break e}q=i.return}}var y=e.current;for(q=y;q!==null;){l=q;var x=l.child;if(l.subtreeFlags&2064&&x!==null)x.return=l,q=x;else e:for(l=y;q!==null;){if(s=q,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:rd(9,s)}}catch(k){it(s,s.return,k)}if(s===l){q=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,q=S;break e}q=s.return}}if(Te=o,Uo(),yr&&typeof yr.onPostCommitFiberRoot=="function")try{yr.onPostCommitFiberRoot(Xc,e)}catch{}r=!0}return r}finally{Ae=n,Bn.transition=t}}return!1}function ny(e,t,n){t=Cl(n,t),t=Kx(e,t,1),e=Co(e,t,1),t=ln(),e!==null&&(Oa(e,1,t),mn(e,t))}function it(e,t,n){if(e.tag===3)ny(e,e,n);else for(;t!==null;){if(t.tag===3){ny(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&($o===null||!$o.has(r))){e=Cl(n,e),e=Gx(t,e,1),t=Co(t,e,1),e=ln(),t!==null&&(Oa(t,1,e),mn(t,e));break}}t=t.return}}function eT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ln(),e.pingedLanes|=e.suspendedLanes&n,Rt===e&&(Dt&n)===n&&(_t===4||_t===3&&(Dt&130023424)===Dt&&500>ft()-Eg?oi(e,0):Sg|=n),mn(e,t)}function hw(e,t){t===0&&(e.mode&1?(t=tu,tu<<=1,!(tu&130023424)&&(tu=4194304)):t=1);var n=ln();e=Hr(e,t),e!==null&&(Oa(e,t,n),mn(e,n))}function tT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hw(e,n)}function nT(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(U(314))}r!==null&&r.delete(t),hw(e,n)}var pw;pw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||pn.current)hn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return hn=!1,Uk(e,t,n);hn=!!(e.flags&131072)}else hn=!1,Ye&&t.flags&1048576&&vx(t,ac,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ju(e,t),e=t.pendingProps;var o=wl(t,Gt.current);fl(t,n),o=mg(null,t,r,e,o,n);var i=vg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,gn(r)?(i=!0,lc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,dg(t),o.updater=td,t.stateNode=o,o._reactInternals=t,yh(t,r,e,n),t=_h(null,t,r,!0,i,n)):(t.tag=0,Ye&&i&&og(t),Jt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ju(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=oT(r),e=Jn(r,e),o){case 0:t=wh(null,t,r,e,n);break e;case 1:t=Kv(null,t,r,e,n);break e;case 11:t=Vv(null,t,r,e,n);break e;case 14:t=Hv(null,t,r,Jn(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Jn(r,o),wh(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Jn(r,o),Kv(e,t,r,o,n);case 3:e:{if(Jx(t),e===null)throw Error(U(387));r=t.pendingProps,i=t.memoizedState,o=i.element,_x(e,t),dc(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Cl(Error(U(423)),t),t=Gv(e,t,r,n,o);break e}else if(r!==o){o=Cl(Error(U(424)),t),t=Gv(e,t,r,n,o);break e}else for(En=Eo(t.stateNode.containerInfo.firstChild),Cn=t,Ye=!0,er=null,n=$x(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_l(),r===o){t=Kr(e,t,n);break e}Jt(e,t,r,n)}t=t.child}return t;case 5:return kx(t),e===null&&gh(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,ch(r,o)?l=null:i!==null&&ch(r,i)&&(t.flags|=32),Qx(e,t),Jt(e,t,l,n),t.child;case 6:return e===null&&gh(t),null;case 13:return Zx(e,t,n);case 4:return fg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Sl(t,null,r,n):Jt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Jn(r,o),Vv(e,t,r,o,n);case 7:return Jt(e,t,t.pendingProps,n),t.child;case 8:return Jt(e,t,t.pendingProps.children,n),t.child;case 12:return Jt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,ze(uc,r._currentValue),r._currentValue=l,i!==null)if(ir(i.value,l)){if(i.children===o.children&&!pn.current){t=Kr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Wr(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),mh(i.return,n,t),s.lanes|=n;break}a=a.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(U(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),mh(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}Jt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,fl(t,n),o=Wn(o),r=r(o),t.flags|=1,Jt(e,t,r,n),t.child;case 14:return r=t.type,o=Jn(r,t.pendingProps),o=Jn(r.type,o),Hv(e,t,r,o,n);case 15:return Yx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Jn(r,o),ju(e,t),t.tag=1,gn(r)?(e=!0,lc(t)):e=!1,fl(t,n),Ex(t,r,o),yh(t,r,o,n),_h(null,t,r,!0,e,n);case 19:return qx(e,t,n);case 22:return Xx(e,t,n)}throw Error(U(156,t.tag))};function gw(e,t){return B1(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 zn(e,t,n,r){return new rT(e,t,n,r)}function Tg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oT(e){if(typeof e=="function")return Tg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Kp)return 11;if(e===Gp)return 14}return 2}function To(e,t){var n=e.alternate;return n===null?(n=zn(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 Bu(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")Tg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Gi:return ii(n.children,o,i,t);case Hp:l=8,o|=8;break;case Wf:return e=zn(12,n,t,o|2),e.elementType=Wf,e.lanes=i,e;case Uf:return e=zn(13,n,t,o),e.elementType=Uf,e.lanes=i,e;case Vf:return e=zn(19,n,t,o),e.elementType=Vf,e.lanes=i,e;case C1:return id(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case S1:l=10;break e;case E1:l=9;break e;case Kp:l=11;break e;case Gp:l=14;break e;case uo:l=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=zn(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function ii(e,t,n,r){return e=zn(7,e,r,t),e.lanes=n,e}function id(e,t,n,r){return e=zn(22,e,r,t),e.elementType=C1,e.lanes=n,e.stateNode={isHidden:!1},e}function vf(e,t,n){return e=zn(6,e,null,t),e.lanes=n,e}function yf(e,t,n){return t=zn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function iT(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jd(0),this.expirationTimes=Jd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jd(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function bg(e,t,n,r,o,i,l,s,a){return e=new iT(e,t,n,s,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=zn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},dg(i),e}function lT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ki,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function mw(e){if(!e)return Oo;e=e._reactInternals;e:{if(Si(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(gn(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(gn(n))return gx(e,n,t)}return t}function vw(e,t,n,r,o,i,l,s,a){return e=bg(n,r,!0,e,o,i,l,s,a),e.context=mw(null),n=e.current,r=ln(),o=ko(n),i=Wr(r,o),i.callback=t??null,Co(n,i,o),e.current.lanes=o,Oa(e,o,r),mn(e,r),e}function ld(e,t,n,r){var o=t.current,i=ln(),l=ko(o);return n=mw(n),t.context===null?t.context=n:t.pendingContext=n,t=Wr(i,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Co(o,t,l),e!==null&&(or(e,o,l,i),Lu(e,o,l)),l}function xc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ry(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ng(e,t){ry(e,t),(e=e.alternate)&&ry(e,t)}function sT(){return null}var yw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Rg(e){this._internalRoot=e}sd.prototype.render=Rg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));ld(e,t,null,null)};sd.prototype.unmount=Rg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hi(function(){ld(null,e,null,null)}),t[Vr]=null}};function sd(e){this._internalRoot=e}sd.prototype.unstable_scheduleHydration=function(e){if(e){var t=Y1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ho.length&&t!==0&&t<ho[n].priority;n++);ho.splice(n,0,e),n===0&&Q1(e)}};function Pg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ad(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function oy(){}function aT(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=xc(l);i.call(u)}}var l=vw(t,r,e,0,null,!1,!1,"",oy);return e._reactRootContainer=l,e[Vr]=l.current,ia(e.nodeType===8?e.parentNode:e),hi(),l}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var s=r;r=function(){var u=xc(a);s.call(u)}}var a=bg(e,0,!1,null,null,!1,!1,"",oy);return e._reactRootContainer=a,e[Vr]=a.current,ia(e.nodeType===8?e.parentNode:e),hi(function(){ld(t,a,n,r)}),a}function ud(e,t,n,r,o){var i=n._reactRootContainer;if(i){var l=i;if(typeof o=="function"){var s=o;o=function(){var a=xc(l);s.call(a)}}ld(t,l,e,o)}else l=aT(n,t,e,o,r);return xc(l)}K1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=_s(t.pendingLanes);n!==0&&(Qp(t,n|1),mn(t,ft()),!(Te&6)&&($l=ft()+500,Uo()))}break;case 13:hi(function(){var r=Hr(e,1);if(r!==null){var o=ln();or(r,e,1,o)}}),Ng(e,1)}};Jp=function(e){if(e.tag===13){var t=Hr(e,134217728);if(t!==null){var n=ln();or(t,e,134217728,n)}Ng(e,134217728)}};G1=function(e){if(e.tag===13){var t=ko(e),n=Hr(e,t);if(n!==null){var r=ln();or(n,e,t,r)}Ng(e,t)}};Y1=function(){return Ae};X1=function(e,t){var n=Ae;try{return Ae=e,t()}finally{Ae=n}};eh=function(e,t,n){switch(t){case"input":if(Gf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=qc(r);if(!o)throw Error(U(90));k1(r),Gf(r,o)}}}break;case"textarea":b1(e,n);break;case"select":t=n.value,t!=null&&al(e,!!n.multiple,t,!1)}};L1=Cg;D1=hi;var uT={usingClientEntryPoint:!1,Events:[Ma,Ji,qc,A1,M1,Cg]},cs={findFiberByHostInstance:qo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},cT={bundleType:cs.bundleType,version:cs.version,rendererPackageName:cs.rendererPackageName,rendererConfig:cs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Qr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=z1(e),e===null?null:e.stateNode},findFiberByHostInstance:cs.findFiberByHostInstance||sT,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 fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fu.isDisabled&&fu.supportsFiber)try{Xc=fu.inject(cT),yr=fu}catch{}}Rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uT;Rn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pg(t))throw Error(U(200));return lT(e,t,null,n)};Rn.createRoot=function(e,t){if(!Pg(e))throw Error(U(299));var n=!1,r="",o=yw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=bg(e,1,!1,null,null,n,!1,r,o),e[Vr]=t.current,ia(e.nodeType===8?e.parentNode:e),new Rg(t)};Rn.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=z1(t),e=e===null?null:e.stateNode,e};Rn.flushSync=function(e){return hi(e)};Rn.hydrate=function(e,t,n){if(!ad(t))throw Error(U(200));return ud(null,e,t,!0,n)};Rn.hydrateRoot=function(e,t,n){if(!Pg(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",l=yw;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=vw(t,null,e,1,n??null,o,!1,i,l),e[Vr]=t.current,ia(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new sd(t)};Rn.render=function(e,t,n){if(!ad(t))throw Error(U(200));return ud(null,e,t,!1,n)};Rn.unmountComponentAtNode=function(e){if(!ad(e))throw Error(U(40));return e._reactRootContainer?(hi(function(){ud(null,null,e,!1,function(){e._reactRootContainer=null,e[Vr]=null})}),!0):!1};Rn.unstable_batchedUpdates=Cg;Rn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ad(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return ud(e,t,n,!1,r)};Rn.version="18.2.0-next-9e3b772b8-20220608";function xw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xw)}catch(e){console.error(e)}}xw(),v1.exports=Rn;var $r=v1.exports;const ww=Ra($r),dT=s1({__proto__:null,default:ww},[$r]);var iy=$r;Ff.createRoot=iy.createRoot,Ff.hydrateRoot=iy.hydrateRoot;var _w={exports:{}},cd={};/**
|
|
33
|
-
* @license React
|
|
34
|
-
* react-jsx-runtime.production.min.js
|
|
35
|
-
*
|
|
36
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
37
|
-
*
|
|
38
|
-
* This source code is licensed under the MIT license found in the
|
|
39
|
-
* LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/var fT=p,hT=Symbol.for("react.element"),pT=Symbol.for("react.fragment"),gT=Object.prototype.hasOwnProperty,mT=fT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vT={key:!0,ref:!0,__self:!0,__source:!0};function Sw(e,t,n){var r,o={},i=null,l=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)gT.call(t,r)&&!vT.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:hT,type:e,key:i,ref:l,props:o,_owner:mT.current}}cd.Fragment=pT;cd.jsx=Sw;cd.jsxs=Sw;_w.exports=cd;var w=_w.exports;function Ah(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Og(e,t){if(e){if(typeof e=="string")return Ah(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 Ah(e,t)}}function Ag(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Og(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(a){throw a},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
41
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,l=!1,s;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return i=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function Ew(e){return e.length>0}var Da=Object.freeze({kind:"ok",value:void 0});function Ia(e){return e===void 0?Da:{kind:"ok",value:e}}function wr(e){return{kind:"err",error:e}}function jl(e){return e===Da||e.kind==="ok"}function Mg(e){return e!==Da&&e.kind==="err"}function Cw(e){var t=[],n=[],r=Ag(e),o;try{for(r.s();!(o=r.n()).done;){var i=o.value;jl(i)?t.push(i.value):n.push(i.error)}}catch(l){r.e(l)}finally{r.f()}return Ew(n)?wr(n):Ia(t)}function yT(e){return Cw(e)}function xT(e){var t=[],n=Ag(e),r;try{for(n.s();!(r=n.n()).done;){var o=r.value;Mg(o)&&t.push(o.error)}}catch(i){n.e(i)}finally{n.f()}return Ew(t)?wr(t):Da}function wT(e,t){return function(n){for(var r=Ia(t),o=0;o<n.length&&jl(r);++o)r=e(r.value,n[o],o);return r}}function _T(e){return function(t){return jl(t)?Ia(e(t.value)):t}}function ST(e){return function(t){return jl(t)?e(t.value):t}}function ET(e){return function(t){return Mg(t)?wr(e(t.error)):t}}function CT(e,t){return function(n){return e(n)?Ia(n):wr(t(n))}}var $T=function(t,n){return function(r){return jl(r)?t(r.value)?r:wr(n(r.value)):r}},Ds=Object.freeze({__proto__:null,voidOk:Da,ok:Ia,err:wr,isOk:jl,isErr:Mg,allT:Cw,all:yT,allV:xT,flatMapReduce:wT,map:_T,flatMap:ST,mapErr:ET,fromPredicate:CT,filterOrElse:$T});function kT(e){if(Array.isArray(e))return Ah(e)}function TT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bT(){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 NT(e){return kT(e)||TT(e)||Og(e)||bT()}function me(e){"@babel/helpers - typeof";return me=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},me(e)}function RT(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 $w(e){var t=RT(e,"string");return typeof t=="symbol"?t:String(t)}function xt(e,t,n){return t=$w(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ly(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function kl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ly(Object(n),!0).forEach(function(r){xt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ly(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PT(e){if(Array.isArray(e))return e}function OT(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,l,s=[],a=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);a=!0);}catch(c){u=!0,o=c}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw o}}return s}}function AT(){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 bo(e,t){return PT(e)||OT(e,t)||Og(e,t)||AT()}function kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$w(r.key),r)}}function Tr(e,t,n){return t&&sy(e.prototype,t),n&&sy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mh(e,t){return Mh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Mh(e,t)}function Ei(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&&Mh(e,t)}function wc(e){return wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wc(e)}function MT(){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 kw(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LT(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 kw(e)}function Ci(e){var t=MT();return function(){var r=wc(e),o;if(t){var i=wc(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return LT(this,o)}}var $i=function(){function e(){kr(this,e)}return Tr(e,[{key:"appendValidationError",value:function(n,r,o,i){return n?(n[r]?n[r].push({message:o,value:i}):n[r]=[{message:o,value:i}],n):xt({},r,[{message:o,value:i}])}}]),e}(),Wu=Symbol("GetSchema"),nn=Symbol("Path"),wt=Symbol("GetSource");function DT(e){return e[Wu]}var Lg=Tr(function e(t){kr(this,e),this.span=t}),IT=function(e){Ei(n,e);var t=Ci(n);function n(r,o){var i;return kr(this,n),i=t.call(this,o),xt(kw(i),"type","Sym"),i.value=r,i}return Tr(n,[{key:"transpile",value:function(){return this.value}}]),n}(Lg);new IT("()");var Ht="_type",vn="_ref",jT=function(e){Ei(n,e);var t=Ci(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return kr(this,n),o=t.call(this),o.options=r,o.opt=i,o}return Tr(n,[{key:"validate",value:function(o,i){return this.opt&&i==null?!1:i==null?xt({},o,[{message:"Non-optional image was null or undefined.",value:i}]):typeof i[vn]!="string"?xt({},o,[{message:"Image did not have a file reference string. Got: ".concat(me(i[vn])),value:i}]):i[Ht]!=="file"?xt({},o,[{message:"Image did not have the valid file extension type. Got: ".concat(i[Ht]),value:i}]):i.metadata?xt({},o,[{message:"Found metadata, but it could not be validated. Image metadata must be an object with the required props: width (positive number), height (positive number) and sha256 (string of length 64 of the base16 hash).",value:i,fixes:["image:replace-metadata"]}]):xt({},o,[{message:"Could not validate Image metadata.",value:i,fixes:["image:add-metadata"]}])}},{key:"assert",value:function(o){return this.opt&&o==null?!0:(o==null?void 0:o[vn])==="image"&&(o==null?void 0:o[Ht])==="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}($i),Tw=function(t){var n;if(!t[vn].startsWith("/public")){var r;return{url:t[vn]+"?sha256=".concat((r=t.metadata)===null||r===void 0?void 0:r.sha256),metadata:t.metadata}}return{url:t[vn].slice(7)+"?sha256=".concat((n=t.metadata)===null||n===void 0?void 0:n.sha256),metadata:t.metadata}};function bw(e){return me(e)==="object"&&e!==null&&e!==void 0&&("val"in e||"valPath"in e)}function zT(e){return me(e)==="object"&&e!==null&&e!==void 0&&nn in e&&"val"in e}function FT(e){return e[nn]}function BT(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ay(e,t,n){return t?Et(e(Et(t,n))):Et(t,n)}function No(e){return me(e)==="object"&&e!==null&&(wt in e||nn in e)}function Et(e,t,n){if(me(e)==="object"){if(No(e))return e;if(bw(e))return Et(e.val,e.valPath)}if(e&&e[vn]&&e[Ht]==="file"){var r=e[vn];if(typeof r!="string")throw Error("Invalid file ref: "+r);return Et(Tw(e),t,n)}switch(me(e)){case"function":case"symbol":throw Error("Invalid selector type: ".concat(me(e),": ").concat(e));case"object":if(e!==null)return new Proxy(e,{has:function(i,l){return l===wt||l===nn||l==="andThen"||l===Wu?!0:l in i},get:function(i,l){if(l===wt)return e;if(l===nn)return t;if(l===Wu)return n;if(l==="andThen")return function(a){return ay(a,e,t)};if(Array.isArray(i)){if(l==="filter")return function(a){var u=i.map(function(c,d){return Et(c,tr(t,d),n==null?void 0:n.item)}).filter(function(c){return a&&a instanceof $i?a.assert(uy(c)):uy(a(c))});return Et(u,t,n)};if(l==="map")return function(a){var u=i.map(function(c,d){var f=a(Et(c,tr(t,d),n==null?void 0:n.item),Et(d));return No(f)?f:Et(f)});return Et(u,t,n)}}if(Array.isArray(i)&&l==="length")return Et(i.length);var s=Reflect.get(i,l);return BT(e,l)?Number.isNaN(Number(l))?Et(s,tr(t,l),n==null?void 0:n.items[l]):Et(s,tr(t,Number(l)),n==null?void 0:n.item):s}});default:return xt(xt(xt({eq:function(i){var l=i;if(No(i)&&(l=i[wt],l instanceof Lg))throw Error("TODO: Cannot evaluate equality with an Expr");return Et(e===l,void 0)},andThen:function(i){return ay(i,e===void 0?null:e,t)}},wt,e===void 0?null:e),nn,t),Wu,n)}}function tr(e,t){if(me(t)==="symbol")throw Error("Cannot create val path of array item with symbol prop: ".concat(t.toString()));return e&&"".concat(e,".").concat(JSON.stringify(t))}function uy(e){if(me(e)==="object"&&(wt in e||nn in e)){var t=e[wt];return t}return e}var WT=function(e){Ei(n,e);var t=Ci(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return kr(this,n),o=t.call(this),o.items=r,o.opt=i,o}return Tr(n,[{key:"validate",value:function(o,i){var l=this,s=!1;return this.opt&&i==null?!1:me(i)!=="object"?xt({},o,[{message:"Expected 'object', got '".concat(me(i),"'")}]):Array.isArray(i)?xt({},o,[{message:"Expected 'object', got 'array'"}]):(Object.entries(this.items).forEach(function(a){var u=bo(a,2),c=u[0],d=u[1],f=tr(o,c);if(!f)s=l.appendValidationError(s,o,"Internal error: could not create path at ".concat(!o&&typeof o=="string"?"<empty string>":o," at key ").concat(c),i);else{var h=d.validate(f,i[c]);h&&s?s=kl(kl({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(o){if(this.opt&&o==null)return!0;if(!o)return!1;for(var i=0,l=Object.entries(this.items);i<l.length;i++){var s=bo(l[i],2),a=s[0],u=s[1];if(!u.assert(o[a]))return!1}return me(o)==="object"&&!Array.isArray(o)}},{key:"optional",value:function(){return new n(this.items,!0)}},{key:"serialize",value:function(){return{type:"object",items:Object.fromEntries(Object.entries(this.items).map(function(o){var i=bo(o,2),l=i[0],s=i[1];return[l,s.serialize()]})),opt:this.opt}}}]),n}($i),UT=function(e){Ei(n,e);var t=Ci(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return kr(this,n),o=t.call(this),o.item=r,o.opt=i,o}return Tr(n,[{key:"validate",value:function(o,i){var l=this,s=!1;return this.opt&&i==null?!1:me(i)!=="object"||!Array.isArray(i)?xt({},o,[{message:"Expected 'array', got '".concat(me(i),"'")}]):(i.forEach(function(a,u){var c=tr(o,u);if(!c)s=l.appendValidationError(s,o,"Internal error: could not create path at ".concat(!o&&typeof o=="string"?"<empty string>":o," at index ").concat(u),i);else{var d=l.item.validate(c,a);d&&s?s=kl(kl({},d),s):d&&(s=d)}}),s)}},{key:"assert",value:function(o){if(this.opt&&o==null)return!0;if(!o)return!1;var i=Ag(o),l;try{for(i.s();!(l=i.n()).done;){var s=l.value;if(!this.item.assert(s))return!1}}catch(a){i.e(a)}finally{i.f()}return me(o)==="object"&&Array.isArray(o)}},{key:"optional",value:function(){return new n(this.item,!0)}},{key:"serialize",value:function(){return{type:"array",item:this.item.serialize(),opt:this.opt}}}]),n}($i),VT=function(e){Ei(n,e);var t=Ci(n);function n(r,o){var i,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return kr(this,n),i=t.call(this),i.key=r,i.items=o,i.opt=l,i}return Tr(n,[{key:"validate",value:function(o,i){throw new Error("Method not implemented.")}},{key:"assert",value:function(o){throw new Error("Method not implemented.")}},{key:"optional",value:function(){throw new Error("Method not implemented.")}},{key:"serialize",value:function(){return{type:"union",key:this.key,items:this.items.map(function(o){return o.serialize()}),opt:this.opt}}}]),n}($i),HT=function(e){Ei(n,e);var t=Ci(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return kr(this,n),o=t.call(this),o.options=r,o.opt=i,o}return Tr(n,[{key:"validate",value:function(o,i){return!1}},{key:"assert",value:function(o){return!0}},{key:"optional",value:function(){return new n(this.options,!0)}},{key:"serialize",value:function(){return{type:"richtext",opt:this.opt}}}]),n}($i),KT=function(e){Ei(n,e);var t=Ci(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return kr(this,n),o=t.call(this),o.item=r,o.opt=i,o}return Tr(n,[{key:"validate",value:function(o,i){var l=this,s=!1;return this.opt&&i==null?!1:me(i)!=="object"?xt({},o,[{message:"Expected 'object', got '".concat(me(i),"'")}]):Array.isArray(i)?xt({},o,[{message:"Expected 'object', got 'array'"}]):(Object.entries(i).forEach(function(a){var u=bo(a,2),c=u[0],d=u[1],f=tr(o,c);if(!f)s=l.appendValidationError(s,o,"Internal error: could not create path at ".concat(!o&&typeof o=="string"?"<empty string>":o," at key ").concat(d),i);else{var h=l.item.validate(f,d);h&&s?s=kl(kl({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(o){if(this.opt&&o==null)return!0;if(!o)return!1;for(var i=0,l=Object.entries(o);i<l.length;i++){var s=bo(l[i],2),a=s[1];if(!this.item.assert(a))return!1}return me(o)==="object"&&!Array.isArray(o)}},{key:"optional",value:function(){return new n(this.item,!0)}},{key:"serialize",value:function(){return{type:"record",item:this.item.serialize(),opt:this.opt}}}]),n}($i);function GT(e){var t=e[wt];if(t instanceof Lg)throw Error("Cannot get raw source of an Expr");var n=t;return n}function YT(e){return e.indexOf(".")===-1?[e,""]:[e.slice(0,e.indexOf(".")),e.slice(e.indexOf(".")+1)]}function XT(e){return e instanceof WT||me(e)==="object"&&"type"in e&&e.type==="object"}function QT(e){return e instanceof KT||me(e)==="object"&&"type"in e&&e.type==="record"}function JT(e){return e instanceof UT||me(e)==="object"&&"type"in e&&e.type==="array"}function ZT(e){return e instanceof VT||me(e)==="object"&&"type"in e&&e.type==="union"}function qT(e){return e instanceof HT||me(e)==="object"&&"type"in e&&e.type==="richtext"}function eb(e){return e instanceof jT||me(e)==="object"&&"type"in e&&e.type==="image"}function tb(e,t,n){for(var r=nb(e),o=NT(r),i=n,l=t,s=function(){var c=r.shift();if(c===void 0)throw Error("Unexpected undefined part");if(JT(i)){if(Number.isNaN(Number(c)))throw Error("Invalid path: array schema ".concat(JSON.stringify(i)," must have a number as path, but got ").concat(c,". Path: ").concat(e));if(me(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of array, but got ".concat(me(l)));if(!l[c]){var d;throw Error("Invalid path: array source (length: ".concat((d=l)===null||d===void 0?void 0:d.length,") did not have index ").concat(c," from path: ").concat(e))}l=l[c],i=i.item}else if(QT(i)){if(typeof c!="string")throw Error("Invalid path: record schema ".concat(i," must have path: ").concat(c," as string"));if(me(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of record, but got ".concat(me(l)));if(!l[c])throw Error("Invalid path: record source did not have key ".concat(c," from path: ").concat(e));l=l[c],i=i.item}else if(XT(i)){if(me(l)!=="object")throw Error("Schema type error: expected source to be type of object, but got ".concat(me(l)));if(!l[c])throw Error("Invalid path: object source did not have key ".concat(c," from path: ").concat(e));l=l[c],i=i.items[c]}else{if(eb(i))return{v:{path:o.slice(0,o.length-r.length-1).map(function(m){return JSON.stringify(m)}).join("."),schema:i,source:l}};if(ZT(i)){var f=i.key,h=l[f];if(!h)throw Error("Invalid path: union source ".concat(i," did not have required key ").concat(f," in path: ").concat(e));var g=i.items.find(function(m){var _;return(m==null||(_=m.items)===null||_===void 0||(_=_[f])===null||_===void 0?void 0:_.value)===h});if(!g)throw Error("Invalid path: union schema ".concat(i," did not have a child object with ").concat(f," of value ").concat(h," in path: ").concat(e));i=g.items[c],l=l[c]}else{if(qT(i))return{v:{path:o.slice(0,o.length-r.length-1).map(function(m){return JSON.stringify(m)}).join("."),schema:i,source:l}};throw Error("Invalid path: ".concat(c," resolved to an unexpected schema ").concat(JSON.stringify(i)))}}},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:o.map(function(u){return Number.isNaN(Number(u))?JSON.stringify(u):u}).join("."),schema:i,source:l}}function nb(e){for(var t=[],n=0;n<e.length;){var r="";if(e[n]==='"'){for(n++;n<e.length&&e[n]!=='"';)e[n]==="\\"&&e[n+1]==='"'?(r+='"',n++):r+=e[n],n++;if(e[n]!=='"'){var o;throw new Error("Invalid input (".concat(JSON.stringify(e),"): Missing closing double quote: ").concat((o=e[n])!==null&&o!==void 0?o:"at end of string"," (char: ").concat(n,"; length: ").concat(e.length,")"))}}else for(;n<e.length&&e[n]!==".";)r+=e[n],n++;r!==""&&t.push(r),n++}return t}function rb(e){return Nw(lb(e))}function ob(e){return No(e)?me(e[wt])==="object"&&e[wt]!==null&&Array.isArray(e[wt]):Array.isArray(e)}function ib(e){return No(e)?me(e[wt])==="object"&&e[wt]!==null&&!Array.isArray(e[wt]):me(e)==="object"}function lb(e){var t=Et(e);function n(r){var o=ob(r),i=ib(r);if(o){var l=wt in r?r[wt]:r,s=nn in r?r[nn]:void 0;return{val:l.map(function(c,d){return n(No(c)?c:Et(c,tr(s,d)))}),valPath:s}}else if(i){var a=wt in r?r[wt]:r,u=nn in r?r[nn]:void 0;return{val:a!==null&&Object.fromEntries(Object.entries(a).map(function(c){var d=bo(c,2),f=d[0],h=d[1];return[f,n(No(h)?h:Et(h,tr(u,f)))]})),valPath:u}}else return No(r)?{val:n(r[wt]),valPath:r[nn]}:r}return n(t)}function Lh(e){var t=bw(e)?e.val:e;switch(me(t)){case"function":case"symbol":throw Error("Invalid val type: ".concat(me(t)));case"object":return t===null?null:Array.isArray(t)?t.map(Lh):Object.fromEntries(Object.entries(t).map(function(n){var r=bo(n,2),o=r[0],i=r[1];return[o,i&&Lh(i)]}));default:return t}}function Nw(e){var t=e.val;switch(me(t)){case"function":case"symbol":throw Error("Invalid val type: ".concat(me(t)));case"object":if(t!==null)return new Proxy(t,{has:function(r,o){return o==="val"||o===nn?!0:cy(r,o)},get:function(r,o){if(o===nn)return e.valPath;if(o==="val")return Lh(e);if(Array.isArray(r)&&o==="length")return r.length;if(cy(t,o)){var i,l;return Nw({val:Reflect.get(r,o).val,valPath:(i=(l=Reflect.get(r,o))===null||l===void 0?void 0:l.valPath)!==null&&i!==void 0?i:tr(e.valPath,Array.isArray(r)?Number(o):o)})}return Reflect.get(r,o)}});default:return xt(xt({},nn,e.valPath),"val",e.val)}}function cy(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function pi(){pi=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(C,$,E){C[$]=E.value},i=typeof Symbol=="function"?Symbol:{},l=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(C,$,E){return Object.defineProperty(C,$,{value:E,enumerable:!0,configurable:!0,writable:!0}),C[$]}try{u({},"")}catch{u=function($,E,O){return $[E]=O}}function c(C,$,E,O){var R=$&&$.prototype instanceof v?$:v,F=Object.create(R.prototype),V=new H(O||[]);return o(F,"_invoke",{value:M(C,E,V)}),F}function d(C,$,E){try{return{type:"normal",arg:C.call($,E)}}catch(O){return{type:"throw",arg:O}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",g="executing",m="completed",_={};function v(){}function y(){}function x(){}var S={};u(S,l,function(){return this});var k=Object.getPrototypeOf,b=k&&k(k(Y([])));b&&b!==n&&r.call(b,l)&&(S=b);var T=x.prototype=v.prototype=Object.create(S);function N(C){["next","throw","return"].forEach(function($){u(C,$,function(E){return this._invoke($,E)})})}function D(C,$){function E(R,F,V,ae){var oe=d(C[R],C,F);if(oe.type!=="throw"){var $e=oe.arg,_e=$e.value;return _e&&typeof _e=="object"&&r.call(_e,"__await")?$.resolve(_e.__await).then(function(Q){E("next",Q,V,ae)},function(Q){E("throw",Q,V,ae)}):$.resolve(_e).then(function(Q){$e.value=Q,V($e)},function(Q){return E("throw",Q,V,ae)})}ae(oe.arg)}var O;o(this,"_invoke",{value:function(R,F){function V(){return new $(function(ae,oe){E(R,F,ae,oe)})}return O=O?O.then(V,V):V()}})}function M(C,$,E){var O=f;return function(R,F){if(O===g)throw new Error("Generator is already running");if(O===m){if(R==="throw")throw F;return{value:e,done:!0}}for(E.method=R,E.arg=F;;){var V=E.delegate;if(V){var ae=j(V,E);if(ae){if(ae===_)continue;return ae}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(O===f)throw O=m,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);O=g;var oe=d(C,$,E);if(oe.type==="normal"){if(O=E.done?m:h,oe.arg===_)continue;return{value:oe.arg,done:E.done}}oe.type==="throw"&&(O=m,E.method="throw",E.arg=oe.arg)}}}function j(C,$){var E=$.method,O=C.iterator[E];if(O===e)return $.delegate=null,E==="throw"&&C.iterator.return&&($.method="return",$.arg=e,j(C,$),$.method==="throw")||E!=="return"&&($.method="throw",$.arg=new TypeError("The iterator does not provide a '"+E+"' method")),_;var R=d(O,C.iterator,$.arg);if(R.type==="throw")return $.method="throw",$.arg=R.arg,$.delegate=null,_;var F=R.arg;return F?F.done?($[C.resultName]=F.value,$.next=C.nextLoc,$.method!=="return"&&($.method="next",$.arg=e),$.delegate=null,_):F:($.method="throw",$.arg=new TypeError("iterator result is not an object"),$.delegate=null,_)}function B(C){var $={tryLoc:C[0]};1 in C&&($.catchLoc=C[1]),2 in C&&($.finallyLoc=C[2],$.afterLoc=C[3]),this.tryEntries.push($)}function re(C){var $=C.completion||{};$.type="normal",delete $.arg,C.completion=$}function H(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(B,this),this.reset(!0)}function Y(C){if(C||C===""){var $=C[l];if($)return $.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var E=-1,O=function R(){for(;++E<C.length;)if(r.call(C,E))return R.value=C[E],R.done=!1,R;return R.value=e,R.done=!0,R};return O.next=O}}throw new TypeError(typeof C+" is not iterable")}return y.prototype=x,o(T,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:y,configurable:!0}),y.displayName=u(x,a,"GeneratorFunction"),t.isGeneratorFunction=function(C){var $=typeof C=="function"&&C.constructor;return!!$&&($===y||($.displayName||$.name)==="GeneratorFunction")},t.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,x):(C.__proto__=x,u(C,a,"GeneratorFunction")),C.prototype=Object.create(T),C},t.awrap=function(C){return{__await:C}},N(D.prototype),u(D.prototype,s,function(){return this}),t.AsyncIterator=D,t.async=function(C,$,E,O,R){R===void 0&&(R=Promise);var F=new D(c(C,$,E,O),R);return t.isGeneratorFunction($)?F:F.next().then(function(V){return V.done?V.value:F.next()})},N(T),u(T,a,"Generator"),u(T,l,function(){return this}),u(T,"toString",function(){return"[object Generator]"}),t.keys=function(C){var $=Object(C),E=[];for(var O in $)E.push(O);return E.reverse(),function R(){for(;E.length;){var F=E.pop();if(F in $)return R.value=F,R.done=!1,R}return R.done=!0,R}},t.values=Y,H.prototype={constructor:H,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(re),!C)for(var $ in this)$.charAt(0)==="t"&&r.call(this,$)&&!isNaN(+$.slice(1))&&(this[$]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var $=this;function E(oe,$e){return F.type="throw",F.arg=C,$.next=oe,$e&&($.method="next",$.arg=e),!!$e}for(var O=this.tryEntries.length-1;O>=0;--O){var R=this.tryEntries[O],F=R.completion;if(R.tryLoc==="root")return E("end");if(R.tryLoc<=this.prev){var V=r.call(R,"catchLoc"),ae=r.call(R,"finallyLoc");if(V&&ae){if(this.prev<R.catchLoc)return E(R.catchLoc,!0);if(this.prev<R.finallyLoc)return E(R.finallyLoc)}else if(V){if(this.prev<R.catchLoc)return E(R.catchLoc,!0)}else{if(!ae)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return E(R.finallyLoc)}}}},abrupt:function(C,$){for(var E=this.tryEntries.length-1;E>=0;--E){var O=this.tryEntries[E];if(O.tryLoc<=this.prev&&r.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var R=O;break}}R&&(C==="break"||C==="continue")&&R.tryLoc<=$&&$<=R.finallyLoc&&(R=null);var F=R?R.completion:{};return F.type=C,F.arg=$,R?(this.method="next",this.next=R.finallyLoc,_):this.complete(F)},complete:function(C,$){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&$&&(this.next=$),_},finish:function(C){for(var $=this.tryEntries.length-1;$>=0;--$){var E=this.tryEntries[$];if(E.finallyLoc===C)return this.complete(E.completion,E.afterLoc),re(E),_}},catch:function(C){for(var $=this.tryEntries.length-1;$>=0;--$){var E=this.tryEntries[$];if(E.tryLoc===C){var O=E.completion;if(O.type==="throw"){var R=O.arg;re(E)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(C,$,E){return this.delegate={iterator:Y(C),resultName:$,nextLoc:E},this.method==="next"&&(this.arg=e),_}},t}function dy(e,t,n,r,o,i,l){try{var s=e[i](l),a=s.value}catch(u){n(u);return}s.done?t(a):Promise.resolve(a).then(r,o)}function Dg(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(a){dy(i,r,o,l,s,"next",a)}function s(a){dy(i,r,o,l,s,"throw",a)}l(void 0)})}}var sb=function(){var e=Dg(pi().mark(function t(n){var r,o,i;return pi().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,crypto.subtle.digest("SHA-256",n);case 2:return r=s.sent,o=Array.from(new Uint8Array(r)),i=o.map(function(a){return a.toString(16).padStart(2,"0")}).join(""),s.abrupt("return",i);case 6:case"end":return s.stop()}},t)}));return function(n){return e.apply(this,arguments)}}(),ab=function(){function e(t){kr(this,e),this.host=t}return Tr(e,[{key:"getDisableUrl",value:function(n){return"".concat(this.host,"/disable?redirect_to=").concat(encodeURIComponent(n))}},{key:"getEditUrl",value:function(){return"".concat(this.host,"/static/edit")}},{key:"getLoginUrl",value:function(n){return"".concat(this.host,"/authorize?redirect_to=").concat(encodeURIComponent(n))}},{key:"getEnableUrl",value:function(n){return"".concat(this.host,"/enable?redirect_to=").concat(encodeURIComponent(n))}},{key:"getPatches",value:function(){var t=Dg(pi().mark(function r(o){var i,l,s;return pi().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return i=o.patchIds,l=o.headers,s=i?"?".concat(i.map(function(c){return"".concat(c,"=").concat(encodeURIComponent(c))}).join("&")):"",u.abrupt("return",fetch("".concat(this.host,"/patches/~").concat(s),{headers:l||{"Content-Type":"application/json"}}).then(function(c){return pu(c)}).catch(hu));case 3:case"end":return u.stop()}},r,this)}));function n(r){return t.apply(this,arguments)}return n}()},{key:"postPatches",value:function(n,r,o){return fetch("".concat(this.host,"/patches/~"),{headers:o||{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(xt({},n,r))}).then(function(i){return pu(i)}).catch(hu)}},{key:"getSession",value:function(){return fetch("".concat(this.host,"/session")).then(function(n){return pu(n).catch(hu)})}},{key:"getTree",value:function(n){var r=n.patch,o=r===void 0?!1:r,i=n.includeSchema,l=i===void 0?!1:i,s=n.includeSource,a=s===void 0?!1:s,u=n.treePath,c=u===void 0?"/":u,d=n.headers,f=new URLSearchParams;return f.set("patch",o.toString()),f.set("schema",l.toString()),f.set("source",a.toString()),fetch("".concat(this.host,"/tree/~").concat(c,"?").concat(f.toString()),{headers:d}).then(function(h){return pu(h)}).catch(hu)}}]),e}();function hu(e){return wr({statusCode:500,message:e instanceof Error?e.message:"Unknown error"})}function pu(e){return Dh.apply(this,arguments)}function Dh(){return Dh=Dg(pi().mark(function e(t){var n;return pi().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,!t.ok){o.next=9;break}return o.t0=Ds,o.next=5,t.json();case 5:return o.t1=o.sent,o.abrupt("return",o.t0.ok.call(o.t0,o.t1));case 9:return o.prev=9,o.next=12,t.json();case 12:return n=o.sent,o.abrupt("return",wr({statusCode:t.status,message:n.message||t.statusText,details:n.details||Object.fromEntries(Object.entries(n).filter(function(i){var l=bo(i,1),s=l[0];return s!=="message"}))}));case 16:return o.prev=16,o.t2=o.catch(9),o.abrupt("return",wr({statusCode:t.status,message:t.statusText}));case 19:o.next=24;break;case 21:return o.prev=21,o.t3=o.catch(0),o.abrupt("return",wr({message:o.t3 instanceof Error?o.t3.message:"Unknown error"}));case 24:case"end":return o.stop()}},e,null,[[0,21],[9,16]])})),Dh.apply(this,arguments)}var Kt={convertFileSource:Tw,getSchema:DT,getValPath:FT,getVal:rb,getSource:GT,resolvePath:tb,splitModuleIdAndModulePath:YT,isVal:zT,createValPathOfItem:tr,getSHA256Hash:sb,createPatchJSONPath:function(t){return"/".concat(t.split(".").map(function(n){return n&&ub(n)}).join("/"))},VAL_ENABLE_COOKIE_NAME:"val_enable",VAL_STATE_COOKIE:"val_state",VAL_SESSION_COOKIE:"val_session"};function ub(e){try{return JSON.parse(e)}catch{return e}}var Rw={exports:{}};/*!
|
|
44
|
-
Copyright (c) 2018 Jed Watson.
|
|
45
|
-
Licensed under the MIT License (MIT), see
|
|
46
|
-
http://jedwatson.github.io/classnames
|
|
47
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var l=typeof i;if(l==="string"||l==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(l==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var a in i)t.call(i,a)&&i[a]&&r.push(a)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Rw);var cb=Rw.exports;const dd=Ra(cb);function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},te.apply(this,arguments)}function db(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Pw(...e){return t=>e.forEach(n=>db(n,t))}function Qe(...e){return p.useCallback(Pw(...e),e)}const Tl=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(hb);if(i){const l=i.props.children,s=o.map(a=>a===i?p.Children.count(l)>1?p.Children.only(null):p.isValidElement(l)?l.props.children:null:a);return p.createElement(Ih,te({},r,{ref:t}),p.isValidElement(l)?p.cloneElement(l,void 0,s):null)}return p.createElement(Ih,te({},r,{ref:t}),n)});Tl.displayName="Slot";const Ih=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...pb(r,n.props),ref:t?Pw(t,n.ref):n.ref}):p.Children.count(n)>1?p.Children.only(null):null});Ih.displayName="SlotClone";const fb=({children:e})=>p.createElement(p.Fragment,null,e);function hb(e){return p.isValidElement(e)&&e.type===fb}function pb(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const gb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Le=gb.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...l}=r,s=i?Tl:t;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(s,te({},l,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function mb(e,t){e&&$r.flushSync(()=>e.dispatchEvent(t))}const bn=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function vb(e,t){return p.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const zl=e=>{const{present:t,children:n}=e,r=yb(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=Qe(r.ref,o.ref);return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};zl.displayName="Presence";function yb(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),l=e?"mounted":"unmounted",[s,a]=vb(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=gu(r.current);i.current=s==="mounted"?u:"none"},[s]),bn(()=>{const u=r.current,c=o.current;if(c!==e){const f=i.current,h=gu(u);e?a("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),bn(()=>{if(t){const u=d=>{const h=gu(r.current).includes(d.animationName);d.target===t&&h&&$r.flushSync(()=>a("ANIMATION_END"))},c=d=>{d.target===t&&(i.current=gu(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 gu(e){return(e==null?void 0:e.animationName)||"none"}function ki(e,t=[]){let n=[];function r(i,l){const s=p.createContext(l),a=n.length;n=[...n,l];function u(d){const{scope:f,children:h,...g}=d,m=(f==null?void 0:f[e][a])||s,_=p.useMemo(()=>g,Object.values(g));return p.createElement(m.Provider,{value:_},h)}function c(d,f){const h=(f==null?void 0:f[e][a])||s,g=p.useContext(h);if(g)return g;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const o=()=>{const i=n.map(l=>p.createContext(l));return function(s){const a=(s==null?void 0:s[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,xb(o,...t)]}function xb(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const l=r.reduce((s,{useScope:a,scopeName:u})=>{const d=a(i)[`__scope${u}`];return{...s,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Ut(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 wb=p.createContext(void 0);function Ig(e){const t=p.useContext(wb);return e||t||"ltr"}function jh(e,[t,n]){return Math.min(n,Math.max(t,e))}function He(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function _b(e,t){return p.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Ow="ScrollArea",[Aw,H4]=ki(Ow),[Sb,Hn]=Aw(Ow),Eb=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...l}=e,[s,a]=p.useState(null),[u,c]=p.useState(null),[d,f]=p.useState(null),[h,g]=p.useState(null),[m,_]=p.useState(null),[v,y]=p.useState(0),[x,S]=p.useState(0),[k,b]=p.useState(!1),[T,N]=p.useState(!1),D=Qe(t,j=>a(j)),M=Ig(o);return p.createElement(Sb,{scope:n,type:r,dir:M,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:k,onScrollbarXEnabledChange:b,scrollbarY:m,onScrollbarYChange:_,scrollbarYEnabled:T,onScrollbarYEnabledChange:N,onCornerWidthChange:y,onCornerHeightChange:S},p.createElement(Le.div,te({dir:M},l,{ref:D,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})))}),Cb="ScrollAreaViewport",$b=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=Hn(Cb,n),l=p.useRef(null),s=Qe(t,l,i.onViewportChange);return p.createElement(p.Fragment,null,p.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),p.createElement(Le.div,te({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),p.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Jr="ScrollAreaScrollbar",Mw=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Hn(Jr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:l}=o,s=e.orientation==="horizontal";return p.useEffect(()=>(s?i(!0):l(!0),()=>{s?i(!1):l(!1)}),[s,i,l]),o.type==="hover"?p.createElement(kb,te({},r,{ref:t,forceMount:n})):o.type==="scroll"?p.createElement(Tb,te({},r,{ref:t,forceMount:n})):o.type==="auto"?p.createElement(Lw,te({},r,{ref:t,forceMount:n})):o.type==="always"?p.createElement(jg,te({},r,{ref:t})):null}),kb=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Hn(Jr,e.__scopeScrollArea),[i,l]=p.useState(!1);return p.useEffect(()=>{const s=o.scrollArea;let a=0;if(s){const u=()=>{window.clearTimeout(a),l(!0)},c=()=>{a=window.setTimeout(()=>l(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(a),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",c)}}},[o.scrollArea,o.scrollHideDelay]),p.createElement(zl,{present:n||i},p.createElement(Lw,te({"data-state":i?"visible":"hidden"},r,{ref:t})))}),Tb=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Hn(Jr,e.__scopeScrollArea),i=e.orientation==="horizontal",l=hd(()=>a("SCROLL_END"),100),[s,a]=_b("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>a("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,o.scrollHideDelay,a]),p.useEffect(()=>{const u=o.viewport,c=i?"scrollLeft":"scrollTop";if(u){let d=u[c];const f=()=>{const h=u[c];d!==h&&(a("SCROLL"),l()),d=h};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[o.viewport,i,a,l]),p.createElement(zl,{present:n||s!=="hidden"},p.createElement(jg,te({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:He(e.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:He(e.onPointerLeave,()=>a("POINTER_LEAVE"))})))}),Lw=p.forwardRef((e,t)=>{const n=Hn(Jr,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,l]=p.useState(!1),s=e.orientation==="horizontal",a=hd(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,c=n.viewport.offsetHeight<n.viewport.scrollHeight;l(s?u:c)}},10);return bl(n.viewport,a),bl(n.content,a),p.createElement(zl,{present:r||i},p.createElement(jg,te({"data-state":i?"visible":"hidden"},o,{ref:t})))}),jg=p.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=Hn(Jr,e.__scopeScrollArea),i=p.useRef(null),l=p.useRef(0),[s,a]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=zw(s.viewport,s.content),c={...r,sizes:s,onSizesChange:a,hasThumb:u>0&&u<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:f=>l.current=f};function d(f,h){return Lb(f,l.current,s,h)}return n==="horizontal"?p.createElement(bb,te({},c,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollLeft,h=fy(f,s,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}})):n==="vertical"?p.createElement(Nb,te({},c,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollTop,h=fy(f,s);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}})):null}),bb=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Hn(Jr,e.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=Qe(t,a,i.onScrollbarXChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(Iw,te({"data-orientation":"horizontal"},o,{ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":fd(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(i.viewport){const f=i.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),Bw(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&i.viewport&&l&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:_c(l.paddingLeft),paddingEnd:_c(l.paddingRight)}})}}))}),Nb=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Hn(Jr,e.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=Qe(t,a,i.onScrollbarYChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(Iw,te({"data-orientation":"vertical"},o,{ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":fd(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(i.viewport){const f=i.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),Bw(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&i.viewport&&l&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:_c(l.paddingTop),paddingEnd:_c(l.paddingBottom)}})}}))}),[Rb,Dw]=Aw(Jr),Iw=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:l,onThumbPointerDown:s,onThumbPositionChange:a,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,h=Hn(Jr,n),[g,m]=p.useState(null),_=Qe(t,D=>m(D)),v=p.useRef(null),y=p.useRef(""),x=h.viewport,S=r.content-r.viewport,k=Ut(c),b=Ut(a),T=hd(d,10);function N(D){if(v.current){const M=D.clientX-v.current.left,j=D.clientY-v.current.top;u({x:M,y:j})}}return p.useEffect(()=>{const D=M=>{const j=M.target;(g==null?void 0:g.contains(j))&&k(M,S)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[x,g,S,k]),p.useEffect(b,[r,b]),bl(g,T),bl(h.content,T),p.createElement(Rb,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:Ut(i),onThumbPointerUp:Ut(l),onThumbPositionChange:b,onThumbPointerDown:Ut(s)},p.createElement(Le.div,te({},f,{ref:_,style:{position:"absolute",...f.style},onPointerDown:He(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),v.current=g.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),N(D))}),onPointerMove:He(e.onPointerMove,N),onPointerUp:He(e.onPointerUp,D=>{const M=D.target;M.hasPointerCapture(D.pointerId)&&M.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=y.current,h.viewport&&(h.viewport.style.scrollBehavior=""),v.current=null})})))}),zh="ScrollAreaThumb",Pb=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Dw(zh,e.__scopeScrollArea);return p.createElement(zl,{present:n||o.hasThumb},p.createElement(Ob,te({ref:t},r)))}),Ob=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=Hn(zh,n),l=Dw(zh,n),{onThumbPositionChange:s}=l,a=Qe(t,d=>l.onThumbChange(d)),u=p.useRef(),c=hd(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const d=i.viewport;if(d){const f=()=>{if(c(),!u.current){const h=Db(d,s);u.current=h,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,c,s]),p.createElement(Le.div,te({"data-state":l.hasThumb?"visible":"hidden"},o,{ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:He(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,m=d.clientY-h.top;l.onThumbPointerDown({x:g,y:m})}),onPointerUp:He(e.onPointerUp,l.onThumbPointerUp)}))}),jw="ScrollAreaCorner",Ab=p.forwardRef((e,t)=>{const n=Hn(jw,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.createElement(Mb,te({},e,{ref:t})):null}),Mb=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Hn(jw,n),[i,l]=p.useState(0),[s,a]=p.useState(0),u=!!(i&&s);return bl(o.scrollbarX,()=>{var c;const d=((c=o.scrollbarX)===null||c===void 0?void 0:c.offsetHeight)||0;o.onCornerHeightChange(d),a(d)}),bl(o.scrollbarY,()=>{var c;const d=((c=o.scrollbarY)===null||c===void 0?void 0:c.offsetWidth)||0;o.onCornerWidthChange(d),l(d)}),u?p.createElement(Le.div,te({},r,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function _c(e){return e?parseInt(e,10):0}function zw(e,t){const n=e/t;return isNaN(n)?0:n}function fd(e){const t=zw(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Lb(e,t,n,r="ltr"){const o=fd(n),i=o/2,l=t||i,s=o-l,a=n.scrollbar.paddingStart+l,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return Fw([a,u],d)(e)}function fy(e,t,n="ltr"){const r=fd(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,l=t.content-t.viewport,s=i-r,a=n==="ltr"?[0,l]:[l*-1,0],u=jh(e,a);return Fw([0,l],[0,s])(u)}function Fw(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 Bw(e,t){return e>0&&e<t}const Db=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},l=n.left!==i.left,s=n.top!==i.top;(l||s)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function hd(e,t){const n=Ut(e),r=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),p.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function bl(e,t){const n=Ut(t);bn(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const Ww=Eb,Ib=$b,jb=Ab;function Uw(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=Uw(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Vw(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Uw(e))&&(r&&(r+=" "),r+=t);return r}const zg="-";function zb(e){const t=Bb(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(l){const s=l.split(zg);return s[0]===""&&s.length!==1&&s.shift(),Hw(s,t)||Fb(l)}function i(l,s){const a=n[l]||[];return s&&r[l]?[...a,...r[l]]:a}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function Hw(e,t){var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Hw(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(zg);return(l=t.validators.find(({validator:s})=>s(i)))==null?void 0:l.classGroupId}const hy=/^\[(.+)\]$/;function Fb(e){if(hy.test(e)){const t=hy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Bb(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Ub(Object.entries(e.classGroups),n).forEach(([i,l])=>{Fh(l,r,i,t)}),r}function Fh(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:py(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Wb(o)){Fh(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{Fh(l,py(t,i),n,r)})})}function py(e,t){let n=e;return t.split(zg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Wb(e){return e.isThemeGetter}function Ub(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,s])=>[t+l,s])):i);return[n,o]}):e}function Vb(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const Kw="!";function Hb(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const s=[];let a=0,u=0,c;for(let m=0;m<l.length;m++){let _=l[m];if(a===0){if(_===r&&(n||l.slice(m,m+o)===t)){s.push(l.slice(u,m)),u=m+o;continue}if(_==="/"){c=m;continue}}_==="["?a++:_==="]"&&a--}const d=s.length===0?l:l.substring(u),f=d.startsWith(Kw),h=f?d.substring(1):d,g=c&&c>u?c-u:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:g}}}function Kb(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 Gb(e){return{cache:Vb(e.cacheSize),splitModifiers:Hb(e),...zb(e)}}const Yb=/\s+/;function Xb(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(Yb).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=Kb(s).join(":");return{isTailwindClass:!0,modifierId:a?h+Kw:h,classGroupId:d,originalClassName:l,hasPostfixModifier:f}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:s,classGroupId:a,hasPostfixModifier:u}=l,c=s+a;return i.has(c)?!1:(i.add(c),o(a,u).forEach(d=>i.add(s+d)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function Qb(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Gw(t))&&(r&&(r+=" "),r+=n);return r}function Gw(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Gw(e[r]))&&(n&&(n+=" "),n+=t);return n}function Jb(e,...t){let n,r,o,i=l;function l(a){const u=t.reduce((c,d)=>d(c),e());return n=Gb(u),r=n.cache.get,o=n.cache.set,i=s,s(a)}function s(a){const u=r(a);if(u)return u;const c=Xb(a,n);return o(a,c),c}return function(){return i(Qb.apply(null,arguments))}}function We(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Yw=/^\[(?:([a-z-]+):)?(.+)\]$/i,Zb=/^\d+\/\d+$/,qb=new Set(["px","full","screen"]),eN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tN=/\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$/,nN=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Xn(e){return ni(e)||qb.has(e)||Zb.test(e)}function oo(e){return Fl(e,"length",dN)}function ni(e){return!!e&&!Number.isNaN(Number(e))}function mu(e){return Fl(e,"number",ni)}function ds(e){return!!e&&Number.isInteger(Number(e))}function oN(e){return e.endsWith("%")&&ni(e.slice(0,-1))}function ge(e){return Yw.test(e)}function io(e){return eN.test(e)}const iN=new Set(["length","size","percentage"]);function lN(e){return Fl(e,iN,Xw)}function sN(e){return Fl(e,"position",Xw)}const aN=new Set(["image","url"]);function uN(e){return Fl(e,aN,hN)}function cN(e){return Fl(e,"",fN)}function fs(){return!0}function Fl(e,t,n){const r=Yw.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function dN(e){return tN.test(e)}function Xw(){return!1}function fN(e){return nN.test(e)}function hN(e){return rN.test(e)}function pN(){const e=We("colors"),t=We("spacing"),n=We("blur"),r=We("brightness"),o=We("borderColor"),i=We("borderRadius"),l=We("borderSpacing"),s=We("borderWidth"),a=We("contrast"),u=We("grayscale"),c=We("hueRotate"),d=We("invert"),f=We("gap"),h=We("gradientColorStops"),g=We("gradientColorStopPositions"),m=We("inset"),_=We("margin"),v=We("opacity"),y=We("padding"),x=We("saturate"),S=We("scale"),k=We("sepia"),b=We("skew"),T=We("space"),N=We("translate"),D=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ge,t],B=()=>[ge,t],re=()=>["",Xn,oo],H=()=>["auto",ni,ge],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],E=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",ge],R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[ni,mu],V=()=>[ni,ge];return{cacheSize:500,separator:":",theme:{colors:[fs],spacing:[Xn,oo],blur:["none","",io,ge],brightness:F(),borderColor:[e],borderRadius:["none","","full",io,ge],borderSpacing:B(),borderWidth:re(),contrast:F(),grayscale:O(),hueRotate:V(),invert:O(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[oN,oo],inset:j(),margin:j(),opacity:F(),padding:B(),saturate:F(),scale:F(),sepia:O(),skew:V(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[io]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),ge]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ds,ge]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ge]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",ds,ge]}],"grid-cols":[{"grid-cols":[fs]}],"col-start-end":[{col:["auto",{span:["full",ds,ge]},ge]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[fs]}],"row-start-end":[{row:["auto",{span:[ds,ge]},ge]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",ge,t]}],"min-w":[{"min-w":["min","max","fit",ge,Xn]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[io]},io,ge]}],h:[{h:[ge,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Xn,ge]}],"max-h":[{"max-h":[ge,t,"min","max","fit"]}],"font-size":[{text:["base",io,oo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",mu]}],"font-family":[{font:[fs]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ge]}],"line-clamp":[{"line-clamp":["none",ni,mu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xn,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...C(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xn,oo]}],"underline-offset":[{"underline-offset":["auto",Xn,ge]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],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",ge]}],"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:[...Y(),sN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",lN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uN]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...C(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:C()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...C()]}],"outline-offset":[{"outline-offset":[Xn,ge]}],"outline-w":[{outline:[Xn,oo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Xn,oo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",io,cN]}],"shadow-color":[{shadow:[fs]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":$()}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",io,ge]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ge]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ds,ge]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge]}],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",ge]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xn,oo,mu]}],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 gN=Jb(pN);function st(...e){return gN(Vw(e))}const Is=p.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(Ww,{ref:r,className:st("relative overflow-hidden",e),...n,children:[w.jsx(Ib,{className:"h-full w-full rounded-[inherit]",children:t}),w.jsx(Qw,{}),w.jsx(jb,{})]}));Is.displayName=Ww.displayName;const Qw=p.forwardRef(({className:e,orientation:t="vertical",...n},r)=>w.jsx(Mw,{ref:r,orientation:t,className:st("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:w.jsx(Pb,{className:st("relative rounded-full bg-border",t==="vertical"&&"flex-1")})}));Qw.displayName=Mw.displayName;function js({children:e}){const t=p.useRef(null),n=p.useRef(null),r=p.useRef(!1),o=p.useRef(0),i=p.useRef(null),l=p.useRef(0),s=()=>{r.current=!1,i.current=null,o.current=0,l.current=0},a=_=>{_.preventDefault();const v=i.current==="left"?t:n;if(v.current&&r.current){const y=i.current==="left"?_.screenX-o.current:o.current-_.screenX;v.current.style.width=`${Math.max(l.current+y,150)}px`}},u=_=>v=>{if(v.target){const x=_==="left"?t:_==="right"?n:null;r.current=!0,x&&x.current&&(o.current=v.screenX,i.current=_,x.current&&(l.current=x.current.offsetWidth))}},[c,d,f,h,g,m]=p.Children.toArray(e);return p.useEffect(()=>(document.addEventListener("mouseup",s),document.addEventListener("mousemove",a),()=>{document.removeEventListener("mouseup",s),document.removeEventListener("mousemove",a)}),[]),w.jsxs("div",{className:"flex h-screen",children:[w.jsxs("div",{ref:t,className:"relative border-r border-border",style:{width:300},children:[w.jsxs(js.Column,{children:[c,w.jsx(Is,{style:{height:"calc(100vh - 50px)"},children:d})]}),w.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")})]}),w.jsx("div",{className:dd("",{"w-full":!g&&!m}),children:w.jsxs(js.Column,{children:[f,w.jsx(Is,{style:{height:"calc(100vh - 50px)"},children:h})]})}),g||m&&w.jsxs("div",{ref:n,className:"relative h-screen border-l border-border",style:{width:300},children:[w.jsxs(js.Column,{children:[g,w.jsx(Is,{style:{height:"calc(100vh - 50px)"},children:m})]}),w.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"})]})]})}js.Column=({children:e})=>{const[t,n]=p.Children.toArray(e);return w.jsxs("div",{className:"flex flex-col",children:[w.jsx("div",{className:"flex items-center border-b border-border",children:t}),n]})};const mN=({className:e})=>w.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 9 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[w.jsxs("g",{clipPath:"url(#clip0_1225_1638)",children:[w.jsx("rect",{y:"0.5",width:"9",height:"9"}),w.jsx("path",{d:"M0 7L8.5 5",stroke:"currentColor"}),w.jsx("circle",{cx:"3",cy:"3.5",r:"1",fill:"currentColor"})]}),w.jsx("rect",{x:"0.5",y:"1",width:"8",height:"8",stroke:"currentColor"}),w.jsx("defs",{children:w.jsx("clipPath",{id:"clip0_1225_1638",children:w.jsx("rect",{y:"0.5",width:"9",height:"9",fill:"white"})})})]}),Jw=mN,vN=({className:e})=>w.jsxs("svg",{width:"9",height:"10",viewBox:"0 0 9 10",className:e,fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[w.jsxs("g",{clipPath:"url(#clip0_1222_1618)",children:[w.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.5H0V0.5H9V1.5Z",fill:"currentColor"}),w.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 9.5H0V8.5H9V9.5Z",fill:"currentColor"})]}),w.jsx("defs",{children:w.jsx("clipPath",{id:"clip0_1222_1618",children:w.jsx("rect",{width:"9",height:"9",fill:"white",transform:"translate(0 0.5)"})})})]}),yN=vN,xN=({className:e})=>w.jsx("svg",{width:"9",height:"10",viewBox:"0 0 9 10",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,children:w.jsx("g",{clipPath:"url(#clip0_1229_1625)",children:w.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"})})}),wN=xN;function Zw({children:e,rootPath:t}){return w.jsx("div",{className:"flex flex-col w-full py-2 text-xs",children:p.Children.map(e,n=>p.cloneElement(n,{paths:[t]}))})}Zw.Node=({children:e,paths:t=[],path:n,level:r=1,type:o,setActivePath:i})=>{const l=r*30,s=o==="string"?w.jsx(wN,{}):o==="image"?w.jsx(Jw,{className:"h-[9px] w-[9px]"}):w.jsx(yN,{});return w.jsxs("div",{className:"w-full",children:[w.jsx("button",{className:"flex justify-between w-full group py-2 text-xs font-[400] shrink-0",onClick:()=>{i&&i(n)},style:{paddingLeft:l},children:w.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s,w.jsx("p",{children:n})]})}),e&&w.jsx(w.Fragment,{children:p.Children.map(e,a=>p.cloneElement(a,{level:r+1,paths:[...t,n]}))})]})};function Fg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ti=Fg();function qw(e){Ti=e}const e_=/[&<>"']/,_N=new RegExp(e_.source,"g"),t_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,SN=new RegExp(t_.source,"g"),EN={"&":"&","<":"<",">":">",'"':""","'":"'"},gy=e=>EN[e];function _n(e,t){if(t){if(e_.test(e))return e.replace(_N,gy)}else if(t_.test(e))return e.replace(SN,gy);return e}const CN=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function $N(e){return e.replace(CN,(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 kN=/(^|[^\[])\^/g;function Oe(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(kN,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function my(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Sc={exec:()=>null};function vy(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let a=!1,u=l;for(;--u>=0&&s[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(/\\\|/g,"|");return r}function vu(e,t,n){const r=e.length;if(r===0)return"";let o=0;for(;o<r;){const i=e.charAt(r-o-1);if(i===t&&!n)o++;else if(i!==t&&n)o++;else break}return e.slice(0,r-o)}function TN(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function yy(e,t,n,r){const o=t.href,i=t.title?_n(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const s={type:"link",raw:n,href:o,title:i,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,s}return{type:"image",raw:n,href:o,title:i,text:_n(l)}}function bN(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
|
|
48
|
-
`).map(o=>{const i=o.match(/^\s+/);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(`
|
|
49
|
-
`)}class Ec{constructor(t){Be(this,"options");Be(this,"rules");Be(this,"lexer");this.options=t||Ti}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:vu(r,`
|
|
50
|
-
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=bN(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=vu(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=vu(n[0].replace(/^ *>[ \t]?/gm,""),`
|
|
51
|
-
`),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",a="",u=!1;for(;t;){let c=!1;if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;s=n[0],t=t.substring(s.length);let d=n[2].split(`
|
|
52
|
-
`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),f=t.split(`
|
|
53
|
-
`,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 g=!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+|$)`),x=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),S=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;t;){const k=t.split(`
|
|
55
|
-
`,1)[0];if(f=k,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),x.test(f)||S.test(f)||v.test(f)||y.test(t))break;if(f.search(/[^ ]/)>=h||!f.trim())a+=`
|
|
56
|
-
`+f.slice(h);else{if(g||d.search(/[^ ]/)>=4||x.test(d)||S.test(d)||y.test(d))break;a+=`
|
|
57
|
-
`+f}!g&&!f.trim()&&(g=!0),s+=k+`
|
|
58
|
-
`,t=t.substring(k.length+1),d=f.slice(h)}}i.loose||(u?i.loose=!0:/\n *\n *$/.test(s)&&(u=!0));let m=null,_;this.options.gfm&&(m=/^\[[ xX]\] /.exec(a),m&&(_=m[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!m,checked:_,loose:!1,text:a,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=a.trimEnd(),i.raw=i.raw.trimEnd();for(let c=0;c<i.items.length;c++)if(this.lexer.state.top=!1,i.items[c].tokens=this.lexer.blockTokens(i.items[c].text,[]),!i.loose){const d=i.items[c].tokens.filter(h=>h.type==="space"),f=d.length>0&&d.some(h=>/\n.*\n/.test(h.raw));i.loose=f}if(i.loose)for(let c=0;c<i.items.length;c++)i.items[c].loose=!0;return i}}html(t){const n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){const n=this.rules.block.def.exec(t);if(n){const r=n[1].toLowerCase().replace(/\s+/g," "),o=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:vy(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
59
|
-
`):[]};if(r.header.length===r.align.length){let o=r.align.length,i,l,s,a;for(i=0;i<o;i++){const u=r.align[i];u&&(/^ *-+: *$/.test(u)?r.align[i]="right":/^ *:-+: *$/.test(u)?r.align[i]="center":/^ *:-+ *$/.test(u)?r.align[i]="left":r.align[i]=null)}for(o=r.rows.length,i=0;i<o;i++)r.rows[i]=vy(r.rows[i],r.header.length).map(u=>({text:u,tokens:[]}));for(o=r.header.length,l=0;l<o;l++)r.header[l].tokens=this.lexer.inline(r.header[l].text);for(o=r.rows.length,l=0;l<o;l++)for(a=r.rows[l],s=0;s<a.length;s++)a[s].tokens=this.lexer.inline(a[s].text);return r}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r=n[1].charAt(n[1].length-1)===`
|
|
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:_n(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=vu(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=TN(n[2],"()");if(l>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l&&(o=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^</.test(o)&&(this.options.pedantic&&!/>$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),yy(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return yy(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...o[0]].length-1;let s,a,u=l,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+l);(o=d.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(a=[...s].length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&l%3&&!((l+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const f=[...o[0]][0].length,h=t.slice(0,l+o.index+f+a);if(Math.min(l,a)%2){const m=h.slice(1,-1);return{type:"em",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}const g=h.slice(2,-2);return{type:"strong",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=_n(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=_n(n[1]),o="mailto:"+r):(r=_n(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=_n(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=_n(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=_n(n[0]),{type:"text",raw:n[0],text:r}}}}const se={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:Sc,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]+/};se._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;se.def=Oe(se.def).replace("label",se._label).replace("title",se._title).getRegex();se.bullet=/(?:[*+-]|\d{1,9}[.)])/;se.listItemStart=Oe(/^( *)(bull) */).replace("bull",se.bullet).getRegex();se.list=Oe(se.list).replace(/bull/g,se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+se.def.source+")").getRegex();se._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";se._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;se.html=Oe(se.html,"i").replace("comment",se._comment).replace("tag",se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();se.lheading=Oe(se.lheading).replace(/bull/g,se.bullet).getRegex();se.paragraph=Oe(se._paragraph).replace("hr",se.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",se._tag).getRegex();se.blockquote=Oe(se.blockquote).replace("paragraph",se.paragraph).getRegex();se.normal={...se};se.gfm={...se.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};se.gfm.table=Oe(se.gfm.table).replace("hr",se.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",se._tag).getRegex();se.gfm.paragraph=Oe(se._paragraph).replace("hr",se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",se.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",se._tag).getRegex();se.pedantic={...se.normal,html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",se._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:Sc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Oe(se.normal._paragraph).replace("hr",se.hr).replace("heading",` *#{1,6} *[^
|
|
61
|
-
]`).replace("lheading",se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const X={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Sc,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:Sc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/};X._punctuation="\\p{P}$+<=>`^|~";X.punctuation=Oe(X.punctuation,"u").replace(/punctuation/g,X._punctuation).getRegex();X.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;X.anyPunctuation=/\\[punct]/g;X._escapes=/\\([punct])/g;X._comment=Oe(se._comment).replace("(?:-->|$)","-->").getRegex();X.emStrong.lDelim=Oe(X.emStrong.lDelim,"u").replace(/punct/g,X._punctuation).getRegex();X.emStrong.rDelimAst=Oe(X.emStrong.rDelimAst,"gu").replace(/punct/g,X._punctuation).getRegex();X.emStrong.rDelimUnd=Oe(X.emStrong.rDelimUnd,"gu").replace(/punct/g,X._punctuation).getRegex();X.anyPunctuation=Oe(X.anyPunctuation,"gu").replace(/punct/g,X._punctuation).getRegex();X._escapes=Oe(X._escapes,"gu").replace(/punct/g,X._punctuation).getRegex();X._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;X._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])?)+(?![-_])/;X.autolink=Oe(X.autolink).replace("scheme",X._scheme).replace("email",X._email).getRegex();X._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;X.tag=Oe(X.tag).replace("comment",X._comment).replace("attribute",X._attribute).getRegex();X._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;X._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;X._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;X.link=Oe(X.link).replace("label",X._label).replace("href",X._href).replace("title",X._title).getRegex();X.reflink=Oe(X.reflink).replace("label",X._label).replace("ref",se._label).getRegex();X.nolink=Oe(X.nolink).replace("ref",se._label).getRegex();X.reflinkSearch=Oe(X.reflinkSearch,"g").replace("reflink",X.reflink).replace("nolink",X.nolink).getRegex();X.normal={...X};X.pedantic={...X.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:Oe(/^!?\[(label)\]\((.*?)\)/).replace("label",X._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X._label).getRegex()};X.gfm={...X.normal,escape:Oe(X.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.!#$%&'*+\/=?_`{\|}~-]+@)))/};X.gfm.url=Oe(X.gfm.url,"i").replace("email",X.gfm._extended_email).getRegex();X.breaks={...X.gfm,br:Oe(X.br).replace("{2,}","*").getRegex(),text:Oe(X.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class gr{constructor(t){Be(this,"tokens");Be(this,"options");Be(this,"state");Be(this,"tokenizer");Be(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ti,this.options.tokenizer=this.options.tokenizer||new Ec,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:se.normal,inline:X.normal};this.options.pedantic?(n.block=se.pedantic,n.inline=X.pedantic):this.options.gfm&&(n.block=se.gfm,this.options.breaks?n.inline=X.breaks:n.inline=X.gfm),this.tokenizer.rules=n}static get rules(){return{block:se,inline:X}}static lex(t,n){return new gr(n).lex(t)}static lexInline(t,n){return new gr(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
62
|
-
`),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(s,a,u)=>a+" ".repeat(u.length));let r,o,i,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
63
|
-
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
|
|
64
|
-
`+r.raw,o.text+=`
|
|
65
|
-
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
|
|
66
|
-
`+r.raw,o.text+=`
|
|
67
|
-
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const a=t.slice(1);let u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(s=Math.min(s,u))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],l&&o.type==="paragraph"?(o.raw+=`
|
|
68
|
-
`+r.raw,o.text+=`
|
|
69
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),l=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=`
|
|
70
|
-
`+r.raw,o.text+=`
|
|
71
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,l=t,s,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(h=>{f=h.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(i=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Cc{constructor(t){Be(this,"options");this.options=t||Ti}code(t,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+`
|
|
72
|
-
`,o?'<pre><code class="language-'+_n(o)+'">'+(r?t:_n(t,!0))+`</code></pre>
|
|
73
|
-
`:"<pre><code>"+(r?t:_n(t,!0))+`</code></pre>
|
|
74
|
-
`}blockquote(t){return`<blockquote>
|
|
75
|
-
${t}</blockquote>
|
|
76
|
-
`}html(t,n){return t}heading(t,n,r){return`<h${n}>${t}</h${n}>
|
|
77
|
-
`}hr(){return`<hr>
|
|
78
|
-
`}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`>
|
|
79
|
-
`+t+"</"+o+`>
|
|
80
|
-
`}listitem(t,n,r){return`<li>${t}</li>
|
|
81
|
-
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
|
|
82
|
-
`}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
83
|
-
<thead>
|
|
84
|
-
`+t+`</thead>
|
|
85
|
-
`+n+`</table>
|
|
86
|
-
`}tablerow(t){return`<tr>
|
|
87
|
-
${t}</tr>
|
|
88
|
-
`}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 o=my(t);if(o===null)return r;t=o;let i='<a href="'+t+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){const o=my(t);if(o===null)return r;t=o;let i=`<img src="${t}" alt="${r}"`;return n&&(i+=` title="${n}"`),i+=">",i}text(t){return t}}class Bg{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class mr{constructor(t){Be(this,"options");Be(this,"renderer");Be(this,"textRenderer");this.options=t||Ti,this.options.renderer=this.options.renderer||new Cc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Bg}static parse(t,n){return new mr(n).parse(t)}static parseInline(t,n){return new mr(n).parseInline(t)}parse(t,n=!0){let r="";for(let o=0;o<t.length;o++){const i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const l=i,s=this.options.extensions.renderers[l.type].call({parser:this},l);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){r+=s||"";continue}}switch(i.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{const l=i;r+=this.renderer.heading(this.parseInline(l.tokens),l.depth,$N(this.parseInline(l.tokens,this.textRenderer)));continue}case"code":{const l=i;r+=this.renderer.code(l.text,l.lang,!!l.escaped);continue}case"table":{const l=i;let s="",a="";for(let c=0;c<l.header.length;c++)a+=this.renderer.tablecell(this.parseInline(l.header[c].tokens),{header:!0,align:l.align[c]});s+=this.renderer.tablerow(a);let u="";for(let c=0;c<l.rows.length;c++){const d=l.rows[c];a="";for(let f=0;f<d.length;f++)a+=this.renderer.tablecell(this.parseInline(d[f].tokens),{header:!1,align:l.align[f]});u+=this.renderer.tablerow(a)}r+=this.renderer.table(s,u);continue}case"blockquote":{const l=i,s=this.parse(l.tokens);r+=this.renderer.blockquote(s);continue}case"list":{const l=i,s=l.ordered,a=l.start,u=l.loose;let c="";for(let d=0;d<l.items.length;d++){const f=l.items[d],h=f.checked,g=f.task;let m="";if(f.task){const _=this.renderer.checkbox(!!h);u?f.tokens.length>0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=_+" "+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=_+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:_+" "}):m+=_+" "}m+=this.parse(f.tokens,u),c+=this.renderer.listitem(m,g,!!h)}r+=this.renderer.list(c,s,a);continue}case"html":{const l=i;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=i;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=i,s=l.tokens?this.parseInline(l.tokens):l.text;for(;o+1<t.length&&t[o+1].type==="text";)l=t[++o],s+=`
|
|
90
|
-
`+(l.tokens?this.parseInline(l.tokens):l.text);r+=n?this.renderer.paragraph(s):s;continue}default:{const l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}parseInline(t,n){n=n||this.renderer;let r="";for(let o=0;o<t.length;o++){const i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=l||"";continue}}switch(i.type){case"escape":{const l=i;r+=n.text(l.text);break}case"html":{const l=i;r+=n.html(l.text);break}case"link":{const l=i;r+=n.link(l.href,l.title,this.parseInline(l.tokens,n));break}case"image":{const l=i;r+=n.image(l.href,l.title,l.text);break}case"strong":{const l=i;r+=n.strong(this.parseInline(l.tokens,n));break}case"em":{const l=i;r+=n.em(this.parseInline(l.tokens,n));break}case"codespan":{const l=i;r+=n.codespan(l.text);break}case"br":{r+=n.br();break}case"del":{const l=i;r+=n.del(this.parseInline(l.tokens,n));break}case"text":{const l=i;r+=n.text(l.text);break}default:{const l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}}class zs{constructor(t){Be(this,"options");this.options=t||Ti}preprocess(t){return t}postprocess(t){return t}}Be(zs,"passThroughHooks",new Set(["preprocess","postprocess"]));var Na,Bh,Yc,n_;class NN{constructor(...t){Hd(this,Na);Hd(this,Yc);Be(this,"defaults",Fg());Be(this,"options",this.setOptions);Be(this,"parse",Xa(this,Na,Bh).call(this,gr.lex,mr.parse));Be(this,"parseInline",Xa(this,Na,Bh).call(this,gr.lexInline,mr.parseInline));Be(this,"Parser",mr);Be(this,"Renderer",Cc);Be(this,"TextRenderer",Bg);Be(this,"Lexer",gr);Be(this,"Tokenizer",Ec);Be(this,"Hooks",zs);this.use(...t)}walkTokens(t,n){var o,i;let r=[];for(const l of t)switch(r=r.concat(n.call(this,l)),l.type){case"table":{const s=l;for(const a of s.header)r=r.concat(this.walkTokens(a.tokens,n));for(const a of s.rows)for(const u of a)r=r.concat(this.walkTokens(u.tokens,n));break}case"list":{const s=l;r=r.concat(this.walkTokens(s.items,n));break}default:{const s=l;(i=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{r=r.concat(this.walkTokens(s[a],n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=n.renderers[i.name];l?n.renderers[i.name]=function(...s){let a=i.renderer.apply(this,s);return a===!1&&(a=l.apply(this,s)),a}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[i.level];l?l.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new Cc(this.defaults);for(const l in r.renderer){const s=r.renderer[l],a=l,u=i[a];i[a]=(...c)=>{let d=s.apply(i,c);return d===!1&&(d=u.apply(i,c)),d||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new Ec(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],a=l,u=i[a];i[a]=(...c)=>{let d=s.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new zs;for(const l in r.hooks){const s=r.hooks[l],a=l,u=i[a];zs.passThroughHooks.has(l)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(s.call(i,c)).then(f=>u.call(i,f));const d=s.call(i,c);return u.call(i,d)}:i[a]=(...c)=>{let d=s.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(s){let a=[];return a.push(l.call(this,s)),i&&(a=a.concat(i.call(this,s))),a}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return gr.lex(t,n??this.defaults)}parser(t,n){return mr.parse(t,n??this.defaults)}}Na=new WeakSet,Bh=function(t,n){return(r,o)=>{const i={...o},l={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const s=Xa(this,Yc,n_).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)}}},Yc=new WeakSet,n_=function(t,n){return r=>{if(r.message+=`
|
|
91
|
-
Please report this to https://github.com/markedjs/marked.`,t){const o="<p>An error occurred:</p><pre>"+_n(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const gi=new NN;function Me(e,t){return gi.parse(e,t)}Me.options=Me.setOptions=function(e){return gi.setOptions(e),Me.defaults=gi.defaults,qw(Me.defaults),Me};Me.getDefaults=Fg;Me.defaults=Ti;Me.use=function(...e){return gi.use(...e),Me.defaults=gi.defaults,qw(Me.defaults),Me};Me.walkTokens=function(e,t){return gi.walkTokens(e,t)};Me.parseInline=gi.parseInline;Me.Parser=mr;Me.parser=mr.parse;Me.Renderer=Cc;Me.TextRenderer=Bg;Me.Lexer=gr;Me.lexer=gr.lex;Me.Tokenizer=Ec;Me.Hooks=zs;Me.parse=Me;Me.options;Me.setOptions;Me.use;Me.walkTokens;Me.parseInline;mr.parse;const RN=gr.lex;function pa(){pa=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(C,$,E){C[$]=E.value},i=typeof Symbol=="function"?Symbol:{},l=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(C,$,E){return Object.defineProperty(C,$,{value:E,enumerable:!0,configurable:!0,writable:!0}),C[$]}try{u({},"")}catch{u=function($,E,O){return $[E]=O}}function c(C,$,E,O){var R=$&&$.prototype instanceof v?$:v,F=Object.create(R.prototype),V=new H(O||[]);return o(F,"_invoke",{value:M(C,E,V)}),F}function d(C,$,E){try{return{type:"normal",arg:C.call($,E)}}catch(O){return{type:"throw",arg:O}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",g="executing",m="completed",_={};function v(){}function y(){}function x(){}var S={};u(S,l,function(){return this});var k=Object.getPrototypeOf,b=k&&k(k(Y([])));b&&b!==n&&r.call(b,l)&&(S=b);var T=x.prototype=v.prototype=Object.create(S);function N(C){["next","throw","return"].forEach(function($){u(C,$,function(E){return this._invoke($,E)})})}function D(C,$){function E(R,F,V,ae){var oe=d(C[R],C,F);if(oe.type!=="throw"){var $e=oe.arg,_e=$e.value;return _e&&typeof _e=="object"&&r.call(_e,"__await")?$.resolve(_e.__await).then(function(Q){E("next",Q,V,ae)},function(Q){E("throw",Q,V,ae)}):$.resolve(_e).then(function(Q){$e.value=Q,V($e)},function(Q){return E("throw",Q,V,ae)})}ae(oe.arg)}var O;o(this,"_invoke",{value:function(R,F){function V(){return new $(function(ae,oe){E(R,F,ae,oe)})}return O=O?O.then(V,V):V()}})}function M(C,$,E){var O=f;return function(R,F){if(O===g)throw new Error("Generator is already running");if(O===m){if(R==="throw")throw F;return{value:e,done:!0}}for(E.method=R,E.arg=F;;){var V=E.delegate;if(V){var ae=j(V,E);if(ae){if(ae===_)continue;return ae}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(O===f)throw O=m,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);O=g;var oe=d(C,$,E);if(oe.type==="normal"){if(O=E.done?m:h,oe.arg===_)continue;return{value:oe.arg,done:E.done}}oe.type==="throw"&&(O=m,E.method="throw",E.arg=oe.arg)}}}function j(C,$){var E=$.method,O=C.iterator[E];if(O===e)return $.delegate=null,E==="throw"&&C.iterator.return&&($.method="return",$.arg=e,j(C,$),$.method==="throw")||E!=="return"&&($.method="throw",$.arg=new TypeError("The iterator does not provide a '"+E+"' method")),_;var R=d(O,C.iterator,$.arg);if(R.type==="throw")return $.method="throw",$.arg=R.arg,$.delegate=null,_;var F=R.arg;return F?F.done?($[C.resultName]=F.value,$.next=C.nextLoc,$.method!=="return"&&($.method="next",$.arg=e),$.delegate=null,_):F:($.method="throw",$.arg=new TypeError("iterator result is not an object"),$.delegate=null,_)}function B(C){var $={tryLoc:C[0]};1 in C&&($.catchLoc=C[1]),2 in C&&($.finallyLoc=C[2],$.afterLoc=C[3]),this.tryEntries.push($)}function re(C){var $=C.completion||{};$.type="normal",delete $.arg,C.completion=$}function H(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(B,this),this.reset(!0)}function Y(C){if(C||C===""){var $=C[l];if($)return $.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var E=-1,O=function R(){for(;++E<C.length;)if(r.call(C,E))return R.value=C[E],R.done=!1,R;return R.value=e,R.done=!0,R};return O.next=O}}throw new TypeError(typeof C+" is not iterable")}return y.prototype=x,o(T,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:y,configurable:!0}),y.displayName=u(x,a,"GeneratorFunction"),t.isGeneratorFunction=function(C){var $=typeof C=="function"&&C.constructor;return!!$&&($===y||($.displayName||$.name)==="GeneratorFunction")},t.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,x):(C.__proto__=x,u(C,a,"GeneratorFunction")),C.prototype=Object.create(T),C},t.awrap=function(C){return{__await:C}},N(D.prototype),u(D.prototype,s,function(){return this}),t.AsyncIterator=D,t.async=function(C,$,E,O,R){R===void 0&&(R=Promise);var F=new D(c(C,$,E,O),R);return t.isGeneratorFunction($)?F:F.next().then(function(V){return V.done?V.value:F.next()})},N(T),u(T,a,"Generator"),u(T,l,function(){return this}),u(T,"toString",function(){return"[object Generator]"}),t.keys=function(C){var $=Object(C),E=[];for(var O in $)E.push(O);return E.reverse(),function R(){for(;E.length;){var F=E.pop();if(F in $)return R.value=F,R.done=!1,R}return R.done=!0,R}},t.values=Y,H.prototype={constructor:H,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(re),!C)for(var $ in this)$.charAt(0)==="t"&&r.call(this,$)&&!isNaN(+$.slice(1))&&(this[$]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var $=this;function E(oe,$e){return F.type="throw",F.arg=C,$.next=oe,$e&&($.method="next",$.arg=e),!!$e}for(var O=this.tryEntries.length-1;O>=0;--O){var R=this.tryEntries[O],F=R.completion;if(R.tryLoc==="root")return E("end");if(R.tryLoc<=this.prev){var V=r.call(R,"catchLoc"),ae=r.call(R,"finallyLoc");if(V&&ae){if(this.prev<R.catchLoc)return E(R.catchLoc,!0);if(this.prev<R.finallyLoc)return E(R.finallyLoc)}else if(V){if(this.prev<R.catchLoc)return E(R.catchLoc,!0)}else{if(!ae)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return E(R.finallyLoc)}}}},abrupt:function(C,$){for(var E=this.tryEntries.length-1;E>=0;--E){var O=this.tryEntries[E];if(O.tryLoc<=this.prev&&r.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var R=O;break}}R&&(C==="break"||C==="continue")&&R.tryLoc<=$&&$<=R.finallyLoc&&(R=null);var F=R?R.completion:{};return F.type=C,F.arg=$,R?(this.method="next",this.next=R.finallyLoc,_):this.complete(F)},complete:function(C,$){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&$&&(this.next=$),_},finish:function(C){for(var $=this.tryEntries.length-1;$>=0;--$){var E=this.tryEntries[$];if(E.finallyLoc===C)return this.complete(E.completion,E.afterLoc),re(E),_}},catch:function(C){for(var $=this.tryEntries.length-1;$>=0;--$){var E=this.tryEntries[$];if(E.tryLoc===C){var O=E.completion;if(O.type==="throw"){var R=O.arg;re(E)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(C,$,E){return this.delegate={iterator:Y(C),resultName:$,nextLoc:E},this.method==="next"&&(this.arg=e),_}},t}function Wh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wg(e,t){if(e){if(typeof e=="string")return Wh(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 Wh(e,t)}}function PN(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Wg(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(a){throw a},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
92
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,l=!1,s;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return i=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function ON(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 AN(e){var t=ON(e,"string");return typeof t=="symbol"?t:String(t)}function Wt(e,t,n){return t=AN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MN(e){if(Array.isArray(e))return e}function LN(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,l,s=[],a=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);a=!0);}catch(c){u=!0,o=c}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw o}}return s}}function DN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
93
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IN(e,t){return MN(e)||LN(e,t)||Wg(e,t)||DN()}function xy(e,t,n,r,o,i,l){try{var s=e[i](l),a=s.value}catch(u){n(u);return}s.done?t(a):Promise.resolve(a).then(r,o)}function r_(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(a){xy(i,r,o,l,s,"next",a)}function s(a){xy(i,r,o,l,s,"throw",a)}l(void 0)})}}function jN(e){if(Array.isArray(e))return Wh(e)}function zN(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FN(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
94
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uh(e){return jN(e)||zN(e)||Wg(e)||FN()}var BN=/^data:(image\/(png|jpeg|jpg|gif|webp|bmp|tiff|ico|svg\+xml));base64,/;function Ug(e){var t=BN.exec(e);if(t&&t[1])return t[1]}function Vg(e){return e==="image/svg+xml"?"svg":e==="image/vnd.microsoft.icon"?"ico":e.startsWith("image/")?e.slice(6):e}var WN=/^h([\d+])$/;function UN(e){var t=e.children.map(VN);return HN(t)}function VN(e){if(e.type==="heading"){var t,n="",r=Number((t=e.tag.match(WN))===null||t===void 0?void 0:t[1]);if(Number.isNaN(r))throw new Error("Invalid header depth");for(var o=0;o<Number(r);o++)n+="#";var i=["".concat(n," ")];return{type:"block",children:i.concat.apply(i,Uh(e.children.map(Hh)))}}else{if(e.type==="paragraph")return e.children.length===0?{type:"block",children:["<br />"]}:{type:"block",children:e.children.map(function(s){return Hh(s)})};if(e.type==="list")return{type:"block",children:e.children.flatMap(function(s,a){return i_(l_(e),s,0,a===0)})};var l=e;throw new Error("Unhandled node type: ".concat("type"in l?"exhaustiveCheck.type":"unknown"))}}function HN(e){return Vh.apply(this,arguments)}function Vh(){return Vh=r_(pa().mark(function e(t){var n,r,o,i,l,s,a,u,c;return pa().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:n=[`
|
|
95
|
-
`],r=[],o={},i=0;case 4:if(!(i<t.length)){f.next=44;break}l=t[i],s=PN(l.children),f.prev=7,s.s();case 9:if((a=s.n()).done){f.next=32;break}if(u=a.value,typeof u!="string"){f.next=15;break}n[n.length-1]+=u,f.next=30;break;case 15:if(u.type!=="image"){f.next=23;break}return f.t0=r,f.next=19,XN(u,o);case 19:f.t1=f.sent,f.t0.push.call(f.t0,f.t1),f.next=29;break;case 23:if(u.type!=="link"){f.next=27;break}r.push(JN(u)),f.next=29;break;case 27:throw c=u,new Error("Unexpected node type: ".concat(JSON.stringify(c,null,2)));case 29:n.push("");case 30:f.next=9;break;case 32:f.next=37;break;case 34:f.prev=34,f.t2=f.catch(7),s.e(f.t2);case 37:return f.prev=37,s.f(),f.finish(37);case 40:i===t.length-1?n[n.length-1]+=`
|
|
96
|
-
`:n[n.length-1]+=`
|
|
97
|
-
|
|
98
|
-
`;case 41:i++,f.next=4;break;case 44:return f.abrupt("return",Wt(Wt(Wt(Wt({},Ht,"richtext"),"templateStrings",n),"exprs",r),"files",o));case 45:case"end":return f.stop()}},e,null,[[7,34,37,40]])})),Vh.apply(this,arguments)}function o_(e){var t=typeof e.format=="number"?GN(e.format):[],n=e.text.trimStart(),r=e.text.length-n.length;n=n.trimEnd();var o=e.text.length-n.length-r;return t.includes("bold")&&t.includes("italic")?n="***".concat(n,"***"):t.includes("bold")?n="**".concat(n,"**"):t.includes("italic")&&(n="_".concat(n,"_")),t.includes("line-through")&&(n="~~".concat(n,"~~")),"".concat(" ".repeat(r)).concat(n).concat(" ".repeat(o))}function Hh(e){return e.type==="text"?o_(e):e.type==="linebreak"?`
|
|
99
|
-
`:e}function i_(e,t,n){var r,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=o?"":`
|
|
100
|
-
`,l=["".concat(i).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 i_(l_(s),a,n+4)}):[Hh(s)]}))}function l_(e){if(e.listType==="bullet")return"-";if(e.listType==="number")return"1.";throw new Error("Unhandled list type: ".concat(e.listType))}var KN={bold:1,italic:2,"line-through":4};function GN(e){return Object.entries(KN).flatMap(function(t){var n=IN(t,2),r=n[0],o=n[1];return(o&e)===o?[r]:[]})}var YN=new TextEncoder;function XN(e,t){return Kh.apply(this,arguments)}function Kh(){return Kh=r_(pa().mark(function e(t,n){var r,o,i,l,s;return pa().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!t.src.startsWith("data:")){u.next=13;break}return u.next=3,Kt.getSHA256Hash(YN.encode(t.src));case 3:if(r=u.sent,o=Ug(t.src),o!==void 0){u.next=7;break}throw new Error("Could not detect Mime Type for image: ".concat(t.src));case 7:return i=Vg(o),l="/public/".concat(r,".").concat(i),n[l]=t.src,u.abrupt("return",Wt(Wt(Wt({},Ht,"file"),vn,l),"metadata",{width:t.width||0,height:t.height||0,sha256:r||""}));case 13:return s=QN("sha256",t.src),u.abrupt("return",Wt(Wt(Wt({},Ht,"file"),vn,"/public".concat(t.src.split("?")[0])),"metadata",{width:t.width||0,height:t.height||0,sha256:s||""}));case 15:case"end":return u.stop()}},e)})),Kh.apply(this,arguments)}function QN(e,t){var n=t.split("?");if(!(n.length<2)){var r=n[1],o=new URLSearchParams(r);if(o.has(e))return o.get(e)}}function JN(e){return Wt(Wt(Wt({},Ht,"link"),"href",e.url),"children",e.children.map(o_))}function wy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wy(Object(n),!0).forEach(function(r){Wt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var lr={version:1,format:"",indent:0,direction:null};function Bl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(typeof e=="string")return Xe(Xe({},lr),{},{type:"text",format:"",text:e});if("tag"in e)switch(e.tag){case"h1":return Di(e);case"h2":return Di(e);case"h3":return Di(e);case"h4":return Di(e);case"h5":return Di(e);case"h6":return Di(e);case"li":return r2(e);case"p":return t2(e);case"ul":return _y(e);case"ol":return _y(e);case"span":return s_(e);case"a":return qN(e);case"img":return ZN(e);case"br":return t?Xe(Xe({},lr),{},{type:"linebreak"}):n2();default:throw Error("Unexpected node tag: "+JSON.stringify(e,null,2))}else throw Error("Unexpected node: "+JSON.stringify(e,null,2))}function ZN(e){var t=e.src;return Xe(Xe({},lr),{},{type:"image",src:t,width:e.width,height:e.height})}function qN(e){return Xe(Xe({},lr),{},{type:"link",url:e.href,children:e.children.map(function(t){return Bl(t)})})}function e2(e){return Xe(Xe({},lr),{},{format:"",type:"root",children:e.children.map(function(t){return Bl(t)})})}function Di(e){return Xe(Xe({},lr),{},{type:"heading",tag:e.tag,children:e.children.map(function(t){return Bl(t)})})}function t2(e){return Xe(Xe({},lr),{},{type:"paragraph",children:e.children.map(function(t){return Bl(t,!0)})})}function n2(){return Xe(Xe({},lr),{},{type:"paragraph",children:[]})}function r2(e){return Xe(Xe({},lr),{},{type:"listitem",children:e.children.map(function(t){return Bl(t,!0)})})}function _y(e){return Xe(Xe({},lr),{},{type:"list",listType:e.tag==="ol"?"number":"bullet",children:e.children.map(function(t){return Bl(t)})},e.dir?{direction:e.dir}:{direction:null})}var o2={bold:1,italic:2,"line-through":4};function i2(e){return e.reduce(function(t,n){return t|o2[n]},0)}function s_(e){var t=e.children[0];return typeof t=="string"?Xe(Xe({},lr),{},{type:"text",text:t,format:i2(e.classes)}):s_(Xe(Xe({},t),{},{classes:e.classes.concat(t.classes)}))}var $c='<val value="',Gh='">',Yh="</val>";function Qn(e,t,n){for(var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=[],i=function(){var a=e[n];if(a.type==="heading")o.push({tag:"h".concat(a.depth),children:Qn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="paragraph")o.push({tag:"p",children:Qn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="strong")o.push({tag:"span",classes:["bold"],children:Qn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="em")o.push({tag:"span",classes:["italic"],children:Qn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="del")o.push({tag:"span",classes:["line-through"],children:Qn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="text")if("tokens"in a&&Array.isArray(a.tokens))o.push.apply(o,Uh(Qn(a.tokens,t,n,r).children));else if(r&&typeof a.raw=="string"){var u=a.raw.split(`
|
|
101
|
-
`),c=u.flatMap(function(S,k){return k===u.length-1?[S]:[S,{tag:"br",children:[]}]});o.push.apply(o,Uh(c))}else o.push(a.raw);else if(a.type==="list")o.push({tag:a.ordered?"ol":"ul",children:Qn(a.items,t,0).children});else if(a.type==="list_item")o.push({tag:"li",children:Qn(a.tokens?a.tokens:[],t,0,!0).children});else if(a.type!=="space")if(a.type==="html"){if(a.text===Yh)return{v:{children:o,cursor:n}};var d=a.text.indexOf(Gh);if(a.text.startsWith($c)&&d>-1){var f=Number(a.text.slice($c.length,d));if(Number.isNaN(f))throw Error("Illegal val intermediate node: ".concat(JSON.stringify(a)));var h=Qn(e.map(function(S){return S.type==="link"||S.type==="list"?{type:"text",raw:S.raw,text:S.raw}:S}),t,n+1),g=h.children,m=h.cursor,_=t[f];if(_._type==="link")o.push({tag:"a",href:_.href,children:g});else if(_._type==="file"){var v,y;o.push({tag:"img",src:Kt.convertFileSource(_).url,width:(v=_.metadata)===null||v===void 0?void 0:v.width,height:(y=_.metadata)===null||y===void 0?void 0:y.height,children:[]})}n=m}var x=/<br\s*\/?>/gi;a.text.trim().match(x)&&o.push({tag:"br",children:[]})}else a.type==="link"?a.raw===a.href?o.push(a.raw):o.push({tag:"a",href:a.href,children:Qn(a.tokens?a.tokens:[],t,0).children}):a.type==="br"?o.push({tag:"br",children:[]}):console.error("Could not parse markdown: unsupported token type: ".concat(a.type,". Found: ").concat(a.raw));n++},l;n<e.length;)if(l=i(),l)return l.v;return{children:o,cursor:n}}function a_(e){var t=e.templateStrings,n=e.exprs,r=t.flatMap(function(a,u){var c=n[u];return c?c[Ht]==="link"?a.concat("".concat($c).concat(u).concat(Gh).concat(c.children[0]).concat(Yh)):a.concat("".concat($c).concat(u).concat(Gh).concat(Yh)):a}).join(""),o=RN(r,{gfm:!0}),i=Qn(o,n,0),l=i.children,s=i.cursor;if(s!==o.length)throw Error("Unexpectedly terminated markdown parsing. Possible reason: unclosed html tag?");return Wt(Wt({},Ht,"richtext"),"children",l)}Kt.VAL_SESSION_COOKIE;Kt.VAL_STATE_COOKIE;Kt.VAL_ENABLE_COOKIE_NAME;var un={},I={};let pd={},u_={},ga={},Fs={},Xh={},pl={},Hg={},Qh={},ma={},va={},yo={},Kg={},Gg={},c_={},d_={},f_={},h_={},p_={},g_={},m_={},kc={},v_={},y_={},x_={},w_={},__={},S_={},E_={},C_={},$_={},Yg={},Xg={},Jh={},k_={},T_={},b_={};function K(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let Zr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",l2=Zr&&"documentMode"in document?document.documentMode:null,Ft=Zr&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Ao=Zr&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Tc=Zr&&"InputEvent"in window&&!l2?"getTargetRanges"in new window.InputEvent("input"):!1,Qg=Zr&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),gd=Zr&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,s2=Zr&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Jg=Zr&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!s2,md=Qg||gd||Jg?" ":"",a2=Ao?" ":md,u2=/^[^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]/,c2=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,li={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},d2={directionless:1,unmergeable:2},Sy={center:2,end:6,justify:4,left:1,right:3,start:5},f2={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},h2={normal:0,segmented:2,token:1},p2={0:"normal",2:"segmented",1:"token"},Zh=!1,Zg=0;function g2(e){Zg=e.timeStamp}function xf(e,t,n){return t.__lexicalLineBreak===e||e[`__lexicalKey_${n._key}`]!==void 0}function m2(e){return e.getEditorState().read(()=>{let t=Ke();return t!==null?t.clone():null})}function N_(e,t,n){Zh=!0;let r=100<performance.now()-Zg;try{Nn(e,()=>{let o=Ke()||m2(e);var i=new Map,l=e.getRootElement(),s=e._editorState,a=e._blockCursorElement;let u=!1,c="";for(var d=0;d<t.length;d++){var f=t[d],h=f.type,g=f.target,m=za(g,s);if(!(m===null&&g!==l||Ve(m))){if(h==="characterData"){if(f=r&&Z(m))e:{f=o,h=g;var _=m;if(fe(f)){var v=f.anchor.getNode();if(v.is(_)&&f.format!==v.getFormat()){f=!1;break e}}f=h.nodeType===3&&_.isAttached()}f&&(_=Nr(e._window),h=f=null,_!==null&&_.anchorNode===g&&(f=_.anchorOffset,h=_.focusOffset),g=g.nodeValue,g!==null&&om(m,g,f,h,!1))}else if(h==="childList"){for(u=!0,h=f.addedNodes,_=0;_<h.length;_++){v=h[_];var y=D_(v),x=v.parentNode;x==null||v===a||y!==null||v.nodeName==="BR"&&xf(v,x,e)||(Ao&&(y=v.innerText||v.nodeValue)&&(c+=y),x.removeChild(v))}if(f=f.removedNodes,h=f.length,0<h){for(_=0,v=0;v<h;v++)x=f[v],(x.nodeName==="BR"&&xf(x,g,e)||a===x)&&(g.appendChild(x),_++);h!==_&&(g===l&&(m=s._nodeMap.get("root")),i.set(g,m))}}}}if(0<i.size)for(let[S,k]of i)if(W(k))for(i=k.getChildrenKeys(),l=S.firstChild,s=0;s<i.length;s++)a=e.getElementByKey(i[s]),a!==null&&(l==null?(S.appendChild(a),l=a):l!==a&&S.replaceChild(a,l),l=l.nextSibling);else Z(k)&&k.markDirty();if(i=n.takeRecords(),0<i.length){for(l=0;l<i.length;l++)for(a=i[l],s=a.addedNodes,a=a.target,d=0;d<s.length;d++)m=s[d],g=m.parentNode,g==null||m.nodeName!=="BR"||xf(m,a,e)||g.removeChild(m);n.takeRecords()}o!==null&&(u&&(o.dirty=!0,Sr(o)),Ao&&F_(e)&&o.insertRawText(c))})}finally{Zh=!1}}function R_(e){let t=e._observer;if(t!==null){let n=t.takeRecords();N_(e,n,t)}}function P_(e){Zg===0&&yd(e).addEventListener("textInput",g2,!0),e._observer=new MutationObserver((t,n)=>{N_(e,t,n)})}function Ey(e,t){let n=e.__mode,r=e.__format;e=e.__style;let o=t.__mode,i=t.__format;return t=t.__style,(n===null||n===o)&&(r===null||r===i)&&(e===null||e===t)}function Cy(e,t){let n=e.mergeWithSibling(t),r=nt()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function O_(e){if(e.__text===""&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;(t=e.getPreviousSibling())!==null&&Z(t)&&t.isSimpleText()&&!t.isUnmergeable();)if(t.__text==="")t.remove();else{Ey(t,e)&&(e=Cy(t,e));break}for(var n;(n=e.getNextSibling())!==null&&Z(n)&&n.isSimpleText()&&!n.isUnmergeable();)if(n.__text==="")n.remove();else{Ey(e,n)&&Cy(e,n);break}}}function qg(e){return $y(e.anchor),$y(e.focus),e}function $y(e){for(;e.type==="element";){var t=e.getNode(),n=e.offset;if(n===t.getChildrenSize()?(t=t.getChildAtIndex(n-1),n=!0):(t=t.getChildAtIndex(n),n=!1),Z(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}else if(!W(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let v2=1,y2=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function em(e){let t=document.activeElement;if(t===null)return!1;let n=t.nodeName;return Ve(za(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&t.__lexicalEditor==null)}function ja(e,t,n){let r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!em(t)&&tm(t)===e}catch{return!1}}function tm(e){for(;e!=null;){let t=e.__lexicalEditor;if(t!=null)return t;e=vd(e)}return null}function qh(e){return e.isToken()||e.isSegmented()}function bc(e){for(;e!=null;){if(e.nodeType===3)return e;e=e.firstChild}return null}function A_(e,t,n){return t=li[t],e&t&&(n===null||!(n&t))?e^t:n===null||n&t?e|t:e}function M_(e){return Z(e)||_a(e)||Ve(e)}function L_(e,t){if(t!=null)e.__key=t;else{tn(),99<Sa&&K(14),t=nt();var n=Rr(),r=""+v2++;n._nodeMap.set(r,e),W(e)?t._dirtyElements.set(r,!0):t._dirtyLeaves.add(r),t._cloneNotNeeded.add(r),t._dirtyType=1,e.__key=r}}function si(e){var t=e.getParent();if(t!==null){let o=e.getWritable();t=t.getWritable();var n=e.getPreviousSibling();if(e=e.getNextSibling(),n===null)if(e!==null){var r=e.getWritable();t.__first=e.__key,r.__prev=null}else t.__first=null;else{if(r=n.getWritable(),e!==null){let i=e.getWritable();i.__prev=r.__key,r.__next=i.__key}else r.__next=null;o.__prev=null}e===null?n!==null?(e=n.getWritable(),t.__last=n.__key,e.__next=null):t.__last=null:(e=e.getWritable(),n!==null?(n=n.getWritable(),n.__next=e.__key,e.__prev=n.__key):e.__prev=null,o.__next=null),t.__size--,o.__parent=null}}function Nc(e){99<Sa&&K(14);var t=e.getLatest(),n=t.__parent,r=Rr();let o=nt(),i=r._nodeMap;if(r=o._dirtyElements,n!==null)e:for(;n!==null;){if(r.has(n))break e;let l=i.get(n);if(l===void 0)break;r.set(n,!1),n=l.__parent}t=t.__key,o._dirtyType=1,W(e)?r.set(t,!0):o._dirtyLeaves.add(t)}function Lt(e){tn();var t=nt();let n=t._compositionKey;e!==n&&(t._compositionKey=e,n!==null&&(t=kt(n),t!==null&&t.getWritable()),e!==null&&(e=kt(e),e!==null&&e.getWritable()))}function xo(){return Kl()?null:nt()._compositionKey}function kt(e,t){return e=(t||Rr())._nodeMap.get(e),e===void 0?null:e}function D_(e,t){let n=nt();return e=e[`__lexicalKey_${n._key}`],e!==void 0?kt(e,t):null}function za(e,t){for(;e!=null;){let n=D_(e,t);if(n!==null)return n;e=vd(e)}return null}function I_(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t}function ky(e){return e.read(()=>br().getTextContent())}function x2(e,t){Nn(e,()=>{var n=Rr();if(!n.isEmpty())if(t==="root")br().markDirty();else{n=n._nodeMap;for(let[,r]of n)r.markDirty()}},e._pendingEditorState===null?{tag:"history-merge"}:void 0)}function br(){return Rr()._nodeMap.get("root")}function Sr(e){tn();let t=Rr();e!==null&&(e.dirty=!0,e._cachedNodes=null),t._selection=e}function ol(e){var t=nt(),n;e:{for(n=e;n!=null;){let r=n[`__lexicalKey_${t._key}`];if(r!==void 0){n=r;break e}n=vd(n)}n=null}return n===null?(t=t.getRootElement(),e===t?kt("root"):null):kt(n)}function j_(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function nm(e){let t=[];for(;e!==null;)t.push(e),e=e._parentEditor;return t}function z_(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function rm(e,t,n){if(t=Nr(t._window),t!==null){var r=t.anchorNode,{anchorOffset:o,focusOffset:i}=t;if(r!==null&&(t=r.nodeType===3?r.nodeValue:null,r=za(r),t!==null&&Z(r))){if(t===md&&n){let l=n.length;t=n,i=o=l}t!==null&&om(r,t,o,i,e)}}}function om(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){let u=i.isComposing(),c=t;if((u||o)&&t[t.length-1]===md&&(c=t.slice(0,-1)),t=i.getTextContent(),o||c!==t)if(c==="")if(Lt(null),Qg||gd||Jg)i.remove();else{let d=nt();setTimeout(()=>{d.update(()=>{i.isAttached()&&i.remove()})},20)}else{o=i.getParent(),t=Hl();var l=i.getTextContentSize(),s=xo(),a=i.getKey();i.isToken()||s!==null&&a===s&&!u||fe(t)&&(o!==null&&!o.canInsertTextBefore()&&t.anchor.offset===0||t.anchor.key===e.__key&&t.anchor.offset===0&&!i.canInsertTextBefore()||t.focus.key===e.__key&&t.focus.offset===l&&!i.canInsertTextAfter())?i.markDirty():(e=Ke(),fe(e)&&n!==null&&r!==null&&(e.setTextNodeRange(i,n,i,r),i.isSegmented()&&(n=i.getTextContent(),n=Ct(n),i.replace(n),i=n)),i.setTextContent(c))}}}function w2(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;e=e.anchor.offset;let n=t.getParentOrThrow(),r=t.isToken();return e===0?((e=!t.canInsertTextBefore()||!n.canInsertTextBefore()||r)||(t=t.getPreviousSibling(),e=(Z(t)||W(t)&&t.isInline())&&!t.canInsertTextAfter()),e):e===t.getTextContentSize()?!t.canInsertTextAfter()||!n.canInsertTextAfter()||r:!1}function Bs(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];return r!==void 0?r:(e=e[t],typeof e=="string"?(e=e.split(" "),n[t]=e):e)}function im(e,t,n,r,o){n.size!==0&&(n=r.__type,r=r.__key,t=t.get(n),t===void 0&&K(33,n),n=t.klass,t=e.get(n),t===void 0&&(t=new Map,e.set(n,t)),e=t.get(r),n=e==="destroyed"&&o==="created",(e===void 0||n)&&t.set(r,n?"updated":o))}function Ty(e,t,n){let r=e.getParent(),o=n;return r!==null&&(t&&n===0?(o=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(o=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?o-1:o)}function ep(e,t){var n=e.offset;return e.type==="element"?(e=e.getNode(),Ty(e,t,n)):(e=e.getNode(),t&&n===0||!t&&n===e.getTextContentSize()?(n=t?e.getPreviousSibling():e.getNextSibling(),n===null?Ty(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n):null)}function F_(e){return e=(e=yd(e).event)&&e.inputType,e==="insertFromPaste"||e==="insertFromPasteAsQuotation"}function Rc(e){return!rn(e)&&!e.isLastChild()&&!e.isInline()}function Pc(e,t){return e=e._keyToDOMMap.get(t),e===void 0&&K(75,t),e}function vd(e){return e=e.assignedSlot||e.parentElement,e!==null&&e.nodeType===11?e.host:e}function Oc(e,t){for(e=e.getParent();e!==null;){if(e.is(t))return!0;e=e.getParent()}return!1}function yd(e){return e=e._window,e===null&&K(78),e}function B_(e){for(e=e.getParentOrThrow();e!==null&&!nr(e);)e=e.getParentOrThrow();return e}function nr(e){return rn(e)||W(e)&&e.isShadowRoot()}function W_(e){return e=e.constructor.clone(e),L_(e,null),e}function Fa(e){var t=nt();let n=e.constructor.getType();return t=t._nodes.get(n),t===void 0&&K(97),t=t.replace,t!==null?(t=t(e),t instanceof e.constructor||K(98),t):e}function wf(e,t){e=e.getParent(),!rn(e)||W(t)||Ve(t)||K(99)}function _f(e){return(Ve(e)||W(e)&&!e.canBeEmpty())&&!e.isInline()}function tp(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,t=e.parentElement,t!==null&&t.removeChild(e)}function Nr(e){return Zr?(e||window).getSelection():null}function U_(e,t){let n=e.getChildAtIndex(t);n==null&&(n=e),nr(e)&&K(102);let r=l=>{const s=l.getParentOrThrow(),a=nr(s),u=l!==n||a?W_(l):l;if(a)return l.insertAfter(u),[l,u,u];const[c,d,f]=r(s);return l=l.getNextSiblings(),f.append(u,...l),[c,d,u]},[o,i]=r(n);return[o,i]}function Ac(e,t){for(;e!==br()&&e!=null;){if(t(e))return e;e=e.getParent()}return null}function _2(e){let t=[],n=[e];for(;0<n.length;){let r=n.pop();r===void 0&&K(112),W(r)&&n.unshift(...r.getChildren()),r!==e&&t.push(r)}return t}function xd(e){return e.nodeType===1}function V_(e,t,n,r,o,i){for(e=e.getFirstChild();e!==null;){let l=e.__key;e.__parent===t&&(W(e)&&V_(e,l,n,r,o,i),n.has(l)||i.delete(l),o.push(l)),e=e.getNextSibling()}}function S2(e,t,n,r){e=e._nodeMap,t=t._nodeMap;let o=[];for(let[i]of r){let l=t.get(i);l===void 0||l.isAttached()||(W(l)&&V_(l,i,e,t,o,r),e.has(i)||r.delete(i),o.push(i))}for(let i of o)t.delete(i);for(let i of n)r=t.get(i),r===void 0||r.isAttached()||(e.has(i)||n.delete(i),t.delete(i))}let vt="",en="",jr="",Mo,Vt,ya,H_=!1,lm=!1,wd,Uu=null,np,rp,mi,Lo,op,xa;function Vu(e,t){let n=mi.get(e);if(t!==null){let r=sp(e);r.parentNode===t&&t.removeChild(r)}Lo.has(e)||Vt._keyToDOMMap.delete(e),W(n)&&(e=Mc(n,mi),ip(e,0,e.length-1,null)),n!==void 0&&im(xa,ya,wd,n,"destroyed")}function ip(e,t,n,r){for(;t<=n;++t){let o=e[t];o!==void 0&&Vu(o,r)}}function Yo(e,t){e.setProperty("text-align",t)}function K_(e,t){var n=Mo.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 G_(e,t){e=e.style,t===0?Yo(e,""):t===1?Yo(e,"left"):t===2?Yo(e,"center"):t===3?Yo(e,"right"):t===4?Yo(e,"justify"):t===5?Yo(e,"start"):t===6&&Yo(e,"end")}function Hu(e,t,n){let r=Lo.get(e);r===void 0&&K(60);let o=r.createDOM(Mo,Vt);var i=Vt._keyToDOMMap;if(o["__lexicalKey_"+Vt._key]=e,i.set(e,o),Z(r)?o.setAttribute("data-lexical-text","true"):Ve(r)&&o.setAttribute("data-lexical-decorator","true"),W(r)){if(e=r.__indent,i=r.__size,e!==0&&K_(o,e),i!==0){--i,e=Mc(r,Lo);var l=en;en="",lp(e,r,0,i,o,null),X_(r,o),en=l}e=r.__format,e!==0&&G_(o,e),r.isInline()||Y_(null,r,o),Rc(r)&&(vt+=`
|
|
102
|
-
|
|
103
|
-
`,jr+=`
|
|
104
|
-
|
|
105
|
-
`)}else i=r.getTextContent(),Ve(r)?(l=r.decorate(Vt,Mo),l!==null&&Q_(e,l),o.contentEditable="false"):Z(r)&&(r.isDirectionless()||(en+=i)),vt+=i,jr+=i;return t!==null&&(n!=null?t.insertBefore(o,n):(n=t.__lexicalLineBreak,n!=null?t.insertBefore(o,n):t.appendChild(o))),im(xa,ya,wd,r,"created"),o}function lp(e,t,n,r,o,i){let l=vt;for(vt="";n<=r;++n)Hu(e[n],o,i);Rc(t)&&(vt+=`
|
|
106
|
-
|
|
107
|
-
`),o.__lexicalTextContent=vt,vt=l+vt}function by(e,t){return e=t.get(e),_a(e)||Ve(e)&&e.isInline()}function Y_(e,t,n){e=e!==null&&(e.__size===0||by(e.__last,mi)),t=t.__size===0||by(t.__last,Lo),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 X_(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==en||n!==Uu){let i=en==="";if(i)var r=Uu;else r=en,r=u2.test(r)?"rtl":c2.test(r)?"ltr":null;if(r!==n){let l=t.classList,s=Mo.theme;var o=n!==null?s[n]:void 0;let a=r!==null?s[r]:void 0;o!==void 0&&(typeof o=="string"&&(o=o.split(" "),o=s[n]=o),l.remove(...o)),r===null||i&&r==="ltr"?t.removeAttribute("dir"):(a!==void 0&&(typeof a=="string"&&(n=a.split(" "),a=s[r]=n),a!==void 0&&l.add(...a)),t.dir=r),lm||(e.getWritable().__dir=r)}Uu=r,t.__lexicalDirTextContent=en,t.__lexicalDir=r}}function Mc(e,t){let n=[];for(e=e.__first;e!==null;){let r=t.get(e);r===void 0&&K(101),n.push(e),e=r.__next}return n}function Es(e,t){var n=mi.get(e),r=Lo.get(e);n!==void 0&&r!==void 0||K(61);var o=H_||rp.has(e)||np.has(e);let i=Pc(Vt,e);if(n===r&&!o)return W(n)?(r=i.__lexicalTextContent,r!==void 0&&(vt+=r,jr+=r),r=i.__lexicalDirTextContent,r!==void 0&&(en+=r)):(r=n.getTextContent(),Z(n)&&!n.isDirectionless()&&(en+=r),jr+=r,vt+=r),i;if(n!==r&&o&&im(xa,ya,wd,r,"updated"),r.updateDOM(n,i,Mo))return r=Hu(e,null,null),t===null&&K(62),t.replaceChild(r,i),Vu(e,null),r;if(W(n)&&W(r)){if(e=r.__indent,e!==n.__indent&&K_(i,e),e=r.__format,e!==n.__format&&G_(i,e),o){e=r,o=en,en="",t=vt;var l=n.__size,s=e.__size;if(vt="",l===1&&s===1){var a=n.__first,u=e.__first;if(a===u)Es(a,i);else{var c=sp(a);u=Hu(u,null,null),i.replaceChild(u,c),Vu(a,null)}}else{u=Mc(n,mi);var d=Mc(e,Lo);if(l===0)s!==0&&lp(d,e,0,s-1,i,null);else if(s===0)l!==0&&(a=i.__lexicalLineBreak==null,ip(u,0,l-1,a?null:i),a&&(i.textContent=""));else{var f=u;u=d,d=l-1,l=s-1;let g=i.firstChild,m=0;for(s=0;m<=d&&s<=l;){var h=f[m];let _=u[s];if(h===_)g=Sf(Es(_,i)),m++,s++;else{a===void 0&&(a=new Set(f)),c===void 0&&(c=new Set(u));let v=c.has(h),y=a.has(_);v?(y?(h=Pc(Vt,_),h===g?g=Sf(Es(_,i)):(g!=null?i.insertBefore(h,g):i.appendChild(h),Es(_,i)),m++):Hu(_,i,g),s++):(g=Sf(sp(h)),Vu(h,i),m++)}}a=m>d,c=s>l,a&&!c?(a=u[l+1],a=a===void 0?null:Vt.getElementByKey(a),lp(u,e,s,l,i,a)):c&&!a&&ip(f,m,d,i)}}Rc(e)&&(vt+=`
|
|
108
|
-
|
|
109
|
-
`),i.__lexicalTextContent=vt,vt=t+vt,X_(e,i),en=o,rn(r)||r.isInline()||Y_(n,r,i)}Rc(r)&&(vt+=`
|
|
110
|
-
|
|
111
|
-
`,jr+=`
|
|
112
|
-
|
|
113
|
-
`)}else n=r.getTextContent(),Ve(r)?(o=r.decorate(Vt,Mo),o!==null&&Q_(e,o)):Z(r)&&!r.isDirectionless()&&(en+=n),vt+=n,jr+=n;return!lm&&rn(r)&&r.__cachedText!==jr&&(r=r.getWritable(),r.__cachedText=jr),i}function Q_(e,t){let n=Vt._pendingDecorators,r=Vt._decorators;if(n===null){if(r[e]===t)return;n=I_(Vt)}n[e]=t}function Sf(e){return e=e.nextSibling,e!==null&&e===Vt._blockCursorElement&&(e=e.nextSibling),e}function sp(e){let t=op.get(e);return t===void 0&&K(75,e),t}let Ar=Object.freeze({}),ap=[["keydown",R2],["pointerdown",C2],["compositionstart",b2],["compositionend",N2],["input",T2],["click",E2],["cut",Ar],["copy",Ar],["dragstart",Ar],["dragover",Ar],["dragend",Ar],["paste",Ar],["focus",Ar],["blur",Ar],["drop",Ar]];Tc&&ap.push(["beforeinput",(e,t)=>k2(e,t)]);let wa=0,J_=0,Z_=0,Hi=null,Ws=0,up=!1,cp=!1,Us=!1,Cs=!1,q_=[0,"",0,"root",0];function eS(e,t,n,r,o){let i=e.anchor,l=e.focus,s=i.getNode();var a=nt();let u=Nr(a._window),c=u!==null?u.anchorNode:null,d=i.key;a=a.getElementByKey(d);let f=n.length;return d!==l.key||!Z(s)||(!o&&(!Tc||Z_<r+50)||s.isDirty()&&2>f||j_(n))&&i.offset!==l.offset&&!s.isComposing()||qh(s)||s.isDirty()&&1<f||(o||!Tc)&&a!==null&&!s.isComposing()&&c!==bc(a)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||w2(e,s)}function Ny(e,t){return e!==null&&e.nodeValue!==null&&e.nodeType===3&&t!==0&&t!==e.nodeValue.length}function Ry(e,t,n){let{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:l}=e;up&&(up=!1,Ny(r,o)&&Ny(i,l))||Nn(t,()=>{if(!n)Sr(null);else if(ja(t,r,i)){var s=Ke();if(fe(s)){var a=s.anchor,u=a.getNode();if(s.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(s.dirty=!0);var c=yd(t).event;c=c?c.timeStamp:performance.now();let[d,f,h,g,m]=q_;c<m+200&&a.offset===h&&a.key===g?(s.format=d,s.style=f):a.type==="text"?(s.format=u.getFormat(),s.style=u.getStyle()):a.type==="element"&&(s.format=0,s.style="")}else{a=255,u=!1,c=s.getNodes();let d=c.length;for(let f=0;f<d;f++){let h=c[f];if(Z(h)&&(u=!0,a&=h.getFormat(),a===0))break}s.format=u?a:0}}J(t,pd,void 0)}})}function E2(e,t){Nn(t,()=>{let n=Ke();var r=Nr(t._window);let o=Hl();if(r)if(fe(n)){let l=n.anchor;var i=l.getNode();l.type==="element"&&l.offset===0&&n.isCollapsed()&&!rn(i)&&br().getChildrenSize()===1&&i.getTopLevelElementOrThrow().isEmpty()&&o!==null&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):e.detail!==3||n.isCollapsed()||(r=n.focus.getNode(),i!==r&&(W(i)?i.select(0):i.getParentOrThrow().select(0)))}else e.pointerType==="touch"&&(i=r.anchorNode,i!==null&&(i=i.nodeType,i===1||i===3))&&(r=am(o,r,t),Sr(r));J(t,u_,e)})}function C2(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&e!=="touch"&&Nn(t,()=>{Ve(za(n))||(cp=!0)})}function tS(e){return e.getTargetRanges?(e=e.getTargetRanges(),e.length===0?null:e[0]):null}function $2(e,t){return e!==t||W(e)||W(t)||!e.isToken()||!t.isToken()}function k2(e,t){let n=e.inputType,r=tS(e);n==="deleteCompositionText"||Ao&&F_(t)||n!=="insertCompositionText"&&Nn(t,()=>{let o=Ke();if(n==="deleteContentBackward"){if(o===null){var i=Hl();if(!fe(i))return;Sr(i.clone())}if(fe(o)){J_===229&&e.timeStamp<wa+30&&t.isComposing()&&o.anchor.key===o.focus.key?(Lt(null),wa=0,setTimeout(()=>{Nn(t,()=>{Lt(null)})},30),fe(o)&&(i=o.anchor.getNode(),i.markDirty(),o.format=i.getFormat(),o.style=i.getStyle())):(e.preventDefault(),J(t,ga,!0));return}}if(fe(o)){i=e.data,Hi!==null&&rm(!1,t,Hi),o.dirty&&Hi===null||!o.isCollapsed()||rn(o.anchor.getNode())||r===null||o.applyDOMRange(r),Hi=null;var l=o.focus,s=o.anchor.getNode();if(l=l.getNode(),n==="insertText"||n==="insertTranspose")i===`
|
|
114
|
-
`?(e.preventDefault(),J(t,Fs,!1)):i===`
|
|
115
|
-
|
|
116
|
-
`?(e.preventDefault(),J(t,Xh,void 0)):i==null&&e.dataTransfer?(i=e.dataTransfer.getData("text/plain"),e.preventDefault(),o.insertRawText(i)):i!=null&&eS(o,r,i,e.timeStamp,!0)?(e.preventDefault(),J(t,pl,i)):Hi=i,Z_=e.timeStamp;else switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":J(t,pl,e);break;case"insertFromComposition":Lt(null),J(t,pl,e);break;case"insertLineBreak":Lt(null),J(t,Fs,!1);break;case"insertParagraph":Lt(null),Us&&!gd?(Us=!1,J(t,Fs,!1)):J(t,Xh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":J(t,Hg,e);break;case"deleteByComposition":$2(s,l)&&J(t,Qh,e);break;case"deleteByDrag":case"deleteByCut":J(t,Qh,e);break;case"deleteContent":J(t,ga,!1);break;case"deleteWordBackward":J(t,ma,!0);break;case"deleteWordForward":J(t,ma,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":J(t,va,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":J(t,va,!1);break;case"formatStrikeThrough":J(t,yo,"strikethrough");break;case"formatBold":J(t,yo,"bold");break;case"formatItalic":J(t,yo,"italic");break;case"formatUnderline":J(t,yo,"underline");break;case"historyUndo":J(t,Kg,void 0);break;case"historyRedo":J(t,Gg,void 0)}}})}function T2(e,t){e.stopPropagation(),Nn(t,()=>{var n=Ke(),r=e.data,o=tS(e);if(r!=null&&fe(n)&&eS(n,o,r,e.timeStamp,!1)){Cs&&(dp(t,r),Cs=!1);var i=n.anchor,l=i.getNode();if(o=Nr(t._window),o===null)return;let s=i.offset;(i=Tc&&!n.isCollapsed()&&Z(l)&&o.anchorNode!==null)&&(l=l.getTextContent().slice(0,s)+r+l.getTextContent().slice(s+n.focus.offset),o=o.anchorNode,i=l===(o.nodeType===3?o.nodeValue:null)),i||J(t,pl,r),r=r.length,Ao&&1<r&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=r),Qg||gd||Jg||!t.isComposing()||(wa=0,Lt(null))}else rm(!1,t,r!==null?r:void 0),Cs&&(dp(t,r||void 0),Cs=!1);tn(),n=nt(),R_(n)}),Hi=null}function b2(e,t){Nn(t,()=>{let n=Ke();if(fe(n)&&!t.isComposing()){let r=n.anchor,o=n.anchor.getNode();Lt(r.key),(e.timeStamp<wa+30||r.type==="element"||!n.isCollapsed()||o.getFormat()!==n.format||o.getStyle()!==n.style)&&J(t,pl,a2)}})}function dp(e,t){var n=e._compositionKey;if(Lt(null),n!==null&&t!=null){if(t===""){t=kt(n),e=bc(e.getElementByKey(n)),e!==null&&e.nodeValue!==null&&Z(t)&&om(t,e.nodeValue,null,null,!0);return}if(t[t.length-1]===`
|
|
117
|
-
`&&(n=Ke(),fe(n))){t=n.focus,n.anchor.set(t.key,t.offset,t.type),J(e,kc,null);return}}rm(!0,e,t)}function N2(e,t){Ao?Cs=!0:Nn(t,()=>{dp(t,e.data)})}function R2(e,t){if(wa=e.timeStamp,J_=e.keyCode,!t.isComposing()){var{keyCode:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:l}=e;if(!J(t,c_,e)){if(n!==39||o||i||l)if(n!==39||l||r||!o&&!i)if(n!==37||o||i||l)if(n!==37||l||r||!o&&!i)if(n!==38||o||i)if(n!==40||o||i)if(n===13&&r)Us=!0,J(t,kc,e);else if(n===32)J(t,v_,e);else if(Ft&&o&&n===79)e.preventDefault(),Us=!0,J(t,Fs,!0);else if(n!==13||r){var s=Ft?l||i?!1:n===8||n===72&&o:o||l||i?!1:n===8;s?n===8?J(t,y_,e):(e.preventDefault(),J(t,ga,!0)):n===27?J(t,x_,e):(s=Ft?r||l||i?!1:n===46||n===68&&o:o||l||i?!1:n===46,s?n===46?J(t,w_,e):(e.preventDefault(),J(t,ga,!1)):n===8&&(Ft?l:o)?(e.preventDefault(),J(t,ma,!0)):n===46&&(Ft?l:o)?(e.preventDefault(),J(t,ma,!1)):Ft&&i&&n===8?(e.preventDefault(),J(t,va,!0)):Ft&&i&&n===46?(e.preventDefault(),J(t,va,!1)):n===66&&!l&&(Ft?i:o)?(e.preventDefault(),J(t,yo,"bold")):n===85&&!l&&(Ft?i:o)?(e.preventDefault(),J(t,yo,"underline")):n===73&&!l&&(Ft?i:o)?(e.preventDefault(),J(t,yo,"italic")):n!==9||l||o||i?n===90&&!r&&(Ft?i:o)?(e.preventDefault(),J(t,Kg,void 0)):(s=Ft?n===90&&i&&r:n===89&&o||n===90&&o&&r,s?(e.preventDefault(),J(t,Gg,void 0)):Vl(t._editorState._selection)?(s=r?!1:n===67?Ft?i:o:!1,s?(e.preventDefault(),J(t,Yg,e)):(s=r?!1:n===88?Ft?i:o:!1,s?(e.preventDefault(),J(t,Xg,e)):n===65&&(Ft?i:o)&&(e.preventDefault(),J(t,Jh,e)))):!Ao&&n===65&&(Ft?i:o)&&(e.preventDefault(),J(t,Jh,e))):J(t,__,e))}else Us=!1,J(t,kc,e);else J(t,m_,e);else J(t,g_,e);else J(t,p_,e);else J(t,h_,e);else J(t,f_,e);else J(t,d_,e);(o||r||l||i)&&J(t,b_,e)}}}function nS(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}let gl=new Map;function rS(e){e=e.target;let t=Nr(e==null?null:e.nodeType===9?e.defaultView:e.ownerDocument.defaultView);if(t!==null){var n=tm(t.anchorNode);if(n!==null){cp&&(cp=!1,Nn(n,()=>{var l=Hl(),s=t.anchorNode;s!==null&&(s=s.nodeType,s===1||s===3)&&(l=am(l,t,n),Sr(l))})),e=nm(n),e=e[e.length-1];var r=e._key,o=gl.get(r),i=o||e;i!==n&&Ry(t,i,!1),Ry(t,n,!0),n!==e?gl.set(r,n):o&&gl.delete(r)}}}function P2(e,t){Ws===0&&e.ownerDocument.addEventListener("selectionchange",rS),Ws++,e.__lexicalEditor=t;let n=nS(e);for(let r=0;r<ap.length;r++){let[o,i]=ap[r],l=typeof i=="function"?s=>{s._lexicalHandled!==!0&&(s._lexicalHandled=!0,t.isEditable()&&i(s,t))}:s=>{if(s._lexicalHandled!==!0&&(s._lexicalHandled=!0,t.isEditable()))switch(o){case"cut":return J(t,Xg,s);case"copy":return J(t,Yg,s);case"paste":return J(t,Hg,s);case"dragstart":return J(t,E_,s);case"dragover":return J(t,C_,s);case"dragend":return J(t,$_,s);case"focus":return J(t,k_,s);case"blur":return J(t,T_,s);case"drop":return J(t,S_,s)}};e.addEventListener(o,l),n.push(()=>{e.removeEventListener(o,l)})}}function fp(e,t,n){tn();var r=e.__key;let o=e.getParent();if(o!==null){var i=Ke();if(fe(i)&&W(e)){var{anchor:l,focus:s}=i,a=l.getNode(),u=s.getNode();Oc(a,e)&&l.set(e.__key,0,"element"),Oc(u,e)&&s.set(e.__key,0,"element")}if(a=i,u=!1,fe(a)&&t){i=a.anchor;let c=a.focus;i.key===r&&(Dc(i,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0),c.key===r&&(Dc(c,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0)}else Vl(a)&&t&&e.isSelected()&&e.selectPrevious();fe(a)&&t&&!u?(r=e.getIndexWithinParent(),si(e),Lc(a,o,r,-1)):si(e),n||nr(o)||o.canBeEmpty()||!o.isEmpty()||fp(o,t),t&&rn(o)&&o.isEmpty()&&o.selectEnd()}}class Ba{static getType(){K(64,this.name)}static clone(){K(65,this.name)}constructor(t){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,L_(this,t)}getType(){return this.__type}isAttached(){for(var t=this.__key;t!==null;){if(t==="root")return!0;if(t=kt(t),t===null)break;t=t.__parent}return!1}isSelected(t){if(t=t||Ke(),t==null)return!1;let n=t.getNodes().some(r=>r.__key===this.__key);return Z(this)?n:fe(t)&&t.anchor.type==="element"&&t.focus.type==="element"&&t.anchor.key===t.focus.key&&t.anchor.offset===t.focus.offset?!1:n}getKey(){return this.__key}getIndexWithinParent(){var t=this.getParent();if(t===null)return-1;t=t.getFirstChild();let n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let t=this.getLatest().__parent;return t===null?null:kt(t)}getParentOrThrow(){let t=this.getParent();return t===null&&K(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){let n=t.getParent();if(nr(n))return t;t=n}return null}getTopLevelElementOrThrow(){let t=this.getTopLevelElement();return t===null&&K(67,this.__key),t}getParents(){let t=[],n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){let t=[],n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){let t=this.getLatest().__prev;return t===null?null:kt(t)}getPreviousSiblings(){let t=[];var n=this.getParent();if(n===null)return t;for(n=n.getFirstChild();n!==null&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){let t=this.getLatest().__next;return t===null?null:kt(t)}getNextSiblings(){let t=[],n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){let n=this.getParents();var r=t.getParents();W(this)&&n.unshift(this),W(t)&&r.unshift(t),t=n.length;var o=r.length;if(t===0||o===0||n[t-1]!==r[o-1])return null;for(r=new Set(r),o=0;o<t;o++){let i=n[o];if(r.has(i))return i}return null}is(t){return t==null?!1:this.__key===t.__key}isBefore(t){if(this===t)return!1;if(t.isParentOf(this))return!0;if(this.isParentOf(t))return!1;var n=this.getCommonAncestor(t);let r=this;for(;;){var o=r.getParentOrThrow();if(o===n){o=r.getIndexWithinParent();break}r=o}for(r=t;;){if(t=r.getParentOrThrow(),t===n){n=r.getIndexWithinParent();break}r=t}return o<n}isParentOf(t){let n=this.__key;if(n===t.__key)return!1;for(;t!==null;){if(t.__key===n)return!0;t=t.getParent()}return!1}getNodesBetween(t){let n=this.isBefore(t),r=[],o=new Set;for(var i=this;;){var l=i.__key;if(o.has(l)||(o.add(l),r.push(i)),i===t)break;if(l=W(i)?n?i.getFirstChild():i.getLastChild():null,l!==null)i=l;else if(l=n?i.getNextSibling():i.getPreviousSibling(),l!==null)i=l;else{if(i=i.getParentOrThrow(),o.has(i.__key)||r.push(i),i===t)break;l=i;do l===null&&K(68),i=n?l.getNextSibling():l.getPreviousSibling(),l=l.getParent(),l!==null&&(i!==null||o.has(l.__key)||r.push(l));while(i===null)}}return n||r.reverse(),r}isDirty(){let t=nt()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){let t=kt(this.__key);return t===null&&K(113),t}getWritable(){tn();var t=Rr(),n=nt();t=t._nodeMap;let r=this.__key,o=this.getLatest(),i=o.__parent;n=n._cloneNotNeeded;var l=Ke();return l!==null&&(l._cachedNodes=null),n.has(r)?(Nc(o),o):(l=o.constructor.clone(o),l.__parent=i,l.__next=o.__next,l.__prev=o.__prev,W(o)&&W(l)?(l.__first=o.__first,l.__last=o.__last,l.__size=o.__size,l.__indent=o.__indent,l.__format=o.__format,l.__dir=o.__dir):Z(o)&&Z(l)&&(l.__format=o.__format,l.__style=o.__style,l.__mode=o.__mode,l.__detail=o.__detail),n.add(r),l.__key=r,Nc(l),t.set(r,l),l)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){K(70)}updateDOM(){K(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){K(72)}static importJSON(){K(18,this.name)}static transform(){return null}remove(t){fp(this,!0,t)}replace(t,n){tn();var r=Ke();r!==null&&(r=r.clone()),wf(this,t);let o=this.getLatest(),i=this.__key,l=t.__key,s=t.getWritable();t=this.getParentOrThrow().getWritable();let a=t.__size;si(s);let u=o.getPreviousSibling(),c=o.getNextSibling(),d=o.__prev,f=o.__next,h=o.__parent;return fp(o,!1,!0),u===null?t.__first=l:u.getWritable().__next=l,s.__prev=d,c===null?t.__last=l:c.getWritable().__prev=l,s.__next=f,s.__parent=h,t.__size=a,n&&this.getChildren().forEach(g=>{s.append(g)}),fe(r)&&(Sr(r),n=r.anchor,r=r.focus,n.key===i&&Ay(n,s),r.key===i&&Ay(r,s)),xo()===i&&Lt(l),s}insertAfter(t,n=!0){tn(),wf(this,t);var r=this.getWritable();let o=t.getWritable();var i=o.getParent();let l=Ke();var s=!1,a=!1;if(i!==null){var u=t.getIndexWithinParent();si(o),fe(l)&&(a=i.__key,s=l.anchor,i=l.focus,s=s.type==="element"&&s.key===a&&s.offset===u+1,a=i.type==="element"&&i.key===a&&i.offset===u+1)}i=this.getNextSibling(),u=this.getParentOrThrow().getWritable();let c=o.__key,d=r.__next;return i===null?u.__last=c:i.getWritable().__prev=c,u.__size++,r.__next=c,o.__next=d,o.__prev=r.__key,o.__parent=r.__parent,n&&fe(l)&&(n=this.getIndexWithinParent(),Lc(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){tn(),wf(this,t);var r=this.getWritable();let o=t.getWritable(),i=o.__key;si(o);let l=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),a=r.__prev,u=this.getIndexWithinParent();return l===null?s.__first=i:l.getWritable().__next=i,s.__size++,r.__prev=i,o.__prev=a,o.__next=r.__key,o.__parent=r.__parent,r=Ke(),n&&fe(r)&&(n=this.getParentOrThrow(),Lc(r,n,u)),t}isParentRequired(){return!1}createParentElementNode(){return vi()}selectPrevious(t,n){tn();let r=this.getPreviousSibling(),o=this.getParentOrThrow();return r===null?o.select(0,0):W(r)?r.select():Z(r)?r.select(t,n):(t=r.getIndexWithinParent()+1,o.select(t,t))}selectNext(t,n){tn();let r=this.getNextSibling(),o=this.getParentOrThrow();return r===null?o.select():W(r)?r.select(0,0):Z(r)?r.select(t,n):(t=r.getIndexWithinParent(),o.select(t,t))}markDirty(){this.getWritable()}}class Wl extends Ba{static getType(){return"linebreak"}static clone(t){return new Wl(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,o;return n!==null&&((r=n.firstChild)===t||r.nextSibling===t&&r.nodeType===3&&(r.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((o=n.lastChild)===t||o.previousSibling===t&&o.nodeType===3&&(o.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:O2,priority:0}}}}static importJSON(){return Nl()}exportJSON(){return{type:"linebreak",version:1}}}function O2(){return{node:Nl()}}function Nl(){return Fa(new Wl)}function _a(e){return e instanceof Wl}function Ef(e,t){return t&16?"code":t&128?"mark":t&32?"sub":t&64?"sup":null}function Cf(e,t){return t&1?"strong":t&2?"em":"span"}function $f(e,t,n,r,o){e=r.classList,r=Bs(o,"base"),r!==void 0&&e.add(...r),r=Bs(o,"underlineStrikethrough");let i=!1,l=t&8&&t&4;var s=n&8&&n&4;r!==void 0&&(s?(i=!0,l||e.add(...r)):l&&e.remove(...r));for(let a in li)s=li[a],r=Bs(o,a),r!==void 0&&(n&s?!i||a!=="underline"&&a!=="strikethrough"?(!(t&s)||l&&a==="underline"||a==="strikethrough")&&e.add(...r):t&s&&e.remove(...r):t&s&&e.remove(...r))}function kf(e,t,n){let r=t.firstChild;if(n=n.isComposing(),e+=n?md:"",r==null)t.textContent=e;else if(t=r.nodeValue,t!==e)if(n||Ao){n=t.length;let o=e.length,i=0,l=0;for(;i<n&&i<o&&t[i]===e[i];)i++;for(;l+i<n&&l+i<o&&t[n-l-1]===e[o-l-1];)l++;e=[i,n-i-l,e.slice(i,o-l)];let[s,a,u]=e;a!==0&&r.deleteData(s,a),r.insertData(s,u)}else r.nodeValue=e}function yu(e,t){return t=document.createElement(t),t.appendChild(e),t}class bi extends Ba{static getType(){return"text"}static clone(t){return new bi(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 p2[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===xo()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(t){return t=li[t],(this.getFormat()&t)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){let r=this.getLatest().__format;return A_(r,t,n)}createDOM(t){var n=this.__format,r=Ef(this,n);let o=Cf(this,n),i=document.createElement(r===null?o:r),l=i;return this.hasFormat("code")&&i.setAttribute("spellcheck","false"),r!==null&&(l=document.createElement(o),i.appendChild(l)),r=l,kf(this.__text,r,this),t=t.theme.text,t!==void 0&&$f(o,0,n,r,t),n=this.__style,n!==""&&(i.style.cssText=n),i}updateDOM(t,n,r){let o=this.__text;var i=t.__format,l=this.__format,s=Ef(this,i);let a=Ef(this,l);var u=Cf(this,i);let c=Cf(this,l);return(s===null?u:s)!==(a===null?c:a)?!0:s===a&&u!==c?(i=n.firstChild,i==null&&K(48),t=s=document.createElement(c),kf(o,t,this),r=r.theme.text,r!==void 0&&$f(c,0,l,t,r),n.replaceChild(s,i),!1):(u=n,a!==null&&s!==null&&(u=n.firstChild,u==null&&K(49)),kf(o,u,this),r=r.theme.text,r!==void 0&&i!==l&&$f(c,i,l,u,r),l=this.__style,t.__style!==l&&(n.style.cssText=l),!1)}static importDOM(){return{"#text":()=>({conversion:L2,priority:0}),b:()=>({conversion:M2,priority:0}),code:()=>({conversion:lo,priority:0}),em:()=>({conversion:lo,priority:0}),i:()=>({conversion:lo,priority:0}),s:()=>({conversion:lo,priority:0}),span:()=>({conversion:A2,priority:0}),strong:()=>({conversion:lo,priority:0}),sub:()=>({conversion:lo,priority:0}),sup:()=>({conversion:lo,priority:0}),u:()=>({conversion:lo,priority:0})}}static importJSON(t){let n=Ct(t.text);return n.setFormat(t.format),n.setDetail(t.detail),n.setMode(t.mode),n.setStyle(t.style),n}exportDOM(t){return{element:t}=super.exportDOM(t),t!==null&&xd(t)||K(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=yu(t,"b")),this.hasFormat("italic")&&(t=yu(t,"i")),this.hasFormat("strikethrough")&&(t=yu(t,"s")),this.hasFormat("underline")&&(t=yu(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(t){let n=this.getWritable();return n.__format=typeof t=="string"?li[t]:t,n}setDetail(t){let n=this.getWritable();return n.__detail=typeof t=="string"?d2[t]:t,n}setStyle(t){let n=this.getWritable();return n.__style=t,n}toggleFormat(t){return t=li[t],this.setFormat(this.getFormat()^t)}toggleDirectionless(){let t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){let t=this.getWritable();return t.__detail^=2,t}setMode(t){if(t=h2[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){tn();let r=Ke();var o=this.getTextContent();let i=this.__key;if(typeof o=="string"?(o=o.length,t===void 0&&(t=o),n===void 0&&(n=o)):n=t=0,fe(r))o=xo(),o!==r.anchor.key&&o!==r.focus.key||Lt(i),r.setTextNodeRange(this,t,this,n);else return lS(i,t,i,n,"text","text");return r}spliceText(t,n,r,o){let i=this.getWritable(),l=i.__text,s=r.length,a=t;0>a&&(a=s+a,0>a&&(a=0));let u=Ke();return o&&fe(u)&&(t+=s,u.setTextNodeRange(i,t,i,t)),n=l.slice(0,a)+r+l.slice(a+n),i.__text=n,i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){tn();var n=this.getLatest(),r=n.getTextContent(),o=n.__key,i=xo(),l=new Set(t);t=[];for(var s=r.length,a="",u=0;u<s;u++)a!==""&&l.has(u)&&(t.push(a),a=""),a+=r[u];if(a!==""&&t.push(a),l=t.length,l===0)return[];if(t[0]===r)return[n];var c=t[0];r=n.getParentOrThrow(),u=n.getFormat();let d=n.getStyle(),f=n.__detail;s=!1,n.isSegmented()?(a=Ct(c),a.__format=u,a.__style=d,a.__detail=f,s=!0):(a=n.getWritable(),a.__text=c),n=Ke(),a=[a],c=c.length;for(let m=1;m<l;m++){var h=t[m],g=h.length;h=Ct(h).getWritable(),h.__format=u,h.__style=d,h.__detail=f;let _=h.__key;if(g=c+g,fe(n)){let v=n.anchor,y=n.focus;v.key===o&&v.type==="text"&&v.offset>c&&v.offset<=g&&(v.key=_,v.offset-=c,n.dirty=!0),y.key===o&&y.type==="text"&&y.offset>c&&y.offset<=g&&(y.key=_,y.offset-=c,n.dirty=!0)}i===o&&Lt(_),c=g,a.push(h)}return o=this.getPreviousSibling(),i=this.getNextSibling(),o!==null&&Nc(o),i!==null&&Nc(i),o=r.getWritable(),i=this.getIndexWithinParent(),s?(o.splice(i,0,a),this.remove()):o.splice(i,1,a),fe(n)&&Lc(n,r,i,l-1),a}mergeWithSibling(t){var n=t===this.getPreviousSibling();n||t===this.getNextSibling()||K(50);var r=this.__key;let o=t.__key,i=this.__text,l=i.length;xo()===o&&Lt(r);let s=Ke();if(fe(s)){let a=s.anchor,u=s.focus;a!==null&&a.key===o&&(Fy(a,n,r,t,l),s.dirty=!0),u!==null&&u.key===o&&(Fy(u,n,r,t,l),s.dirty=!0)}return r=t.__text,this.setTextContent(n?r+i:i+r),n=this.getWritable(),t.remove(),n}isTextEntity(){return!1}}function A2(e){let t=e.style.fontWeight==="700",n=e.style.textDecoration==="line-through",r=e.style.fontStyle==="italic",o=e.style.textDecoration==="underline",i=e.style.verticalAlign;return{forChild:l=>(Z(l)&&(t&&l.toggleFormat("bold"),n&&l.toggleFormat("strikethrough"),r&&l.toggleFormat("italic"),o&&l.toggleFormat("underline"),i==="sub"&&l.toggleFormat("subscript"),i==="super"&&l.toggleFormat("superscript")),l),node:null}}function M2(e){let t=e.style.fontWeight==="normal";return{forChild:n=>(Z(n)&&!t&&n.toggleFormat("bold"),n),node:null}}let Py=new WeakMap;function L2(e){e.parentElement===null&&K(129);for(var t=e.textContent||"",n,r=e.parentNode,o=[e];r!==null&&(n=Py.get(r))===void 0&&!(r.nodeName==="PRE"||r.nodeType===1&&r.style.whiteSpace.startsWith("pre"));)o.push(r),r=r.parentNode;for(n=n===void 0?r:n,r=0;r<o.length;r++)Py.set(o[r],n);if(n!==null){for(t=t.split(/(\r?\n|\t)/),e=[],o=t.length,n=0;n<o;n++)r=t[n],r===`
|
|
119
|
-
`||r===`\r
|
|
120
|
-
`?e.push(Nl()):r===" "?e.push(_d()):r!==""&&e.push(Ct(r));return{node:e}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){for(o=e,n=!0;o!==null&&(o=Oy(o,!1))!==null;)if(r=o.textContent||"",0<r.length){/[ \t\n]$/.test(r)&&(t=t.slice(1)),n=!1;break}n&&(t=t.slice(1))}if(t[t.length-1]===" "){for(o=!0;e!==null&&(e=Oy(e,!0))!==null;)if(0<(e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){o=!1;break}o&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:Ct(t)}}let D2=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function Oy(e,t){for(;;){for(var n=void 0;(n=t?e.nextSibling:e.previousSibling)===null;)if(e=e.parentElement,e===null)return null;if(e=n,e.nodeType===1&&(n=e.style.display,n===""&&e.nodeName.match(D2)===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 I2={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function lo(e){let t=I2[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:n=>(Z(n)&&!n.hasFormat(t)&&n.toggleFormat(t),n),node:null}}function Ct(e=""){return Fa(new bi(e))}function Z(e){return e instanceof bi}class Ul extends bi{static getType(){return"tab"}static clone(t){let n=new Ul(t.__key);return n.__text=t.__text,n.__format=t.__format,n.__style=t.__style,n}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}static importJSON(t){let n=_d();return n.setFormat(t.format),n.setStyle(t.style),n}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){K(126)}setDetail(){K(127)}setMode(){K(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function _d(){return Fa(new Ul)}class Er{constructor(t,n,r){this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){let n=this.getNode(),r=t.getNode(),o=this.offset;if(t=t.offset,W(n)){var i=n.getDescendantByIndex(o);n=i??n}return W(r)&&(i=r.getDescendantByIndex(t),r=i??r),n===r?o<t:n.isBefore(r)}getNode(){let t=kt(this.key);return t===null&&K(20),t}set(t,n,r){let o=this._selection,i=this.key;this.key=t,this.offset=n,this.type=r,Kl()||(xo()===i&&Lt(t),o!==null&&(o._cachedNodes=null,o.dirty=!0))}}function Tf(e,t){let n=t.__key,r=e.offset,o="element";if(Z(t))o="text",t=t.getTextContentSize(),r>t&&(r=t);else if(!W(t)){var i=t.getNextSibling();Z(i)?(n=i.__key,r=0,o="text"):(i=t.getParent())&&(n=i.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,o)}function Ay(e,t){if(W(t)){let n=t.getLastDescendant();W(n)||Z(n)?Tf(e,n):Tf(e,t)}else Tf(e,t)}function My(e,t,n,r){let o=e.getNode(),i=o.getChildAtIndex(e.offset),l=Ct(),s=rn(o)?vi().append(l):l;l.setFormat(n),l.setStyle(r),i===null?o.append(s):(i.insertBefore(s),t.type==="element"&&t.key===e.key&&t.offset!==e.offset&&t.set(t.key,t.offset+1,"element")),e.is(t)&&t.set(l.__key,0,"text"),e.set(l.__key,0,"text")}function fo(e,t,n,r){e.key=t,e.offset=n,e.type=r}class Sd{constructor(t){this.dirty=!1,this._nodes=t,this._cachedNodes=null}is(t){if(!Vl(t))return!1;let n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(o=>r.has(o))}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new Sd(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t,n){let r=this.getNodes(),o=r.length;var i=r[o-1];if(Z(i))i=i.select();else{let l=i.getIndexWithinParent()+1;i=i.getParentOrThrow().select(l,l)}for(i.insertNodes(t,n),t=0;t<o;t++)r[t].remove();return!0}getNodes(){var t=this._cachedNodes;if(t!==null)return t;var n=this._nodes;t=[];for(let r of n)n=kt(r),n!==null&&t.push(n);return Kl()||(this._cachedNodes=t),t}getTextContent(){let t=this.getNodes(),n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}}function fe(e){return e instanceof Ni}function hp(e){let[t,,n]=aS(e);e=n.getChildren();let r=e.length;var o=e[0].getChildren().length;let i=Array(r);for(var l=0;l<r;l++)i[l]=Array(o);for(o=0;o<r;o++){l=e[o].getChildren();let s=0;for(let a=0;a<l.length;a++){for(;i[o][s];)s++;let u=l[a],c=u.__rowSpan||1,d=u.__colSpan||1;for(let f=0;f<c;f++)for(let h=0;h<d;h++)i[o+f][s+h]=u;if(t===u)return{colSpan:d,columnIndex:s,rowIndex:o,rowSpan:c};s+=d}}return null}class Ed{constructor(t,n,r){this.gridKey=t,this.anchor=n,this.focus=r,this.dirty=!1,this._cachedNodes=null,n._selection=this,r._selection=this}is(t){return sm(t)?this.gridKey===t.gridKey&&this.anchor.is(t.anchor)&&this.focus.is(t.focus):!1}set(t,n,r){this.dirty=!0,this.gridKey=t,this.anchor.key=n,this.focus.key=r,this._cachedNodes=null}clone(){return new Ed(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Ku(this)}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t,n){let r=this.focus.getNode();return qg(r.select(0,r.getChildrenSize())).insertNodes(t,n)}getShape(){var t=kt(this.anchor.key);if(In(t)||K(103),t=hp(t),t===null)throw Error("getCellRect: expected to find AnchorNode");var n=kt(this.focus.key);In(n)||K(104);let r=hp(n);if(r===null)throw Error("getCellRect: expected to find focusCellNode");n=Math.min(t.columnIndex,r.columnIndex);let o=Math.max(t.columnIndex,r.columnIndex),i=Math.min(t.rowIndex,r.rowIndex);return t=Math.max(t.rowIndex,r.rowIndex),{fromX:Math.min(n,o),fromY:Math.min(i,t),toX:Math.max(n,o),toY:Math.max(i,t)}}getNodes(){function t(_){let{cell:v,startColumn:y,startRow:x}=_;a=Math.min(a,y),u=Math.min(u,x),c=Math.max(c,y+v.__colSpan-1),d=Math.max(d,x+v.__rowSpan-1)}var n=this._cachedNodes;if(n!==null)return n;var r=this.anchor.getNode();n=this.focus.getNode(),r=Ac(r,In);var o=Ac(n,In);In(r)||K(103),In(o)||K(104),n=r.getParent(),Ea(n)||K(105),n=n.getParent(),fm(n)||K(106);let[i,l,s]=sS(n,r,o),a=Math.min(l.startColumn,s.startColumn),u=Math.min(l.startRow,s.startRow),c=Math.max(l.startColumn+l.cell.__colSpan-1,s.startColumn+s.cell.__colSpan-1),d=Math.max(l.startRow+l.cell.__rowSpan-1,s.startRow+s.cell.__rowSpan-1);r=a,o=u;for(var f=a,h=u;a<r||u<o||c>f||d>h;){if(a<r){var g=h-o;--r;for(var m=0;m<=g;m++)t(i[o+m][r])}if(u<o)for(g=f-r,--o,m=0;m<=g;m++)t(i[o][r+m]);if(c>f)for(g=h-o,f+=1,m=0;m<=g;m++)t(i[o+m][f]);if(d>h)for(g=f-r,h+=1,m=0;m<=g;m++)t(i[h][r+m])}for(n=[n],r=null,o=u;o<=d;o++)for(f=a;f<=c;f++)({cell:h}=i[o][f]),g=h.getParent(),Ea(g)||K(107),g!==r&&n.push(g),n.push(h,..._2(h)),r=g;return Kl()||(this._cachedNodes=n),n}getTextContent(){let t=this.getNodes(),n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}}function sm(e){return e instanceof Ed}class Ni{constructor(t,n,r,o){this.anchor=t,this.focus=n,this.dirty=!1,this.format=r,this.style=o,this._cachedNodes=null,t._selection=this,n._selection=this}is(t){return fe(t)?this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style:!1}isBackward(){return this.focus.isBefore(this.anchor)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var t=this._cachedNodes;if(t!==null)return t;t=this.anchor;var n=this.focus,r=t.isBefore(n),o=r?t:n;r=r?n:t,t=o.getNode(),n=r.getNode();let i=o.offset;return o=r.offset,W(t)&&(r=t.getDescendantByIndex(i),t=r??t),W(n)&&(r=n.getDescendantByIndex(o),r!==null&&r!==t&&n.getChildAtIndex(o)===r&&(r=r.getPreviousSibling()),n=r??n),t=t.is(n)?W(t)&&0<t.getChildrenSize()?[]:[t]:t.getNodesBetween(n),Kl()||(this._cachedNodes=t),t}setTextNodeRange(t,n,r,o){fo(this.anchor,t.__key,n,"text"),fo(this.focus,r.__key,o,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let t=this.getNodes();if(t.length===0)return"";let n=t[0],r=t[t.length-1],o=this.anchor,i=this.focus,l=o.isBefore(i),[s,a]=Ku(this),u="",c=!0;for(let d=0;d<t.length;d++){let f=t[d];if(W(f)&&!f.isInline())c||(u+=`
|
|
121
|
-
`),c=!f.isEmpty();else if(c=!1,Z(f)){let h=f.getTextContent();f===n?f===r?(o.type!=="element"||i.type!=="element"||i.offset===o.offset)&&(h=s<a?h.slice(s,a):h.slice(a,s)):h=l?h.slice(s):h.slice(a):f===r&&(h=l?h.slice(0,a):h.slice(0,s)),u+=h}else!Ve(f)&&!_a(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(t){let n=nt(),r=n.getEditorState()._selection;if(t=iS(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r),t!==null){var[o,i]=t;fo(this.anchor,o.key,o.offset,o.type),fo(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}}clone(){let t=this.anchor,n=this.focus;return new Ni(new Er(t.key,t.offset,t.type),new Er(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=A_(this.format,t,null),this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){return(this.format&li[t])!==0}insertRawText(t){t=t.split(/(\r?\n|\t)/);let n=[],r=t.length;for(let o=0;o<r;o++){let i=t[o];i===`
|
|
122
|
-
`||i===`\r
|
|
123
|
-
`?n.push(Nl()):i===" "?n.push(_d()):n.push(Ct(i))}this.insertNodes(n)}insertText(t){var n=this.anchor,r=this.focus,o=this.isCollapsed()||n.isBefore(r),i=this.format,l=this.style;o&&n.type==="element"?My(n,r,i,l):o||r.type!=="element"||My(r,n,i,l);var s=this.getNodes(),a=s.length,u=o?r:n;r=(o?n:r).offset;var c=u.offset;n=s[0],Z(n)||K(26),o=n.getTextContent().length;var d=n.getParentOrThrow(),f=s[a-1];if(this.isCollapsed()&&r===o&&(n.isSegmented()||n.isToken()||!n.canInsertTextAfter()||!d.canInsertTextAfter()&&n.getNextSibling()===null)){var h=n.getNextSibling();if(Z(h)&&h.canInsertTextBefore()&&!qh(h)||(h=Ct(),h.setFormat(i),d.canInsertTextAfter()?n.insertAfter(h):d.insertAfter(h)),h.select(0,0),n=h,t!==""){this.insertText(t);return}}else if(this.isCollapsed()&&r===0&&(n.isSegmented()||n.isToken()||!n.canInsertTextBefore()||!d.canInsertTextBefore()&&n.getPreviousSibling()===null)){if(h=n.getPreviousSibling(),(!Z(h)||qh(h))&&(h=Ct(),h.setFormat(i),d.canInsertTextBefore()?n.insertBefore(h):d.insertBefore(h)),h.select(),n=h,t!==""){this.insertText(t);return}}else if(n.isSegmented()&&r!==o)d=Ct(n.getTextContent()),d.setFormat(i),n.replace(d),n=d;else if(!(this.isCollapsed()||t===""||(h=f.getParent(),d.canInsertTextBefore()&&d.canInsertTextAfter()&&(!W(h)||h.canInsertTextBefore()&&h.canInsertTextAfter())))){this.insertText(""),oS(this.anchor,this.focus,null),this.insertText(t);return}if(a===1)if(n.isToken())t=Ct(t),t.select(),n.replace(t);else{if(s=n.getFormat(),a=n.getStyle(),r===c&&(s!==i||a!==l))if(n.getTextContent()==="")n.setFormat(i),n.setStyle(l);else{s=Ct(t),s.setFormat(i),s.setStyle(l),s.select(),r===0?n.insertBefore(s,!1):([a]=n.splitText(r),a.insertAfter(s,!1)),s.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);return}n=n.spliceText(r,c-r,t,!0),n.getTextContent()===""?n.remove():this.anchor.type==="text"&&(n.isComposing()?this.anchor.offset-=t.length:(this.format=s,this.style=a))}else{if(i=new Set([...n.getParentKeys(),...f.getParentKeys()]),h=W(n)?n:n.getParentOrThrow(),l=W(f)?f:f.getParentOrThrow(),d=f,!h.is(l)&&l.isInline())do d=l,l=l.getParentOrThrow();while(l.isInline());if(u.type==="text"&&(c!==0||f.getTextContent()==="")||u.type==="element"&&f.getIndexWithinParent()<c)if(Z(f)&&!f.isToken()&&c!==f.getTextContentSize()){if(f.isSegmented()){var g=Ct(f.getTextContent());f.replace(g),f=g}rn(u.getNode())||(f=f.spliceText(0,c,"")),i.add(f.__key)}else u=f.getParentOrThrow(),u.canBeEmpty()||u.getChildrenSize()!==1?f.remove():u.remove();else i.add(f.__key);for(u=l.getChildren(),c=new Set(s),f=h.is(l),h=h.isInline()&&n.getNextSibling()===null?h:n,g=u.length-1;0<=g;g--){let m=u[g];if(m.is(n)||W(m)&&m.isParentOf(n))break;m.isAttached()&&(!c.has(m)||m.is(d)?f||h.insertAfter(m,!1):m.remove())}if(!f)for(u=l,c=null;u!==null;)l=u.getChildren(),f=l.length,(f===0||l[f-1].is(c))&&(i.delete(u.__key),c=u),u=u.getParent();for(n.isToken()?r===o?n.select():(t=Ct(t),t.select(),n.replace(t)):(n=n.spliceText(r,o-r,t,!0),n.getTextContent()===""?n.remove():n.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length)),t=1;t<a;t++)n=s[t],i.has(n.__key)||n.remove()}}removeText(){this.insertText("")}formatText(t){if(this.isCollapsed())this.toggleFormat(t),Lt(null);else{var n=this.getNodes(),r=[];for(var o of n)Z(o)&&r.push(o);var i=r.length;if(i===0)this.toggleFormat(t),Lt(null);else{o=this.anchor;var l=this.focus,s=this.isBackward();n=s?l:o,o=s?o:l;var a=0,u=r[0];if(l=n.type==="element"?0:n.offset,n.type==="text"&&l===u.getTextContentSize()&&(a=1,u=r[1],l=0),u!=null){s=u.getFormatFlags(t,null);var c=i-1,d=r[c];if(i=o.type==="text"?o.offset:d.getTextContentSize(),u.is(d))l!==i&&(l===0&&i===u.getTextContentSize()?u.setFormat(s):(t=u.splitText(l,i),t=l===0?t[0]:t[1],t.setFormat(s),n.type==="text"&&n.set(t.__key,0,"text"),o.type==="text"&&o.set(t.__key,i-l,"text")),this.format=s);else{l!==0&&([,u]=u.splitText(l),l=0),u.setFormat(s);var f=d.getFormatFlags(t,s);for(0<i&&(i!==d.getTextContentSize()&&([d]=d.splitText(i)),d.setFormat(f)),a+=1;a<c;a++){let h=r[a];if(!h.isToken()){let g=h.getFormatFlags(t,f);h.setFormat(g)}}n.type==="text"&&n.set(u.__key,l,"text"),o.type==="text"&&o.set(d.__key,i,"text"),this.format=s|f}}}}}insertNodes(t,n){if(!this.isCollapsed()){var r=this.isBackward()?this.anchor:this.focus,o=r.getNode().getNextSibling();if(o=o?o.getKey():null,r=(r=r.getNode().getPreviousSibling())?r.getKey():null,this.removeText(),this.isCollapsed()&&this.focus.type==="element"){if(this.focus.key===o&&this.focus.offset===0){var i=Ct();this.focus.getNode().insertBefore(i)}else this.focus.key===r&&this.focus.offset===this.focus.getNode().getChildrenSize()&&(i=Ct(),this.focus.getNode().insertAfter(i));i&&(this.focus.set(i.__key,0,"text"),this.anchor.set(i.__key,0,"text"))}}i=this.anchor,r=i.offset;var l=i.getNode();o=l,i.type==="element"&&(i=i.getNode(),o=i.getChildAtIndex(r-1),o=o===null?i:o),i=[];var s=l.getNextSiblings(),a=nr(l)?null:l.getTopLevelElementOrThrow();if(Z(l))if(o=l.getTextContent().length,r===0&&o!==0)o=l.getPreviousSibling(),o=o!==null?o:l.getParentOrThrow(),i.push(l);else if(r===o)o=l;else{if(l.isToken())return!1;[o,l]=l.splitText(r),i.push(l)}l=o,i.push(...s),s=t[0];var u=!1,c=null;for(let g=0;g<t.length;g++){var d=t[g];if(nr(o)||Ve(o)||!W(d)||d.isInline())u&&!W(d)&&!Ve(d)&&nr(o.getParent())&&K(28);else{if(d.is(s)){if(W(o)&&o.isEmpty()&&o.canReplaceWith(d)){o.replace(d),o=d,u=!0;continue}if(u=d.getFirstDescendant(),M_(u)){for(var f=u.getParentOrThrow();f.isInline();)f=f.getParentOrThrow();if(c=f.getChildren(),u=c.length,W(o)){var h=o.getFirstChild();for(let m=0;m<u;m++){let _=c[m];h===null?o.append(_):h.insertAfter(_),h=_}}else{for(h=u-1;0<=h;h--)o.insertAfter(c[h]);o=o.getParentOrThrow()}if(c=c[u-1],f.remove(),u=!0,f.is(d))continue}}Z(o)&&(a===null&&K(27),o=a)}u=!1,W(o)&&!o.isInline()?(c=d,Ve(d)&&!d.isInline()?o=t.length===1&&o.canBeEmpty()&&o.isEmpty()?o.insertBefore(d,!1):o.insertAfter(d,!1):W(d)?(d.canBeEmpty()||!d.isEmpty())&&(rn(o)?(f=o.getChildAtIndex(r),f!==null?f.insertBefore(d):o.append(d),o=d):d.isInline()?(o.append(d),o=d):o=o.insertAfter(d,!1)):(f=o.getFirstChild(),f!==null?f.insertBefore(d):o.append(d),o=d)):!W(d)||W(d)&&d.isInline()||Ve(o)&&!o.isInline()?(c=d,fe(this)&&Ve(d)&&(W(o)||Z(o))&&!d.isInline()?(Z(o)?(f=o.getParentOrThrow(),[o]=o.splitText(r),o=o.getIndexWithinParent()+1):(f=o,o=r),[,o]=U_(f,o),o=o.insertBefore(d)):o=o.insertAfter(d,!1)):(d=o.getParentOrThrow(),_a(o)&&o.remove(),o=d,g--)}if(n&&(Z(l)?l.select():(t=o.getPreviousSibling(),Z(t)?t.select():(t=o.getIndexWithinParent(),o.getParentOrThrow().select(t,t)))),W(o)){if(t=Z(c)?c:W(c)&&c.isInline()?c.getLastDescendant():o.getLastDescendant(),n||(t===null?o.select():Z(t)?t.getTextContent()===""?t.selectPrevious():t.select():t.selectNext()),i.length!==0)for(n=o,t=i.length-1;0<=t;t--)r=i[t],a=r.getParentOrThrow(),!W(o)||pp(r)||Ve(r)&&(!r.isInline()||r.isIsolated())?W(o)||pp(r)?W(r)&&!r.canInsertAfter(o)?(l=a.constructor.clone(a),W(l)||K(29),l.append(r),o.insertAfter(l)):o.insertAfter(r):(o.insertBefore(r),o=r):(n===o?o.append(r):o.insertBefore(r),o=r),a.isEmpty()&&!a.canBeEmpty()&&a.remove()}else n||(Z(o)?o.select():(n=o.getParentOrThrow(),t=o.getIndexWithinParent()+1,n.select(t,t)));return!0}insertParagraph(){this.isCollapsed()||this.removeText();var t=this.anchor,n=t.offset,r=[];if(t.type==="text"){var o=t.getNode(),i=o.getNextSiblings().reverse(),l=o.getParentOrThrow(),s=l.isInline(),a=s?l.getTextContentSize():o.getTextContentSize();n===0?i.push(o):(s&&(r=l.getNextSiblings()),n===a||s&&n===o.getTextContentSize()||([,o]=o.splitText(n),i.push(o)))}else{if(l=t.getNode(),nr(l)){i=vi(),r=l.getChildAtIndex(n),i.select(),r!==null?r.insertBefore(i,!1):l.append(i);return}i=l.getChildren().slice(n).reverse()}if(o=i.length,n===0&&0<o&&l.isInline()){if(r=l.getParentOrThrow(),i=r.insertNewAfter(this,!1),W(i))for(r=r.getChildren(),l=0;l<r.length;l++)i.append(r[l])}else if(s=l.insertNewAfter(this,!1),s===null)this.insertLineBreak();else if(W(s))if(a=l.getFirstChild(),n===0&&(l.is(t.getNode())||a&&a.is(t.getNode()))&&0<o)l.insertBefore(s);else{if(l=null,n=r.length,t=s.getParentOrThrow(),0<n)for(a=0;a<n;a++)t.append(r[a]);if(o!==0)for(r=0;r<o;r++)n=i[r],l===null?s.append(n):l.insertBefore(n),l=n;s.canBeEmpty()||s.getChildrenSize()!==0?s.selectStart():(s.selectPrevious(),s.remove())}}insertLineBreak(t){let n=Nl();var r=this.anchor;r.type==="element"&&(r=r.getNode(),rn(r)&&this.insertParagraph()),t?this.insertNodes([n],!0):this.insertNodes([n])&&n.selectNext(0,0)}getCharacterOffsets(){return Ku(this)}extract(){var t=this.getNodes(),n=t.length,r=n-1,o=this.anchor;let i=this.focus;var l=t[0];let s=t[r],[a,u]=Ku(this);return n===0?[]:n===1?Z(l)&&!this.isCollapsed()?(t=a>u?u:a,r=l.splitText(t,a>u?a:u),t=t===0?r[0]:r[1],t!=null?[t]:[]):[l]:(n=o.isBefore(i),Z(l)&&(o=n?a:u,o===l.getTextContentSize()?t.shift():o!==0&&([,l]=l.splitText(o),t[0]=l)),Z(s)&&(l=s.getTextContent().length,n=n?u:a,n===0?t.pop():n!==l&&([s]=s.splitText(n),t[r]=s)),t)}modify(t,n,r){var o=this.focus,i=this.anchor,l=t==="move",s=ep(o,n);if(Ve(s)&&!s.isIsolated())l&&s.isKeyboardSelectable()?(n=gp(),n.add(s.__key),Sr(n)):(t=n?s.getPreviousSibling():s.getNextSibling(),Z(t)?(s=t.__key,n=n?t.getTextContent().length:0,o.set(s,n,"text"),l&&i.set(s,n,"text")):(r=s.getParentOrThrow(),W(t)?(r=t.__key,s=n?t.getChildrenSize():0):(s=s.getIndexWithinParent(),r=r.__key,n||s++),o.set(r,s,"element"),l&&i.set(r,s,"element")));else if(i=nt(),o=Nr(i._window)){var a=i._blockCursorElement,u=i._rootElement;if(u===null||a===null||!W(s)||s.isInline()||s.canBeEmpty()||tp(a,i,u),o.modify(t,n?"backward":"forward",r),0<o.rangeCount&&(s=o.getRangeAt(0),i=this.anchor.getNode(),i=rn(i)?i:B_(i),this.applyDOMRange(s),this.dirty=!0,!l)){for(l=this.getNodes(),t=[],r=!1,a=0;a<l.length;a++)u=l[a],Oc(u,i)?t.push(u):r=!0;r&&0<t.length&&(n?(n=t[0],W(n)?n.selectStart():n.getParentOrThrow().selectStart()):(n=t[t.length-1],W(n)?n.selectEnd():n.getParentOrThrow().selectEnd())),(o.anchorNode!==s.startContainer||o.anchorOffset!==s.startOffset)&&(n=this.focus,l=this.anchor,o=l.key,s=l.offset,i=l.type,fo(l,n.key,n.offset,n.type),fo(n,o,s,i),this._cachedNodes=null)}}}deleteCharacter(t){let n=this.isCollapsed();if(this.isCollapsed()){var r=this.anchor,o=this.focus,i=r.getNode();if(!t&&(r.type==="element"&&W(i)&&r.offset===i.getChildrenSize()||r.type==="text"&&r.offset===i.getTextContentSize())){var l=i.getParent();if(l=i.getNextSibling()||(l===null?null:l.getNextSibling()),W(l)&&l.isShadowRoot())return}if(l=ep(o,t),Ve(l)&&!l.isIsolated()){l.isKeyboardSelectable()&&W(i)&&i.getChildrenSize()===0?(i.remove(),t=gp(),t.add(l.__key),Sr(t)):(l.remove(),nt().dispatchCommand(pd,void 0));return}if(!t&&W(l)&&W(i)&&i.isEmpty()){i.remove(),l.selectStart();return}if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&(r.type==="element"?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(l=o.type==="text"?o.getNode():null,i=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){if(r=o.offset,o=l.getTextContentSize(),l.is(i)||t&&r!==o||!t&&r!==0){Dy(l,t,r);return}}else if(i!==null&&i.isSegmented()&&(r=r.offset,o=i.getTextContentSize(),i.is(l)||t&&r!==0||!t&&r!==o)){Dy(i,t,r);return}if(i=this.anchor,l=this.focus,r=i.getNode(),o=l.getNode(),r===o&&i.type==="text"&&l.type==="text"){var s=i.offset,a=l.offset;let u=s<a;o=u?s:a,a=u?a:s,s=a-1,o!==s&&(r=r.getTextContent().slice(o,a),j_(r)||(t?l.offset=s:i.offset=s))}}}this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(t=this.anchor.getNode(),t.isEmpty()&&rn(t.getParent())&&t.getIndexWithinParent()===0&&t.collapseAtStart(this))}deleteLine(t){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",t,"lineboundary"),(t?this.focus:this.anchor).offset===0&&this.modify("extend",t,"character")),this.removeText()}deleteWord(t){this.isCollapsed()&&this.modify("extend",t,"word"),this.removeText()}}function Vl(e){return e instanceof Sd}function Ly(e){let t=e.offset;return e.type==="text"?t:(e=e.getNode(),t===e.getChildrenSize()?e.getTextContent().length:0)}function Ku(e){let t=e.anchor;return e=e.focus,t.type==="element"&&e.type==="element"&&t.key===e.key&&t.offset===e.offset?[0,0]:[Ly(t),Ly(e)]}function Dy(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),o=r.length,i=0,l=0;for(let s=0;s<o;s++){let a=r[s],u=s===o-1;if(l=i,i+=a.length,t&&i===n||i>n||u){r.splice(s,1),u&&(l=void 0);break}}t=r.join("").trim(),t===""?e.remove():(e.setTextContent(t),e.select(l,l))}function Iy(e,t,n,r){var o=t;if(e.nodeType===1){let s=!1;var i=e.childNodes,l=i.length;o===l&&(s=!0,o=l-1);let a=i[o];if(l=!1,a===r._blockCursorElement?(a=i[o+1],l=!0):r._blockCursorElement!==null&&o--,r=ol(a),Z(r))o=s?r.getTextContentSize():0;else{if(i=ol(e),i===null)return null;if(W(i)?(e=i.getChildAtIndex(o),(t=W(e))&&(t=e.getParent(),t=n===null||t===null||!t.canBeEmpty()||t!==n.getNode()),t&&(n=s?e.getLastDescendant():e.getFirstDescendant(),n===null?(i=e,o=0):(e=n,i=W(e)?e:e.getParentOrThrow())),Z(e)?(r=e,i=null,o=s?e.getTextContentSize():0):e!==i&&s&&!l&&o++):(o=i.getIndexWithinParent(),o=t===0&&Ve(i)&&ol(e)===i?o:o+1,i=i.getParentOrThrow()),W(i))return new Er(i.__key,o,"element")}}else r=ol(e);return Z(r)?new Er(r.__key,o,"text"):null}function jy(e,t,n){var r=e.offset,o=e.getNode();r===0?(r=o.getPreviousSibling(),o=o.getParent(),t?(n||!t)&&r===null&&W(o)&&o.isInline()&&(t=o.getPreviousSibling(),Z(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)):W(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Z(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===o.getTextContent().length&&(r=o.getNextSibling(),o=o.getParent(),t&&W(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&r===null&&W(o)&&o.isInline()&&!o.canInsertTextAfter()&&(t=o.getNextSibling(),Z(t)&&(e.key=t.__key,e.offset=0)))}function oS(e,t,n){if(e.type==="text"&&t.type==="text"){var r=e.isBefore(t);let o=e.is(t);jy(e,r,o),jy(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type),r=nt(),r.isComposing()&&r._compositionKey!==e.key&&fe(n)&&(r=n.anchor,n=n.focus,fo(e,r.key,r.offset,r.type),fo(t,n.key,n.offset,n.type))}}function iS(e,t,n,r,o,i){return e===null||n===null||!ja(o,e,n)||(t=Iy(e,t,fe(i)?i.anchor:null,o),t===null)||(r=Iy(n,r,fe(i)?i.focus:null,o),r===null||t.type==="element"&&r.type==="element"&&(e=ol(e),n=ol(n),Ve(e)&&Ve(n)))?null:(oS(t,r,i),[t,r])}function pp(e){return W(e)&&!e.isInline()}function lS(e,t,n,r,o,i){let l=Rr();return e=new Ni(new Er(e,t,o),new Er(n,r,i),0,""),e.dirty=!0,l._selection=e}function gp(){return new Sd(new Set)}function j2(e){let t=e.getEditorState()._selection,n=Nr(e._window);return Vl(t)||sm(t)?t.clone():am(t,n,e)}function am(e,t,n){var r=n._window;if(r===null)return null;var o=r.event,i=o?o.type:void 0;r=i==="selectionchange",o=!Zh&&(r||i==="beforeinput"||i==="compositionstart"||i==="compositionend"||i==="click"&&o&&o.detail===3||i==="drop"||i===void 0);let l;if(!fe(e)||o){if(t===null)return null;if(o=t.anchorNode,i=t.focusNode,l=t.anchorOffset,t=t.focusOffset,r&&fe(e)&&!ja(n,o,i))return e.clone()}else return e.clone();if(n=iS(o,l,i,t,n,e),n===null)return null;let[s,a]=n;return new Ni(s,a,fe(e)?e.format:0,fe(e)?e.style:"")}function Ke(){return Rr()._selection}function Hl(){return nt()._editorState._selection}function Lc(e,t,n,r=1){var o=e.anchor,i=e.focus,l=o.getNode(),s=i.getNode();if(t.is(l)||t.is(s)){if(l=t.__key,e.isCollapsed())t=o.offset,(n<=t&&0<r||n<t&&0>r)&&(n=Math.max(0,t+r),o.set(l,n,"element"),i.set(l,n,"element"),zy(e));else{let u=e.isBackward();s=u?i:o;var a=s.getNode();o=u?o:i,i=o.getNode(),t.is(a)&&(a=s.offset,(n<=a&&0<r||n<a&&0>r)&&s.set(l,Math.max(0,a+r),"element")),t.is(i)&&(t=o.offset,(n<=t&&0<r||n<t&&0>r)&&o.set(l,Math.max(0,t+r),"element"))}zy(e)}}function zy(e){var t=e.anchor,n=t.offset;let r=e.focus;var o=r.offset,i=t.getNode(),l=r.getNode();if(e.isCollapsed())W(i)&&(l=i.getChildrenSize(),l=(o=n>=l)?i.getChildAtIndex(l-1):i.getChildAtIndex(n),Z(l)&&(n=0,o&&(n=l.getTextContentSize()),t.set(l.__key,n,"text"),r.set(l.__key,n,"text")));else{if(W(i)){let s=i.getChildrenSize();n=(e=n>=s)?i.getChildAtIndex(s-1):i.getChildAtIndex(n),Z(n)&&(i=0,e&&(i=n.getTextContentSize()),t.set(n.__key,i,"text"))}W(l)&&(n=l.getChildrenSize(),o=(t=o>=n)?l.getChildAtIndex(n-1):l.getChildAtIndex(o),Z(o)&&(l=0,t&&(l=o.getTextContentSize()),r.set(o.__key,l,"text")))}}function z2(e,t){if(t=t.getEditorState()._selection,e=e._selection,fe(e)){var n=e.anchor;let r=e.focus,o;n.type==="text"&&(o=n.getNode(),o.selectionTransform(t,e)),r.type==="text"&&(n=r.getNode(),o!==n&&n.selectionTransform(t,e))}}function Dc(e,t,n,r,o){let i=null,l=0,s=null;r!==null?(i=r.__key,Z(r)?(l=r.getTextContentSize(),s="text"):W(r)&&(l=r.getChildrenSize(),s="element")):o!==null&&(i=o.__key,Z(o)?s="text":W(o)&&(s="element")),i!==null&&s!==null?e.set(i,l,s):(l=t.getIndexWithinParent(),l===-1&&(l=n.getChildrenSize()),e.set(n.__key,l,"element"))}function Fy(e,t,n,r,o){e.type==="text"?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&--e.offset}function sS(e,t,n){let r=[],o=null,i=null;e=e.getChildren();for(let c=0;c<e.length;c++){var l=e[c];Ea(l)||K(108);var s=l.getChildren();l=0;for(let d of s){for(In(d)||K(109);r[c]!==void 0&&r[c][l]!==void 0;)l++;s=c;var a=l,u=d;let f={cell:u,startColumn:a,startRow:s},h=u.__rowSpan,g=u.__colSpan;for(let m=0;m<h;m++){r[s+m]===void 0&&(r[s+m]=[]);for(let _=0;_<g;_++)r[s+m][a+_]=f}t.is(u)&&(o=f),n.is(u)&&(i=f),l+=d.__colSpan}}return o===null&&K(110),i===null&&K(111),[r,o,i]}function aS(e){e instanceof dm||(e instanceof Ba?(e=Ac(e,In),In(e)||K(114)):(e=Ac(e.getNode(),In),In(e)||K(114)));let t=e.getParent();Ea(t)||K(115);let n=t.getParent();return fm(n)||K(116),[e,t,n]}let Tt=null,bt=null,yn=!1,bf=!1,Sa=0,By={characterData:!0,childList:!0,subtree:!0};function Kl(){return yn||Tt!==null&&Tt._readOnly}function tn(){yn&&K(13)}function Rr(){return Tt===null&&K(15),Tt}function nt(){return bt===null&&K(16),bt}function Wy(e,t,n){var r=t.__type;let o=e._nodes.get(r);for(o===void 0&&K(30,r),e=n.get(r),e===void 0&&(e=Array.from(o.transforms),n.set(r,e)),n=e.length,r=0;r<n&&(e[r](t),t.isAttached());r++);}function F2(e,t){t=t._dirtyLeaves,e=e._nodeMap;for(let n of t)t=e.get(n),Z(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&O_(t)}function B2(e,t){let n=t._dirtyLeaves,r=t._dirtyElements;e=e._nodeMap;let o=xo(),i=new Map;var l=n;let s=l.size;for(var a=r,u=a.size;0<s||0<u;){if(0<s){t._dirtyLeaves=new Set;for(let c of l)l=e.get(c),Z(l)&&l.isAttached()&&l.isSimpleText()&&!l.isUnmergeable()&&O_(l),l!==void 0&&l!==void 0&&l.__key!==o&&l.isAttached()&&Wy(t,l,i),n.add(c);if(l=t._dirtyLeaves,s=l.size,0<s){Sa++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(let c of a)a=c[0],u=c[1],(a==="root"||u)&&(l=e.get(a),l!==void 0&&l!==void 0&&l.__key!==o&&l.isAttached()&&Wy(t,l,i),r.set(a,u));l=t._dirtyLeaves,s=l.size,a=t._dirtyElements,u=a.size,Sa++}t._dirtyLeaves=n,t._dirtyElements=r}function um(e,t){var n=e.type,r=t.get(n);if(r===void 0&&K(17,n),n=r.klass,e.type!==n.getType()&&K(18,n.name),n=n.importJSON(e),e=e.children,W(n)&&Array.isArray(e))for(r=0;r<e.length;r++){let o=um(e[r],t);n.append(o)}return n}function Uy(e,t){let n=Tt,r=yn,o=bt;Tt=e,yn=!0,bt=null;try{return t()}finally{Tt=n,yn=r,bt=o}}function ai(e,t){let n=e._pendingEditorState,r=e._rootElement,o=e._headless||r===null;if(n!==null){var i=e._editorState,l=i._selection,s=n._selection,a=e._dirtyType!==0,u=Tt,c=yn,d=bt,f=e._updating,h=e._observer,g=null;if(e._pendingEditorState=null,e._editorState=n,!o&&a&&h!==null){bt=e,Tt=n,yn=!1,e._updating=!0;try{let Re=e._dirtyType,mt=e._dirtyElements,Je=e._dirtyLeaves;h.disconnect();var m=Re,_=mt,v=Je;en=jr=vt="",H_=m===2,Uu=null,Vt=e,Mo=e._config,ya=e._nodes,wd=Vt._listeners.mutation,np=_,rp=v,mi=i._nodeMap,Lo=n._nodeMap,lm=n._readOnly,op=new Map(e._keyToDOMMap);let Yt=new Map;xa=Yt,Es("root",null),xa=op=Mo=Lo=mi=rp=np=ya=Vt=void 0,g=Yt}catch(Re){if(Re instanceof Error&&e._onError(Re),bf)throw Re;fS(e,null,r,n),P_(e),e._dirtyType=2,bf=!0,ai(e,i),bf=!1;return}finally{h.observe(r,By),e._updating=f,Tt=u,yn=c,bt=d}}n._readOnly||(n._readOnly=!0);var y=e._dirtyLeaves,x=e._dirtyElements,S=e._normalizedNodes,k=e._updateTags,b=e._deferred;a&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set);var T=e._decorators,N=e._pendingDecorators||T,D=n._nodeMap,M;for(M in N)D.has(M)||(N===T&&(N=I_(e)),delete N[M]);var j=o?null:Nr(e._window);if(e._editable&&j!==null&&(a||s===null||s.dirty)){bt=e,Tt=n;try{if(h!==null&&h.disconnect(),a||s===null||s.dirty){let Re=e._blockCursorElement;Re!==null&&tp(Re,e,r);e:{let mt=j.anchorNode,Je=j.focusNode,Yt=j.anchorOffset,dn=j.focusOffset,at=document.activeElement;if(!(k.has("collaboration")&&at!==r||at!==null&&em(at)))if(fe(s)){var B=s.anchor,re=s.focus,H=B.key,Y=re.key,C=Pc(e,H),$=Pc(e,Y),E=B.offset,O=re.offset,R=s.format,F=s.style,V=s.isCollapsed(),ae=C,oe=$,$e=!1;if(B.type==="text"){ae=bc(C);let St=B.getNode();$e=St.getFormat()!==R||St.getStyle()!==F}else fe(l)&&l.anchor.type==="text"&&($e=!0);if(re.type==="text"&&(oe=bc($)),ae!==null&&oe!==null){if(V&&(l===null||$e||fe(l)&&(l.format!==R||l.style!==F))){var _e=performance.now();q_=[R,F,E,H,_e]}if(Yt===E&&dn===O&&mt===ae&&Je===oe&&(j.type!=="Range"||!V)&&(at!==null&&r.contains(at)||r.focus({preventScroll:!0}),B.type!=="element"))break e;try{j.setBaseAndExtent(ae,E,oe,O)}catch{}if(!k.has("skip-scroll-into-view")&&s.isCollapsed()&&r!==null&&r===document.activeElement){let St=s instanceof Ni&&s.anchor.type==="element"?ae.childNodes[E]||null:0<j.rangeCount?j.getRangeAt(0):null;if(St!==null){let Xt;if(St instanceof Text){let ot=document.createRange();ot.selectNode(St),Xt=ot.getBoundingClientRect()}else Xt=St.getBoundingClientRect();let xn=r.ownerDocument,Or=xn.defaultView;if(Or!==null)for(var{top:Q,bottom:Ne}=Xt,ye,Se,pe=r;pe!==null;){let ot=pe===xn.body;if(ot)ye=0,Se=yd(e).innerHeight;else{let Ko=pe.getBoundingClientRect();ye=Ko.top,Se=Ko.bottom}let ar=0;if(Q<ye?ar=-(ye-Q):Ne>Se&&(ar=Ne-Se),ar!==0)if(ot)Or.scrollBy(0,ar);else{let Ko=pe.scrollTop;pe.scrollTop+=ar;let ts=pe.scrollTop-Ko;Q-=ts,Ne-=ts}if(ot)break;pe=vd(pe)}}}up=!0}}else l!==null&&ja(e,mt,Je)&&j.removeAllRanges()}}e:{let Re=e._blockCursorElement;if(fe(s)&&s.isCollapsed()&&s.anchor.type==="element"&&r.contains(document.activeElement)){let mt=s.anchor,Je=mt.getNode(),Yt=mt.offset,dn=Je.getChildrenSize(),at=!1,St=null;if(Yt===dn){let Xt=Je.getChildAtIndex(Yt-1);_f(Xt)&&(at=!0)}else{let Xt=Je.getChildAtIndex(Yt);if(_f(Xt)){let xn=Xt.getPreviousSibling();(xn===null||_f(xn))&&(at=!0,St=e.getElementByKey(Xt.__key))}}if(at){let Xt=e.getElementByKey(Je.__key);if(Re===null){let xn=e._config.theme,Or=document.createElement("div");Or.contentEditable="false",Or.setAttribute("data-lexical-cursor","true");let ot=xn.blockCursor;if(ot!==void 0){if(typeof ot=="string"){let ar=ot.split(" ");ot=xn.blockCursor=ar}ot!==void 0&&Or.classList.add(...ot)}e._blockCursorElement=Re=Or}r.style.caretColor="transparent",St===null?Xt.appendChild(Re):Xt.insertBefore(Re,St);break e}}Re!==null&&tp(Re,e,r)}h!==null&&h.observe(r,By)}finally{bt=d,Tt=u}}if(g!==null){var be=g;let Re=Array.from(e._listeners.mutation),mt=Re.length;for(let Je=0;Je<mt;Je++){let[Yt,dn]=Re[Je],at=be.get(dn);at!==void 0&&Yt(at,{dirtyLeaves:y,prevEditorState:i,updateTags:k})}}fe(s)||s===null||l!==null&&l.is(s)||e.dispatchCommand(pd,void 0);var Fe=e._pendingDecorators;Fe!==null&&(e._decorators=Fe,e._pendingDecorators=null,Vs("decorator",e,!0,Fe));var Ot=ky(t||i),cn=ky(n);if(Ot!==cn&&Vs("textcontent",e,!0,cn),Vs("update",e,!0,{dirtyElements:x,dirtyLeaves:y,editorState:n,normalizedNodes:S,prevEditorState:t||i,tags:k}),e._deferred=[],b.length!==0){let Re=e._updating;e._updating=!0;try{for(let mt=0;mt<b.length;mt++)b[mt]()}finally{e._updating=Re}}var Kn=e._updates;if(Kn.length!==0){let Re=Kn.shift();if(Re){let[mt,Je]=Re;uS(e,mt,Je)}}}}function Vs(e,t,n,...r){let o=t._updating;t._updating=n;try{let i=Array.from(t._listeners[e]);for(e=0;e<i.length;e++)i[e].apply(null,r)}finally{t._updating=o}}function J(e,t,n){if(e._updating===!1||bt!==e){let i=!1;return e.update(()=>{i=J(e,t,n)}),i}let r=nm(e);for(let i=4;0<=i;i--)for(let l=0;l<r.length;l++){var o=r[l]._commands.get(t);if(o!==void 0&&(o=o[i],o!==void 0)){o=Array.from(o);let s=o.length;for(let a=0;a<s;a++)if(o[a](n,e)===!0)return!0}}return!1}function Vy(e,t){let n=e._updates;for(t=t||!1;n.length!==0;){var r=n.shift();if(r){let[o,i]=r,l;i!==void 0&&(r=i.onUpdate,l=i.tag,i.skipTransforms&&(t=!0),r&&e._deferred.push(r),l&&e._updateTags.add(l)),o()}}return t}function uS(e,t,n){let r=e._updateTags;var o,i=o=!1;if(n!==void 0){var l=n.onUpdate;o=n.tag,o!=null&&r.add(o),o=n.skipTransforms||!1,i=n.discrete||!1}l&&e._deferred.push(l),n=e._editorState,l=e._pendingEditorState;let s=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=new Cd(new Map((l||n)._nodeMap)),s=!0),l._flushSync=i,i=Tt;let a=yn,u=bt,c=e._updating;Tt=l,yn=!1,e._updating=!0,bt=e;try{s&&(e._headless?n._selection!=null&&(l._selection=n._selection.clone()):l._selection=j2(e));let d=e._compositionKey;t(),o=Vy(e,o),z2(l,e),e._dirtyType!==0&&(o?F2(l,e):B2(l,e),Vy(e),S2(n,l,e._dirtyLeaves,e._dirtyElements)),d!==e._compositionKey&&(l._flushSync=!0);let f=l._selection;if(fe(f)){let h=l._nodeMap,g=f.focus.key;h.get(f.anchor.key)!==void 0&&h.get(g)!==void 0||K(19)}else Vl(f)&&f._nodes.size===0&&(l._selection=null)}catch(d){d instanceof Error&&e._onError(d),e._pendingEditorState=n,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),ai(e);return}finally{Tt=i,yn=a,bt=u,e._updating=c,Sa=0}e._dirtyType!==0||W2(l,e)?l._flushSync?(l._flushSync=!1,ai(e)):s&&y2(()=>{ai(e)}):(l._flushSync=!1,s&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Nn(e,t,n){e._updating?e._updates.push([t,n]):uS(e,t,n)}class cS extends Ba{constructor(t){super(t)}decorate(){K(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ve(e){return e instanceof cS}class Ri extends Ba{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 f2[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=nt()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){let t=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(t)}getAllTextNodes(){let t=[],n=this.getFirstChild();for(;n!==null;){if(Z(n)&&t.push(n),W(n)){let r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;t!==null;){if(W(t)){let n=t.getFirstChild();if(n!==null){t=n;continue}}break}return t}getLastDescendant(){let t=this.getLastChild();for(;t!==null;){if(W(t)){let n=t.getLastChild();if(n!==null){t=n;continue}}break}return t}getDescendantByIndex(t){let n=this.getChildren(),r=n.length;return t>=r?(t=n[r-1],W(t)&&t.getLastDescendant()||t||null):(t=n[t],W(t)&&t.getFirstDescendant()||t||null)}getFirstChild(){let t=this.getLatest().__first;return t===null?null:kt(t)}getFirstChildOrThrow(){let t=this.getFirstChild();return t===null&&K(45,this.__key),t}getLastChild(){let t=this.getLatest().__last;return t===null?null:kt(t)}getLastChildOrThrow(){let t=this.getLastChild();return t===null&&K(96,this.__key),t}getChildAtIndex(t){var n=this.getChildrenSize();let r;if(t<n/2){for(r=this.getFirstChild(),n=0;r!==null&&n<=t;){if(n===t)return r;r=r.getNextSibling(),n++}return null}for(r=this.getLastChild(),--n;r!==null&&n>=t;){if(n===t)return r;r=r.getPreviousSibling(),n--}return null}getTextContent(){let t="",n=this.getChildren(),r=n.length;for(let o=0;o<r;o++){let i=n[o];t+=i.getTextContent(),W(i)&&o!==r-1&&!i.isInline()&&(t+=`
|
|
124
|
-
|
|
125
|
-
`)}return t}getTextContentSize(){let t=0,n=this.getChildren(),r=n.length;for(let o=0;o<r;o++){let i=n[o];t+=i.getTextContentSize(),W(i)&&o!==r-1&&!i.isInline()&&(t+=2)}return t}getDirection(){return this.getLatest().__dir}hasFormat(t){return t!==""?(t=Sy[t],(this.getFormat()&t)!==0):!1}select(t,n){tn();let r=Ke(),o=t,i=n;var l=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&n===0){if(t=this.getFirstChild(),Z(t)||W(t))return t.select(0,0)}else if(!(t!==void 0&&t!==l||n!==void 0&&n!==l)&&(t=this.getLastChild(),Z(t)||W(t)))return t.select()}if(o===void 0&&(o=l),i===void 0&&(i=l),l=this.__key,fe(r))r.anchor.set(l,o,"element"),r.focus.set(l,i,"element"),r.dirty=!0;else return lS(l,o,l,i,"element","element");return r}selectStart(){let t=this.getFirstDescendant();return W(t)||Z(t)?t.select(0,0):t!==null?t.selectPrevious():this.select(0,0)}selectEnd(){let t=this.getLastDescendant();return W(t)||Z(t)?t.select():t!==null?t.selectNext():this.select()}clear(){let t=this.getWritable();return this.getChildren().forEach(n=>n.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){let n=this.getWritable();return n.__dir=t,n}setFormat(t){return this.getWritable().__format=t!==""?Sy[t]:0,this}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){let o=r.length,i=this.getChildrenSize(),l=this.getWritable(),s=l.__key;var a=[],u=[];let c=this.getChildAtIndex(t+n),d=null,f=i-n+o;if(t!==0)if(t===i)d=this.getLastChild();else{var h=this.getChildAtIndex(t);h!==null&&(d=h.getPreviousSibling())}if(0<n){var g=d===null?this.getFirstChild():d.getNextSibling();for(h=0;h<n;h++){g===null&&K(100);var m=g.getNextSibling(),_=g.__key;g=g.getWritable(),si(g),u.push(_),g=m}}for(h=d,m=0;m<o;m++){_=r[m],h!==null&&_.is(h)&&(d=h=h.getPreviousSibling()),g=_.getWritable(),g.__parent===s&&f--,si(g);let v=_.__key;h===null?(l.__first=v,g.__prev=null):(h=h.getWritable(),h.__next=v,g.__prev=h.__key),_.__key===s&&K(76),g.__parent=s,a.push(v),h=_}if(t+n===i?h!==null&&(h.getWritable().__next=null,l.__last=h.__key):c!==null&&(t=c.getWritable(),h!==null?(n=h.getWritable(),t.__prev=h.__key,n.__next=c.__key):t.__prev=null),l.__size=f,u.length&&(t=Ke(),fe(t))){u=new Set(u),a=new Set(a);let{anchor:v,focus:y}=t;Hy(v,u,a)&&Dc(v,v.getNode(),this,d,c),Hy(y,u,a)&&Dc(y,y.getNode(),this,d,c),f!==0||this.canBeEmpty()||nr(this)||this.remove()}return l}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function W(e){return e instanceof Ri}function Hy(e,t,n){for(e=e.getNode();e;){let r=e.__key;if(t.has(r)&&!n.has(r))return!0;e=e.getParent()}return!1}class Gl extends Ri{static getType(){return"root"}static clone(){return new Gl}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){K(51)}getTextContent(){let t=this.__cachedText;return!Kl()&&nt()._dirtyType!==0||t===null?super.getTextContent():t}remove(){K(52)}replace(){K(53)}insertBefore(){K(54)}insertAfter(){K(55)}updateDOM(){return!1}append(...t){for(let n=0;n<t.length;n++){let r=t[n];W(r)||Ve(r)||K(56)}return super.append(...t)}static importJSON(t){let n=br();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 rn(e){return e instanceof Gl}function W2(e,t){if(t=t.getEditorState()._selection,e=e._selection,e!==null){if(e.dirty||!e.is(t))return!0}else if(t!==null)return!0;return!1}function cm(){return new Cd(new Map([["root",new Gl]]))}function dS(e){let t=e.exportJSON();var n=e.constructor;t.type!==n.getType()&&K(130,n.name);let r=t.children;if(W(e))for(Array.isArray(r)||K(59,n.name),e=e.getChildren(),n=0;n<e.length;n++){let o=dS(e[n]);r.push(o)}return t}class Cd{constructor(t,n){this._nodeMap=t,this._selection=n||null,this._readOnly=this._flushSync=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t){return Uy(this,t)}clone(t){return t=new Cd(this._nodeMap,t===void 0?this._selection:t),t._readOnly=!0,t}toJSON(){return Uy(this,()=>({root:dS(br())}))}}class Yl extends Ri{static getType(){return"paragraph"}static clone(t){return new Yl(t.__key)}createDOM(t){let n=document.createElement("p");return t=Bs(t.theme,"paragraph"),t!==void 0&&n.classList.add(...t),n}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:U2,priority:0})}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&xd(t)){this.isEmpty()&&t.append(document.createElement("br"));var n=this.getFormatType();t.style.textAlign=n,(n=this.getDirection())&&(t.dir=n),n=this.getIndent(),0<n&&(t.style.textIndent=`${20*n}px`)}return{element:t}}static importJSON(t){let n=vi();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(t,n){t=vi();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=this.getChildren();if(t.length===0||Z(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function U2(e){let t=vi();return e.style&&(t.setFormat(e.style.textAlign),e=parseInt(e.style.textIndent,10)/20,0<e&&t.setIndent(e)),{node:t}}function vi(){return Fa(new Yl)}function fS(e,t,n,r){let o=e._keyToDOMMap;o.clear(),e._editorState=cm(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null,r=e._observer,r!==null&&(r.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",o.set("root",n))}function V2(e){let t=new Map,n=new Set;return e.forEach(r=>{if(r=r.klass.importDOM!=null?r.klass.importDOM.bind(r.klass):null,r!=null&&!n.has(r)){n.add(r);var o=r();o!==null&&Object.keys(o).forEach(i=>{let l=t.get(i);l===void 0&&(l=[],t.set(i,l)),l.push(o[i])})}}),t}class H2{constructor(t,n,r,o,i,l,s){this._parentEditor=n,this._rootElement=null,this._editorState=t,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=o,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=z_(),this._onError=i,this._htmlConversions=l,this._editable=s,this._headless=n!==null&&n._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){let n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){let n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){let n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){let n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){let n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&K(35);let o=this._commands;o.has(t)||o.set(t,[new Set,new Set,new Set,new Set,new Set]);let i=o.get(t);i===void 0&&K(36,String(t));let l=i[r];return l.add(n),()=>{l.delete(n),i.every(s=>s.size===0)&&o.delete(t)}}registerMutationListener(t,n){this._nodes.get(t.getType())===void 0&&K(37,t.name);let r=this._listeners.mutation;return r.set(n,t),()=>{r.delete(n)}}registerNodeTransformToKlass(t,n){var r=t.getType();return r=this._nodes.get(r),r===void 0&&K(37,t.name),r.transforms.add(n),r}registerNodeTransform(t,n){var r=this.registerNodeTransformToKlass(t,n);let o=[r];return r=r.replaceWithKlass,r!=null&&(r=this.registerNodeTransformToKlass(r,n),o.push(r)),x2(this,t.getType()),()=>{o.forEach(i=>i.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return J(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){let n=this._rootElement;if(t!==n){let l=Bs(this._config.theme,"root");var r=this._pendingEditorState||this._editorState;if(this._rootElement=t,fS(this,n,t,r),n!==null){if(!this._config.disableEvents){Ws!==0&&(Ws--,Ws===0&&n.ownerDocument.removeEventListener("selectionchange",rS));var o=n.__lexicalEditor;if(o!=null){if(o._parentEditor!==null){var i=nm(o);i=i[i.length-1]._key,gl.get(i)===o&&gl.delete(i)}else gl.delete(o._key);n.__lexicalEditor=null}for(o=nS(n),i=0;i<o.length;i++)o[i]();n.__lexicalEventHandles=[]}l!=null&&n.classList.remove(...l)}t!==null?(r=(r=t.ownerDocument)&&r.defaultView||null,o=t.style,o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=r,this._dirtyType=2,P_(this),this._updateTags.add("history-merge"),ai(this),this._config.disableEvents||P2(t,this),l!=null&&t.classList.add(...l)):(this._editorState=r,this._window=this._pendingEditorState=null),Vs("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&K(38),R_(this);let r=this._pendingEditorState,o=this._updateTags;n=n!==void 0?n.tag:null,r===null||r.isEmpty()||(n!=null&&o.add(n),ai(this)),this._pendingEditorState=t,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,n!=null&&o.add(n),ai(this)}parseEditorState(t,n){t=typeof t=="string"?JSON.parse(t):t;let r=cm(),o=Tt,i=yn,l=bt,s=this._dirtyElements,a=this._dirtyLeaves,u=this._cloneNotNeeded,c=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,Tt=r,yn=!1,bt=this;try{um(t.root,this._nodes),n&&n(),r._readOnly=!0}catch(d){d instanceof Error&&this._onError(d)}finally{this._dirtyElements=s,this._dirtyLeaves=a,this._cloneNotNeeded=u,this._dirtyType=c,Tt=o,yn=i,bt=l}return r}update(t,n){Nn(this,t,n)}focus(t,n={}){let r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Nn(this,()=>{let o=Ke(),i=br();o!==null?o.dirty=!0:i.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?i.selectStart():i.selectEnd())},{onUpdate:()=>{r.removeAttribute("autocapitalize"),t&&t()},tag:"focus"}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){var t=this._rootElement;t!==null&&t.blur(),t=Nr(this._window),t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Vs("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}class dm extends Ri{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 In(e){return e instanceof dm}class hS extends Ri{}function fm(e){return e instanceof hS}class pS extends Ri{}function Ea(e){return e instanceof pS}I.$addUpdateTag=function(e){tn(),nt()._updateTags.add(e)};I.$applyNodeReplacement=Fa;I.$copyNode=W_;I.$createLineBreakNode=Nl;I.$createNodeSelection=gp;I.$createParagraphNode=vi;I.$createRangeSelection=function(){let e=new Er("root",0,"element"),t=new Er("root",0,"element");return new Ni(e,t,0,"")};I.$createTabNode=_d;I.$createTextNode=Ct;I.$getAdjacentNode=ep;I.$getNearestNodeFromDOMNode=za;I.$getNearestRootOrShadowRoot=B_;I.$getNodeByKey=kt;I.$getPreviousSelection=Hl;I.$getRoot=br;I.$getSelection=Ke;I.$getTextContent=function(){let e=Ke();return e===null?"":e.getTextContent()};I.$hasAncestor=Oc;I.$hasUpdateTag=function(e){return nt()._updateTags.has(e)};I.$insertNodes=function(e,t){let n=Ke()||Hl();return n===null&&(n=br().selectEnd()),n.insertNodes(e,t)};I.$isBlockElementNode=pp;I.$isDecoratorNode=Ve;I.$isElementNode=W;I.$isInlineElementOrDecoratorNode=function(e){return W(e)&&e.isInline()||Ve(e)&&e.isInline()};I.$isLeafNode=M_;I.$isLineBreakNode=_a;I.$isNodeSelection=Vl;I.$isParagraphNode=function(e){return e instanceof Yl};I.$isRangeSelection=fe;I.$isRootNode=rn;I.$isRootOrShadowRoot=nr;I.$isTabNode=function(e){return e instanceof Ul};I.$isTextNode=Z;I.$nodesOfType=function(e){var t=Rr();let n=t._readOnly,r=e.getType();t=t._nodeMap;let o=[];for(let[,i]of t)i instanceof e&&i.__type===r&&(n||i.isAttached())&&o.push(i);return o};I.$normalizeSelection__EXPERIMENTAL=qg;I.$parseSerializedNode=function(e){return um(e,nt()._nodes)};I.$selectAll=function(){var e=br();e=e.select(0,e.getChildrenSize()),Sr(qg(e))};I.$setCompositionKey=Lt;I.$setSelection=Sr;I.$splitNode=U_;I.BLUR_COMMAND=T_;I.CAN_REDO_COMMAND={};I.CAN_UNDO_COMMAND={};I.CLEAR_EDITOR_COMMAND={};I.CLEAR_HISTORY_COMMAND={};I.CLICK_COMMAND=u_;I.COMMAND_PRIORITY_CRITICAL=4;I.COMMAND_PRIORITY_EDITOR=0;I.COMMAND_PRIORITY_HIGH=3;I.COMMAND_PRIORITY_LOW=1;I.COMMAND_PRIORITY_NORMAL=2;I.CONTROLLED_TEXT_INSERTION_COMMAND=pl;I.COPY_COMMAND=Yg;I.CUT_COMMAND=Xg;I.DELETE_CHARACTER_COMMAND=ga;I.DELETE_LINE_COMMAND=va;I.DELETE_WORD_COMMAND=ma;I.DEPRECATED_$computeGridMap=sS;I.DEPRECATED_$createGridSelection=function(){let e=new Er("root",0,"element"),t=new Er("root",0,"element");return new Ed("root",e,t)};I.DEPRECATED_$getGridCellNodeRect=hp;I.DEPRECATED_$getNodeTriplet=aS;I.DEPRECATED_$isGridCellNode=In;I.DEPRECATED_$isGridNode=fm;I.DEPRECATED_$isGridRowNode=Ea;I.DEPRECATED_$isGridSelection=sm;I.DEPRECATED_GridCellNode=dm;I.DEPRECATED_GridNode=hS;I.DEPRECATED_GridRowNode=pS;I.DRAGEND_COMMAND=$_;I.DRAGOVER_COMMAND=C_;I.DRAGSTART_COMMAND=E_;I.DROP_COMMAND=S_;I.DecoratorNode=cS;I.ElementNode=Ri;I.FOCUS_COMMAND=k_;I.FORMAT_ELEMENT_COMMAND={};I.FORMAT_TEXT_COMMAND=yo;I.INDENT_CONTENT_COMMAND={};I.INSERT_LINE_BREAK_COMMAND=Fs;I.INSERT_PARAGRAPH_COMMAND=Xh;I.INSERT_TAB_COMMAND={};I.KEY_ARROW_DOWN_COMMAND=m_;I.KEY_ARROW_LEFT_COMMAND=h_;I.KEY_ARROW_RIGHT_COMMAND=d_;I.KEY_ARROW_UP_COMMAND=g_;I.KEY_BACKSPACE_COMMAND=y_;I.KEY_DELETE_COMMAND=w_;I.KEY_DOWN_COMMAND=c_;I.KEY_ENTER_COMMAND=kc;I.KEY_ESCAPE_COMMAND=x_;I.KEY_MODIFIER_COMMAND=b_;I.KEY_SPACE_COMMAND=v_;I.KEY_TAB_COMMAND=__;I.LineBreakNode=Wl;I.MOVE_TO_END=f_;I.MOVE_TO_START=p_;I.OUTDENT_CONTENT_COMMAND={};I.PASTE_COMMAND=Hg;I.ParagraphNode=Yl;I.REDO_COMMAND=Gg;I.REMOVE_TEXT_COMMAND=Qh;I.RootNode=Gl;I.SELECTION_CHANGE_COMMAND=pd;I.SELECT_ALL_COMMAND=Jh;I.TabNode=Ul;I.TextNode=bi;I.UNDO_COMMAND=Kg;I.createCommand=function(){return{}};I.createEditor=function(e){var t=e||{},n=bt,r=t.theme||{};let o=e===void 0?n:t.parentEditor||null,i=t.disableEvents||!1,l=cm(),s=t.namespace||(o!==null?o._config.namespace:z_()),a=t.editorState,u=[Gl,bi,Wl,Ul,Yl,...t.nodes||[]],c=t.onError;if(t=t.editable!==void 0?t.editable:!0,e===void 0&&n!==null)e=n._nodes;else for(e=new Map,n=0;n<u.length;n++){let f=u[n],h=null;var d=null;typeof f!="function"&&(d=f,f=d.replace,h=d.with,d=d.withKlass?d.withKlass:null);let g=f.getType(),m=f.transform(),_=new Set;m!==null&&_.add(m),e.set(g,{klass:f,replace:h,replaceWithKlass:d,transforms:_})}return r=new H2(l,o,e,{disableEvents:i,namespace:s,theme:r},c||console.error,V2(e),t),a!==void 0&&(r._pendingEditorState=a,r._dirtyType=2),r};I.getNearestEditorFromDOMNode=tm;I.isHTMLAnchorElement=function(e){return xd(e)&&e.tagName==="A"};I.isHTMLElement=xd;I.isSelectionCapturedInDecoratorInput=em;I.isSelectionWithinEditor=ja;const K2=I;var he=K2,gt={},Pt={},ie=he;let Ic=new Map;function Ky(e){for(;e!=null;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function Gy(e){let t=e.parentNode;if(t==null)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function gS(e){let t={};e=e.split(";");for(let n of e)if(n!==""){let[r,o]=n.split(/:([^]+)/);t[r.trim()]=o.trim()}return t}function jc(e){let t=Ic.get(e);return t===void 0&&(t=gS(e),Ic.set(e,t)),t}function G2(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}function Ii(e,t){var n=jc("getStyle"in e?e.getStyle():e.style);t=Object.entries(t).reduce((r,[o,i])=>(i===null?delete r[o]:r[o]=i,r),{...n}),n=G2(t),e.setStyle(n),Ic.set(n,t)}function mS(e,t){var n=e.getNodes(),r=n.length;if(ie.DEPRECATED_$isGridSelection(e)){for(var o=ie.$createRangeSelection(),i=o.anchor,l=o.focus,s=0;s<r;s++){var a=n[s];ie.DEPRECATED_$isGridCellNode(a)&&(i.set(a.getKey(),0,"element"),l.set(a.getKey(),a.getChildrenSize(),"element"),mS(ie.$normalizeSelection__EXPERIMENTAL(o),t))}ie.$setSelection(e)}else if(--r,o=n[0],i=n[r],e.isCollapsed())Ii(e,t);else{var u=e.anchor,c=e.focus;s=o.getTextContent().length,a=c.offset;var d=u.offset,f=u.isBefore(c);l=f?d:a,e=f?a:d;var h=f?u.type:c.type,g=f?c.type:u.type;if(u=f?c.key:u.key,ie.$isTextNode(o)&&l===s&&(c=o.getNextSibling(),ie.$isTextNode(c)&&(l=d=0,o=c)),n.length===1)ie.$isTextNode(o)&&(l=h==="element"?0:d>a?a:d,e=g==="element"?s:d>a?d:a,l!==e&&(l===0&&e===s?(Ii(o,t),o.select(l,e)):(n=o.splitText(l,e),n=l===0?n[0]:n[1],Ii(n,t),n.select(0,e-l))));else for(ie.$isTextNode(o)&&l<o.getTextContentSize()&&(l!==0&&(o=o.splitText(l)[1]),Ii(o,t)),ie.$isTextNode(i)&&(l=i.getTextContent().length,i.__key!==u&&e!==0&&(e=l),e!==l&&([i]=i.splitText(e)),e!==0&&Ii(i,t)),e=1;e<r;e++)l=n[e],s=l.getKey(),ie.$isTextNode(l)&&s!==o.getKey()&&s!==i.getKey()&&!l.isToken()&&Ii(l,t)}}function Y2(e){for(;e!==null&&!ie.$isRootOrShadowRoot(e);){let t=e.getLatest(),n=e.getParent();t.getChildrenSize()===0&&e.remove(!0),e=n}}function Nf(e,t,n,r,o=null){if(t.length!==0){var i=t[0],l=new Map,s=[];i=ie.$isElementNode(i)?i:i.getParentOrThrow(),i.isInline()&&(i=i.getParentOrThrow());for(var a=!1;i!==null;){var u=i.getPreviousSibling();if(u!==null){i=u,a=!0;break}if(i=i.getParentOrThrow(),ie.$isRootOrShadowRoot(i))break}u=new Set;for(var c=0;c<n;c++){var d=t[c];ie.$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&&ie.$isLeafNode(d)&&!f.has(d.getKey())){if(d=h.getKey(),l.get(d)===void 0){let g=r();g.setFormat(h.getFormatType()),g.setIndent(h.getIndent()),s.push(g),l.set(d,g),h.getChildren().forEach(m=>{g.append(m),f.add(m.getKey()),ie.$isElementNode(m)&&m.getChildrenKeys().forEach(_=>f.add(_))}),Y2(h)}}else u.has(d.getKey())&&(h=r(),h.setFormat(d.getFormatType()),h.setIndent(d.getIndent()),s.push(h),d.remove(!0))}if(o!==null)for(t=0;t<s.length;t++)o.append(s[t]);if(t=null,ie.$isRootOrShadowRoot(i))if(a)if(o!==null)i.insertAfter(o);else for(o=s.length-1;0<=o;o--)i.insertAfter(s[o]);else if(a=i.getFirstChild(),ie.$isElementNode(a)&&(i=a),a===null)if(o)i.append(o);else for(o=0;o<s.length;o++)a=s[o],i.append(a),t=a;else if(o!==null)a.insertBefore(o);else for(i=0;i<s.length;i++)o=s[i],a.insertBefore(o),t=o;else if(o)i.insertAfter(o);else for(o=s.length-1;0<=o;o--)a=s[o],i.insertAfter(a),t=a;s=ie.$getPreviousSelection(),ie.$isRangeSelection(s)&&s.anchor.getNode().isAttached()&&s.focus.getNode().isAttached()?ie.$setSelection(s.clone()):t!==null?t.selectEnd():e.dirty=!0}}function vS(e,t,n,r){e.modify(t?"extend":"move",n,r)}function yS(e){return e=e.anchor.getNode(),(ie.$isRootNode(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}Pt.$addNodeStyle=function(e){e=e.getStyle();let t=gS(e);Ic.set(e,t)};Pt.$cloneWithProperties=function(e){let t=e.constructor.clone(e);return t.__parent=e.__parent,t.__next=e.__next,t.__prev=e.__prev,ie.$isElementNode(e)&&ie.$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):(ie.$isTextNode(e)&&ie.$isTextNode(t)&&(t.__format=e.__format,t.__style=e.__style,t.__mode=e.__mode,t.__detail=e.__detail),t)};Pt.$getSelectionStyleValueForProperty=function(e,t,n=""){let r=null,o=e.getNodes();var i=e.anchor,l=e.focus,s=e.isBackward();let a=s?l.offset:i.offset;if(i=s?l.getNode():i.getNode(),e.style!==""&&(e=jc(e.style),e!==null&&t in e))return e[t];for(e=0;e<o.length;e++){var u=o[e];if((e===0||a!==0||!u.is(i))&&ie.$isTextNode(u)){if(l=t,s=n,u=u.getStyle(),u=jc(u),l=u!==null&&u[l]||s,r===null)r=l;else if(r!==l){r="";break}}}return r===null?n:r};Pt.$isAtNodeEnd=function(e){return e.type==="text"?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()};Pt.$isParentElementRTL=yS;Pt.$moveCaretSelection=vS;Pt.$moveCharacter=function(e,t,n){let r=yS(e);vS(e,t,n?!r:r,"character")};Pt.$patchStyleText=mS;Pt.$selectAll=function(e){let t=e.anchor;e=e.focus;var n=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();let r=n.getFirstDescendant();n=n.getLastDescendant();let o="element",i="element",l=0;ie.$isTextNode(r)?o="text":ie.$isElementNode(r)||r===null||(r=r.getParentOrThrow()),ie.$isTextNode(n)?(i="text",l=n.getTextContentSize()):ie.$isElementNode(n)||n===null||(n=n.getParentOrThrow()),r&&n&&(t.set(r.getKey(),0,o),e.set(n.getKey(),l,i))};Pt.$setBlocksType=function(e,t){if(e.anchor.key==="root"){t=t();var n=ie.$getRoot();(e=n.getFirstChild())?e.replace(t,!0):n.append(t)}else for(n=e.getNodes(),e=e.anchor.getNode().getParentOrThrow(),n.indexOf(e)===-1&&n.push(e),e.isInline()&&(e=e.getParentOrThrow(),n.indexOf(e)===-1&&n.push(e)),e=0;e<n.length;e++){let i=n[e];var r=i;if(!ie.$isElementNode(r)||ie.$isRootOrShadowRoot(r))r=!1;else{var o=r.getFirstChild();o=o===null||ie.$isLineBreakNode(o)||ie.$isTextNode(o)||o.isInline(),r=!r.isInline()&&r.canBeEmpty()!==!1&&o}r&&(r=t(),r.setFormat(i.getFormatType()),r.setIndent(i.getIndent()),i.replace(r,!0))}};Pt.$shouldOverrideDefaultCharacterSelection=function(e,t){return e=ie.$getAdjacentNode(e.focus,t),ie.$isDecoratorNode(e)&&!e.isIsolated()||ie.$isElementNode(e)&&!e.isInline()&&!e.canBeEmpty()};Pt.$sliceSelectedTextNodeContent=function(e,t){if(t.isSelected()&&!t.isSegmented()&&!t.isToken()&&(ie.$isRangeSelection(e)||ie.DEPRECATED_$isGridSelection(e))){var n=e.anchor.getNode(),r=e.focus.getNode(),o=t.is(n),i=t.is(r);if(o||i){o=e.isBackward();let[l,s]=e.getCharacterOffsets();e=n.is(r),i=t.is(o?r:n),r=t.is(o?n:r),n=0;let a;e?(n=l>s?s:l,a=l>s?l:s):i?(n=o?s:l,a=void 0):r&&(o=o?l:s,n=0,a=o),t.__text=t.__text.slice(n,a)}}return t};Pt.$wrapNodes=function(e,t,n=null){var r=e.getNodes();let o=r.length;var i=e.anchor;if(o===0||o===1&&i.type==="element"&&i.getNode().getChildrenSize()===0){e=i.type==="text"?i.getNode().getParentOrThrow():i.getNode(),r=e.getChildren();let s=t();s.setFormat(e.getFormatType()),s.setIndent(e.getIndent()),r.forEach(a=>s.append(a)),n&&(s=n.append(s)),e.replace(s)}else{i=null;var l=[];for(let s=0;s<o;s++){let a=r[s];ie.$isRootOrShadowRoot(a)?(Nf(e,l,l.length,t,n),l=[],i=a):i===null||i!==null&&ie.$hasAncestor(a,i)?l.push(a):(Nf(e,l,l.length,t,n),l=[a])}Nf(e,l,l.length,t,n)}};Pt.createDOMRange=function(e,t,n,r,o){let i=t.getKey(),l=r.getKey(),s=document.createRange(),a=e.getElementByKey(i);if(e=e.getElementByKey(l),ie.$isTextNode(t)&&(a=Ky(a)),ie.$isTextNode(r)&&(e=Ky(e)),t===void 0||r===void 0||a===null||e===null)return null;a.nodeName==="BR"&&([a,n]=Gy(a)),e.nodeName==="BR"&&([e,o]=Gy(e)),t=a.firstChild,a===e&&t!=null&&t.nodeName==="BR"&&n===0&&o===0&&(o=1);try{s.setStart(a,n),s.setEnd(e,o)}catch{return null}return!s.collapsed||n===o&&i===l||(s.setStart(e,o),s.setEnd(a,n)),s};Pt.createRectsFromDOMRange=function(e,t){var n=e.getRootElement();if(n===null)return[];e=n.getBoundingClientRect(),n=getComputedStyle(n),n=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t=Array.from(t.getClientRects());let r=t.length;t.sort((i,l)=>{let s=i.top-l.top;return 3>=Math.abs(s)?i.left-l.left:s});let o;for(let i=0;i<r;i++){let l=t[i],s=l.width+n===e.width;o&&o.top<=l.top&&o.top+o.height>l.top&&o.left+o.width>l.left||s?(t.splice(i--,1),r--):o=l}return t};Pt.getStyleObjectFromCSS=jc;Pt.trimTextContentFromAnchor=function(e,t,n){let r=t.getNode();if(ie.$isElementNode(r)){var o=r.getDescendantByIndex(t.offset);o!==null&&(r=o)}for(;0<n&&r!==null;){var i=r.getPreviousSibling(),l=0;if(i===null){o=r.getParentOrThrow();for(var s=o.getPreviousSibling();s===null;){if(o=o.getParent(),o===null){i=null;break}s=o.getPreviousSibling()}o!==null&&(l=o.isInline()?0:2,i=ie.$isElementNode(s)?s.getLastDescendant():s)}if(s=r.getTextContent(),s===""&&ie.$isElementNode(r)&&!r.isInline()&&(s=`
|
|
126
|
-
|
|
127
|
-
`),o=s.length,!ie.$isTextNode(r)||n>=o)s=r.getParent(),r.remove(),s==null||s.getChildrenSize()!==0||ie.$isRootNode(s)||s.remove(),n-=o+l,r=i;else{let a=r.getKey();l=e.getEditorState().read(()=>{const c=ie.$getNodeByKey(a);return ie.$isTextNode(c)&&c.isSimpleText()?c.getTextContent():null}),i=o-n;let u=s.slice(0,i);l!==null&&l!==s?(n=ie.$getPreviousSelection(),o=r,r.isSimpleText()?r.setTextContent(l):(o=ie.$createTextNode(l),r.replace(o)),ie.$isRangeSelection(n)&&n.isCollapsed()&&(n=n.anchor.offset,o.select(n,n))):r.isSimpleText()?(l=t.key===a,s=t.offset,s<n&&(s=o),n=l?s-n:0,o=l?s:i,l&&n===0?([n]=r.splitText(n,o),n.remove()):([,n]=r.splitText(n,o),n.remove())):(n=ie.$createTextNode(u),r.replace(n)),n=0}}};const X2=Pt;var Do=X2,Q2=Do,dt=he;function J2(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 xS(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function wS(e,t){for(;e!==dt.$getRoot()&&e!=null;){if(t(e))return e;e=e.getParent()}return null}gt.$splitNode=dt.$splitNode;gt.isHTMLAnchorElement=dt.isHTMLAnchorElement;gt.isHTMLElement=dt.isHTMLElement;gt.$dfs=function(e,t){let n=[];e=(e||dt.$getRoot()).getLatest(),t=t||(dt.$isElementNode(e)?e.getLastDescendant():e);for(var r=e,o=0;(r=r.getParent())!==null;)o++;for(r=o;e!==null&&!e.is(t);)if(n.push({depth:r,node:e}),dt.$isElementNode(e)&&0<e.getChildrenSize())e=e.getFirstChild(),r++;else for(o=null;o===null&&e!==null;)o=e.getNextSibling(),o===null?(e=e.getParent(),r--):e=o;return e!==null&&e.is(t)&&n.push({depth:r,node:e}),n};gt.$filter=function(e,t){let n=[];for(let r=0;r<e.length;r++){let o=t(e[r]);o!==null&&n.push(o)}return n};gt.$findMatchingParent=wS;gt.$getNearestBlockElementAncestorOrThrow=function(e){let t=wS(e,n=>dt.$isElementNode(n)&&!n.isInline());return dt.$isElementNode(t)||J2(4,e.__key),t};gt.$getNearestNodeOfType=function(e,t){for(;e!=null;){if(e instanceof t)return e;e=e.getParent()}return null};gt.$insertFirst=function(e,t){let n=e.getFirstChild();n!==null?n.insertBefore(t):e.append(t)};gt.$insertNodeToNearestRoot=function(e){var t=dt.$getSelection()||dt.$getPreviousSelection();if(dt.$isRangeSelection(t)){var{focus:n}=t;if(t=n.getNode(),n=n.offset,dt.$isRootOrShadowRoot(t))n=t.getChildAtIndex(n),n==null?t.append(e):n.insertBefore(e),e.selectNext();else{let r,o;dt.$isTextNode(t)?(r=t.getParentOrThrow(),o=t.getIndexWithinParent(),0<n&&(o+=1,t.splitText(n))):(r=t,o=n),[,t]=dt.$splitNode(r,o),t.insertBefore(e),t.selectStart()}}else dt.$isNodeSelection(t)||dt.DEPRECATED_$isGridSelection(t)?(t=t.getNodes(),t[t.length-1].getTopLevelElementOrThrow().insertAfter(e)):dt.$getRoot().append(e),t=dt.$createParagraphNode(),e.insertAfter(t),t.select();return e.getLatest()};gt.$restoreEditorState=function(e,t){let n=new Map,r=e._pendingEditorState;for(let[o,i]of t._nodeMap){let l=Q2.$cloneWithProperties(i);dt.$isTextNode(l)&&(l.__text=i.__text),n.set(o,l)}r&&(r._nodeMap=n),e._dirtyType=2,e=t._selection,dt.$setSelection(e===null?null:e.clone())};gt.$wrapNodeInElement=function(e,t){return t=t(),e.replace(t),t.append(e),t};gt.addClassNamesToElement=function(e,...t){t.forEach(n=>{typeof n=="string"&&(n=n.split(" ").filter(r=>r!==""),e.classList.add(...n))})};gt.isMimeType=xS;gt.mediaFileReader=function(e,t){let n=e[Symbol.iterator]();return new Promise((r,o)=>{let i=[],l=()=>{const{done:s,value:a}=n.next();if(s)return r(i);const u=new FileReader;u.addEventListener("error",o),u.addEventListener("load",()=>{const c=u.result;typeof c=="string"&&i.push({file:a,result:c}),l()}),xS(a,t)?u.readAsDataURL(a):l()};l()})};gt.mergeRegister=function(...e){return()=>{e.forEach(t=>t())}};gt.objectKlassEquals=function(e,t){return e!==null?Object.getPrototypeOf(e).constructor.name===t.name:!1};gt.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,o=>{e:{for(var i=o.getChildren(),l=0;l<i.length;l++)if(i[l]instanceof t){i=null;break e}for(i=o;i!==null;)if(l=i,i=i.getParent(),i instanceof t){i={child:l,parent:i};break e}i=null}if(i!==null){const{child:s,parent:a}=i;if(s.is(o)){if(r(a,o),o=s.getNextSiblings(),i=o.length,a.insertAfter(s),i!==0){l=n(a),s.insertAfter(l);for(let u=0;u<i;u++)l.append(o[u])}a.canBeEmpty()||a.getChildrenSize()!==0||a.remove()}}})};gt.removeClassNamesFromElement=function(e,...t){t.forEach(n=>{typeof n=="string"&&e.classList.remove(...n.split(" "))})};const Z2=gt;var Nt=Z2,Pe=he,Io=Nt;function Rl(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function _S(e){let t=1;for(e=e.getParent();e!=null;){if(et(e)){if(e=e.getParent(),we(e)){t++,e=e.getParent();continue}Rl(40)}break}return t}function mp(e){e=e.getParent(),we(e)||Rl(40);let t=e;for(;t!==null;)t=t.getParent(),we(t)&&(e=t);return e}function SS(e){let t=[];e=e.getChildren().filter(et);for(let n=0;n<e.length;n++){let r=e[n],o=r.getFirstChild();we(o)?t=t.concat(SS(o)):t.push(r)}return t}function fr(e){return et(e)&&we(e.getFirstChild())}function q2(e){for(;e.getNextSibling()==null&&e.getPreviousSibling()==null;){let t=e.getParent();if(t==null||!et(e)&&!we(e))break;e=t}e.remove()}function Yy(e){return $n().append(e)}function ES(e,t){return et(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function yi(e,t){e.splice(e.getChildrenSize(),0,t)}function Xy(e,t){if(we(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),o=$n();return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),yi(o,e.getChildren()),we(n)&&t===n.getListType()?(n.append(o),e.remove(),we(r)&&t===r.getListType()&&(yi(n,r.getChildren()),r.remove()),n):we(r)&&t===r.getListType()?(r.getFirstChildOrThrow().insertBefore(o),e.remove(),r):(t=on(t),t.append(o),e.replace(t),Zt(t),t)}function CS(e,t){var n=e.getLastChild();let r=t.getFirstChild();n&&r&&fr(n)&&fr(r)&&(CS(n.getFirstChild(),r.getFirstChild()),r.remove()),n=t.getChildren(),0<n.length&&(e.append(...n),Zt(e)),t.remove()}function Zt(e,t){if(e=t||e.getChildren(),e!==void 0)for(t=0;t<e.length;t++){let i=e[t];if(et(i)){let l=i.getValue();var n=i,r=n.getParent(),o=1;for(r!=null&&(we(r)?o=r.getStart():Rl(44)),n=n.getPreviousSiblings(),r=0;r<n.length;r++){let s=n[r];et(s)&&!we(s.getFirstChild())&&o++}l!==o&&i.setValue(o)}}}function eR(e){if(!fr(e)){var t=e.getParent(),n=t?t.getParent():void 0,r=n?n.getParent():void 0;if(we(r)&&et(n)&&we(t)){var o=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(o))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{var l=t.getListType();o=$n();let s=on(l);o.append(s),e.getPreviousSiblings().forEach(a=>s.append(a)),i=$n(),l=on(l),i.append(l),yi(l,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(i),n.replace(e)}Zt(t),Zt(r)}}}let $d=class $S extends Pe.ElementNode{static getType(){return"listitem"}static clone(t){return new $S(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 we(r)&&r.getListType()==="check"&&Jy(n,this,null),n.value=this.__value,Qy(n,t.theme,this),n}updateDOM(t,n,r){let o=this.getParent();return we(o)&&o.getListType()==="check"&&Jy(n,this,t),n.value=this.__value,Qy(n,r.theme,this),!1}static transform(){return t=>{let n=t.getParent();we(n)&&(Zt(n),n.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:tR,priority:0})}}static importJSON(t){let n=$n();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(Pe.$isElementNode(r)&&this.canMergeWith(r)){let o=r.getChildren();this.append(...o),r.remove()}else super.append(r)}return this}replace(t,n){if(et(t))return super.replace(t);this.setIndent(0);let r=this.getParentOrThrow();if(!we(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{let o=on(r.getListType()),i=this.getNextSibling();for(;i;){let l=i;i=i.getNextSibling(),o.append(l)}r.insertAfter(t),t.insertAfter(o)}return n&&this.getChildren().forEach(o=>{t.append(o)}),this.remove(),r.getChildrenSize()===0&&r.remove(),t}insertAfter(t,n=!0){var r=this.getParentOrThrow();we(r)||Rl(39);var o=this.getNextSiblings();if(et(t))return n=super.insertAfter(t,n),t=t.getParentOrThrow(),we(t)&&Zt(t),n;if(we(t)){for(r=t,t=t.getChildren(),o=t.length-1;0<=o;o--)r=t[o],this.insertAfter(r,n);return r}if(r.insertAfter(t,n),o.length!==0){let i=on(r.getListType());o.forEach(l=>i.append(l)),t.insertAfter(i,n)}return t}remove(t){let n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(t),n&&r&&fr(n)&&fr(r)?(CS(n.getFirstChild(),r.getFirstChild()),r.remove()):r&&(t=r.getParent(),we(t)&&Zt(t))}insertNewAfter(t,n=!0){return t=$n(this.__checked==null?void 0:!1),this.insertAfter(t,n),t}collapseAtStart(t){let n=Pe.$createParagraphNode();this.getChildren().forEach(l=>n.append(l));var r=this.getParentOrThrow(),o=r.getParentOrThrow();let i=et(o);return r.getChildrenSize()===1?i?(r.remove(),o.select()):(r.insertBefore(n),r.remove(),r=t.anchor,t=t.focus,o=n.getKey(),r.type==="element"&&r.getNode().is(this)&&r.set(o,r.offset,"element"),t.type==="element"&&t.getNode().is(this)&&t.set(o,t.offset,"element")):(r.insertBefore(n),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(t){this.getWritable().__value=t}getChecked(){return this.getLatest().__checked}setChecked(t){this.getWritable().__checked=t}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var t=this.getParent();if(t===null)return this.getLatest().__indent;t=t.getParentOrThrow();let n=0;for(;et(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t=="number"&&-1<t||Rl(117);let n=this.getIndent();for(;n!==t;)if(n<t){e:{var r=new Set;if(fr(this)||r.has(this.getKey()))break e;let s=this.getParent();var o=this.getNextSibling(),i=this.getPreviousSibling();if(fr(o)&&fr(i)){if(i=i.getFirstChild(),we(i)){i.append(this);var l=o.getFirstChild();we(l)&&(l=l.getChildren(),yi(i,l),o.remove(),r.add(o.getKey())),Zt(i)}}else fr(o)?(o=o.getFirstChild(),we(o)&&(r=o.getFirstChild(),r!==null&&r.insertBefore(this),Zt(o))):fr(i)?(o=i.getFirstChild(),we(o)&&(o.append(this),Zt(o))):we(s)&&(r=$n(),l=on(s.getListType()),r.append(l),l.append(this),i?i.insertAfter(r):o?o.insertBefore(r):s.append(r),Zt(l));we(s)&&Zt(s)}n++}else eR(this),n--;return this}insertBefore(t){if(et(t)){let n=this.getParentOrThrow();if(we(n)){let r=this.getNextSiblings();Zt(n,r)}}return super.insertBefore(t)}canInsertAfter(t){return et(t)}canReplaceWith(t){return et(t)}canMergeWith(t){return Pe.$isParagraphNode(t)||et(t)}extractWithChild(t,n){if(!Pe.$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 on("bullet")}};function Qy(e,t,n){let r=[],o=[];var i=(t=t.list)?t.listitem:void 0;if(t&&t.nested)var l=t.nested.listitem;if(i!==void 0&&(i=i.split(" "),r.push(...i)),t){i=n.getParent(),i=we(i)&&i.getListType()==="check";let s=n.getChecked();i&&!s||o.push(t.listitemUnchecked),i&&s||o.push(t.listitemChecked),i&&r.push(s?t.listitemChecked:t.listitemUnchecked)}l!==void 0&&(l=l.split(" "),n.getChildren().some(s=>we(s))?r.push(...l):o.push(...l)),0<o.length&&Io.removeClassNamesFromElement(e,...o),0<r.length&&Io.addClassNamesToElement(e,...r)}function Jy(e,t,n){we(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 tR(e){return e=Io.isHTMLElement(e)&&e.getAttribute("aria-checked")==="true",{node:$n(e)}}function $n(e){return Pe.$applyNodeReplacement(new $d(void 0,e))}function et(e){return e instanceof $d}let hm=class kS extends Pe.ElementNode{static getType(){return"list"}static clone(t){return new kS(t.__listType||e0[t.__tag],t.__start,t.__key)}constructor(t,n,r){super(r),this.__listType=t=e0[t]||t,this.__tag=t==="number"?"ol":"ul",this.__start=n}getTag(){return this.__tag}setListType(t){let n=this.getWritable();n.__listType=t,n.__tag=t==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(t){let n=document.createElement(this.__tag);return this.__start!==1&&n.setAttribute("start",String(this.__start)),n.__lexicalListType=this.__listType,Zy(n,t.theme,this),n}updateDOM(t,n,r){return t.__tag!==this.__tag?!0:(Zy(n,r.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:qy,priority:0}),ul:()=>({conversion:qy,priority:0})}}static importJSON(t){let n=on(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&&Io.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(et(n))super.append(n);else{let o=$n();we(n)||Pe.$isElementNode(n)&&(n=Pe.$createTextNode(n.getTextContent())),o.append(n),super.append(o)}}return Zt(this),this}extractWithChild(t){return et(t)}};function Zy(e,t,n){let r=[],o=[];var i=t.list;if(i!==void 0){let s=i[`${n.__tag}Depth`]||[];t=_S(n)-1;let a=t%s.length;var l=s[a];let u=i[n.__tag],c;if(i=i.nested,i!==void 0&&i.list&&(c=i.list),u!==void 0&&r.push(u),l!==void 0)for(l=l.split(" "),r.push(...l),l=0;l<s.length;l++)l!==a&&o.push(n.__tag+l);c!==void 0&&(n=c.split(" "),1<t?r.push(...n):o.push(...n))}0<o.length&&Io.removeClassNamesFromElement(e,...o),0<r.length&&Io.addClassNamesToElement(e,...r)}function nR(e){let t=[];for(let r=0;r<e.length;r++){var n=e[r];et(n)?(t.push(n),n=n.getChildren(),1<n.length&&n.forEach(o=>{we(o)&&t.push(Yy(o))})):t.push(Yy(n))}return t}function qy(e){let t=e.nodeName.toLowerCase(),n=null;return t==="ol"?n=on("number",e.start):t==="ul"&&(n=Io.isHTMLElement(e)&&e.getAttribute("__lexicallisttype")==="check"?on("check"):on("bullet")),{after:nR,node:n}}let e0={ol:"number",ul:"bullet"};function on(e,t=1){return Pe.$applyNodeReplacement(new hm(e,t))}function we(e){return e instanceof hm}let rR=Pe.createCommand("INSERT_UNORDERED_LIST_COMMAND"),oR=Pe.createCommand("INSERT_ORDERED_LIST_COMMAND"),iR=Pe.createCommand("INSERT_CHECK_LIST_COMMAND"),lR=Pe.createCommand("REMOVE_LIST_COMMAND");un.$createListItemNode=$n;un.$createListNode=on;un.$getListDepth=_S;un.$handleListInsertParagraph=function(){var e=Pe.$getSelection();if(!Pe.$isRangeSelection(e)||!e.isCollapsed()||(e=e.anchor.getNode(),!et(e)||e.getChildrenSize()!==0))return!1;var t=mp(e),n=e.getParent();we(n)||Rl(40);let r=n.getParent(),o;if(Pe.$isRootOrShadowRoot(r))o=Pe.$createParagraphNode(),t.insertAfter(o);else if(et(r))o=$n(),r.insertAfter(o);else return!1;if(o.select(),t=e.getNextSiblings(),0<t.length){let i=on(n.getListType());Pe.$isParagraphNode(o)?o.insertAfter(i):(n=$n(),n.append(i),o.insertAfter(n)),t.forEach(l=>{l.remove(),i.append(l)})}return q2(e),!0};un.$isListItemNode=et;un.$isListNode=we;un.INSERT_CHECK_LIST_COMMAND=iR;un.INSERT_ORDERED_LIST_COMMAND=oR;un.INSERT_UNORDERED_LIST_COMMAND=rR;un.ListItemNode=$d;un.ListNode=hm;un.REMOVE_LIST_COMMAND=lR;un.insertList=function(e,t){e.update(()=>{var n=Pe.$getSelection();if(Pe.$isRangeSelection(n)||Pe.DEPRECATED_$isGridSelection(n)){var r=n.getNodes();n=n.anchor.getNode();var o=n.getParent();if(ES(n,r))r=on(t),Pe.$isRootOrShadowRoot(o)?(n.replace(r),o=$n(),Pe.$isElementNode(n)&&(o.setFormat(n.getFormatType()),o.setIndent(n.getIndent())),r.append(o)):et(n)&&(n=n.getParentOrThrow(),yi(r,n.getChildren()),n.replace(r));else for(n=new Set,o=0;o<r.length;o++){var i=r[o];if(Pe.$isElementNode(i)&&i.isEmpty()&&!n.has(i.getKey()))Xy(i,t);else if(Pe.$isLeafNode(i))for(i=i.getParent();i!=null;){let s=i.getKey();if(we(i)){if(!n.has(s)){var l=on(t);yi(l,i.getChildren()),i.replace(l),Zt(l),n.add(s)}break}else{if(l=i.getParent(),Pe.$isRootOrShadowRoot(l)&&!n.has(s)){n.add(s),Xy(i,t);break}i=l}}}}})};un.removeList=function(e){e.update(()=>{let t=Pe.$getSelection();if(Pe.$isRangeSelection(t)){var n=new Set,r=t.getNodes(),o=t.anchor.getNode();if(ES(o,r))n.add(mp(o));else for(o=0;o<r.length;o++){var i=r[o];Pe.$isLeafNode(i)&&(i=Io.$getNearestNodeOfType(i,$d),i!=null&&n.add(mp(i)))}for(let l of n){n=l,r=SS(l);for(let s of r)r=Pe.$createParagraphNode(),yi(r,s.getChildren()),n.insertAfter(r),n=r,s.__key===t.anchor.key&&t.anchor.set(r.getKey(),0,"element"),s.__key===t.focus.key&&t.focus.set(r.getKey(),0,"element"),s.remove();l.remove()}}})};const sR=un;var go=sR,TS={},kd={},bS=p;function aR(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 NS=bS.createContext(null);kd.LexicalComposerContext=NS;kd.createLexicalComposerContext=function(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n!=null?n.getTheme():null)}}};kd.useLexicalComposerContext=function(){let e=bS.useContext(NS);return e==null&&aR(8),e};const uR=kd;var sr=uR,t0=sr,$s=he,zc=p;let RS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var cR=RS?zc.useLayoutEffect:zc.useEffect;let xu={tag:"history-merge"};function dR(e,t){if(t!==null){if(t===void 0)e.update(()=>{var n=$s.$getRoot();if(n.isEmpty()){let r=$s.$createParagraphNode();n.append(r),n=RS?document.activeElement:null,($s.$getSelection()!==null||n!==null&&n===e.getRootElement())&&r.select()}},xu);else if(t!==null)switch(typeof t){case"string":let n=e.parseEditorState(t);e.setEditorState(n,xu);break;case"object":e.setEditorState(t,xu);break;case"function":e.update(()=>{$s.$getRoot().isEmpty()&&t(e)},xu)}}}TS.LexicalComposer=function({initialConfig:e,children:t}){let n=zc.useMemo(()=>{const{theme:r,namespace:o,editor__DEPRECATED:i,nodes:l,onError:s,editorState:a}=e,u=t0.createLexicalComposerContext(null,r);let c=i||null;if(c===null){const d=$s.createEditor({editable:e.editable,namespace:o,nodes:l,onError:f=>s(f,d),theme:r});dR(d,a),c=d}return[c,u]},[]);return cR(()=>{let r=e.editable,[o]=n;o.setEditable(r!==void 0?r:!0)},[]),zc.createElement(t0.LexicalComposerContext.Provider,{value:n},t)};const fR=TS;var hR=fR,Hs=p;function vp(e,t){return vp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},vp(e,t)}function pR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vp(e,t)}function gR(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),e.length!==t.length||e.some(function(n,r){return!Object.is(n,t[r])})}var n0={error:null},mR=function(e){function t(){for(var r,o=arguments.length,i=Array(o),l=0;l<o;l++)i[l]=arguments[l];return r=e.call.apply(e,[this].concat(i))||this,r.state=n0,r.resetErrorBoundary=function(){for(var s,a=arguments.length,u=Array(a),c=0;c<a;c++)u[c]=arguments[c];r.props.onReset==null||(s=r.props).onReset.apply(s,u),r.reset()},r}pR(t,e),t.getDerivedStateFromError=function(r){return{error:r}};var n=t.prototype;return n.reset=function(){this.setState(n0)},n.componentDidCatch=function(r,o){var i,l;(i=(l=this.props).onError)==null||i.call(l,r,o)},n.componentDidUpdate=function(r,o){var i=this.props.resetKeys;if(this.state.error!==null&&o.error!==null&&gR(r.resetKeys,i)){var l,s;(l=(s=this.props).onResetKeysChange)==null||l.call(s,r.resetKeys,i),this.reset()}},n.render=function(){var r=this.state.error,o=this.props,i=o.fallbackRender,l=o.FallbackComponent;if(o=o.fallback,r!==null){if(r={error:r,resetErrorBoundary:this.resetErrorBoundary},Hs.isValidElement(o))return o;if(typeof i=="function")return i(r);if(l)return Hs.createElement(l,r);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(Hs.Component),vR=function({children:e,onError:t}){return Hs.createElement(mR,{fallback:Hs.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:t},e)};const yR=vR;var xR=yR;const wR=Ra(xR);var pm={},gm={},_R=Nt,je=he;function SR(e,t,n,r,o){if(e===null||n.size===0&&r.size===0&&!o)return 0;var i=t._selection,l=e._selection;if(o)return 1;if(!(je.$isRangeSelection(i)&&je.$isRangeSelection(l)&&l.isCollapsed()&&i.isCollapsed()))return 0;o=t._nodeMap;let s=[];for(let a of n)n=o.get(a),n!==void 0&&s.push(n);for(let[a,u]of r)u&&(r=o.get(a),r===void 0||je.$isRootNode(r)||s.push(r));return s.length===0?0:1<s.length?(r=t._nodeMap,t=r.get(i.anchor.key),l=r.get(l.anchor.key),t&&l&&!e._nodeMap.has(t.__key)&&je.$isTextNode(t)&&t.__text.length===1&&i.anchor.offset===1?2:0):(t=s[0],e=e._nodeMap.get(t.__key),!je.$isTextNode(e)||!je.$isTextNode(t)||e.__mode!==t.__mode||(e=e.__text,t=t.__text,e===t)||(i=i.anchor,l=l.anchor,i.key!==l.key||i.type!=="text")?0:(i=i.offset,l=l.offset,e=t.length-e.length,e===1&&l===i-1?2:e===-1&&l===i+1?3:e===-1&&l===i?4:0))}function ER(e,t){let n=Date.now(),r=0;return(o,i,l,s,a,u)=>{let c=Date.now();if(u.has("historic"))return r=0,n=c,2;let d=SR(o,i,s,a,e.isComposing()),f=(()=>{var h=l===null||l.editor===e,g=u.has("history-push");if(!g&&h&&u.has("history-merge"))return 0;if(o===null)return 1;var m=i._selection;if(!(0<s.size||0<a.size))return m!==null?0:2;if(g===!1&&d!==0&&d===r&&c<n+t&&h)return 0;if(s.size===1){{g=Array.from(s)[0],h=o._nodeMap.get(g),g=i._nodeMap.get(g),m=o._selection;let _=i._selection,v=!1;je.$isRangeSelection(m)&&je.$isRangeSelection(_)&&(v=m.anchor.type==="element"&&m.focus.type==="element"&&_.anchor.type==="text"&&_.focus.type==="text"),h=!v&&je.$isTextNode(h)&&je.$isTextNode(g)?h.__type===g.__type&&h.__text===g.__text&&h.__mode===g.__mode&&h.__detail===g.__detail&&h.__style===g.__style&&h.__format===g.__format&&h.__parent===g.__parent:!1}if(h)return 0}return 1})();return n=c,r=d,f}}gm.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}};gm.registerHistory=function(e,t,n){let r=ER(e,n);n=({editorState:l,prevEditorState:s,dirtyLeaves:a,dirtyElements:u,tags:c})=>{const d=t.current,f=t.redoStack,h=t.undoStack,g=d===null?null:d.editorState;if(d===null||l!==g){if(s=r(s,l,d,a,u,c),s===1)f.length!==0&&(t.redoStack=[],e.dispatchCommand(je.CAN_REDO_COMMAND,!1)),d!==null&&(h.push({...d}),e.dispatchCommand(je.CAN_UNDO_COMMAND,!0));else if(s===2)return;t.current={editor:e,editorState:l}}};let o=_R.mergeRegister(e.registerCommand(je.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(je.CAN_REDO_COMMAND,!0)),s.length===0&&e.dispatchCommand(je.CAN_UNDO_COMMAND,!1),t.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:"historic"})}return!0},je.COMMAND_PRIORITY_EDITOR),e.registerCommand(je.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(je.CAN_UNDO_COMMAND,!0)),s=l.pop(),l.length===0&&e.dispatchCommand(je.CAN_REDO_COMMAND,!1),t.current=s||null,s&&s.editor.setEditorState(s.editorState,{tag:"historic"})}return!0},je.COMMAND_PRIORITY_EDITOR),e.registerCommand(je.CLEAR_EDITOR_COMMAND,()=>(t.undoStack=[],t.redoStack=[],t.current=null,!1),je.COMMAND_PRIORITY_EDITOR),e.registerCommand(je.CLEAR_HISTORY_COMMAND,()=>(t.undoStack=[],t.redoStack=[],t.current=null,e.dispatchCommand(je.CAN_REDO_COMMAND,!1),e.dispatchCommand(je.CAN_UNDO_COMMAND,!1),!0),je.COMMAND_PRIORITY_EDITOR),e.registerUpdateListener(n)),i=e.registerUpdateListener(n);return()=>{o(),i()}};const CR=gm;var $R=CR,kR=sr,yp=$R,r0=p;function TR(e,t,n=1e3){let r=r0.useMemo(()=>t||yp.createEmptyHistoryState(),[t]);r0.useEffect(()=>yp.registerHistory(e,r,n),[n,e,r])}pm.createEmptyHistoryState=yp.createEmptyHistoryState;pm.HistoryPlugin=function({externalHistoryState:e}){let[t]=kR.useLexicalComposerContext();return TR(t,e),null};const bR=pm;var NR=bR,PS={},RR=sr,Ks=p,PR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Ks.useLayoutEffect:Ks.useEffect;function OR(e){let[t]=RR.useLexicalComposerContext(),n=Ks.useMemo(()=>e(t),[t,e]),r=Ks.useRef(n.initialValueFn()),[o,i]=Ks.useState(r.current);return PR(()=>{let{initialValueFn:l,subscribe:s}=n,a=l();return r.current!==a&&(r.current=a,i(a)),s(u=>{r.current=u,i(u)})},[n,e]),o}function AR(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}var MR=function(){return OR(AR)};const LR=MR;var DR=LR,Vo={},qt=he;function mm(e,t=!0){return e?!1:(e=OS(),t&&(e=e.trim()),e==="")}function OS(){return qt.$getRoot().getTextContent()}function AS(e){if(!mm(e,!1))return!1;e=qt.$getRoot().getChildren();let t=e.length;if(1<t)return!1;for(let r=0;r<t;r++){var n=e[r];if(qt.$isDecoratorNode(n))return!1;if(qt.$isElementNode(n)){if(!qt.$isParagraphNode(n)||n.__indent!==0)return!1;n=n.getChildren();let o=n.length;for(let i=0;i<o;i++)if(!qt.$isTextNode(n[r]))return!1}}return!0}Vo.$canShowPlaceholder=AS;Vo.$canShowPlaceholderCurry=function(e){return()=>AS(e)};Vo.$findTextIntersectionFromCharacters=function(e,t){var n=e.getFirstChild();e=0;e:for(;n!==null;){if(qt.$isElementNode(n)){var r=n.getFirstChild();if(r!==null){n=r;continue}}else if(qt.$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};Vo.$isRootTextContentEmpty=mm;Vo.$isRootTextContentEmptyCurry=function(e,t){return()=>mm(e,t)};Vo.$rootTextContent=OS;Vo.registerLexicalTextEntity=function(e,t,n,r){let o=l=>{const s=qt.$createTextNode(l.getTextContent());s.setFormat(l.getFormat()),l.replace(s)},i=e.registerNodeTransform(qt.TextNode,l=>{if(l.isSimpleText()){var s=l.getPreviousSibling(),a=l.getTextContent(),u=l;if(qt.$isTextNode(s)){var c=s.getTextContent(),d=t(c+a);if(s instanceof n){if(d===null||s.getLatest().__mode!==0){o(s);return}if(d=d.end-c.length,0<d){u=a.slice(0,d),u=c+u,s.select(),s.setTextContent(u),d===a.length?l.remove():(s=a.slice(d),l.setTextContent(s));return}}else if(d===null||d.start<c.length)return}for(;;){if(l=t(a),a=d=l===null?"":a.slice(l.end),d===""){if(c=u.getNextSibling(),qt.$isTextNode(c)){if(d=u.getTextContent()+c.getTextContent(),d=t(d),d===null){c instanceof n?o(c):c.markDirty();break}else if(d.start!==0)break}}else if(c=t(d),c!==null&&c.start===0)break;if(l===null)break;if(l.start===0&&qt.$isTextNode(s)&&s.isTextEntity())continue;let f;if(l.start===0?[f,u]=u.splitText(l.end):[,f,u]=u.splitText(l.start,l.end),l=r(f),l.setFormat(f.getFormat()),f.replace(l),u==null)break}}});return e=e.registerNodeTransform(n,l=>{var s=l.getTextContent();const a=t(s);a===null||a.start!==0?o(l):s.length>a.end?l.splitText(a.end):(s=l.getPreviousSibling(),qt.$isTextNode(s)&&s.isTextEntity()&&(o(s),o(l)),s=l.getNextSibling(),qt.$isTextNode(s)&&s.isTextEntity()&&(o(s),l instanceof n&&o(l)))}),[i,e]};const IR=Vo;var jR=IR,MS={},wu=he;MS.registerDragonSupport=function(e){let t=window.location.origin,n=r=>{if(r.origin===t){var o=e.getRootElement();if(document.activeElement===o&&(o=r.data,typeof o=="string")){try{var i=JSON.parse(o)}catch{return}if(i&&i.protocol==="nuanria_messaging"&&i.type==="request"&&(i=i.payload)&&i.functionId==="makeChanges"&&(i=i.args)){const[l,s,a,u,c]=i;e.update(()=>{const d=wu.$getSelection();if(wu.$isRangeSelection(d)){var f=d.anchor;let h=f.getNode(),g=0,m=0;wu.$isTextNode(h)&&0<=l&&0<=s&&(g=l,m=l+s,d.setTextNodeRange(h,g,h,m)),(g!==m||a!=="")&&(d.insertRawText(a),h=f.getNode()),wu.$isTextNode(h)&&(g=u,m=u+c,f=h.getTextContentSize(),g=g>f?f:g,m=m>f?f:m,d.setTextNodeRange(h,g,h,m)),r.stopImmediatePropagation()}})}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}};const zR=MS;var FR=zR,Pr={},qr={},vm={},o0=Do,BR=Nt,il=he;function LS(e,t,n,r=null){let o=r!=null?t.isSelected(r):!0,i=il.$isElementNode(t)&&t.excludeFromCopy("html");var l=t;r!==null&&(l=o0.$cloneWithProperties(t),l=il.$isTextNode(l)&&r!=null?o0.$sliceSelectedTextNodeContent(r,l):l);let s=il.$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=LS(e,f,c,r);!o&&il.$isElementNode(t)&&h&&t.extractWithChild(f,r,"html")&&(o=!0)}return o&&!i?(BR.isHTMLElement(a)&&a.append(c),n.append(a),u&&(e=u.call(l,a))&&a.replaceWith(e)):n.append(c),o}let DS=new Set(["STYLE","SCRIPT"]);function IS(e,t,n=new Map,r){let o=[];if(DS.has(e.nodeName))return o;let i=null;var l,{nodeName:s}=e,a=t._htmlConversions.get(s.toLowerCase());if(s=null,a!==void 0)for(l of a)a=l(e),a!==null&&(s===null||s.priority<a.priority)&&(s=a);if(s=(l=s!==null?s.conversion:null)?l(e):null,l=null,s!==null){if(l=s.after,a=s.node,i=Array.isArray(a)?a[a.length-1]:a,i!==null){for(var[,u]of n)if(i=u(i,r),!i)break;i&&o.push(...Array.isArray(a)?a:[i])}s.forChild!=null&&n.set(e.nodeName,s.forChild)}for(e=e.childNodes,r=[],u=0;u<e.length;u++)r.push(...IS(e[u],t,new Map(n),i));return l!=null&&(r=l(r)),i==null?o=o.concat(r):il.$isElementNode(i)&&i.append(...r),o}vm.$generateHtmlFromNodes=function(e,t){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let n=document.createElement("div"),r=il.$getRoot().getChildren();for(let o=0;o<r.length;o++)LS(e,r[o],n,t);return n.innerHTML};vm.$generateNodesFromDOM=function(e,t){t=t.body?t.body.childNodes:[];let n=[];for(let o=0;o<t.length;o++){var r=t[o];DS.has(r.nodeName)||(r=IS(r,e),r!==null&&(n=n.concat(r)))}return n};const WR=vm;var UR=WR,jS=UR,xp=Do,ml=Nt,de=he;function zr(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 zS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function FS(e){let t=de.$getSelection();if(t==null)throw Error("Expected valid LexicalSelection");return de.$isRangeSelection(t)&&t.isCollapsed()||t.getNodes().length===0?"":jS.$generateHtmlFromNodes(e,t)}function BS(e){let t=de.$getSelection();if(t==null)throw Error("Expected valid LexicalSelection");return de.$isRangeSelection(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(US(e,t))}function wp(e,t,n){(de.DEPRECATED_$isGridSelection(n)||ml.$findMatchingParent(n.anchor.getNode(),r=>de.DEPRECATED_$isGridCellNode(r))!==null&&ml.$findMatchingParent(n.focus.getNode(),r=>de.DEPRECATED_$isGridCellNode(r))!==null)&&t.length===1&&de.DEPRECATED_$isGridNode(t[0])?HR(t,n,!1,e):VR(t,n)}function VR(e,t){let n=[],r=null;for(let o=0;o<e.length;o++){let i=e[o],l=de.$isLineBreakNode(i);if(l||de.$isDecoratorNode(i)&&i.isInline()||de.$isElementNode(i)&&i.isInline()||de.$isTextNode(i)||i.isParentRequired()){if(r===null&&(r=i.createParentElementNode(),n.push(r),l))continue;r!==null&&r.append(i)}else n.push(i),r=null}de.$isRangeSelection(t)?t.insertNodes(n):de.DEPRECATED_$isGridSelection(t)&&(e=t.anchor.getNode(),de.DEPRECATED_$isGridCellNode(e)||zr(41),e.append(...n))}function HR(e,t,n,r){e.length===1&&de.DEPRECATED_$isGridNode(e[0])||zr(42);var o=e[0];e=o.getChildren(),n=o.getFirstChildOrThrow().getChildrenSize();var i=o.getChildrenSize(),l=ml.$findMatchingParent(t.anchor.getNode(),h=>de.DEPRECATED_$isGridCellNode(h));t=(o=l&&ml.$findMatchingParent(l,h=>de.DEPRECATED_$isGridRowNode(h)))&&ml.$findMatchingParent(o,h=>de.DEPRECATED_$isGridNode(h)),de.DEPRECATED_$isGridCellNode(l)&&de.DEPRECATED_$isGridRowNode(o)&&de.DEPRECATED_$isGridNode(t)||zr(43);var s=o.getIndexWithinParent(),a=Math.min(t.getChildrenSize()-1,s+i-1);i=l.getIndexWithinParent(),l=Math.min(o.getChildrenSize()-1,i+n-1),n=Math.min(i,l),o=Math.min(s,a),i=Math.max(i,l),s=Math.max(s,a),a=t.getChildren(),l=0;let u,c;for(let h=o;h<=s;h++){var d=a[h];de.DEPRECATED_$isGridRowNode(d)||zr(24);var f=e[l];de.DEPRECATED_$isGridRowNode(f)||zr(24),d=d.getChildren(),f=f.getChildren();let g=0;for(let m=n;m<=i;m++){let _=d[m];de.DEPRECATED_$isGridCellNode(_)||zr(25);let v=f[g];de.DEPRECATED_$isGridCellNode(v)||zr(25),h===o&&m===n?u=_.getKey():h===s&&m===i&&(c=_.getKey());let y=_.getChildren();v.getChildren().forEach(x=>{de.$isTextNode(x)&&de.$createParagraphNode().append(x),_.append(x)}),y.forEach(x=>x.remove()),g++}l++}u&&c&&(e=de.DEPRECATED_$createGridSelection(),e.set(t.getKey(),u,c),de.$setSelection(e),r.dispatchCommand(de.SELECTION_CHANGE_COMMAND,void 0))}function WS(e,t,n,r=[]){let o=t!=null?n.isSelected(t):!0,i=de.$isElementNode(n)&&n.excludeFromCopy("html");var l=n;if(t!==null){var s=xp.$cloneWithProperties(n);l=s=de.$isTextNode(s)&&t!=null?xp.$sliceSelectedTextNodeContent(t,s):s}let a=de.$isElementNode(l)?l.getChildren():[];var u=l;s=u.exportJSON();var c=u.constructor;s.type!==c.getType()&&zr(58,c.name);let d=s.children;for(de.$isElementNode(u)&&(Array.isArray(d)||zr(59,c.name)),de.$isTextNode(l)&&(l=l.__text,0<l.length?s.text=l:o=!1),l=0;l<a.length;l++)u=a[l],c=WS(e,t,u,s.children),!o&&de.$isElementNode(n)&&c&&n.extractWithChild(u,t,"clone")&&(o=!0);if(o&&!i)r.push(s);else if(Array.isArray(s.children))for(e=0;e<s.children.length;e++)r.push(s.children[e]);return o}function US(e,t){let n=[],r=de.$getRoot().getChildren();for(let o=0;o<r.length;o++)WS(e,t,r[o],n);return{namespace:e._config.namespace,nodes:n}}function VS(e){let t=[];for(let n=0;n<e.length;n++){let r=de.$parseSerializedNode(e[n]);de.$isTextNode(r)&&xp.$addNodeStyle(r),t.push(r)}return t}let ji=null;function i0(e,t){var n=zS?(e._window||window).getSelection():null;if(!n)return!1;var r=n.anchorNode;if(n=n.focusNode,r!==null&&n!==null&&!de.isSelectionWithinEditor(e,r,n)||(t.preventDefault(),t=t.clipboardData,r=de.$getSelection(),t===null||r===null))return!1;n=FS(e),e=BS(e);let o="";return r!==null&&(o=r.getTextContent()),n!==null&&t.setData("text/html",n),e!==null&&t.setData("application/x-lexical-editor",e),t.setData("text/plain",o),!0}qr.$generateJSONFromSelectedNodes=US;qr.$generateNodesFromSerializedNodes=VS;qr.$getHtmlContent=FS;qr.$getLexicalContent=BS;qr.$insertDataTransferForPlainText=function(e,t){e=e.getData("text/plain")||e.getData("text/uri-list"),e!=null&&t.insertRawText(e)};qr.$insertDataTransferForRichText=function(e,t,n){var r=e.getData("application/x-lexical-editor");if(r)try{let l=JSON.parse(r);if(l.namespace===n._config.namespace&&Array.isArray(l.nodes)){let s=VS(l.nodes);return wp(n,s,t)}}catch{}if(r=e.getData("text/html"))try{var o=new DOMParser().parseFromString(r,"text/html"),i=jS.$generateNodesFromDOM(n,o);return wp(n,i,t)}catch{}if(e=e.getData("text/plain")||e.getData("text/uri-list"),e!=null)if(de.$isRangeSelection(t))for(e=e.split(/(\r?\n|\t)/),n=e.length,o=0;o<n;o++)i=e[o],i===`
|
|
128
|
-
`||i===`\r
|
|
129
|
-
`?t.insertParagraph():i===" "?t.insertNodes([de.$createTabNode()]):t.insertText(i);else t.insertRawText(e)};qr.$insertGeneratedNodes=wp;qr.copyToClipboard=async function(e,t){if(ji!==null)return!1;if(t!==null)return new Promise(l=>{e.update(()=>{l(i0(e,t))})});var n=e.getRootElement();let r=e._window==null?window.document:e._window.document,o=zS?(e._window||window).getSelection():null;if(n===null||o===null)return!1;let i=r.createElement("span");return i.style.cssText="position: fixed; top: -1000px;",i.append(r.createTextNode("#")),n.append(i),n=new Range,n.setStart(i,0),n.setEnd(i,1),o.removeAllRanges(),o.addRange(n),new Promise(l=>{let s=e.registerCommand(de.COPY_COMMAND,a=>(ml.objectKlassEquals(a,ClipboardEvent)&&(s(),ji!==null&&(window.clearTimeout(ji),ji=null),l(i0(e,a))),!0),de.COMMAND_PRIORITY_CRITICAL);ji=window.setTimeout(()=>{s(),ji=null,l(!1)},50),r.execCommand("copy"),i.remove()})};const KR=qr;var GR=KR,Fc=GR,_u=Do,vr=Nt,A=he;function l0(e,t){return typeof document.caretRangeFromPoint<"u"?(e=document.caretRangeFromPoint(e,t),e===null?null:{node:e.startContainer,offset:e.startOffset}):document.caretPositionFromPoint!=="undefined"?(e=document.caretPositionFromPoint(e,t),e===null?null:{node:e.offsetNode,offset:e.offset}):null}let Xl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",YR=Xl&&"documentMode"in document?document.documentMode:null,XR=Xl&&"InputEvent"in window&&!YR?"getTargetRanges"in new window.InputEvent("input"):!1,QR=Xl&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),JR=Xl&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ZR=Xl&&/^(?=.*Chrome).*/i.test(navigator.userAgent),qR=Xl&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!ZR,_p=A.createCommand("DRAG_DROP_PASTE_FILE"),ym=class HS extends A.ElementNode{static getType(){return"quote"}static clone(t){return new HS(t.__key)}constructor(t){super(t)}createDOM(t){let n=document.createElement("blockquote");return vr.addClassNamesToElement(n,t.theme.quote),n}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:eP,priority:0})}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&vr.isHTMLElement(t)){this.isEmpty()&&t.append(document.createElement("br"));var n=this.getFormatType();t.style.textAlign=n,(n=this.getDirection())&&(t.dir=n)}return{element:t}}static importJSON(t){let n=xm();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(t,n){t=A.$createParagraphNode();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=A.$createParagraphNode();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}};function xm(){return A.$applyNodeReplacement(new ym)}let wm=class KS extends A.ElementNode{static getType(){return"heading"}static clone(t){return new KS(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&&vr.addClassNamesToElement(r,t[n]),r}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:zi,priority:0}),h2:()=>({conversion:zi,priority:0}),h3:()=>({conversion:zi,priority:0}),h4:()=>({conversion:zi,priority:0}),h5:()=>({conversion:zi,priority:0}),h6:()=>({conversion:zi,priority:0}),p:t=>(t=t.firstChild,t!==null&&s0(t)?{conversion:()=>({node:null}),priority:3}:null),span:t=>s0(t)?{conversion:()=>({node:ll("h1")}),priority:3}:null}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&vr.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=ll(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()?ll(this.getTag()):A.$createParagraphNode();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=this.isEmpty()?A.$createParagraphNode():ll(this.getTag());return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}extractWithChild(){return!0}};function s0(e){return e.nodeName.toLowerCase()==="span"?e.style.fontSize==="26pt":!1}function zi(e){let t=e.nodeName.toLowerCase(),n=null;return(t==="h1"||t==="h2"||t==="h3"||t==="h4"||t==="h5"||t==="h6")&&(n=ll(t),e.style!==null&&n.setFormat(e.style.textAlign)),{node:n}}function eP(e){let t=xm();return e.style!==null&&t.setFormat(e.style.textAlign),{node:t}}function ll(e){return A.$applyNodeReplacement(new wm(e))}function tP(e,t){e.preventDefault(),t.update(()=>{let n=A.$getSelection(),r=e instanceof InputEvent||e instanceof KeyboardEvent?null:e.clipboardData;r!=null&&(A.$isRangeSelection(n)||A.DEPRECATED_$isGridSelection(n))&&Fc.$insertDataTransferForRichText(r,n,t)},{tag:"paste"})}async function nP(e,t){await Fc.copyToClipboard(t,vr.objectKlassEquals(e,ClipboardEvent)?e:null),t.update(()=>{let n=A.$getSelection();A.$isRangeSelection(n)?n.removeText():A.$isNodeSelection(n)&&n.getNodes().forEach(r=>r.remove())})}function ks(e){let t=null;if(e instanceof DragEvent?t=e.dataTransfer:e instanceof ClipboardEvent&&(t=e.clipboardData),t===null)return[!1,[],!1];var n=t.types;return e=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[e,Array.from(t.files),n]}function a0(e){var t=A.$getSelection();if(!A.$isRangeSelection(t))return!1;let n=new Set;t=t.getNodes();for(let i=0;i<t.length;i++){var r=t[i],o=r.getKey();n.has(o)||(r=vr.$getNearestBlockElementAncestorOrThrow(r),o=r.getKey(),r.canIndent()&&!n.has(o)&&(n.add(o),e(r)))}return 0<n.size}function Su(e){return e=A.$getNearestNodeFromDOMNode(e),A.$isDecoratorNode(e)}Pr.$createHeadingNode=ll;Pr.$createQuoteNode=xm;Pr.$isHeadingNode=function(e){return e instanceof wm};Pr.$isQuoteNode=function(e){return e instanceof ym};Pr.DRAG_DROP_PASTE=_p;Pr.HeadingNode=wm;Pr.QuoteNode=ym;Pr.eventFiles=ks;Pr.registerRichText=function(e){return vr.mergeRegister(e.registerCommand(A.CLICK_COMMAND,()=>{const t=A.$getSelection();return A.$isNodeSelection(t)?(t.clear(),!0):!1},0),e.registerCommand(A.DELETE_CHARACTER_COMMAND,t=>{const n=A.$getSelection();return A.$isRangeSelection(n)?(n.deleteCharacter(t),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.DELETE_WORD_COMMAND,t=>{const n=A.$getSelection();return A.$isRangeSelection(n)?(n.deleteWord(t),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.DELETE_LINE_COMMAND,t=>{const n=A.$getSelection();return A.$isRangeSelection(n)?(n.deleteLine(t),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.CONTROLLED_TEXT_INSERTION_COMMAND,t=>{const n=A.$getSelection();if(typeof t=="string")A.$isRangeSelection(n)?n.insertText(t):A.DEPRECATED_$isGridSelection(n);else{if(!A.$isRangeSelection(n)&&!A.DEPRECATED_$isGridSelection(n))return!1;const r=t.dataTransfer;r!=null?Fc.$insertDataTransferForRichText(r,n,e):A.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.REMOVE_TEXT_COMMAND,()=>{const t=A.$getSelection();return A.$isRangeSelection(t)?(t.removeText(),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.FORMAT_TEXT_COMMAND,t=>{const n=A.$getSelection();return A.$isRangeSelection(n)?(n.formatText(t),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.FORMAT_ELEMENT_COMMAND,t=>{var n=A.$getSelection();if(!A.$isRangeSelection(n)&&!A.$isNodeSelection(n))return!1;n=n.getNodes();for(const r of n)n=vr.$findMatchingParent(r,o=>A.$isElementNode(o)&&!o.isInline()),n!==null&&n.setFormat(t);return!0},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.INSERT_LINE_BREAK_COMMAND,t=>{const n=A.$getSelection();return A.$isRangeSelection(n)?(n.insertLineBreak(t),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.INSERT_PARAGRAPH_COMMAND,()=>{const t=A.$getSelection();return A.$isRangeSelection(t)?(t.insertParagraph(),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.INSERT_TAB_COMMAND,()=>(A.$insertNodes([A.$createTabNode()]),!0),A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.INDENT_CONTENT_COMMAND,()=>a0(t=>{const n=t.getIndent();t.setIndent(n+1)}),A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.OUTDENT_CONTENT_COMMAND,()=>a0(t=>{const n=t.getIndent();0<n&&t.setIndent(n-1)}),A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_ARROW_UP_COMMAND,t=>{var n=A.$getSelection();if(A.$isNodeSelection(n)&&!Su(t.target)){if(t=n.getNodes(),0<t.length)return t[0].selectPrevious(),!0}else if(A.$isRangeSelection(n)&&(n=A.$getAdjacentNode(n.focus,!0),!t.shiftKey&&A.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline()))return n.selectPrevious(),t.preventDefault(),!0;return!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_ARROW_DOWN_COMMAND,t=>{var n=A.$getSelection();if(A.$isNodeSelection(n)){if(t=n.getNodes(),0<t.length)return t[0].selectNext(0,0),!0}else if(A.$isRangeSelection(n)){let r=n.focus;if(r.key==="root"&&r.offset===A.$getRoot().getChildrenSize())return t.preventDefault(),!0;if(n=A.$getAdjacentNode(n.focus,!1),!t.shiftKey&&A.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),t.preventDefault(),!0}return!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_ARROW_LEFT_COMMAND,t=>{const n=A.$getSelection();if(A.$isNodeSelection(n)){var r=n.getNodes();if(0<r.length)return t.preventDefault(),r[0].selectPrevious(),!0}return A.$isRangeSelection(n)&&_u.$shouldOverrideDefaultCharacterSelection(n,!0)?(r=t.shiftKey,t.preventDefault(),_u.$moveCharacter(n,r,!0),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_ARROW_RIGHT_COMMAND,t=>{const n=A.$getSelection();if(A.$isNodeSelection(n)&&!Su(t.target)){var r=n.getNodes();if(0<r.length)return t.preventDefault(),r[0].selectNext(0,0),!0}return A.$isRangeSelection(n)?(r=t.shiftKey,_u.$shouldOverrideDefaultCharacterSelection(n,!1)?(t.preventDefault(),_u.$moveCharacter(n,r,!1),!0):!1):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_BACKSPACE_COMMAND,t=>{if(Su(t.target))return!1;const n=A.$getSelection();if(!A.$isRangeSelection(n))return!1;t.preventDefault(),{anchor:t}=n;const r=t.getNode();return n.isCollapsed()&&t.offset===0&&!A.$isRootNode(r)&&0<vr.$getNearestBlockElementAncestorOrThrow(r).getIndent()?e.dispatchCommand(A.OUTDENT_CONTENT_COMMAND,void 0):e.dispatchCommand(A.DELETE_CHARACTER_COMMAND,!0)},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_DELETE_COMMAND,t=>{if(Su(t.target))return!1;const n=A.$getSelection();return A.$isRangeSelection(n)?(t.preventDefault(),e.dispatchCommand(A.DELETE_CHARACTER_COMMAND,!1)):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_ENTER_COMMAND,t=>{const n=A.$getSelection();if(!A.$isRangeSelection(n))return!1;if(t!==null){if((JR||QR||qR)&&XR)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(A.INSERT_LINE_BREAK_COMMAND,!1)}return e.dispatchCommand(A.INSERT_PARAGRAPH_COMMAND,void 0)},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_ESCAPE_COMMAND,()=>{const t=A.$getSelection();return A.$isRangeSelection(t)?(e.blur(),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.DROP_COMMAND,t=>{const[,n]=ks(t);if(0<n.length){var r=l0(t.clientX,t.clientY);if(r!==null){const{offset:i,node:l}=r;var o=A.$getNearestNodeFromDOMNode(l);if(o!==null){if(r=A.$createRangeSelection(),A.$isTextNode(o))r.anchor.set(o.getKey(),i,"text"),r.focus.set(o.getKey(),i,"text");else{const s=o.getParentOrThrow().getKey();o=o.getIndexWithinParent()+1,r.anchor.set(s,o,"element"),r.focus.set(s,o,"element")}r=A.$normalizeSelection__EXPERIMENTAL(r),A.$setSelection(r)}e.dispatchCommand(_p,n)}return t.preventDefault(),!0}return t=A.$getSelection(),!!A.$isRangeSelection(t)},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.DRAGSTART_COMMAND,t=>{[t]=ks(t);const n=A.$getSelection();return!(t&&!A.$isRangeSelection(n))},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.DRAGOVER_COMMAND,t=>{var[n]=ks(t);const r=A.$getSelection();return n&&!A.$isRangeSelection(r)?!1:(n=l0(t.clientX,t.clientY),n!==null&&(n=A.$getNearestNodeFromDOMNode(n.node),A.$isDecoratorNode(n)&&t.preventDefault()),!0)},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.SELECT_ALL_COMMAND,()=>(A.$selectAll(),!0),A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.COPY_COMMAND,t=>(Fc.copyToClipboard(e,vr.objectKlassEquals(t,ClipboardEvent)?t:null),!0),A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.CUT_COMMAND,t=>(nP(t,e),!0),A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.PASTE_COMMAND,t=>{const[,n,r]=ks(t);if(0<n.length&&!r)return e.dispatchCommand(_p,n),!0;if(A.isSelectionCapturedInDecoratorInput(t.target))return!1;const o=A.$getSelection();return A.$isRangeSelection(o)||A.DEPRECATED_$isGridSelection(o)?(tP(t,e),!0):!1},A.COMMAND_PRIORITY_EDITOR))};const rP=Pr;var Gs=rP,GS=sr,oP=DR,jn=p,iP=jR,YS=Nt,u0=$r,lP=FR,sP=Gs,_m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?jn.useLayoutEffect:jn.useEffect;function c0(e){return e.getEditorState().read(iP.$canShowPlaceholderCurry(e.isComposing()))}function aP(e){let[t,n]=jn.useState(()=>c0(e));return _m(()=>{function r(){let o=c0(e);n(o)}return r(),YS.mergeRegister(e.registerUpdateListener(()=>{r()}),e.registerEditableListener(()=>{r()}))},[e]),t}function uP(e,t){let[n,r]=jn.useState(()=>e.getDecorators());return _m(()=>e.registerDecoratorListener(o=>{u0.flushSync(()=>{r(o)})}),[e]),jn.useEffect(()=>{r(e.getDecorators())},[e]),jn.useMemo(()=>{let o=[],i=Object.keys(n);for(let l=0;l<i.length;l++){let s=i[l],a=jn.createElement(t,{onError:c=>e._onError(c)},jn.createElement(jn.Suspense,{fallback:null},n[s])),u=e.getElementByKey(s);u!==null&&o.push(u0.createPortal(a,u,s))}return o},[t,n,e])}function cP(e){_m(()=>YS.mergeRegister(sP.registerRichText(e),lP.registerDragonSupport(e)),[e])}function dP({content:e}){var[t]=GS.useLexicalComposerContext();t=aP(t);let n=oP();return t?typeof e=="function"?e(n):e:null}PS.RichTextPlugin=function({contentEditable:e,placeholder:t,ErrorBoundary:n}){let[r]=GS.useLexicalComposerContext();return n=uP(r,n),cP(r),jn.createElement(jn.Fragment,null,e,jn.createElement(dP,{content:t}),n)};const fP=PS;var hP=fP,XS={},Lr=go,pP=sr,QS=p,gP=Nt,hs=he;function mP(e){QS.useEffect(()=>gP.mergeRegister(e.registerCommand(Lr.INSERT_ORDERED_LIST_COMMAND,()=>(Lr.insertList(e,"number"),!0),hs.COMMAND_PRIORITY_LOW),e.registerCommand(Lr.INSERT_UNORDERED_LIST_COMMAND,()=>(Lr.insertList(e,"bullet"),!0),hs.COMMAND_PRIORITY_LOW),e.registerCommand(Lr.REMOVE_LIST_COMMAND,()=>(Lr.removeList(e),!0),hs.COMMAND_PRIORITY_LOW),e.registerCommand(hs.INSERT_PARAGRAPH_COMMAND,()=>!!Lr.$handleListInsertParagraph(),hs.COMMAND_PRIORITY_LOW)),[e])}XS.ListPlugin=function(){let[e]=pP.useLexicalComposerContext();return QS.useEffect(()=>{if(!e.hasNodes([Lr.ListNode,Lr.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[e]),mP(e),null};const vP=XS;var yP=vP,JS={},eo={},ZS=Nt,_r=he;let xP=new Set(["http:","https:","mailto:","sms:","tel:"]);class Ql extends _r.ElementNode{static getType(){return"link"}static clone(t){return new Ql(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t,n={},r){super(r);let{target:o=null,rel:i=null,title:l=null}=n;this.__url=t,this.__target=o,this.__rel=i,this.__title=l}createDOM(t){let n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),this.__target!==null&&(n.target=this.__target),this.__rel!==null&&(n.rel=this.__rel),this.__title!==null&&(n.title=this.__title),ZS.addClassNamesToElement(n,t.theme.link),n}updateDOM(t,n){let r=this.__url,o=this.__target,i=this.__rel,l=this.__title;return r!==t.__url&&(n.href=r),o!==t.__target&&(o?n.target=o:n.removeAttribute("target")),i!==t.__rel&&(i?n.rel=i:n.removeAttribute("rel")),l!==t.__title&&(l?n.title=l:n.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:wP,priority:1})}}static importJSON(t){let n=Ca(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(!xP.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),_r.$isElementNode(t)?(n=Ca(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(!_r.$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 wP(e){let t=null;if(ZS.isHTMLAnchorElement(e)){let n=e.textContent;n!==null&&n!==""&&(t=Ca(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function Ca(e,t){return _r.$applyNodeReplacement(new Ql(e,t))}function Jo(e){return e instanceof Ql}class Wa extends Ql{static getType(){return"autolink"}static clone(t){return new Wa(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}static importJSON(t){let n=Sp(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),_r.$isElementNode(t)?(n=Sp(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),t.append(n),n):null}}function Sp(e,t){return _r.$applyNodeReplacement(new Wa(e,t))}let _P=_r.createCommand("TOGGLE_LINK_COMMAND");function SP(e,t){for(;e!==null&&(e=e.getParent())!==null&&!t(e););return e}eo.$createAutoLinkNode=Sp;eo.$createLinkNode=Ca;eo.$isAutoLinkNode=function(e){return e instanceof Wa};eo.$isLinkNode=Jo;eo.AutoLinkNode=Wa;eo.LinkNode=Ql;eo.TOGGLE_LINK_COMMAND=_P;eo.toggleLink=function(e,t={}){let{target:n,title:r}=t,o=t.rel===void 0?"noreferrer":t.rel;if(t=_r.$getSelection(),_r.$isRangeSelection(t))if(t=t.extract(),e===null)t.forEach(l=>{if(l=l.getParent(),Jo(l)){let s=l.getChildren();for(let a=0;a<s.length;a++)l.insertBefore(s[a]);l.remove()}});else{if(t.length===1){var i=t[0];if(i=Jo(i)?i:SP(i,Jo),i!==null){i.setURL(e),n!==void 0&&i.setTarget(n),o!==null&&i.setRel(o),r!==void 0&&i.setTitle(r);return}}let l=null,s=null;t.forEach(a=>{var u=a.getParent();if(u!==s&&u!==null&&(!_r.$isElementNode(a)||a.isInline()))if(Jo(u))s=u,u.setURL(e),n!==void 0&&u.setTarget(n),o!==null&&s.setRel(o),r!==void 0&&s.setTitle(r);else if(u.is(l)||(l=u,s=Ca(e,{rel:o,target:n}),Jo(u)?a.getPreviousSibling()===null?u.insertBefore(s):u.insertAfter(s):a.insertBefore(s)),Jo(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 EP=eo;var Pl=EP,Fi=Pl,CP=sr,$P=Nt,Bi=he,kP=p;JS.LinkPlugin=function({validateUrl:e}){let[t]=CP.useLexicalComposerContext();return kP.useEffect(()=>{if(!t.hasNodes([Fi.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return $P.mergeRegister(t.registerCommand(Fi.TOGGLE_LINK_COMMAND,n=>{if(n===null)return Fi.toggleLink(n),!0;if(typeof n=="string")return e===void 0||e(n)?(Fi.toggleLink(n),!0):!1;let{url:r,target:o,rel:i,title:l}=n;return Fi.toggleLink(r,{rel:i,target:o,title:l}),!0},Bi.COMMAND_PRIORITY_LOW),e!==void 0?t.registerCommand(Bi.PASTE_COMMAND,n=>{let r=Bi.$getSelection();if(!Bi.$isRangeSelection(r)||r.isCollapsed()||!(n instanceof ClipboardEvent)||n.clipboardData==null)return!1;let o=n.clipboardData.getData("text");return e(o)?r.getNodes().some(i=>Bi.$isElementNode(i))?!1:(t.dispatchCommand(Fi.TOGGLE_LINK_COMMAND,o),n.preventDefault(),!0):!1},Bi.COMMAND_PRIORITY_LOW):()=>{})},[t,e]),null};const TP=JS;var bP=TP;function NP({ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:n,ariaDescribedBy:r,ariaExpanded:o,ariaLabel:i,ariaLabelledBy:l,ariaMultiline:s,ariaOwns:a,ariaRequired:u,autoCapitalize:c,className:d,id:f,role:h="textbox",spellCheck:g=!0,style:m,tabIndex:_,"data-testid":v,...y}){const[x]=sr.useLexicalComposerContext(),[S,k]=p.useState(!1),b=p.useCallback(T=>{var D;x.setRootElement(T);const N=(D=document.getElementById("val-ui"))==null?void 0:D.shadowRoot;if(N&&"getSelection"in N){x._window=N;return}},[x]);return p.useLayoutEffect(()=>(k(x.isEditable()),x.registerEditableListener(T=>{k(T)})),[x]),w.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"?!!o:void 0,"aria-label":i,"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:b,role:h,spellCheck:g,style:m,tabIndex:_})}function RP({className:e}){return w.jsx(NP,{className:e})}class Ua extends he.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 Ua({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 qS(t)}createDOM(){return document.createElement("div")}updateDOM(){return!1}decorate(){return w.jsx(PP,{src:this.__src,altText:this.__altText,empty:this.__empty,height:this.__height,nodeKey:this.getKey()})}}function PP(e){return w.jsx("img",{src:e.src})}function qS(e){return new Ua(e)}function OP(){const[e]=sr.useLexicalComposerContext();return p.useEffect(()=>{e.focus()},[e]),null}const eE=he.createCommand("INSERT_IMAGE_COMMAND");function AP(){const[e]=sr.useLexicalComposerContext();return p.useEffect(()=>{if(!e.hasNodes([Ua]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return Nt.mergeRegister(e.registerCommand(eE,t=>{const n=qS(t);return he.$insertNodes([n]),he.$isRootOrShadowRoot(n.getParentOrThrow())&&Nt.$wrapNodeInElement(n,he.$createParagraphNode).selectEnd(),!0},he.COMMAND_PRIORITY_EDITOR))},[e]),null}const MP=({className:e})=>w.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:[w.jsx("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),w.jsx("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]}),LP=MP,DP=({className:e})=>w.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:[w.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),w.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),w.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]}),IP=DP,jP=({className:e})=>w.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:w.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"})}),zP=jP,FP=({variant:e="primary",onClick:t,children:n,icon:r,disabled:o=!1})=>w.jsx("button",{disabled:o,className:dd("font-sans font-[12px] tracking-[0.04em] py-1 px-2 rounded whitespace-nowrap group relative text-primary",{"font-bold":e==="primary","bg-background hover:bg-background text-fill disabled:bg-fill disabled:text-background":e==="primary","bg-transparent border border-primary text-primary hover:border-highlight hover:text-highlight disabled:bg-fill disabled:text-background":e!=="primary"}),onClick:t,children:w.jsxs("span",{className:"flex flex-row items-center justify-center gap-2",children:[r&&r,n]})}),Zo=FP,BP=({className:e})=>w.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",className:e,children:[w.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"}),w.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"})]}),WP=BP,tE=ee.createContext({get api(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get session(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get theme(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setTheme(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get editMode(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setEditMode(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get highlight(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setHighlight(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setWindowSize(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get windowSize(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")}});function Sm(){return ee.useContext(tE)}const UP=({options:e,onChange:t,label:n,icon:r})=>{const[o,i]=p.useState(!1),l=p.useRef(null),[s,a]=p.useState(0),{windowSize:u}=Sm(),c=()=>{i(!o)},d=(f,h)=>{a(h),t(f),i(!1)};return p.useEffect(()=>{const f=h=>{o&&l.current&&!l.current.contains(h.target)&&i(!1)};return document.addEventListener("click",f),()=>{document.removeEventListener("click",f)}},[]),w.jsx("div",{className:"text-[12px]",ref:l,children:w.jsx(Zo,{onClick:f=>{f.preventDefault(),c()},icon:w.jsx(WP,{className:`rotate-[-90deg] transition-transform duration-150 ease-in-out ${o?"":"rotate-[90deg]"}`}),children:w.jsxs("div",{className:"relative",children:[w.jsxs("span",{className:"flex flex-row items-center justify-center gap-1",children:[n,r&&r]}),o&&w.jsx("div",{className:"absolute -top-[4px] overflow-scroll shadow-lg -left-2 text-primary bg-border w-fit z-overlay",style:{maxHeight:u==null?void 0:u.innerHeight},children:w.jsx("div",{className:"flex flex-col ",children:e==null?void 0:e.map((f,h)=>w.jsx("button",{onClick:g=>{g.preventDefault(),d(f,h)},className:`text-left px-2 py-1 hover:bg-background hover:text-highlight ${h===s&&"font-bold bg-background hover:bg-background truncate"}`,children:f},f))})})]})})})},VP=UP,HP=new TextEncoder;function nE(e){return new Promise((t,n)=>{var i;const r=(i=e.currentTarget.files)==null?void 0:i[0],o=new FileReader;o.addEventListener("load",()=>{const l=o.result;if(typeof l=="string"){const s=new Image;s.addEventListener("load",async()=>{const a=await Kt.getSHA256Hash(HP.encode(l));if(s.naturalWidth&&s.naturalHeight){const u=Ug(l);t({src:l,width:s.naturalWidth,height:s.naturalHeight,filename:r==null?void 0:r.name,sha256:a,mimeType:u,fileExt:u&&Vg(u)})}else t({src:l,filename:r==null?void 0:r.name,sha256:a})}),s.src=l}else n(l?{message:"Unexpected image result type",result:l}:{message:"Empty result"})}),r&&o.readAsDataURL(r)})}function rE(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),o=e.focus.getNode();return r===o?r:e.isBackward()?Do.$isAtNodeEnd(n)?r:o:Do.$isAtNodeEnd(t)?r:o}function KP(){const[e]=sr.useLexicalComposerContext();return p.useEffect(()=>Nt.mergeRegister(e.registerCommand(he.CLICK_COMMAND,t=>{const n=he.$getSelection();if(he.$isRangeSelection(n)){const r=rE(n),o=Nt.$findMatchingParent(r,Pl.$isLinkNode);if(Pl.$isLinkNode(o)&&(t.metaKey||t.ctrlKey))return window.open(o.getURL(),"_blank"),!0}return!1},he.COMMAND_PRIORITY_LOW)),[]),null}var oE={exports:{}},GP="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",YP=GP,XP=YP;function iE(){}function lE(){}lE.resetWarningCache=iE;var QP=function(){function e(r,o,i,l,s,a){if(a!==XP){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:lE,resetWarningCache:iE};return n.PropTypes=n,n};oE.exports=QP();var JP=oE.exports;const Fn=Ra(JP);function Ep(){return Ep=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ep.apply(this,arguments)}function ZP(e,t){if(e==null)return{};var n=qP(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qP(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Em=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,l=ZP(e,["color","size"]);return ee.createElement("svg",Ep({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),ee.createElement("polyline",{points:"20 6 9 17 4 12"}))});Em.propTypes={color:Fn.string,size:Fn.oneOfType([Fn.string,Fn.number])};Em.displayName="Check";const eO=Em;function Cp(){return Cp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cp.apply(this,arguments)}function tO(e,t){if(e==null)return{};var n=nO(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nO(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Cm=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,l=tO(e,["color","size"]);return ee.createElement("svg",Cp({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),ee.createElement("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),ee.createElement("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}))});Cm.propTypes={color:Fn.string,size:Fn.oneOfType([Fn.string,Fn.number])};Cm.displayName="Link";const rO=Cm;function $p(){return $p=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},$p.apply(this,arguments)}function oO(e,t){if(e==null)return{};var n=iO(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iO(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var $m=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,l=oO(e,["color","size"]);return ee.createElement("svg",$p({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});$m.propTypes={color:Fn.string,size:Fn.oneOfType([Fn.string,Fn.number])};$m.displayName="X";const lO=$m,sO=({fontSizes:e,fontsFamilies:t,onEditor:n,colors:r})=>{const[o]=sr.useLexicalComposerContext();p.useEffect(()=>{n&&n(o)},[o]);const[i,l]=p.useState(o),[s,a]=p.useState(null),[u,c]=p.useState(!1),[d,f]=p.useState(!1),[h,g]=p.useState(!1),[m,_]=p.useState(!1);p.useState("15px"),p.useState("#000"),p.useState("Sans");const[v,y]=p.useState("paragraph");p.useState(!1),p.useState(!1),p.useState("url"),p.useState(null);const[x,S]=p.useState(null),k=M=>{o.dispatchCommand(Pl.TOGGLE_LINK_COMMAND,M)},b={paragraph:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",number:"Numbered List",bullet:"Bulleted List"},T={};for(const M in b)T[b[M]]=M;const N=p.useCallback(()=>{const M=he.$getSelection();if(he.$isRangeSelection(M)){const j=M.anchor.getNode();let B=j.getKey()==="root"?j:Nt.$findMatchingParent(j,$=>{const E=$.getParent();return E!==null&&he.$isRootOrShadowRoot(E)});B===null&&(B=j.getTopLevelElementOrThrow());const re=rE(M),H=Nt.$findMatchingParent(re,Pl.$isLinkNode);if(H!==null){const $=H.getURL();S($)}else S(null);const Y=B.getKey(),C=i.getElementByKey(Y);if(c(M.hasFormat("bold")),f(M.hasFormat("italic")),g(M.hasFormat("strikethrough")),_(M.hasFormat("underline")),C!==null)if(a(Y),go.$isListNode(B)){const $=Nt.$getNearestNodeOfType(j,go.ListNode),E=$?$.getListType():B.getListType();y(E)}else{const $=Gs.$isHeadingNode(B)?B.getTag():B.getType();$ in b&&y($)}}},[i]);p.useEffect(()=>Nt.mergeRegister(o.registerUpdateListener(({editorState:M})=>{M.read(()=>{N()})})),[N,i,o]),p.useEffect(()=>o.registerCommand(he.SELECTION_CHANGE_COMMAND,(M,j)=>(N(),l(j),!1),he.COMMAND_PRIORITY_CRITICAL),[o,N]);const D=M=>{["h1","h2","h3","h4","h5","h6"].includes(M)?v!==M&&o.update(()=>{const j=he.$getSelection();he.$isRangeSelection(j)&&Do.$setBlocksType(j,()=>Gs.$createHeadingNode(M))}):M==="paragraph"&&v!=="paragraph"?o.update(()=>{const j=he.$getSelection();(he.$isRangeSelection(j)||he.DEPRECATED_$isGridSelection(j))&&Do.$setBlocksType(j,()=>he.$createParagraphNode())}):M==="number"&&v!=="number"?o.dispatchCommand(go.INSERT_ORDERED_LIST_COMMAND,void 0):M==="bullet"&&v!=="bullet"?o.dispatchCommand(go.INSERT_UNORDERED_LIST_COMMAND,void 0):o.dispatchCommand(go.REMOVE_LIST_COMMAND,void 0)};return p.useCallback(()=>{o.update(()=>{const M=he.$getSelection();if(he.$isRangeSelection(M)){const j=M.anchor,B=M.focus,re=M.getNodes();if(j.key===B.key&&j.offset===B.offset)return;re.forEach((H,Y)=>{he.$isTextNode(H)?(Y===0&&j.offset!==0&&(H=H.splitText(j.offset)[1]||H),Y===re.length-1&&(H=H.splitText(B.offset)[0]||H),H.__style!==""&&H.setStyle(""),H.__format!==0&&(H.setFormat(0),Nt.$getNearestBlockElementAncestorOrThrow(H).setFormat(""))):Gs.$isHeadingNode(H)&&H.replace(he.$createParagraphNode(),!0)})}})},[i]),w.jsxs("div",{className:"sticky top-0 border-b bg-background border-highlight flex flex-col",children:[w.jsxs("div",{className:"flex flex-row gap-1",children:[w.jsx(VP,{options:Object.values(b),label:b[v]??v+" (not supported)",onChange:M=>{D(T[M])}}),w.jsx(Zo,{variant:"primary",onClick:M=>{M.preventDefault(),o.dispatchCommand(he.FORMAT_TEXT_COMMAND,"bold")},active:u,icon:w.jsx(LP,{className:`${u&&"stroke-[3px]"}`})}),w.jsx(Zo,{active:h,onClick:M=>{M.preventDefault(),o.dispatchCommand(he.FORMAT_TEXT_COMMAND,"strikethrough")},icon:w.jsx(zP,{className:`${h&&"stroke-[2px]"}`})}),w.jsx(Zo,{active:d,onClick:M=>{M.preventDefault(),o.dispatchCommand(he.FORMAT_TEXT_COMMAND,"italic")},icon:w.jsx(IP,{className:`${d&&"stroke-[3px]"}`})}),w.jsx(Zo,{active:x!==null,onClick:M=>{M.preventDefault(),S(""),k("")},icon:w.jsx(rO,{width:12,height:12,className:`${x!==null&&"stroke-[3px]"}`})}),w.jsxs("label",{className:"flex items-center justify-center cursor-pointer",children:[w.jsx(Jw,{}),w.jsx("input",{type:"file",hidden:!0,onChange:M=>{M.preventDefault(),nE(M).then(j=>{o.dispatchCommand(eE,{...j})}).catch(j=>{console.error("Error reading image",j)})}})]})]}),x!==null&&w.jsxs("div",{className:"flex flex-row p-2",children:[w.jsx("input",{type:"text",placeholder:"Enter URL",className:"w-1/3 text-primary bg-background px-2",value:x,onChange:M=>{M.preventDefault(),S(M.target.value)}}),w.jsx(Zo,{variant:"primary",onClick:M=>{M.preventDefault(),k(x||null)},icon:w.jsx(eO,{size:14})}),w.jsx(Zo,{variant:"primary",onClick:M=>{M.preventDefault(),k(null)},icon:w.jsx(lO,{size:14})})]})]})},aO=sO;function uO(e){console.error(e)}const cO=28,dO=({richtext:e,onEditor:t})=>{const{windowSize:n}=Sm(),o={namespace:"val",editorState:i=>{i.setEditorState(i.parseEditorState({root:e2(a_(e))}))},nodes:[Gs.HeadingNode,Ua,go.ListNode,go.ListItemNode,Pl.LinkNode],theme:{text:{bold:"font-semibold",underline:"underline",italic:"italic",strikethrough:"line-through",underlineStrikethrough:"underline line-through"},list:{listitem:"ml-[20px]",ol:"list-decimal",ul:"list-disc"},heading:{h1:"text-4xl font-bold",h2:"text-3xl font-bold",h3:"text-2xl font-bold",h4:"text-xl font-bold",h5:"text-lg font-bold",h6:"text-md font-bold"},link:"text-highlight underline"},onError:uO};return w.jsxs(hR.LexicalComposer,{initialConfig:o,children:[w.jsx(OP,{}),w.jsx(aO,{onEditor:t}),w.jsx(hP.RichTextPlugin,{contentEditable:w.jsx("div",{className:"font-sans border-b text-primary border-highlight",style:{minHeight:n!=null&&n.innerHeight?(n==null?void 0:n.innerHeight)-cO:void 0},children:w.jsx(RP,{className:"p-4 outline-none bg-fill"})}),placeholder:w.jsx("div",{className:"",children:"Enter some text..."}),ErrorBoundary:wR}),w.jsx(bP.LinkPlugin,{}),w.jsx(KP,{}),w.jsx(yP.ListPlugin,{}),w.jsx(AP,{}),w.jsx(NR.HistoryPlugin,{})]})};var fO={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 hO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),On=(e,t)=>{const n=p.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:l,children:s,...a},u)=>p.createElement("svg",{ref:u,...fO,width:o,height:o,stroke:r,strokeWidth:l?Number(i)*24/Number(o):i,className:`lucide lucide-${hO(e)}`,...a},[...t.map(([c,d])=>p.createElement(c,d)),...(Array.isArray(s)?s:[s])||[]]));return n.displayName=`${e}`,n},pO=On("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),sE=On("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),gO=On("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),d0=On("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"}]]),mO=On("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"}]]),vO=On("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"}]]),yO=On("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),xO=On("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]),wO=On("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]),_O=On("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]),SO=On("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),EO=On("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"}]]),CO=On("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),km="p-1 border rounded-full shadow border-accent",f0="valbuild:urlBeforeNavigation";function $O({api:e}){const{theme:t,setTheme:n,editMode:r,setEditMode:o,session:i}=Sm();if(i.status==="success"&&i.data.mode==="unauthorized")return w.jsxs(h0,{href:e.getLoginUrl(window.location.href),children:[w.jsx("span",{children:"Login"}),w.jsx(d0,{size:18})]});if(i.status==="success"&&!i.data.enabled)return w.jsxs(h0,{href:e.getEnableUrl(window.location.href),children:[w.jsx("span",{children:"Enable"}),w.jsx(d0,{size:18})]});const[l,s]=p.useState();return p.useEffect(()=>{i.status==="success"&&i.data.mode==="proxy"&&e.getPatches({}).then(a=>{if(Ds.isOk(a)){let u=0;for(const c in a.value)u+=a.value[c].length;s(u)}else console.error("Could not load patches",a.error)})},[i]),w.jsxs(kO,{children:[w.jsx(Eu,{active:r==="hover",onClick:()=>{o(a=>a==="hover"?"off":"hover")},children:w.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:r==="hover"?w.jsx(xO,{size:18}):w.jsx(wO,{size:18})})}),w.jsx(Eu,{onClick:()=>{n(t==="dark"?"light":"dark")},children:w.jsxs("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:[t==="dark"&&w.jsx(EO,{size:15}),t==="light"&&w.jsx(yO,{size:15})]})}),w.jsx(Eu,{active:r==="full",onClick:()=>{if(r!=="full")localStorage.setItem(f0,window.location.href),window.location.href=e.getEditUrl();else if(r==="full"){const a=localStorage.getItem(f0);window.location.href=a||"/"}},children:w.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:r==="full"?w.jsx(vO,{size:15}):w.jsx(mO,{size:15})})}),l&&w.jsx(Eu,{onClick:()=>{},children:w.jsxs("div",{className:"relative h-[24px] w-[24px] flex justify-center items-center",children:[w.jsx("div",{className:"absolute -right-[10px] -top-[10px] border border-border rounded-full px-1 font-sans text-xs bg-card text-accent",children:l}),w.jsx(SO,{size:18})]})}),w.jsx("a",{className:km,href:e.getDisableUrl(window.location.href),children:w.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:w.jsx(_O,{size:18})})})]})}function h0({href:e,children:t}){return w.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:w.jsx("a",{className:km,href:e,children:w.jsx("div",{className:"flex items-center justify-center px-2 gap-x-2",children:t})})})}function kO({children:e}){return w.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 Eu({active:e,onClick:t,children:n}){return w.jsx("button",{className:dd(km,{"bg-accent drop-shadow-[0px_0px_12px_rgba(56,205,152,0.60)]":e}),onClick:t,children:n})}const p0=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,g0=Vw,TO=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return g0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,l=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const f=p0(c)||p0(d);return o[u][f]}),s=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(g=>{let[m,_]=g;return Array.isArray(_)?_.includes({...i,...s}[m]):{...i,...s}[m]===_})?[...u,d,f]:u},[]);return g0(e,l,a,n==null?void 0:n.class,n==null?void 0:n.className)},bO=TO("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Jl=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const l=r?Tl:"button";return w.jsx(l,{className:st(bO({variant:t,size:n,className:e})),ref:i,...o})});Jl.displayName="Button";function NO(e="dark"){const[t,n]=p.useState(e);return p.useEffect(()=>{localStorage.getItem("val-theme")==="light"?n("light"):localStorage.getItem("val-theme")==="dark"||window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?n("dark"):window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches&&n("light");const r=o=>{localStorage.getItem("val-theme")||n(o.matches?"dark":"light")};return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r),()=>{window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",r)}},[]),[t,r=>{localStorage.setItem("val-theme",r),n(r)}]}const Tm=p.forwardRef(({className:e,type:t,...n},r)=>w.jsx("input",{type:t,className:st("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}));Tm.displayName="Input";function aE(e){const t=e+"CollectionProvider",[n,r]=ki(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=h=>{const{scope:g,children:m}=h,_=ee.useRef(null),v=ee.useRef(new Map).current;return ee.createElement(o,{scope:g,itemMap:v,collectionRef:_},m)},s=e+"CollectionSlot",a=ee.forwardRef((h,g)=>{const{scope:m,children:_}=h,v=i(s,m),y=Qe(g,v.collectionRef);return ee.createElement(Tl,{ref:y},_)}),u=e+"CollectionItemSlot",c="data-radix-collection-item",d=ee.forwardRef((h,g)=>{const{scope:m,children:_,...v}=h,y=ee.useRef(null),x=Qe(g,y),S=i(u,m);return ee.useEffect(()=>(S.itemMap.set(y,{ref:y,...v}),()=>void S.itemMap.delete(y))),ee.createElement(Tl,{[c]:"",ref:x},_)});function f(h){const g=i(e+"CollectionConsumer",h);return ee.useCallback(()=>{const _=g.collectionRef.current;if(!_)return[];const v=Array.from(_.querySelectorAll(`[${c}]`));return Array.from(g.itemMap.values()).sort((S,k)=>v.indexOf(S.ref.current)-v.indexOf(k.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:l,Slot:a,ItemSlot:d},f,r]}function RO(e,t=globalThis==null?void 0:globalThis.document){const n=Ut(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const kp="dismissableLayer.update",PO="dismissableLayer.pointerDownOutside",OO="dismissableLayer.focusOutside";let m0;const AO=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),MO=p.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:s,onDismiss:a,...u}=e,c=p.useContext(AO),[d,f]=p.useState(null),h=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,g]=p.useState({}),m=Qe(t,N=>f(N)),_=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=_.indexOf(v),x=d?_.indexOf(d):-1,S=c.layersWithOutsidePointerEventsDisabled.size>0,k=x>=y,b=LO(N=>{const D=N.target,M=[...c.branches].some(j=>j.contains(D));!k||M||(i==null||i(N),s==null||s(N),N.defaultPrevented||a==null||a())},h),T=DO(N=>{const D=N.target;[...c.branches].some(j=>j.contains(D))||(l==null||l(N),s==null||s(N),N.defaultPrevented||a==null||a())},h);return RO(N=>{x===c.layers.size-1&&(o==null||o(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},h),p.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(m0=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),v0(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=m0)}},[d,h,r,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),v0())},[d,c]),p.useEffect(()=>{const N=()=>g({});return document.addEventListener(kp,N),()=>document.removeEventListener(kp,N)},[]),p.createElement(Le.div,te({},u,{ref:m,style:{pointerEvents:S?k?"auto":"none":void 0,...e.style},onFocusCapture:He(e.onFocusCapture,T.onFocusCapture),onBlurCapture:He(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:He(e.onPointerDownCapture,b.onPointerDownCapture)}))});function LO(e,t=globalThis==null?void 0:globalThis.document){const n=Ut(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){uE(PO,n,u,{discrete:!0})};var a=c;const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function DO(e,t=globalThis==null?void 0:globalThis.document){const n=Ut(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&uE(OO,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function v0(){const e=new CustomEvent(kp);document.dispatchEvent(e)}function uE(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mb(o,i):o.dispatchEvent(i)}let Rf=0;function IO(){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:y0()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:y0()),Rf++,()=>{Rf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Rf--}},[])}function y0(){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 Pf="focusScope.autoFocusOnMount",Of="focusScope.autoFocusOnUnmount",x0={bubbles:!1,cancelable:!0},jO=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[s,a]=p.useState(null),u=Ut(o),c=Ut(i),d=p.useRef(null),f=Qe(t,m=>a(m)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let y=function(b){if(h.paused||!s)return;const T=b.target;s.contains(T)?d.current=T:so(d.current,{select:!0})},x=function(b){if(h.paused||!s)return;const T=b.relatedTarget;T!==null&&(s.contains(T)||so(d.current,{select:!0}))},S=function(b){if(document.activeElement===document.body)for(const N of b)N.removedNodes.length>0&&so(s)};var m=y,_=x,v=S;document.addEventListener("focusin",y),document.addEventListener("focusout",x);const k=new MutationObserver(S);return s&&k.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),k.disconnect()}}},[r,s,h.paused]),p.useEffect(()=>{if(s){_0.add(h);const m=document.activeElement;if(!s.contains(m)){const v=new CustomEvent(Pf,x0);s.addEventListener(Pf,u),s.dispatchEvent(v),v.defaultPrevented||(zO(VO(cE(s)),{select:!0}),document.activeElement===m&&so(s))}return()=>{s.removeEventListener(Pf,u),setTimeout(()=>{const v=new CustomEvent(Of,x0);s.addEventListener(Of,c),s.dispatchEvent(v),v.defaultPrevented||so(m??document.body,{select:!0}),s.removeEventListener(Of,c),_0.remove(h)},0)}}},[s,u,c,h]);const g=p.useCallback(m=>{if(!n&&!r||h.paused)return;const _=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(_&&v){const y=m.currentTarget,[x,S]=FO(y);x&&S?!m.shiftKey&&v===S?(m.preventDefault(),n&&so(x,{select:!0})):m.shiftKey&&v===x&&(m.preventDefault(),n&&so(S,{select:!0})):v===y&&m.preventDefault()}},[n,r,h.paused]);return p.createElement(Le.div,te({tabIndex:-1},l,{ref:f,onKeyDown:g}))});function zO(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(so(r,{select:t}),document.activeElement!==n)return}function FO(e){const t=cE(e),n=w0(t,e),r=w0(t.reverse(),e);return[n,r]}function cE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function w0(e,t){for(const n of e)if(!BO(n,{upTo:t}))return n}function BO(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 WO(e){return e instanceof HTMLInputElement&&"select"in e}function so(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&WO(e)&&t&&e.select()}}const _0=UO();function UO(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=S0(e,t),e.unshift(t)},remove(t){var n;e=S0(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function S0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function VO(e){return e.filter(t=>t.tagName!=="A")}const HO=m1.useId||(()=>{});let KO=0;function Td(e){const[t,n]=p.useState(HO());return bn(()=>{e||n(r=>r??String(KO++))},[e]),e||(t?`radix-${t}`:"")}const GO=["top","right","bottom","left"],jo=Math.min,Sn=Math.max,Bc=Math.round,Cu=Math.floor,zo=e=>({x:e,y:e}),YO={left:"right",right:"left",bottom:"top",top:"bottom"},XO={start:"end",end:"start"};function Tp(e,t,n){return Sn(e,jo(t,n))}function Gr(e,t){return typeof e=="function"?e(t):e}function Yr(e){return e.split("-")[0]}function Zl(e){return e.split("-")[1]}function bm(e){return e==="x"?"y":"x"}function Nm(e){return e==="y"?"height":"width"}function ql(e){return["top","bottom"].includes(Yr(e))?"y":"x"}function Rm(e){return bm(ql(e))}function QO(e,t,n){n===void 0&&(n=!1);const r=Zl(e),o=Rm(e),i=Nm(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Wc(l)),[l,Wc(l)]}function JO(e){const t=Wc(e);return[bp(e),t,bp(t)]}function bp(e){return e.replace(/start|end/g,t=>XO[t])}function ZO(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}function qO(e,t,n,r){const o=Zl(e);let i=ZO(Yr(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(bp)))),i}function Wc(e){return e.replace(/left|right|bottom|top/g,t=>YO[t])}function e5(e){return{top:0,right:0,bottom:0,left:0,...e}}function dE(e){return typeof e!="number"?e5(e):{top:e,right:e,bottom:e,left:e}}function Uc(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function E0(e,t,n){let{reference:r,floating:o}=e;const i=ql(t),l=Rm(t),s=Nm(l),a=Yr(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let h;switch(a){case"top":h={x:c,y:r.y-o.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Zl(t)){case"start":h[l]-=f*(n&&u?-1:1);break;case"end":h[l]+=f*(n&&u?-1:1);break}return h}const t5=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=E0(u,r,a),f=r,h={},g=0;for(let m=0;m<s.length;m++){const{name:_,fn:v}=s[m],{x:y,y:x,data:S,reset:k}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:u,platform:l,elements:{reference:e,floating:t}});if(c=y??c,d=x??d,h={...h,[_]:{...h[_],...S}},k&&g<=50){g++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(u=k.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:c,y:d}=E0(u,f,a)),m=-1;continue}}return{x:c,y:d,placement:f,strategy:o,middlewareData:h}};async function $a(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Gr(t,e),g=dE(h),_=s[f?d==="floating"?"reference":"floating":d],v=Uc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(_)))==null||n?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:a})),y=d==="floating"?{...l.floating,x:r,y:o}:l.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},k=Uc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:x,strategy:a}):y);return{top:(v.top-k.top+g.top)/S.y,bottom:(k.bottom-v.bottom+g.bottom)/S.y,left:(v.left-k.left+g.left)/S.x,right:(k.right-v.right+g.right)/S.x}}const C0=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:s,middlewareData:a}=t,{element:u,padding:c=0}=Gr(e,t)||{};if(u==null)return{};const d=dE(c),f={x:n,y:r},h=Rm(o),g=Nm(h),m=await l.getDimensions(u),_=h==="y",v=_?"top":"left",y=_?"bottom":"right",x=_?"clientHeight":"clientWidth",S=i.reference[g]+i.reference[h]-f[h]-i.floating[g],k=f[h]-i.reference[h],b=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let T=b?b[x]:0;(!T||!await(l.isElement==null?void 0:l.isElement(b)))&&(T=s.floating[x]||i.floating[g]);const N=S/2-k/2,D=T/2-m[g]/2-1,M=jo(d[v],D),j=jo(d[y],D),B=M,re=T-m[g]-j,H=T/2-m[g]/2+N,Y=Tp(B,H,re),C=!a.arrow&&Zl(o)!=null&&H!=Y&&i.reference[g]/2-(H<B?M:j)-m[g]/2<0,$=C?H<B?H-B:H-re:0;return{[h]:f[h]+$,data:{[h]:Y,centerOffset:H-Y-$,...C&&{alignmentOffset:$}},reset:C}}}),n5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,..._}=Gr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Yr(o),y=Yr(s)===s,x=await(a.isRTL==null?void 0:a.isRTL(u.floating)),S=f||(y||!m?[Wc(s)]:JO(s));!f&&g!=="none"&&S.push(...qO(s,m,g,x));const k=[s,...S],b=await $a(t,_),T=[];let N=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&T.push(b[v]),d){const B=QO(o,l,x);T.push(b[B[0]],b[B[1]])}if(N=[...N,{placement:o,overflows:T}],!T.every(B=>B<=0)){var D,M;const B=(((D=i.flip)==null?void 0:D.index)||0)+1,re=k[B];if(re)return{data:{index:B,overflows:N},reset:{placement:re}};let H=(M=N.filter(Y=>Y.overflows[0]<=0).sort((Y,C)=>Y.overflows[1]-C.overflows[1])[0])==null?void 0:M.placement;if(!H)switch(h){case"bestFit":{var j;const Y=(j=N.map(C=>[C.placement,C.overflows.filter($=>$>0).reduce(($,E)=>$+E,0)]).sort((C,$)=>C[1]-$[1])[0])==null?void 0:j[0];Y&&(H=Y);break}case"initialPlacement":H=s;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function $0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function k0(e){return GO.some(t=>e[t]>=0)}const r5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Gr(e,t);switch(r){case"referenceHidden":{const i=await $a(t,{...o,elementContext:"reference"}),l=$0(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:k0(l)}}}case"escaped":{const i=await $a(t,{...o,altBoundary:!0}),l=$0(i,n.floating);return{data:{escapedOffsets:l,escaped:k0(l)}}}default:return{}}}}};async function o5(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Yr(n),s=Zl(n),a=ql(n)==="y",u=["left","top"].includes(l)?-1:1,c=i&&a?-1:1,d=Gr(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof g=="number"&&(h=s==="end"?g*-1:g),a?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const i5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await o5(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},l5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:_=>{let{x:v,y}=_;return{x:v,y}}},...a}=Gr(e,t),u={x:n,y:r},c=await $a(t,a),d=ql(Yr(o)),f=bm(d);let h=u[f],g=u[d];if(i){const _=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+c[_],x=h-c[v];h=Tp(y,h,x)}if(l){const _=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=g+c[_],x=g-c[v];g=Tp(y,g,x)}const m=s.fn({...t,[f]:h,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r}}}}},s5=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:s=0,mainAxis:a=!0,crossAxis:u=!0}=Gr(e,t),c={x:n,y:r},d=ql(o),f=bm(d);let h=c[f],g=c[d];const m=Gr(s,t),_=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(a){const x=f==="y"?"height":"width",S=i.reference[f]-i.floating[x]+_.mainAxis,k=i.reference[f]+i.reference[x]-_.mainAxis;h<S?h=S:h>k&&(h=k)}if(u){var v,y;const x=f==="y"?"width":"height",S=["top","left"].includes(Yr(o)),k=i.reference[d]-i.floating[x]+(S&&((v=l.offset)==null?void 0:v[d])||0)+(S?0:_.crossAxis),b=i.reference[d]+i.reference[x]+(S?0:((y=l.offset)==null?void 0:y[d])||0)-(S?_.crossAxis:0);g<k?g=k:g>b&&(g=b)}return{[f]:h,[d]:g}}}},a5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:l=()=>{},...s}=Gr(e,t),a=await $a(t,s),u=Yr(n),c=Zl(n),d=ql(n)==="y",{width:f,height:h}=r.floating;let g,m;u==="top"||u==="bottom"?(g=u,m=c===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=u,g=c==="end"?"top":"bottom");const _=h-a[g],v=f-a[m],y=!t.middlewareData.shift;let x=_,S=v;if(d){const b=f-a.left-a.right;S=c||y?jo(v,b):b}else{const b=h-a.top-a.bottom;x=c||y?jo(_,b):b}if(y&&!c){const b=Sn(a.left,0),T=Sn(a.right,0),N=Sn(a.top,0),D=Sn(a.bottom,0);d?S=f-2*(b!==0||T!==0?b+T:Sn(a.left,a.right)):x=h-2*(N!==0||D!==0?N+D:Sn(a.top,a.bottom))}await l({...t,availableWidth:S,availableHeight:x});const k=await o.getDimensions(i.floating);return f!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Fo(e){return fE(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function to(e){var t;return(t=(fE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fE(e){return e instanceof Node||e instanceof kn(e).Node}function Xr(e){return e instanceof Element||e instanceof kn(e).Element}function Cr(e){return e instanceof HTMLElement||e instanceof kn(e).HTMLElement}function T0(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function Va(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function u5(e){return["table","td","th"].includes(Fo(e))}function Pm(e){const t=Om(),n=Vn(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 c5(e){let t=Ol(e);for(;Cr(t)&&!bd(t);){if(Pm(t))return t;t=Ol(t)}return null}function Om(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bd(e){return["html","body","#document"].includes(Fo(e))}function Vn(e){return kn(e).getComputedStyle(e)}function Nd(e){return Xr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ol(e){if(Fo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||T0(e)&&e.host||to(e);return T0(t)?t.host:t}function hE(e){const t=Ol(e);return bd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cr(t)&&Va(t)?t:hE(t)}function ka(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hE(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=kn(o);return i?t.concat(l,l.visualViewport||[],Va(o)?o:[],l.frameElement&&n?ka(l.frameElement):[]):t.concat(o,ka(o,[],n))}function pE(e){const t=Vn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Cr(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=Bc(n)!==i||Bc(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function Am(e){return Xr(e)?e:e.contextElement}function vl(e){const t=Am(e);if(!Cr(t))return zo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=pE(t);let l=(i?Bc(n.width):n.width)/r,s=(i?Bc(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const d5=zo(0);function gE(e){const t=kn(e);return!Om()||!t.visualViewport?d5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function f5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function xi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Am(e);let l=zo(1);t&&(r?Xr(r)&&(l=vl(r)):l=vl(e));const s=f5(i,n,r)?gE(i):zo(0);let a=(o.left+s.x)/l.x,u=(o.top+s.y)/l.y,c=o.width/l.x,d=o.height/l.y;if(i){const f=kn(i),h=r&&Xr(r)?kn(r):r;let g=f.frameElement;for(;g&&r&&h!==f;){const m=vl(g),_=g.getBoundingClientRect(),v=Vn(g),y=_.left+(g.clientLeft+parseFloat(v.paddingLeft))*m.x,x=_.top+(g.clientTop+parseFloat(v.paddingTop))*m.y;a*=m.x,u*=m.y,c*=m.x,d*=m.y,a+=y,u+=x,g=kn(g).frameElement}}return Uc({width:c,height:d,x:a,y:u})}function h5(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Cr(n),i=to(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},s=zo(1);const a=zo(0);if((o||!o&&r!=="fixed")&&((Fo(n)!=="body"||Va(i))&&(l=Nd(n)),Cr(n))){const u=xi(n);s=vl(n),a.x=u.x+n.clientLeft,a.y=u.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-l.scrollLeft*s.x+a.x,y:t.y*s.y-l.scrollTop*s.y+a.y}}function p5(e){return Array.from(e.getClientRects())}function mE(e){return xi(to(e)).left+Nd(e).scrollLeft}function g5(e){const t=to(e),n=Nd(e),r=e.ownerDocument.body,o=Sn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Sn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+mE(e);const s=-n.scrollTop;return Vn(r).direction==="rtl"&&(l+=Sn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}function m5(e,t){const n=kn(e),r=to(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const u=Om();(!u||u&&t==="fixed")&&(s=o.offsetLeft,a=o.offsetTop)}return{width:i,height:l,x:s,y:a}}function v5(e,t){const n=xi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Cr(e)?vl(e):zo(1),l=e.clientWidth*i.x,s=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:l,height:s,x:a,y:u}}function b0(e,t,n){let r;if(t==="viewport")r=m5(e,n);else if(t==="document")r=g5(to(e));else if(Xr(t))r=v5(t,n);else{const o=gE(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Uc(r)}function vE(e,t){const n=Ol(e);return n===t||!Xr(n)||bd(n)?!1:Vn(n).position==="fixed"||vE(n,t)}function y5(e,t){const n=t.get(e);if(n)return n;let r=ka(e,[],!1).filter(s=>Xr(s)&&Fo(s)!=="body"),o=null;const i=Vn(e).position==="fixed";let l=i?Ol(e):e;for(;Xr(l)&&!bd(l);){const s=Vn(l),a=Pm(l);!a&&s.position==="fixed"&&(o=null),(i?!a&&!o:!a&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Va(l)&&!a&&vE(e,l))?r=r.filter(c=>c!==l):o=s,l=Ol(l)}return t.set(e,r),r}function x5(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?y5(t,this._c):[].concat(n),r],s=l[0],a=l.reduce((u,c)=>{const d=b0(t,c,o);return u.top=Sn(d.top,u.top),u.right=jo(d.right,u.right),u.bottom=jo(d.bottom,u.bottom),u.left=Sn(d.left,u.left),u},b0(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function w5(e){return pE(e)}function _5(e,t,n){const r=Cr(t),o=to(t),i=n==="fixed",l=xi(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=zo(0);if(r||!r&&!i)if((Fo(t)!=="body"||Va(o))&&(s=Nd(t)),r){const u=xi(t,!0,i,t);a.x=u.x+t.clientLeft,a.y=u.y+t.clientTop}else o&&(a.x=mE(o));return{x:l.left+s.scrollLeft-a.x,y:l.top+s.scrollTop-a.y,width:l.width,height:l.height}}function N0(e,t){return!Cr(e)||Vn(e).position==="fixed"?null:t?t(e):e.offsetParent}function yE(e,t){const n=kn(e);if(!Cr(e))return n;let r=N0(e,t);for(;r&&u5(r)&&Vn(r).position==="static";)r=N0(r,t);return r&&(Fo(r)==="html"||Fo(r)==="body"&&Vn(r).position==="static"&&!Pm(r))?n:r||c5(e)||n}const S5=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||yE,i=this.getDimensions;return{reference:_5(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function E5(e){return Vn(e).direction==="rtl"}const C5={convertOffsetParentRelativeRectToViewportRelativeRect:h5,getDocumentElement:to,getClippingRect:x5,getOffsetParent:yE,getElementRects:S5,getClientRects:p5,getDimensions:w5,getScale:vl,isElement:Xr,isRTL:E5};function $5(e,t){let n=null,r;const o=to(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function l(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const h=Cu(c),g=Cu(o.clientWidth-(u+d)),m=Cu(o.clientHeight-(c+f)),_=Cu(u),y={rootMargin:-h+"px "+-g+"px "+-m+"px "+-_+"px",threshold:Sn(0,jo(1,a))||1};let x=!0;function S(k){const b=k[0].intersectionRatio;if(b!==a){if(!x)return l();b?l(!1,b):r=setTimeout(()=>{l(!1,1e-7)},100)}x=!1}try{n=new IntersectionObserver(S,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return l(!0),i}function k5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=Am(e),c=o||i?[...u?ka(u):[],...ka(t)]:[];c.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=u&&s?$5(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 g,m=a?xi(e):null;a&&_();function _(){const v=xi(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,g=requestAnimationFrame(_)}return n(),()=>{c.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,a&&cancelAnimationFrame(g)}}const T5=(e,t,n)=>{const r=new Map,o={platform:C5,...n},i={...o.platform,_c:r};return t5(e,t,{...o,platform:i})},b5=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?C0({element:r.current,padding:o}).fn(n):{}:r?C0({element:r,padding:o}).fn(n):{}}}};var Gu=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Vc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Vc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Vc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function xE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function R0(e,t){const n=xE(e);return Math.round(t*n)/n}function P0(e){const t=p.useRef(e);return Gu(()=>{t.current=e}),t}function N5(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:s=!0,whileElementsMounted:a,open:u}=e,[c,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=p.useState(r);Vc(f,r)||h(r);const[g,m]=p.useState(null),[_,v]=p.useState(null),y=p.useCallback(C=>{C!=b.current&&(b.current=C,m(C))},[m]),x=p.useCallback(C=>{C!==T.current&&(T.current=C,v(C))},[v]),S=i||g,k=l||_,b=p.useRef(null),T=p.useRef(null),N=p.useRef(c),D=P0(a),M=P0(o),j=p.useCallback(()=>{if(!b.current||!T.current)return;const C={placement:t,strategy:n,middleware:f};M.current&&(C.platform=M.current),T5(b.current,T.current,C).then($=>{const E={...$,isPositioned:!0};B.current&&!Vc(N.current,E)&&(N.current=E,$r.flushSync(()=>{d(E)}))})},[f,t,n,M]);Gu(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[u]);const B=p.useRef(!1);Gu(()=>(B.current=!0,()=>{B.current=!1}),[]),Gu(()=>{if(S&&(b.current=S),k&&(T.current=k),S&&k){if(D.current)return D.current(S,k,j);j()}},[S,k,j,D]);const re=p.useMemo(()=>({reference:b,floating:T,setReference:y,setFloating:x}),[y,x]),H=p.useMemo(()=>({reference:S,floating:k}),[S,k]),Y=p.useMemo(()=>{const C={position:n,left:0,top:0};if(!H.floating)return C;const $=R0(H.floating,c.x),E=R0(H.floating,c.y);return s?{...C,transform:"translate("+$+"px, "+E+"px)",...xE(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:E}},[n,s,H.floating,c.x,c.y]);return p.useMemo(()=>({...c,update:j,refs:re,elements:H,floatingStyles:Y}),[c,j,re,H,Y])}function wE(e){const[t,n]=p.useState(void 0);return bn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let l,s;if("borderBoxSize"in i){const a=i.borderBoxSize,u=Array.isArray(a)?a[0]:a;l=u.inlineSize,s=u.blockSize}else l=e.offsetWidth,s=e.offsetHeight;n({width:l,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const _E="Popper",[SE,EE]=ki(_E),[R5,CE]=SE(_E),P5=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return p.createElement(R5,{scope:t,anchor:r,onAnchorChange:o},n)},O5="PopperAnchor",A5=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=CE(O5,n),l=p.useRef(null),s=Qe(t,l);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:p.createElement(Le.div,te({},o,{ref:s}))}),$E="PopperContent",[M5,K4]=SE($E),L5=p.forwardRef((e,t)=>{var n,r,o,i,l,s,a,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:g=0,arrowPadding:m=0,avoidCollisions:_=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:x="partial",hideWhenDetached:S=!1,updatePositionStrategy:k="optimized",onPlaced:b,...T}=e,N=CE($E,c),[D,M]=p.useState(null),j=Qe(t,cn=>M(cn)),[B,re]=p.useState(null),H=wE(B),Y=(n=H==null?void 0:H.width)!==null&&n!==void 0?n:0,C=(r=H==null?void 0:H.height)!==null&&r!==void 0?r:0,$=d+(h!=="center"?"-"+h:""),E=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},O=Array.isArray(v)?v:[v],R=O.length>0,F={padding:E,boundary:O.filter(D5),altBoundary:R},{refs:V,floatingStyles:ae,placement:oe,isPositioned:$e,middlewareData:_e}=N5({strategy:"fixed",placement:$,whileElementsMounted:(...cn)=>k5(...cn,{animationFrame:k==="always"}),elements:{reference:N.anchor},middleware:[i5({mainAxis:f+C,alignmentAxis:g}),_&&l5({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?s5():void 0,...F}),_&&n5({...F}),a5({...F,apply:({elements:cn,rects:Kn,availableWidth:Re,availableHeight:mt})=>{const{width:Je,height:Yt}=Kn.reference,dn=cn.floating.style;dn.setProperty("--radix-popper-available-width",`${Re}px`),dn.setProperty("--radix-popper-available-height",`${mt}px`),dn.setProperty("--radix-popper-anchor-width",`${Je}px`),dn.setProperty("--radix-popper-anchor-height",`${Yt}px`)}}),B&&b5({element:B,padding:m}),I5({arrowWidth:Y,arrowHeight:C}),S&&r5({strategy:"referenceHidden",...F})]}),[Q,Ne]=kE(oe),ye=Ut(b);bn(()=>{$e&&(ye==null||ye())},[$e,ye]);const Se=(o=_e.arrow)===null||o===void 0?void 0:o.x,pe=(i=_e.arrow)===null||i===void 0?void 0:i.y,be=((l=_e.arrow)===null||l===void 0?void 0:l.centerOffset)!==0,[Fe,Ot]=p.useState();return bn(()=>{D&&Ot(window.getComputedStyle(D).zIndex)},[D]),p.createElement("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:$e?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Fe,"--radix-popper-transform-origin":[(s=_e.transformOrigin)===null||s===void 0?void 0:s.x,(a=_e.transformOrigin)===null||a===void 0?void 0:a.y].join(" ")},dir:e.dir},p.createElement(M5,{scope:c,placedSide:Q,onArrowChange:re,arrowX:Se,arrowY:pe,shouldHideArrow:be},p.createElement(Le.div,te({"data-side":Q,"data-align":Ne},T,{ref:j,style:{...T.style,animation:$e?void 0:"none",opacity:(u=_e.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function D5(e){return e!==null}const I5=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;const{placement:s,rects:a,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,f=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[g,m]=kE(s),_={start:"0%",center:"50%",end:"100%"}[m],v=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+f/2,y=((i=(l=u.arrow)===null||l===void 0?void 0:l.y)!==null&&i!==void 0?i:0)+h/2;let x="",S="";return g==="bottom"?(x=d?_:`${v}px`,S=`${-h}px`):g==="top"?(x=d?_:`${v}px`,S=`${a.floating.height+h}px`):g==="right"?(x=`${-h}px`,S=d?_:`${y}px`):g==="left"&&(x=`${a.floating.width+h}px`,S=d?_:`${y}px`),{data:{x,y:S}}}});function kE(e){const[t,n="center"]=e.split("-");return[t,n]}const j5=P5,z5=A5,F5=L5,B5=p.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?ww.createPortal(p.createElement(Le.div,te({},o,{ref:t})),r):null});function Al({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=W5({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,s=Ut(n),a=p.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[l,a]}function W5({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),i=Ut(t);return p.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function TE(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 U5=p.forwardRef((e,t)=>p.createElement(Le.span,te({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));var V5=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Wi=new WeakMap,$u=new WeakMap,ku={},Af=0,bE=function(e){return e&&(e.host||bE(e.parentNode))},H5=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=bE(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})},K5=function(e,t,n,r){var o=H5(t,Array.isArray(e)?e:[e]);ku[n]||(ku[n]=new WeakMap);var i=ku[n],l=[],s=new Set,a=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||a.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else{var h=f.getAttribute(r),g=h!==null&&h!=="false",m=(Wi.get(f)||0)+1,_=(i.get(f)||0)+1;Wi.set(f,m),i.set(f,_),l.push(f),m===1&&g&&$u.set(f,!0),_===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}})};return c(t),s.clear(),Af++,function(){l.forEach(function(d){var f=Wi.get(d)-1,h=i.get(d)-1;Wi.set(d,f),i.set(d,h),f||($u.has(d)||d.removeAttribute(r),$u.delete(d)),h||d.removeAttribute(n)}),Af--,Af||(Wi=new WeakMap,Wi=new WeakMap,$u=new WeakMap,ku={})}},G5=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||V5(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),K5(r,o,n,"aria-hidden")):function(){return null}},pr=function(){return pr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},pr.apply(this,arguments)};function NE(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Y5(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Yu="right-scroll-bar-position",Xu="width-before-scroll-bar",X5="with-scroll-bars-hidden",Q5="--removed-body-scroll-bar-size";function J5(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Z5(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function q5(e,t){return Z5(t||null,function(n){return e.forEach(function(r){return J5(r,n)})})}function eA(e){return e}function tA(e,t){t===void 0&&(t=eA);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(s){return s!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var s=n;n=[],s.forEach(i),l=n}var a=function(){var c=l;l=[],c.forEach(i)},u=function(){return Promise.resolve().then(a)};u(),n={push:function(c){l.push(c),u()},filter:function(c){return l=l.filter(c),n}}}};return o}function nA(e){e===void 0&&(e={});var t=tA(null);return t.options=pr({async:!0,ssr:!1},e),t}var RE=function(e){var t=e.sideCar,n=NE(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,pr({},n))};RE.isSideCarExport=!0;function rA(e,t){return e.useMedium(t),RE}var PE=nA(),Mf=function(){},Rd=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:Mf,onWheelCapture:Mf,onTouchMoveCapture:Mf}),o=r[0],i=r[1],l=e.forwardProps,s=e.children,a=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,g=e.inert,m=e.allowPinchZoom,_=e.as,v=_===void 0?"div":_,y=NE(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=f,S=q5([n,t]),k=pr(pr({},y),o);return p.createElement(p.Fragment,null,c&&p.createElement(x,{sideCar:PE,removeScrollBar:u,shards:d,noIsolation:h,inert:g,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),l?p.cloneElement(p.Children.only(s),pr(pr({},k),{ref:S})):p.createElement(v,pr({},k,{className:a,ref:S}),s))});Rd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rd.classNames={fullWidth:Xu,zeroRight:Yu};var O0,oA=function(){if(O0)return O0;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function iA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=oA();return t&&e.setAttribute("nonce",t),e}function lA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function sA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var aA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=iA())&&(lA(t,n),sA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},uA=function(){var e=aA();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},OE=function(){var e=uA(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},cA={left:0,top:0,right:0,gap:0},Lf=function(e){return parseInt(e||"",10)||0},dA=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Lf(n),Lf(r),Lf(o)]},fA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return cA;var t=dA(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])}},hA=OE(),pA=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
130
|
-
.`.concat(X5,` {
|
|
131
|
-
overflow: hidden `).concat(r,`;
|
|
132
|
-
padding-right: `).concat(s,"px ").concat(r,`;
|
|
133
|
-
}
|
|
134
|
-
body {
|
|
135
|
-
overflow: hidden `).concat(r,`;
|
|
136
|
-
overscroll-behavior: contain;
|
|
137
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
138
|
-
padding-left: `.concat(o,`px;
|
|
139
|
-
padding-top: `).concat(i,`px;
|
|
140
|
-
padding-right: `).concat(l,`px;
|
|
141
|
-
margin-left:0;
|
|
142
|
-
margin-top:0;
|
|
143
|
-
margin-right: `).concat(s,"px ").concat(r,`;
|
|
144
|
-
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.`).concat(Yu,` {
|
|
148
|
-
right: `).concat(s,"px ").concat(r,`;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.`).concat(Xu,` {
|
|
152
|
-
margin-right: `).concat(s,"px ").concat(r,`;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.`).concat(Yu," .").concat(Yu,` {
|
|
156
|
-
right: 0 `).concat(r,`;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.`).concat(Xu," .").concat(Xu,` {
|
|
160
|
-
margin-right: 0 `).concat(r,`;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
body {
|
|
164
|
-
`).concat(Q5,": ").concat(s,`px;
|
|
165
|
-
}
|
|
166
|
-
`)},gA=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=p.useMemo(function(){return fA(o)},[o]);return p.createElement(hA,{styles:pA(i,!t,o,n?"":"!important")})},Np=!1;if(typeof window<"u")try{var Tu=Object.defineProperty({},"passive",{get:function(){return Np=!0,!0}});window.addEventListener("test",Tu,Tu),window.removeEventListener("test",Tu,Tu)}catch{Np=!1}var Ui=Np?{passive:!1}:!1,mA=function(e){return e.tagName==="TEXTAREA"},AE=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!mA(e)&&n[t]==="visible")},vA=function(e){return AE(e,"overflowY")},yA=function(e){return AE(e,"overflowX")},A0=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=ME(e,n);if(r){var o=LE(e,n),i=o[1],l=o[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},xA=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},wA=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ME=function(e,t){return e==="v"?vA(t):yA(t)},LE=function(e,t){return e==="v"?xA(t):wA(t)},_A=function(e,t){return e==="h"&&t==="rtl"?-1:1},SA=function(e,t,n,r,o){var i=_A(e,window.getComputedStyle(t).direction),l=i*r,s=n.target,a=t.contains(s),u=!1,c=l>0,d=0,f=0;do{var h=LE(e,s),g=h[0],m=h[1],_=h[2],v=m-_-i*g;(g||v)&&ME(e,s)&&(d+=v,f+=g),s=s.parentNode}while(!a&&s!==document.body||a&&(t.contains(s)||t===s));return(c&&(o&&d===0||!o&&l>d)||!c&&(o&&f===0||!o&&-l>f))&&(u=!0),u},bu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},M0=function(e){return[e.deltaX,e.deltaY]},L0=function(e){return e&&"current"in e?e.current:e},EA=function(e,t){return e[0]===t[0]&&e[1]===t[1]},CA=function(e){return`
|
|
167
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
168
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
169
|
-
`)},$A=0,Vi=[];function kA(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState($A++)[0],i=p.useState(function(){return OE()})[0],l=p.useRef(e);p.useEffect(function(){l.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Y5([e.lockRef.current],(e.shards||[]).map(L0),!0).filter(Boolean);return m.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(m,_){if("touches"in m&&m.touches.length===2)return!l.current.allowPinchZoom;var v=bu(m),y=n.current,x="deltaX"in m?m.deltaX:y[0]-v[0],S="deltaY"in m?m.deltaY:y[1]-v[1],k,b=m.target,T=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in m&&T==="h"&&b.type==="range")return!1;var N=A0(T,b);if(!N)return!0;if(N?k=T:(k=T==="v"?"h":"v",N=A0(T,b)),!N)return!1;if(!r.current&&"changedTouches"in m&&(x||S)&&(r.current=k),!k)return!0;var D=r.current||k;return SA(D,_,m,D==="h"?x:S,!0)},[]),a=p.useCallback(function(m){var _=m;if(!(!Vi.length||Vi[Vi.length-1]!==i)){var v="deltaY"in _?M0(_):bu(_),y=t.current.filter(function(k){return k.name===_.type&&k.target===_.target&&EA(k.delta,v)})[0];if(y&&y.should){_.cancelable&&_.preventDefault();return}if(!y){var x=(l.current.shards||[]).map(L0).filter(Boolean).filter(function(k){return k.contains(_.target)}),S=x.length>0?s(_,x[0]):!l.current.noIsolation;S&&_.cancelable&&_.preventDefault()}}},[]),u=p.useCallback(function(m,_,v,y){var x={name:m,delta:_,target:v,should:y};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),c=p.useCallback(function(m){n.current=bu(m),r.current=void 0},[]),d=p.useCallback(function(m){u(m.type,M0(m),m.target,s(m,e.lockRef.current))},[]),f=p.useCallback(function(m){u(m.type,bu(m),m.target,s(m,e.lockRef.current))},[]);p.useEffect(function(){return Vi.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",a,Ui),document.addEventListener("touchmove",a,Ui),document.addEventListener("touchstart",c,Ui),function(){Vi=Vi.filter(function(m){return m!==i}),document.removeEventListener("wheel",a,Ui),document.removeEventListener("touchmove",a,Ui),document.removeEventListener("touchstart",c,Ui)}},[]);var h=e.removeScrollBar,g=e.inert;return p.createElement(p.Fragment,null,g?p.createElement(i,{styles:CA(o)}):null,h?p.createElement(gA,{gapMode:"margin"}):null)}const TA=rA(PE,kA);var DE=p.forwardRef(function(e,t){return p.createElement(Rd,pr({},e,{ref:t,sideCar:TA}))});DE.classNames=Rd.classNames;const bA=DE,NA=[" ","Enter","ArrowUp","ArrowDown"],RA=[" ","Enter"],Pd="Select",[Od,Mm,PA]=aE(Pd),[es,G4]=ki(Pd,[PA,EE]),Lm=EE(),[OA,Pi]=es(Pd),[AA,MA]=es(Pd),LA=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:l,defaultValue:s,onValueChange:a,dir:u,name:c,autoComplete:d,disabled:f,required:h}=e,g=Lm(t),[m,_]=p.useState(null),[v,y]=p.useState(null),[x,S]=p.useState(!1),k=Ig(u),[b=!1,T]=Al({prop:r,defaultProp:o,onChange:i}),[N,D]=Al({prop:l,defaultProp:s,onChange:a}),M=p.useRef(null),j=m?!!m.closest("form"):!0,[B,re]=p.useState(new Set),H=Array.from(B).map(Y=>Y.props.value).join(";");return p.createElement(j5,g,p.createElement(OA,{required:h,scope:t,trigger:m,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:Td(),value:N,onValueChange:D,open:b,onOpenChange:T,dir:k,triggerPointerDownPosRef:M,disabled:f},p.createElement(Od.Provider,{scope:t},p.createElement(AA,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(Y=>{re(C=>new Set(C).add(Y))},[]),onNativeOptionRemove:p.useCallback(Y=>{re(C=>{const $=new Set(C);return $.delete(Y),$})},[])},n)),j?p.createElement(FE,{key:H,"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:N,onChange:Y=>D(Y.target.value),disabled:f},N===void 0?p.createElement("option",{value:""}):null,Array.from(B)):null))},DA="SelectTrigger",IA=p.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Lm(n),l=Pi(DA,n),s=l.disabled||r,a=Qe(t,l.onTriggerChange),u=Mm(n),[c,d,f]=BE(g=>{const m=u().filter(y=>!y.disabled),_=m.find(y=>y.value===l.value),v=WE(m,g,_);v!==void 0&&l.onValueChange(v.value)}),h=()=>{s||(l.onOpenChange(!0),f())};return p.createElement(z5,te({asChild:!0},i),p.createElement(Le.button,te({type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":zE(l.value)?"":void 0},o,{ref:a,onClick:He(o.onClick,g=>{g.currentTarget.focus()}),onPointerDown:He(o.onPointerDown,g=>{const m=g.target;m.hasPointerCapture(g.pointerId)&&m.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(h(),l.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)},g.preventDefault())}),onKeyDown:He(o.onKeyDown,g=>{const m=c.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&d(g.key),!(m&&g.key===" ")&&NA.includes(g.key)&&(h(),g.preventDefault())})})))}),jA="SelectValue",zA=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:l="",...s}=e,a=Pi(jA,n),{onValueNodeHasChildrenChange:u}=a,c=i!==void 0,d=Qe(t,a.onValueNodeChange);return bn(()=>{u(c)},[u,c]),p.createElement(Le.span,te({},s,{ref:d,style:{pointerEvents:"none"}}),zE(a.value)?p.createElement(p.Fragment,null,l):i)}),FA=p.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.createElement(Le.span,te({"aria-hidden":!0},o,{ref:t}),r||"▼")}),BA=e=>p.createElement(B5,te({asChild:!0},e)),Ml="SelectContent",WA=p.forwardRef((e,t)=>{const n=Pi(Ml,e.__scopeSelect),[r,o]=p.useState();if(bn(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?$r.createPortal(p.createElement(IE,{scope:e.__scopeSelect},p.createElement(Od.Slot,{scope:e.__scopeSelect},p.createElement("div",null,e.children))),i):null}return p.createElement(UA,te({},e,{ref:t}))}),Dr=10,[IE,Ad]=es(Ml),UA=p.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:l,side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:_,...v}=e,y=Pi(Ml,n),[x,S]=p.useState(null),[k,b]=p.useState(null),T=Qe(t,Q=>S(Q)),[N,D]=p.useState(null),[M,j]=p.useState(null),B=Mm(n),[re,H]=p.useState(!1),Y=p.useRef(!1);p.useEffect(()=>{if(x)return G5(x)},[x]),IO();const C=p.useCallback(Q=>{const[Ne,...ye]=B().map(be=>be.ref.current),[Se]=ye.slice(-1),pe=document.activeElement;for(const be of Q)if(be===pe||(be==null||be.scrollIntoView({block:"nearest"}),be===Ne&&k&&(k.scrollTop=0),be===Se&&k&&(k.scrollTop=k.scrollHeight),be==null||be.focus(),document.activeElement!==pe))return},[B,k]),$=p.useCallback(()=>C([N,x]),[C,N,x]);p.useEffect(()=>{re&&$()},[re,$]);const{onOpenChange:E,triggerPointerDownPosRef:O}=y;p.useEffect(()=>{if(x){let Q={x:0,y:0};const Ne=Se=>{var pe,be,Fe,Ot;Q={x:Math.abs(Math.round(Se.pageX)-((pe=(be=O.current)===null||be===void 0?void 0:be.x)!==null&&pe!==void 0?pe:0)),y:Math.abs(Math.round(Se.pageY)-((Fe=(Ot=O.current)===null||Ot===void 0?void 0:Ot.y)!==null&&Fe!==void 0?Fe:0))}},ye=Se=>{Q.x<=10&&Q.y<=10?Se.preventDefault():x.contains(Se.target)||E(!1),document.removeEventListener("pointermove",Ne),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Ne),document.addEventListener("pointerup",ye,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ne),document.removeEventListener("pointerup",ye,{capture:!0})}}},[x,E,O]),p.useEffect(()=>{const Q=()=>E(!1);return window.addEventListener("blur",Q),window.addEventListener("resize",Q),()=>{window.removeEventListener("blur",Q),window.removeEventListener("resize",Q)}},[E]);const[R,F]=BE(Q=>{const Ne=B().filter(pe=>!pe.disabled),ye=Ne.find(pe=>pe.ref.current===document.activeElement),Se=WE(Ne,Q,ye);Se&&setTimeout(()=>Se.ref.current.focus())}),V=p.useCallback((Q,Ne,ye)=>{const Se=!Y.current&&!ye;(y.value!==void 0&&y.value===Ne||Se)&&(D(Q),Se&&(Y.current=!0))},[y.value]),ae=p.useCallback(()=>x==null?void 0:x.focus(),[x]),oe=p.useCallback((Q,Ne,ye)=>{const Se=!Y.current&&!ye;(y.value!==void 0&&y.value===Ne||Se)&&j(Q)},[y.value]),$e=r==="popper"?D0:VA,_e=$e===D0?{side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:_}:{};return p.createElement(IE,{scope:n,content:x,viewport:k,onViewportChange:b,itemRefCallback:V,selectedItem:N,onItemLeave:ae,itemTextRefCallback:oe,focusSelectedItem:$,selectedItemText:M,position:r,isPositioned:re,searchRef:R},p.createElement(bA,{as:Tl,allowPinchZoom:!0},p.createElement(jO,{asChild:!0,trapped:y.open,onMountAutoFocus:Q=>{Q.preventDefault()},onUnmountAutoFocus:He(o,Q=>{var Ne;(Ne=y.trigger)===null||Ne===void 0||Ne.focus({preventScroll:!0}),Q.preventDefault()})},p.createElement(MO,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:Q=>Q.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},p.createElement($e,te({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:Q=>Q.preventDefault()},v,_e,{onPlaced:()=>H(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:He(v.onKeyDown,Q=>{const Ne=Q.ctrlKey||Q.altKey||Q.metaKey;if(Q.key==="Tab"&&Q.preventDefault(),!Ne&&Q.key.length===1&&F(Q.key),["ArrowUp","ArrowDown","Home","End"].includes(Q.key)){let Se=B().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(Q.key)&&(Se=Se.slice().reverse()),["ArrowUp","ArrowDown"].includes(Q.key)){const pe=Q.target,be=Se.indexOf(pe);Se=Se.slice(be+1)}setTimeout(()=>C(Se)),Q.preventDefault()}})}))))))}),VA=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Pi(Ml,n),l=Ad(Ml,n),[s,a]=p.useState(null),[u,c]=p.useState(null),d=Qe(t,T=>c(T)),f=Mm(n),h=p.useRef(!1),g=p.useRef(!0),{viewport:m,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=l,x=p.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&m&&_&&v){const T=i.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),M=v.getBoundingClientRect();if(i.dir!=="rtl"){const pe=M.left-N.left,be=D.left-pe,Fe=T.left-be,Ot=T.width+Fe,cn=Math.max(Ot,N.width),Kn=window.innerWidth-Dr,Re=jh(be,[Dr,Kn-cn]);s.style.minWidth=Ot+"px",s.style.left=Re+"px"}else{const pe=N.right-M.right,be=window.innerWidth-D.right-pe,Fe=window.innerWidth-T.right-be,Ot=T.width+Fe,cn=Math.max(Ot,N.width),Kn=window.innerWidth-Dr,Re=jh(be,[Dr,Kn-cn]);s.style.minWidth=Ot+"px",s.style.right=Re+"px"}const j=f(),B=window.innerHeight-Dr*2,re=m.scrollHeight,H=window.getComputedStyle(u),Y=parseInt(H.borderTopWidth,10),C=parseInt(H.paddingTop,10),$=parseInt(H.borderBottomWidth,10),E=parseInt(H.paddingBottom,10),O=Y+C+re+E+$,R=Math.min(_.offsetHeight*5,O),F=window.getComputedStyle(m),V=parseInt(F.paddingTop,10),ae=parseInt(F.paddingBottom,10),oe=T.top+T.height/2-Dr,$e=B-oe,_e=_.offsetHeight/2,Q=_.offsetTop+_e,Ne=Y+C+Q,ye=O-Ne;if(Ne<=oe){const pe=_===j[j.length-1].ref.current;s.style.bottom="0px";const be=u.clientHeight-m.offsetTop-m.offsetHeight,Fe=Math.max($e,_e+(pe?ae:0)+be+$),Ot=Ne+Fe;s.style.height=Ot+"px"}else{const pe=_===j[0].ref.current;s.style.top="0px";const Fe=Math.max(oe,Y+m.offsetTop+(pe?V:0)+_e)+ye;s.style.height=Fe+"px",m.scrollTop=Ne-oe+m.offsetTop}s.style.margin=`${Dr}px 0`,s.style.minHeight=R+"px",s.style.maxHeight=B+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,i.trigger,i.valueNode,s,u,m,_,v,i.dir,r]);bn(()=>x(),[x]);const[S,k]=p.useState();bn(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const b=p.useCallback(T=>{T&&g.current===!0&&(x(),y==null||y(),g.current=!1)},[x,y]);return p.createElement(HA,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:b},p.createElement("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S}},p.createElement(Le.div,te({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),D0=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Dr,...i}=e,l=Lm(n);return p.createElement(F5,te({},l,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[HA,KA]=es(Ml,{}),I0="SelectViewport",GA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ad(I0,n),i=KA(I0,n),l=Qe(t,o.onViewportChange),s=p.useRef(0);return p.createElement(p.Fragment,null,p.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),p.createElement(Od.Slot,{scope:n},p.createElement(Le.div,te({"data-radix-select-viewport":"",role:"presentation"},r,{ref:l,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:He(r.onScroll,a=>{const u=a.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:d}=i;if(d!=null&&d.current&&c){const f=Math.abs(s.current-u.scrollTop);if(f>0){const h=window.innerHeight-Dr*2,g=parseFloat(c.style.minHeight),m=parseFloat(c.style.height),_=Math.max(g,m);if(_<h){const v=_+f,y=Math.min(h,v),x=v-y;c.style.height=y+"px",c.style.bottom==="0px"&&(u.scrollTop=x>0?x:0,c.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),YA="SelectGroup",[Y4,XA]=es(YA),QA="SelectLabel",JA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=XA(QA,n);return p.createElement(Le.div,te({id:o.id},r,{ref:t}))}),Rp="SelectItem",[ZA,jE]=es(Rp),qA=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...l}=e,s=Pi(Rp,n),a=Ad(Rp,n),u=s.value===r,[c,d]=p.useState(i??""),[f,h]=p.useState(!1),g=Qe(t,v=>{var y;return(y=a.itemRefCallback)===null||y===void 0?void 0:y.call(a,v,r,o)}),m=Td(),_=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.createElement(ZA,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:p.useCallback(v=>{d(y=>{var x;return y||((x=v==null?void 0:v.textContent)!==null&&x!==void 0?x:"").trim()})},[])},p.createElement(Od.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},p.createElement(Le.div,te({role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},l,{ref:g,onFocus:He(l.onFocus,()=>h(!0)),onBlur:He(l.onBlur,()=>h(!1)),onPointerUp:He(l.onPointerUp,_),onPointerMove:He(l.onPointerMove,v=>{if(o){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}else v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:He(l.onPointerLeave,v=>{if(v.currentTarget===document.activeElement){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}}),onKeyDown:He(l.onKeyDown,v=>{var y;((y=a.searchRef)===null||y===void 0?void 0:y.current)!==""&&v.key===" "||(RA.includes(v.key)&&_(),v.key===" "&&v.preventDefault())})}))))}),Nu="SelectItemText",e3=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,l=Pi(Nu,n),s=Ad(Nu,n),a=jE(Nu,n),u=MA(Nu,n),[c,d]=p.useState(null),f=Qe(t,v=>d(v),a.onItemTextChange,v=>{var y;return(y=s.itemTextRefCallback)===null||y===void 0?void 0:y.call(s,v,a.value,a.disabled)}),h=c==null?void 0:c.textContent,g=p.useMemo(()=>p.createElement("option",{key:a.value,value:a.value,disabled:a.disabled},h),[a.disabled,a.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:_}=u;return bn(()=>(m(g),()=>_(g)),[m,_,g]),p.createElement(p.Fragment,null,p.createElement(Le.span,te({id:a.textId},i,{ref:f})),a.isSelected&&l.valueNode&&!l.valueNodeHasChildren?$r.createPortal(i.children,l.valueNode):null)}),t3="SelectItemIndicator",n3=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return jE(t3,n).isSelected?p.createElement(Le.span,te({"aria-hidden":!0},r,{ref:t})):null}),r3=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.createElement(Le.div,te({"aria-hidden":!0},r,{ref:t}))});function zE(e){return e===""||e===void 0}const FE=p.forwardRef((e,t)=>{const{value:n,...r}=e,o=p.useRef(null),i=Qe(t,o),l=TE(n);return p.useEffect(()=>{const s=o.current,a=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(l!==n&&c){const d=new Event("change",{bubbles:!0});c.call(s,n),s.dispatchEvent(d)}},[l,n]),p.createElement(U5,{asChild:!0},p.createElement("select",te({},r,{ref:i,defaultValue:n})))});FE.displayName="BubbleSelect";function BE(e){const t=Ut(e),n=p.useRef(""),r=p.useRef(0),o=p.useCallback(l=>{const s=n.current+l;t(s),function a(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>a(""),1e3))}(s)},[t]),i=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function WE(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=o3(e,Math.max(i,0));o.length===1&&(l=l.filter(u=>u!==n));const a=l.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}function o3(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const i3=LA,UE=IA,l3=zA,s3=FA,a3=BA,VE=WA,u3=GA,HE=JA,KE=qA,c3=e3,d3=n3,GE=r3,f3=i3,h3=l3,YE=p.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(UE,{ref:r,className:st("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,w.jsx(s3,{asChild:!0,children:w.jsx(sE,{className:"w-4 h-4 opacity-50"})})]}));YE.displayName=UE.displayName;const XE=p.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>w.jsx(a3,{children:w.jsx(VE,{ref:o,className:st("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:w.jsx(u3,{className:st("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));XE.displayName=VE.displayName;const p3=p.forwardRef(({className:e,...t},n)=>w.jsx(HE,{ref:n,className:st("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));p3.displayName=HE.displayName;const QE=p.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(KE,{ref:r,className:st("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(d3,{children:w.jsx(pO,{className:"w-4 h-4"})})}),w.jsx(c3,{children:t})]}));QE.displayName=KE.displayName;const g3=p.forwardRef(({className:e,...t},n)=>w.jsx(GE,{ref:n,className:st("-mx-1 my-1 h-px bg-muted",e),...t}));g3.displayName=GE.displayName;function JE({path:e,disabled:t,source:n,schema:r,registerPatchCallback:o,onSubmit:i}){return(typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="string"?w.jsx(w3,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i}):(typeof n=="number"||n===null)&&(r==null?void 0:r.type)==="number"?w.jsx(x3,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i}):(typeof n=="number"||typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="keyOf"?w.jsx(y3,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i,selector:r.selector}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="richtext"?w.jsx(v3,{registerPatchCallback:o,onSubmit:i,defaultValue:n}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="image"?w.jsx(m3,{path:e,registerPatchCallback:o,onSubmit:i,defaultValue:n}):w.jsxs("div",{children:["Unsupported schema: ",r.type]})}function j0(e,t,n,r){if(!t||!r)return[];const o=r.sha256.slice(0,5),i=function(){const l=Ug(t)??"unknown",s=Vg(l);return n?`/public/${n.split(".").slice(0,-1).join(".")||n}_${o}.${s}`:`/public/${r.sha256}.${s}`}();return[{value:{[vn]:i,[Ht]:"file",metadata:r},op:"replace",path:e},{value:t,op:"file",path:e,filePath:i}]}function m3({path:e,defaultValue:t,onSubmit:n,registerPatchCallback:r}){const[o,i]=p.useState(null),[l,s]=p.useState(!1),[a,u]=p.useState(),[c,d]=p.useState();return p.useEffect(()=>{d(t&&Kt.convertFileSource(t).url)},[t]),p.useEffect(()=>{r&&r(async f=>j0(f,(o==null?void 0:o.src)??null,(o==null?void 0:o.filename)??null,a))},[o,t]),w.jsxs("div",{className:"max-w-4xl p-4",children:[w.jsxs("label",{htmlFor:`img_input:${e}`,className:"",children:[o||c?w.jsx("img",{src:(o==null?void 0:o.src)||c}):w.jsx("div",{children:"Empty"}),w.jsx("input",{id:`img_input:${e}`,type:"file",hidden:!0,onChange:f=>{nE(f).then(h=>{i({src:h.src,filename:h.filename}),h.width&&h.height?u({sha256:h.sha256,width:h.width,height:h.height}):u(void 0)}).catch(h=>{console.error(h.message),i(null),u(void 0)})}})]}),n&&w.jsx("div",{children:o&&w.jsx(Jl,{disabled:l,onClick:()=>{s(!0),n(f=>Promise.resolve(j0(f,o.src,o.filename??null,a))).finally(()=>{s(!1),i(null),u(void 0)})},children:l?"Saving...":"Submit"})})]},e)}async function z0(e,t){const{templateStrings:n,exprs:r,files:o}=t?await UN(t.getEditorState().toJSON().root):{[Ht]:"richtext",templateStrings:[""],exprs:[],files:{}};return[{op:"replace",path:e,value:{templateStrings:n,exprs:r,[Ht]:"richtext"}},...Object.entries(o).map(([i,l])=>({op:"file",path:e,filePath:i,value:l}))]}function v3({defaultValue:e,onSubmit:t,registerPatchCallback:n}){const[r,o]=p.useState(null),[i,l]=p.useState(!1),[s,a]=p.useState(!1);return p.useEffect(()=>{r&&(l(!1),r.registerTextContentListener(()=>{l(!0)}),r.registerDecoratorListener(()=>{l(!0)}))},[r]),p.useEffect(()=>{r&&n&&n(u=>z0(u,r))},[r]),w.jsxs("div",{className:"p-4 border rounded border-card",children:[w.jsx(dO,{onEditor:u=>{o(u)},richtext:e||{children:[],[Ht]:"root"}}),t&&w.jsx("div",{children:i&&w.jsx(Jl,{disabled:s||!r,onClick:()=>{r&&(a(!0),t(u=>z0(u,r)).finally(()=>{a(!1),l(!1)}))},children:s?"Saving...":"Submit"})})]})}function y3({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r,selector:o}){const i=BM(o),s=(h=>Array.isArray(h.moduleSource)?{type:"number",values:Object.keys(h.moduleSource).map(g=>parseInt(g))}:{type:"string",values:Object.keys(h.moduleSource??["ERROR fetching source"])})(i),[a,u]=p.useState(t??s.values[0]),[c,d]=p.useState(!1);p.useEffect(()=>{d(e)},[e]);const f=h=>{if(s.type==="number"){if(h==="")throw new Error("Value cannot be empty");if(Number.isNaN(Number(h)))throw new Error("Value was not a number: "+JSON.stringify(h));return Number(h)}return h};return p.useEffect(()=>{n&&n(async h=>[{op:"replace",path:h,value:a}])},[a]),w.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[w.jsxs(f3,{defaultValue:a.toString(),disabled:c,onValueChange:h=>{u(f(h))},children:[w.jsx(YE,{children:w.jsx(h3,{placeholder:"Select a value"})}),w.jsx(XE,{children:s.values.map(h=>w.jsx(QE,{value:h.toString(),children:h.toString()},h))})]}),r&&w.jsx("div",{children:t!==a&&w.jsx(Jl,{disabled:c,onClick:()=>{d(!0),r(async h=>[{op:"replace",path:h,value:a}]).finally(()=>{d(!1)})},children:c?"Saving...":"Submit"})})]})}function x3({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r}){const[o,i]=p.useState(t||0),[l,s]=p.useState(!1);p.useEffect(()=>{s(e)},[e]);const a=p.useRef(null);return p.useEffect(()=>{n&&n(async u=>{var c;return[{op:"replace",path:u,value:Number((c=a.current)==null?void 0:c.value)||0}]})},[]),w.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[w.jsx(Tm,{ref:a,disabled:l,defaultValue:o??0,onChange:u=>i(Number(u.target.value)),type:"number"}),r&&w.jsx("div",{children:t!==o&&w.jsx(Jl,{disabled:l,onClick:()=>{s(!0),r(async u=>{var c;return[{op:"replace",path:u,value:Number((c=a.current)==null?void 0:c.value)||0}]}).finally(()=>{s(!1)})},children:l?"Saving...":"Submit"})})]})}function w3({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r}){const[o,i]=p.useState(t||""),[l,s]=p.useState(!1);p.useEffect(()=>{s(e)},[e]);const a=p.useRef(null);return p.useEffect(()=>{n&&n(async u=>{var c;return[{op:"replace",path:u,value:((c=a.current)==null?void 0:c.value)||""}]})},[]),w.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[w.jsx(Tm,{ref:a,disabled:l,defaultValue:o??"",onChange:u=>i(u.target.value)}),r&&w.jsx("div",{children:t!==o&&w.jsx(Jl,{disabled:l,onClick:()=>{s(!0),r(async u=>{var c;return[{op:"replace",path:u,value:((c=a.current)==null?void 0:c.value)||""}]}).finally(()=>{s(!1)})},children:l?"Saving...":"Submit"})})]})}const _3=({className:e})=>w.jsxs("svg",{width:"58",height:"34",viewBox:"0 0 58 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[w.jsx("g",{filter:"url(#filter0_d_21_1677)",children:w.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"})}),w.jsx("g",{filter:"url(#filter1_i_21_1677)",children:w.jsx("circle",{cx:"11.4656",cy:"23.7595",r:"2.18557",fill:"currentColor"})}),w.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"}),w.jsxs("defs",{children:[w.jsxs("filter",{id:"filter0_d_21_1677",x:"0.124722",y:"0.124722",width:"22.7729",height:"33.6097",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[w.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),w.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"}),w.jsx("feOffset",{}),w.jsx("feGaussianBlur",{stdDeviation:"2.43764"}),w.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),w.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"}),w.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_21_1677"}),w.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_21_1677",result:"shape"})]}),w.jsxs("filter",{id:"filter1_i_21_1677",x:"9.28003",y:"21.5739",width:"4.37112",height:"4.37112",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[w.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),w.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),w.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"}),w.jsx("feOffset",{}),w.jsx("feGaussianBlur",{stdDeviation:"0.546392"}),w.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),w.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"}),w.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_21_1677"})]})]})]}),ZE=_3,qE="Switch",[S3,X4]=ki(qE),[E3,C3]=S3(qE),$3=p.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:l,disabled:s,value:a="on",onCheckedChange:u,...c}=e,[d,f]=p.useState(null),h=Qe(t,y=>f(y)),g=p.useRef(!1),m=d?!!d.closest("form"):!0,[_=!1,v]=Al({prop:o,defaultProp:i,onChange:u});return p.createElement(E3,{scope:n,checked:_,disabled:s},p.createElement(Le.button,te({type:"button",role:"switch","aria-checked":_,"aria-required":l,"data-state":eC(_),"data-disabled":s?"":void 0,disabled:s,value:a},c,{ref:h,onClick:He(e.onClick,y=>{v(x=>!x),m&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})),m&&p.createElement(b3,{control:d,bubbles:!g.current,name:r,value:a,checked:_,required:l,disabled:s,style:{transform:"translateX(-100%)"}}))}),k3="SwitchThumb",T3=p.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=C3(k3,n);return p.createElement(Le.span,te({"data-state":eC(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),b3=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=p.useRef(null),l=TE(n),s=wE(t);return p.useEffect(()=>{const a=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(l!==n&&d){const f=new Event("click",{bubbles:r});d.call(a,n),a.dispatchEvent(f)}},[l,n,r]),p.createElement("input",te({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function eC(e){return e?"checked":"unchecked"}const tC=$3,N3=T3,Pp=p.forwardRef(({className:e,...t},n)=>w.jsx(tC,{className:st("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:w.jsx(N3,{className:st("pointer-events-none block h-[18px] w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Pp.displayName=tC.displayName;const Dm=p.forwardRef(({className:e,...t},n)=>w.jsx("div",{ref:n,className:st("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Dm.displayName="Card";const R3=p.forwardRef(({className:e,...t},n)=>w.jsx("div",{ref:n,className:st("flex flex-col space-y-1.5 p-6",e),...t}));R3.displayName="CardHeader";const P3=p.forwardRef(({className:e,...t},n)=>w.jsx("h3",{ref:n,className:st("text-2xl font-semibold leading-none tracking-tight",e),...t}));P3.displayName="CardTitle";const O3=p.forwardRef(({className:e,...t},n)=>w.jsx("p",{ref:n,className:st("text-sm text-muted-foreground",e),...t}));O3.displayName="CardDescription";const A3=p.forwardRef(({className:e,...t},n)=>w.jsx("div",{ref:n,className:st("p-6 pt-0",e),...t}));A3.displayName="CardContent";const M3=p.forwardRef(({className:e,...t},n)=>w.jsx("div",{ref:n,className:st("flex items-center p-6 pt-0",e),...t}));M3.displayName="CardFooter";/**
|
|
170
|
-
* @remix-run/router v1.13.0
|
|
171
|
-
*
|
|
172
|
-
* Copyright (c) Remix Software Inc.
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the MIT license found in the
|
|
175
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
176
|
-
*
|
|
177
|
-
* @license MIT
|
|
178
|
-
*/function lt(){return lt=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},lt.apply(this,arguments)}var ut;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ut||(ut={}));const F0="popstate";function L3(e){e===void 0&&(e={});function t(r,o){let{pathname:i,search:l,hash:s}=r.location;return Ta("",{pathname:i,search:l,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Ha(o)}return I3(t,n,null,e)}function Ee(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function D3(){return Math.random().toString(36).substr(2,8)}function B0(e,t){return{usr:e.state,key:e.key,idx:t}}function Ta(e,t,n,r){return n===void 0&&(n=null),lt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?no(t):t,{state:n,key:t&&t.key||r||D3()})}function Ha(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 no(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 I3(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,l=o.history,s=ut.Pop,a=null,u=c();u==null&&(u=0,l.replaceState(lt({},l.state,{idx:u}),""));function c(){return(l.state||{idx:null}).idx}function d(){s=ut.Pop;let _=c(),v=_==null?null:_-u;u=_,a&&a({action:s,location:m.location,delta:v})}function f(_,v){s=ut.Push;let y=Ta(m.location,_,v);n&&n(y,_),u=c()+1;let x=B0(y,u),S=m.createHref(y);try{l.pushState(x,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(S)}i&&a&&a({action:s,location:m.location,delta:1})}function h(_,v){s=ut.Replace;let y=Ta(m.location,_,v);n&&n(y,_),u=c();let x=B0(y,u),S=m.createHref(y);l.replaceState(x,"",S),i&&a&&a({action:s,location:m.location,delta:0})}function g(_){let v=o.location.origin!=="null"?o.location.origin:o.location.href,y=typeof _=="string"?_:Ha(_);return Ee(v,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,v)}let m={get action(){return s},get location(){return e(o,l)},listen(_){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(F0,d),a=_,()=>{o.removeEventListener(F0,d),a=null}},createHref(_){return t(o,_)},createURL:g,encodeLocation(_){let v=g(_);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(_){return l.go(_)}};return m}var ct;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ct||(ct={}));const j3=new Set(["lazy","caseSensitive","path","id","index","children"]);function z3(e){return e.index===!0}function Op(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,i)=>{let l=[...n,i],s=typeof o.id=="string"?o.id:l.join("-");if(Ee(o.index!==!0||!o.children,"Cannot specify children on an index route"),Ee(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),z3(o)){let a=lt({},o,t(o),{id:s});return r[s]=a,a}else{let a=lt({},o,t(o),{id:s,children:void 0});return r[s]=a,o.children&&(a.children=Op(o.children,t,l,r)),a}})}function sl(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?no(t):t,o=Ka(r.pathname||"/",n);if(o==null)return null;let i=nC(e);B3(i);let l=null;for(let s=0;l==null&&s<i.length;++s)l=Q3(i[s],q3(o));return l}function F3(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function nC(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,l,s)=>{let a={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};a.relativePath.startsWith("/")&&(Ee(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=Ro([r,a.relativePath]),c=n.concat(a);i.children&&i.children.length>0&&(Ee(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),nC(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Y3(u,i.index),routesMeta:c})};return e.forEach((i,l)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,l);else for(let a of rC(i.path))o(i,l,a)}),t}function rC(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let l=rC(r.join("/")),s=[];return s.push(...l.map(a=>a===""?i:[i,a].join("/"))),o&&s.push(...l),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function B3(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:X3(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const W3=/^:\w+$/,U3=3,V3=2,H3=1,K3=10,G3=-2,W0=e=>e==="*";function Y3(e,t){let n=e.split("/"),r=n.length;return n.some(W0)&&(r+=G3),t&&(r+=V3),n.filter(o=>!W0(o)).reduce((o,i)=>o+(W3.test(i)?U3:i===""?H3:K3),r)}function X3(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Q3(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let l=0;l<n.length;++l){let s=n[l],a=l===n.length-1,u=o==="/"?t:t.slice(o.length)||"/",c=J3({path:s.relativePath,caseSensitive:s.caseSensitive,end:a},u);if(!c)return null;Object.assign(r,c.params);let d=s.route;i.push({params:r,pathname:Ro([o,c.pathname]),pathnameBase:rM(Ro([o,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(o=Ro([o,c.pathnameBase]))}return i}function J3(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Z3(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],l=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let m=s[d]||"";l=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const g=s[d];return h&&!g?u[f]=void 0:u[f]=eM(g||"",f),u},{}),pathname:i,pathnameBase:l,pattern:e}}function Z3(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),wi(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(l,s,a)=>(r.push({paramName:s,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function q3(e){try{return decodeURI(e)}catch(t){return wi(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function eM(e,t){try{return decodeURIComponent(e)}catch(n){return wi(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Ka(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 tM(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?no(e):e;return{pathname:n?n.startsWith("/")?n:nM(n,t):t,search:oM(r),hash:iM(o)}}function nM(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Df(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 oC(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function iC(e){return oC(e).map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function lC(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=no(e):(o=lt({},e),Ee(!o.pathname||!o.pathname.includes("?"),Df("?","pathname","search",o)),Ee(!o.pathname||!o.pathname.includes("#"),Df("#","pathname","hash",o)),Ee(!o.search||!o.search.includes("#"),Df("#","search","hash",o)));let i=e===""||o.pathname==="",l=i?"/":o.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();o.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;o.pathname=f.join("/")}s=d>=0?t[d]:"/"}let a=tM(o,s),u=l&&l!=="/"&&l.endsWith("/"),c=(i||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const Ro=e=>e.join("/").replace(/\/\/+/g,"/"),rM=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),oM=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,iM=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Im{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function sC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const aC=["post","put","patch","delete"],lM=new Set(aC),sM=["get",...aC],aM=new Set(sM),uM=new Set([301,302,303,307,308]),cM=new Set([307,308]),If={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dM={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ps={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},uC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fM=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),cC="remix-router-transitions";function hM(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;Ee(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let P=e.detectErrorBoundary;o=L=>({hasErrorBoundary:P(L)})}else o=fM;let i={},l=Op(e.routes,o,void 0,i),s,a=e.basename||"/",u=lt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,d=new Set,f=null,h=null,g=null,m=e.hydrationData!=null,_=sl(l,e.history.location,a),v=null;if(_==null){let P=Mn(404,{pathname:e.history.location.pathname}),{matches:L,route:z}=Q0(l);_=L,v={[z.id]:P}}let y=!_.some(P=>P.route.lazy)&&(!_.some(P=>P.route.loader)||e.hydrationData!=null),x,S={historyAction:e.history.action,location:e.history.location,matches:_,initialized:y,navigation:If,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||v,fetchers:new Map,blockers:new Map},k=ut.Pop,b=!1,T,N=!1,D=new Map,M=null,j=!1,B=!1,re=[],H=[],Y=new Map,C=0,$=-1,E=new Map,O=new Set,R=new Map,F=new Map,V=new Set,ae=new Map,oe=new Map,$e=!1;function _e(){if(c=e.history.listen(P=>{let{action:L,location:z,delta:G}=P;if($e){$e=!1;return}wi(oe.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 ne=Gm({currentLocation:S.location,nextLocation:z,historyAction:L});if(ne&&G!=null){$e=!0,e.history.go(G*-1),Ga(ne,{state:"blocked",location:z,proceed(){Ga(ne,{state:"proceeding",proceed:void 0,reset:void 0,location:z}),e.history.go(G)},reset(){let ve=new Map(S.blockers);ve.set(ne,ps),ye({blockers:ve})}});return}return Fe(L,z)}),n){CM(t,D);let P=()=>$M(t,D);t.addEventListener("pagehide",P),M=()=>t.removeEventListener("pagehide",P)}return S.initialized||Fe(ut.Pop,S.location),x}function Q(){c&&c(),M&&M(),d.clear(),T&&T.abort(),S.fetchers.forEach((P,L)=>xn(L)),S.blockers.forEach((P,L)=>Km(L))}function Ne(P){return d.add(P),()=>d.delete(P)}function ye(P,L){L===void 0&&(L={}),S=lt({},S,P);let z=[],G=[];u.v7_fetcherPersist&&S.fetchers.forEach((ne,ve)=>{ne.state==="idle"&&(V.has(ve)?G.push(ve):z.push(ve))}),[...d].forEach(ne=>ne(S,{deletedFetchers:G,unstable_viewTransitionOpts:L.viewTransitionOpts,unstable_flushSync:L.flushSync===!0})),u.v7_fetcherPersist&&(z.forEach(ne=>S.fetchers.delete(ne)),G.forEach(ne=>xn(ne)))}function Se(P,L,z){var G,ne;let{flushSync:ve}=z===void 0?{}:z,ce=S.actionData!=null&&S.navigation.formMethod!=null&&qn(S.navigation.formMethod)&&S.navigation.state==="loading"&&((G=P.state)==null?void 0:G._isRedirect)!==!0,ue;L.actionData?Object.keys(L.actionData).length>0?ue=L.actionData:ue=null:ce?ue=S.actionData:ue=null;let le=L.loaderData?X0(S.loaderData,L.loaderData,L.matches||[],L.errors):S.loaderData,ke=S.blockers;ke.size>0&&(ke=new Map(ke),ke.forEach((De,Ze)=>ke.set(Ze,ps)));let At=b===!0||S.navigation.formMethod!=null&&qn(S.navigation.formMethod)&&((ne=P.state)==null?void 0:ne._isRedirect)!==!0;s&&(l=s,s=void 0),j||k===ut.Pop||(k===ut.Push?e.history.push(P,P.state):k===ut.Replace&&e.history.replace(P,P.state));let xe;if(k===ut.Pop){let De=D.get(S.location.pathname);De&&De.has(P.pathname)?xe={currentLocation:S.location,nextLocation:P}:D.has(P.pathname)&&(xe={currentLocation:P,nextLocation:S.location})}else if(N){let De=D.get(S.location.pathname);De?De.add(P.pathname):(De=new Set([P.pathname]),D.set(S.location.pathname,De)),xe={currentLocation:S.location,nextLocation:P}}ye(lt({},L,{actionData:ue,loaderData:le,historyAction:k,location:P,initialized:!0,navigation:If,revalidation:"idle",restoreScrollPosition:Xm(P,L.matches||S.matches),preventScrollReset:At,blockers:ke}),{viewTransitionOpts:xe,flushSync:ve===!0}),k=ut.Pop,b=!1,N=!1,j=!1,B=!1,re=[],H=[]}async function pe(P,L){if(typeof P=="number"){e.history.go(P);return}let z=Ap(S.location,S.matches,a,u.v7_prependBasename,P,L==null?void 0:L.fromRouteId,L==null?void 0:L.relative),{path:G,submission:ne,error:ve}=U0(u.v7_normalizeFormMethod,!1,z,L),ce=S.location,ue=Ta(S.location,G,L&&L.state);ue=lt({},ue,e.history.encodeLocation(ue));let le=L&&L.replace!=null?L.replace:void 0,ke=ut.Push;le===!0?ke=ut.Replace:le===!1||ne!=null&&qn(ne.formMethod)&&ne.formAction===S.location.pathname+S.location.search&&(ke=ut.Replace);let At=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,xe=(L&&L.unstable_flushSync)===!0,De=Gm({currentLocation:ce,nextLocation:ue,historyAction:ke});if(De){Ga(De,{state:"blocked",location:ue,proceed(){Ga(De,{state:"proceeding",proceed:void 0,reset:void 0,location:ue}),pe(P,L)},reset(){let Ze=new Map(S.blockers);Ze.set(De,ps),ye({blockers:Ze})}});return}return await Fe(ke,ue,{submission:ne,pendingError:ve,preventScrollReset:At,replace:L&&L.replace,enableViewTransition:L&&L.unstable_viewTransition,flushSync:xe})}function be(){if(dn(),ye({revalidation:"loading"}),S.navigation.state!=="submitting"){if(S.navigation.state==="idle"){Fe(S.historyAction,S.location,{startUninterruptedRevalidation:!0});return}Fe(k||S.historyAction,S.navigation.location,{overrideNavigation:S.navigation})}}async function Fe(P,L,z){T&&T.abort(),T=null,k=P,j=(z&&z.startUninterruptedRevalidation)===!0,BC(S.location,S.matches),b=(z&&z.preventScrollReset)===!0,N=(z&&z.enableViewTransition)===!0;let G=s||l,ne=z&&z.overrideNavigation,ve=sl(G,L,a),ce=(z&&z.flushSync)===!0;if(!ve){let Ze=Mn(404,{pathname:L.pathname}),{matches:Qt,route:ur}=Q0(G);Fd(),Se(L,{matches:Qt,loaderData:{},errors:{[ur.id]:Ze}},{flushSync:ce});return}if(S.initialized&&!B&&yM(S.location,L)&&!(z&&z.submission&&qn(z.submission.formMethod))){Se(L,{matches:ve},{flushSync:ce});return}T=new AbortController;let ue=ms(e.history,L,T.signal,z&&z.submission),le,ke;if(z&&z.pendingError)ke={[Ys(ve).route.id]:z.pendingError};else if(z&&z.submission&&qn(z.submission.formMethod)){let Ze=await Ot(ue,L,z.submission,ve,{replace:z.replace,flushSync:ce});if(Ze.shortCircuited)return;le=Ze.pendingActionData,ke=Ze.pendingActionError,ne=jf(L,z.submission),ce=!1,ue=new Request(ue.url,{signal:ue.signal})}let{shortCircuited:At,loaderData:xe,errors:De}=await cn(ue,L,ve,ne,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,ce,le,ke);At||(T=null,Se(L,lt({matches:ve},le?{actionData:le}:{},{loaderData:xe,errors:De})))}async function Ot(P,L,z,G,ne){ne===void 0&&(ne={}),dn();let ve=SM(L,z);ye({navigation:ve},{flushSync:ne.flushSync===!0});let ce,ue=Lp(G,L);if(!ue.route.action&&!ue.route.lazy)ce={type:ct.error,error:Mn(405,{method:P.method,pathname:L.pathname,routeId:ue.route.id})};else if(ce=await gs("action",P,ue,G,i,o,a),P.signal.aborted)return{shortCircuited:!0};if(yl(ce)){let le;return ne&&ne.replace!=null?le=ne.replace:le=ce.location===S.location.pathname+S.location.search,await Je(S,ce,{submission:z,replace:le}),{shortCircuited:!0}}if(Xs(ce)){let le=Ys(G,ue.route.id);return(ne&&ne.replace)!==!0&&(k=ut.Push),{pendingActionData:{},pendingActionError:{[le.route.id]:ce.error}}}if(ri(ce))throw Mn(400,{type:"defer-action"});return{pendingActionData:{[ue.route.id]:ce.data}}}async function cn(P,L,z,G,ne,ve,ce,ue,le,ke){let At=G||jf(L,ne),xe=ne||ve||q0(At),De=s||l,[Ze,Qt]=V0(e.history,S,z,xe,L,B,re,H,V,R,O,De,a,le,ke);if(Fd(Ie=>!(z&&z.some(An=>An.route.id===Ie))||Ze&&Ze.some(An=>An.route.id===Ie)),$=++C,Ze.length===0&&Qt.length===0){let Ie=Ko();return Se(L,lt({matches:z,loaderData:{},errors:ke||null},le?{actionData:le}:{},Ie?{fetchers:new Map(S.fetchers)}:{}),{flushSync:ue}),{shortCircuited:!0}}if(!j){Qt.forEach(An=>{let ht=S.fetchers.get(An.key),Go=vs(void 0,ht?ht.data:void 0);S.fetchers.set(An.key,Go)});let Ie=le||S.actionData;ye(lt({navigation:At},Ie?Object.keys(Ie).length===0?{actionData:null}:{actionData:Ie}:{},Qt.length>0?{fetchers:new Map(S.fetchers)}:{}),{flushSync:ue})}Qt.forEach(Ie=>{Y.has(Ie.key)&&ot(Ie.key),Ie.controller&&Y.set(Ie.key,Ie.controller)});let ur=()=>Qt.forEach(Ie=>ot(Ie.key));T&&T.signal.addEventListener("abort",ur);let{results:ns,loaderResults:Bd,fetcherResults:Ai}=await Yt(S.matches,z,Ze,Qt,P);if(P.signal.aborted)return{shortCircuited:!0};T&&T.signal.removeEventListener("abort",ur),Qt.forEach(Ie=>Y.delete(Ie.key));let Gn=J0(ns);if(Gn){if(Gn.idx>=Ze.length){let Ie=Qt[Gn.idx-Ze.length].key;O.add(Ie)}return await Je(S,Gn.result,{replace:ce}),{shortCircuited:!0}}let{loaderData:Ya,errors:Wd}=Y0(S,z,Ze,Bd,ke,Qt,Ai,ae);ae.forEach((Ie,An)=>{Ie.subscribe(ht=>{(ht||Ie.done)&&ae.delete(An)})});let Ud=Ko(),Vd=ts($),Mi=Ud||Vd||Qt.length>0;return lt({loaderData:Ya,errors:Wd},Mi?{fetchers:new Map(S.fetchers)}:{})}function Kn(P,L,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.");Y.has(P)&&ot(P);let ne=(G&&G.unstable_flushSync)===!0,ve=s||l,ce=Ap(S.location,S.matches,a,u.v7_prependBasename,z,L,G==null?void 0:G.relative),ue=sl(ve,ce,a);if(!ue){St(P,L,Mn(404,{pathname:ce}),{flushSync:ne});return}let{path:le,submission:ke,error:At}=U0(u.v7_normalizeFormMethod,!0,ce,G);if(At){St(P,L,At,{flushSync:ne});return}let xe=Lp(ue,le);if(b=(G&&G.preventScrollReset)===!0,ke&&qn(ke.formMethod)){Re(P,L,le,xe,ue,ne,ke);return}R.set(P,{routeId:L,path:le}),mt(P,L,le,xe,ue,ne,ke)}async function Re(P,L,z,G,ne,ve,ce){if(dn(),R.delete(P),!G.route.action&&!G.route.lazy){let ht=Mn(405,{method:ce.formMethod,pathname:z,routeId:L});St(P,L,ht,{flushSync:ve});return}let ue=S.fetchers.get(P);at(P,EM(ce,ue),{flushSync:ve});let le=new AbortController,ke=ms(e.history,z,le.signal,ce);Y.set(P,le);let At=C,xe=await gs("action",ke,G,ne,i,o,a);if(ke.signal.aborted){Y.get(P)===le&&Y.delete(P);return}if(V.has(P)){at(P,ao(void 0));return}if(yl(xe))if(Y.delete(P),$>At){at(P,ao(void 0));return}else return O.add(P),at(P,vs(ce)),Je(S,xe,{fetcherSubmission:ce});if(Xs(xe)){St(P,L,xe.error);return}if(ri(xe))throw Mn(400,{type:"defer-action"});let De=S.navigation.location||S.location,Ze=ms(e.history,De,le.signal),Qt=s||l,ur=S.navigation.state!=="idle"?sl(Qt,S.navigation.location,a):S.matches;Ee(ur,"Didn't find any matches after fetcher action");let ns=++C;E.set(P,ns);let Bd=vs(ce,xe.data);S.fetchers.set(P,Bd);let[Ai,Gn]=V0(e.history,S,ur,ce,De,B,re,H,V,R,O,Qt,a,{[G.route.id]:xe.data},void 0);Gn.filter(ht=>ht.key!==P).forEach(ht=>{let Go=ht.key,Qm=S.fetchers.get(Go),UC=vs(void 0,Qm?Qm.data:void 0);S.fetchers.set(Go,UC),Y.has(Go)&&ot(Go),ht.controller&&Y.set(Go,ht.controller)}),ye({fetchers:new Map(S.fetchers)});let Ya=()=>Gn.forEach(ht=>ot(ht.key));le.signal.addEventListener("abort",Ya);let{results:Wd,loaderResults:Ud,fetcherResults:Vd}=await Yt(S.matches,ur,Ai,Gn,Ze);if(le.signal.aborted)return;le.signal.removeEventListener("abort",Ya),E.delete(P),Y.delete(P),Gn.forEach(ht=>Y.delete(ht.key));let Mi=J0(Wd);if(Mi){if(Mi.idx>=Ai.length){let ht=Gn[Mi.idx-Ai.length].key;O.add(ht)}return Je(S,Mi.result)}let{loaderData:Ie,errors:An}=Y0(S,S.matches,Ai,Ud,void 0,Gn,Vd,ae);if(S.fetchers.has(P)){let ht=ao(xe.data);S.fetchers.set(P,ht)}ts(ns),S.navigation.state==="loading"&&ns>$?(Ee(k,"Expected pending action"),T&&T.abort(),Se(S.navigation.location,{matches:ur,loaderData:Ie,errors:An,fetchers:new Map(S.fetchers)})):(ye({errors:An,loaderData:X0(S.loaderData,Ie,ur,An),fetchers:new Map(S.fetchers)}),B=!1)}async function mt(P,L,z,G,ne,ve,ce){let ue=S.fetchers.get(P);at(P,vs(ce,ue?ue.data:void 0),{flushSync:ve});let le=new AbortController,ke=ms(e.history,z,le.signal);Y.set(P,le);let At=C,xe=await gs("loader",ke,G,ne,i,o,a);if(ri(xe)&&(xe=await hC(xe,ke.signal,!0)||xe),Y.get(P)===le&&Y.delete(P),!ke.signal.aborted){if(V.has(P)){at(P,ao(void 0));return}if(yl(xe))if($>At){at(P,ao(void 0));return}else{O.add(P),await Je(S,xe);return}if(Xs(xe)){St(P,L,xe.error);return}Ee(!ri(xe),"Unhandled fetcher deferred data"),at(P,ao(xe.data))}}async function Je(P,L,z){let{submission:G,fetcherSubmission:ne,replace:ve}=z===void 0?{}:z;L.revalidate&&(B=!0);let ce=Ta(P.location,L.location,{_isRedirect:!0});if(Ee(ce,"Expected a location on the redirect navigation"),n){let De=!1;if(L.reloadDocument)De=!0;else if(uC.test(L.location)){const Ze=e.history.createURL(L.location);De=Ze.origin!==t.location.origin||Ka(Ze.pathname,a)==null}if(De){ve?t.location.replace(L.location):t.location.assign(L.location);return}}T=null;let ue=ve===!0?ut.Replace:ut.Push,{formMethod:le,formAction:ke,formEncType:At}=P.navigation;!G&&!ne&&le&&ke&&At&&(G=q0(P.navigation));let xe=G||ne;if(cM.has(L.status)&&xe&&qn(xe.formMethod))await Fe(ue,ce,{submission:lt({},xe,{formAction:L.location}),preventScrollReset:b});else{let De=jf(ce,G);await Fe(ue,ce,{overrideNavigation:De,fetcherSubmission:ne,preventScrollReset:b})}}async function Yt(P,L,z,G,ne){let ve=await Promise.all([...z.map(le=>gs("loader",ne,le,L,i,o,a)),...G.map(le=>le.matches&&le.match&&le.controller?gs("loader",ms(e.history,le.path,le.controller.signal),le.match,le.matches,i,o,a):{type:ct.error,error:Mn(404,{pathname:le.path})})]),ce=ve.slice(0,z.length),ue=ve.slice(z.length);return await Promise.all([Z0(P,z,ce,ce.map(()=>ne.signal),!1,S.loaderData),Z0(P,G.map(le=>le.match),ue,G.map(le=>le.controller?le.controller.signal:null),!0)]),{results:ve,loaderResults:ce,fetcherResults:ue}}function dn(){B=!0,re.push(...Fd()),R.forEach((P,L)=>{Y.has(L)&&(H.push(L),ot(L))})}function at(P,L,z){z===void 0&&(z={}),S.fetchers.set(P,L),ye({fetchers:new Map(S.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function St(P,L,z,G){G===void 0&&(G={});let ne=Ys(S.matches,L);xn(P),ye({errors:{[ne.route.id]:z},fetchers:new Map(S.fetchers)},{flushSync:(G&&G.flushSync)===!0})}function Xt(P){return u.v7_fetcherPersist&&(F.set(P,(F.get(P)||0)+1),V.has(P)&&V.delete(P)),S.fetchers.get(P)||dM}function xn(P){let L=S.fetchers.get(P);Y.has(P)&&!(L&&L.state==="loading"&&E.has(P))&&ot(P),R.delete(P),E.delete(P),O.delete(P),V.delete(P),S.fetchers.delete(P)}function Or(P){if(u.v7_fetcherPersist){let L=(F.get(P)||0)-1;L<=0?(F.delete(P),V.add(P)):F.set(P,L)}else xn(P);ye({fetchers:new Map(S.fetchers)})}function ot(P){let L=Y.get(P);Ee(L,"Expected fetch controller: "+P),L.abort(),Y.delete(P)}function ar(P){for(let L of P){let z=Xt(L),G=ao(z.data);S.fetchers.set(L,G)}}function Ko(){let P=[],L=!1;for(let z of O){let G=S.fetchers.get(z);Ee(G,"Expected fetcher: "+z),G.state==="loading"&&(O.delete(z),P.push(z),L=!0)}return ar(P),L}function ts(P){let L=[];for(let[z,G]of E)if(G<P){let ne=S.fetchers.get(z);Ee(ne,"Expected fetcher: "+z),ne.state==="loading"&&(ot(z),E.delete(z),L.push(z))}return ar(L),L.length>0}function zC(P,L){let z=S.blockers.get(P)||ps;return oe.get(P)!==L&&oe.set(P,L),z}function Km(P){S.blockers.delete(P),oe.delete(P)}function Ga(P,L){let z=S.blockers.get(P)||ps;Ee(z.state==="unblocked"&&L.state==="blocked"||z.state==="blocked"&&L.state==="blocked"||z.state==="blocked"&&L.state==="proceeding"||z.state==="blocked"&&L.state==="unblocked"||z.state==="proceeding"&&L.state==="unblocked","Invalid blocker state transition: "+z.state+" -> "+L.state);let G=new Map(S.blockers);G.set(P,L),ye({blockers:G})}function Gm(P){let{currentLocation:L,nextLocation:z,historyAction:G}=P;if(oe.size===0)return;oe.size>1&&wi(!1,"A router only supports one blocker at a time");let ne=Array.from(oe.entries()),[ve,ce]=ne[ne.length-1],ue=S.blockers.get(ve);if(!(ue&&ue.state==="proceeding")&&ce({currentLocation:L,nextLocation:z,historyAction:G}))return ve}function Fd(P){let L=[];return ae.forEach((z,G)=>{(!P||P(G))&&(z.cancel(),L.push(G),ae.delete(G))}),L}function FC(P,L,z){if(f=P,g=L,h=z||null,!m&&S.navigation===If){m=!0;let G=Xm(S.location,S.matches);G!=null&&ye({restoreScrollPosition:G})}return()=>{f=null,g=null,h=null}}function Ym(P,L){return h&&h(P,L.map(G=>F3(G,S.loaderData)))||P.key}function BC(P,L){if(f&&g){let z=Ym(P,L);f[z]=g()}}function Xm(P,L){if(f){let z=Ym(P,L),G=f[z];if(typeof G=="number")return G}return null}function WC(P){i={},s=Op(P,o,void 0,i)}return x={get basename(){return a},get state(){return S},get routes(){return l},get window(){return t},initialize:_e,subscribe:Ne,enableScrollRestoration:FC,navigate:pe,fetch:Kn,revalidate:be,createHref:P=>e.history.createHref(P),encodeLocation:P=>e.history.encodeLocation(P),getFetcher:Xt,deleteFetcher:Or,dispose:Q,getBlocker:zC,deleteBlocker:Km,_internalFetchControllers:Y,_internalActiveDeferreds:ae,_internalSetRoutes:WC},x}function pM(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ap(e,t,n,r,o,i,l){let s,a;if(i){s=[];for(let c of t)if(s.push(c),c.route.id===i){a=c;break}}else s=t,a=t[t.length-1];let u=lC(o||".",iC(s),Ka(e.pathname,n)||e.pathname,l==="path");return o==null&&(u.search=e.search,u.hash=e.hash),(o==null||o===""||o===".")&&a&&a.route.index&&!jm(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Ro([n,u.pathname])),Ha(u)}function U0(e,t,n,r){if(!r||!pM(r))return{path:n};if(r.formMethod&&!_M(r.formMethod))return{path:n,error:Mn(405,{method:r.formMethod})};let o=()=>({path:n,error:Mn(400,{type:"invalid-body"})}),i=r.formMethod||"get",l=e?i.toUpperCase():i.toLowerCase(),s=fC(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!qn(l))return o();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((h,g)=>{let[m,_]=g;return""+h+m+"="+_+`
|
|
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(!qn(l))return o();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return o()}}}Ee(typeof FormData=="function","FormData is not available in this environment");let a,u;if(r.formData)a=Mp(r.formData),u=r.formData;else if(r.body instanceof FormData)a=Mp(r.body),u=r.body;else if(r.body instanceof URLSearchParams)a=r.body,u=G0(a);else if(r.body==null)a=new URLSearchParams,u=new FormData;else try{a=new URLSearchParams(r.body),u=G0(a)}catch{return o()}let c={formMethod:l,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(qn(c.formMethod))return{path:n,submission:c};let d=no(n);return t&&d.search&&jm(d.search)&&a.append("index",""),d.search="?"+a,{path:Ha(d),submission:c}}function gM(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function V0(e,t,n,r,o,i,l,s,a,u,c,d,f,h,g){let m=g?Object.values(g)[0]:h?Object.values(h)[0]:void 0,_=e.createURL(t.location),v=e.createURL(o),y=g?Object.keys(g)[0]:void 0,S=gM(n,y).filter((b,T)=>{if(b.route.lazy)return!0;if(b.route.loader==null)return!1;if(mM(t.loaderData,t.matches[T],b)||l.some(M=>M===b.route.id))return!0;let N=t.matches[T],D=b;return H0(b,lt({currentUrl:_,currentParams:N.params,nextUrl:v,nextParams:D.params},r,{actionResult:m,defaultShouldRevalidate:i||_.pathname+_.search===v.pathname+v.search||_.search!==v.search||dC(N,D)}))}),k=[];return u.forEach((b,T)=>{if(!n.some(B=>B.route.id===b.routeId)||a.has(T))return;let N=sl(d,b.path,f);if(!N){k.push({key:T,routeId:b.routeId,path:b.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(T),M=Lp(N,b.path),j=!1;c.has(T)?j=!1:s.includes(T)?j=!0:D&&D.state!=="idle"&&D.data===void 0?j=i:j=H0(M,lt({currentUrl:_,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:m,defaultShouldRevalidate:i})),j&&k.push({key:T,routeId:b.routeId,path:b.path,matches:N,match:M,controller:new AbortController})}),[S,k]}function mM(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function dC(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function H0(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function K0(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];Ee(o,"No route found in manifest");let i={};for(let l in r){let a=o[l]!==void 0&&l!=="hasErrorBoundary";wi(!a,'Route "'+o.id+'" has a static property "'+l+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+l+'" will be ignored.')),!a&&!j3.has(l)&&(i[l]=r[l])}Object.assign(o,i),Object.assign(o,lt({},t(o),{lazy:void 0}))}async function gs(e,t,n,r,o,i,l,s){s===void 0&&(s={});let a,u,c,d=g=>{let m,_=new Promise((v,y)=>m=y);return c=()=>m(),t.signal.addEventListener("abort",c),Promise.race([g({request:t,params:n.params,context:s.requestContext}),_])};try{let g=n.route[e];if(n.route.lazy)if(g){let m,_=await Promise.all([d(g).catch(v=>{m=v}),K0(n.route,i,o)]);if(m)throw m;u=_[0]}else if(await K0(n.route,i,o),g=n.route[e],g)u=await d(g);else if(e==="action"){let m=new URL(t.url),_=m.pathname+m.search;throw Mn(405,{method:t.method,pathname:_,routeId:n.route.id})}else return{type:ct.data,data:void 0};else if(g)u=await d(g);else{let m=new URL(t.url),_=m.pathname+m.search;throw Mn(404,{pathname:_})}Ee(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(g){a=ct.error,u=g}finally{c&&t.signal.removeEventListener("abort",c)}if(wM(u)){let g=u.status;if(uM.has(g)){let v=u.headers.get("Location");if(Ee(v,"Redirects returned/thrown from loaders/actions must have a Location header"),!uC.test(v))v=Ap(new URL(t.url),r.slice(0,r.indexOf(n)+1),l,!0,v);else if(!s.isStaticRequest){let y=new URL(t.url),x=v.startsWith("//")?new URL(y.protocol+v):new URL(v),S=Ka(x.pathname,l)!=null;x.origin===y.origin&&S&&(v=x.pathname+x.search+x.hash)}if(s.isStaticRequest)throw u.headers.set("Location",v),u;return{type:ct.redirect,status:g,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===ct.error?ct.error:ct.data,response:u};let m,_=u.headers.get("Content-Type");return _&&/\bapplication\/json\b/.test(_)?m=await u.json():m=await u.text(),a===ct.error?{type:a,error:new Im(g,u.statusText,m),headers:u.headers}:{type:ct.data,data:m,statusCode:u.status,headers:u.headers}}if(a===ct.error)return{type:a,error:u};if(xM(u)){var f,h;return{type:ct.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:ct.data,data:u}}function ms(e,t,n,r){let o=e.createURL(fC(t)).toString(),i={signal:n};if(r&&qn(r.formMethod)){let{formMethod:l,formEncType:s}=r;i.method=l.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(r.json)):s==="text/plain"?i.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?i.body=Mp(r.formData):i.body=r.formData}return new Request(o,i)}function Mp(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function G0(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function vM(e,t,n,r,o){let i={},l=null,s,a=!1,u={};return n.forEach((c,d)=>{let f=t[d].route.id;if(Ee(!yl(c),"Cannot handle redirect results in processLoaderData"),Xs(c)){let h=Ys(e,f),g=c.error;r&&(g=Object.values(r)[0],r=void 0),l=l||{},l[h.route.id]==null&&(l[h.route.id]=g),i[f]=void 0,a||(a=!0,s=sC(c.error)?c.error.status:500),c.headers&&(u[f]=c.headers)}else ri(c)?(o.set(f,c.deferredData),i[f]=c.deferredData.data):i[f]=c.data,c.statusCode!=null&&c.statusCode!==200&&!a&&(s=c.statusCode),c.headers&&(u[f]=c.headers)}),r&&(l=r,i[Object.keys(r)[0]]=void 0),{loaderData:i,errors:l,statusCode:s||200,loaderHeaders:u}}function Y0(e,t,n,r,o,i,l,s){let{loaderData:a,errors:u}=vM(t,n,r,o,s);for(let c=0;c<i.length;c++){let{key:d,match:f,controller:h}=i[c];Ee(l!==void 0&&l[c]!==void 0,"Did not find corresponding fetcher result");let g=l[c];if(!(h&&h.signal.aborted))if(Xs(g)){let m=Ys(e.matches,f==null?void 0:f.route.id);u&&u[m.route.id]||(u=lt({},u,{[m.route.id]:g.error})),e.fetchers.delete(d)}else if(yl(g))Ee(!1,"Unhandled fetcher revalidation redirect");else if(ri(g))Ee(!1,"Unhandled fetcher deferred data");else{let m=ao(g.data);e.fetchers.set(d,m)}}return{loaderData:a,errors:u}}function X0(e,t,n,r){let o=lt({},t);for(let i of n){let l=i.route.id;if(t.hasOwnProperty(l)?t[l]!==void 0&&(o[l]=t[l]):e[l]!==void 0&&i.route.loader&&(o[l]=e[l]),r&&r.hasOwnProperty(l))break}return o}function Ys(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 Q0(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 Mn(e,t){let{pathname:n,routeId:r,method:o,type:i}=t===void 0?{}:t,l="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(l="Bad Request",o&&n&&r?s="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(l="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",s='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",o&&n&&r?s="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new Im(e||500,l,new Error(s),!0)}function J0(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(yl(n))return{result:n,idx:t}}}function fC(e){let t=typeof e=="string"?no(e):e;return Ha(lt({},t,{hash:""}))}function yM(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ri(e){return e.type===ct.deferred}function Xs(e){return e.type===ct.error}function yl(e){return(e&&e.type)===ct.redirect}function xM(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 wM(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function _M(e){return aM.has(e.toLowerCase())}function qn(e){return lM.has(e.toLowerCase())}async function Z0(e,t,n,r,o,i){for(let l=0;l<n.length;l++){let s=n[l],a=t[l];if(!a)continue;let u=e.find(d=>d.route.id===a.route.id),c=u!=null&&!dC(u,a)&&(i&&i[a.route.id])!==void 0;if(ri(s)&&(o||c)){let d=r[l];Ee(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await hC(s,d,o).then(f=>{f&&(n[l]=f||n[l])})}}}async function hC(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:ct.data,data:e.deferredData.unwrappedData}}catch(o){return{type:ct.error,error:o}}return{type:ct.data,data:e.deferredData.data}}}function jm(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Lp(e,t){let n=typeof t=="string"?no(t).search:t.search;if(e[e.length-1].route.index&&jm(n||""))return e[e.length-1];let r=oC(e);return r[r.length-1]}function q0(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:l}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:l,text:void 0}}}function jf(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 SM(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function vs(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function EM(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 ao(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 CM(e,t){try{let n=e.sessionStorage.getItem(cC);if(n){let r=JSON.parse(n);for(let[o,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function $M(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(cC,JSON.stringify(n))}catch(r){wi(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
|
|
180
|
-
* React Router v6.20.0
|
|
181
|
-
*
|
|
182
|
-
* Copyright (c) Remix Software Inc.
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the MIT license found in the
|
|
185
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
186
|
-
*
|
|
187
|
-
* @license MIT
|
|
188
|
-
*/function Hc(){return Hc=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},Hc.apply(this,arguments)}const Md=p.createContext(null),pC=p.createContext(null),Ld=p.createContext(null),Dd=p.createContext(null),Oi=p.createContext({outlet:null,matches:[],isDataRoute:!1}),gC=p.createContext(null);function Id(){return p.useContext(Dd)!=null}function mC(){return Id()||Ee(!1),p.useContext(Dd).location}function vC(e){p.useContext(Ld).static||p.useLayoutEffect(e)}function zm(){let{isDataRoute:e}=p.useContext(Oi);return e?jM():kM()}function kM(){Id()||Ee(!1);let e=p.useContext(Md),{basename:t,navigator:n}=p.useContext(Ld),{matches:r}=p.useContext(Oi),{pathname:o}=mC(),i=JSON.stringify(iC(r)),l=p.useRef(!1);return vC(()=>{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=lC(a,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Ro([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}function TM(){let{matches:e}=p.useContext(Oi),t=e[e.length-1];return t?t.params:{}}function bM(e,t,n){Id()||Ee(!1);let{navigator:r}=p.useContext(Ld),{matches:o}=p.useContext(Oi),i=o[o.length-1],l=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let a=mC(),u;if(t){var c;let m=typeof t=="string"?no(t):t;s==="/"||(c=m.pathname)!=null&&c.startsWith(s)||Ee(!1),u=m}else u=a;let d=u.pathname||"/",f=s==="/"?d:d.slice(s.length)||"/",h=sl(e,{pathname:f}),g=AM(h&&h.map(m=>Object.assign({},m,{params:Object.assign({},l,m.params),pathname:Ro([s,r.encodeLocation?r.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?s:Ro([s,r.encodeLocation?r.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),o,n);return t&&g?p.createElement(Dd.Provider,{value:{location:Hc({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:ut.Pop}},g):g}function NM(){let e=IM(),t=sC(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:o},n):null,i)}const RM=p.createElement(NM,null);class PM 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(Oi.Provider,{value:this.props.routeContext},p.createElement(gC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function OM(e){let{routeContext:t,match:n,children:r}=e,o=p.useContext(Md);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(Oi.Provider,{value:t},r)}function AM(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,l=(r=n)==null?void 0:r.errors;if(l!=null){let s=i.findIndex(a=>a.route.id&&(l==null?void 0:l[a.route.id]));s>=0||Ee(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,a,u)=>{let c=a.route.id?l==null?void 0:l[a.route.id]:null,d=null;n&&(d=a.route.errorElement||RM);let f=t.concat(i.slice(0,u+1)),h=()=>{let g;return c?g=d:a.route.Component?g=p.createElement(a.route.Component,null):a.route.element?g=a.route.element:g=s,p.createElement(OM,{match:a,routeContext:{outlet:s,matches:f,isDataRoute:n!=null},children:g})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?p.createElement(PM,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:h(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):h()},null)}var yC=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(yC||{}),Kc=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}(Kc||{});function MM(e){let t=p.useContext(Md);return t||Ee(!1),t}function LM(e){let t=p.useContext(pC);return t||Ee(!1),t}function DM(e){let t=p.useContext(Oi);return t||Ee(!1),t}function xC(e){let t=DM(),n=t.matches[t.matches.length-1];return n.route.id||Ee(!1),n.route.id}function IM(){var e;let t=p.useContext(gC),n=LM(Kc.UseRouteError),r=xC(Kc.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function jM(){let{router:e}=MM(yC.UseNavigateStable),t=xC(Kc.UseNavigateStable),n=p.useRef(!1);return vC(()=>{n.current=!0}),p.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Hc({fromRouteId:t},i)))},[e,t])}function zM(e){let{basename:t="/",children:n=null,location:r,navigationType:o=ut.Pop,navigator:i,static:l=!1}=e;Id()&&Ee(!1);let s=t.replace(/^\/*/,"/"),a=p.useMemo(()=>({basename:s,navigator:i,static:l}),[s,i,l]);typeof r=="string"&&(r=no(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:h="default"}=r,g=p.useMemo(()=>{let m=Ka(u,s);return m==null?null:{location:{pathname:m,search:c,hash:d,state:f,key:h},navigationType:o}},[s,u,c,d,f,h,o]);return g==null?null:p.createElement(Ld.Provider,{value:a},p.createElement(Dd.Provider,{children:n,value:g}))}new Promise(()=>{});function FM(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 wC=ee.createContext(null),BM=e=>{var s,a;const t=ee.useContext(wC),[n,r]=Kt.splitModuleIdAndModulePath(e),o=(s=t==null?void 0:t[n])==null?void 0:s.source,i=(a=t==null?void 0:t[n])==null?void 0:a.schema;if(!o||!i)throw Error("Could not find module: "+n);const l=Kt.resolvePath(r,o,i);return{moduleId:n,moduleSource:l.source,moduleSchema:l.schema}},WM=({valApi:e})=>{var S,k;const{"*":t}=TM(),[n,r]=p.useState(null),[o,i]=p.useState(null),[l,s]=p.useState(),[a]=l?Kt.splitModuleIdAndModulePath(l):[void 0,void 0],u=a&&((S=n==null?void 0:n[a])==null?void 0:S.source),c=a&&((k=n==null?void 0:n[a])==null?void 0:k.schema),d=Object.entries(n||{}).flatMap(([,b])=>b.errors?b.errors.fatal?b.errors.fatal:[]:[]),f=Object.entries(n||{}).flatMap(([,b])=>b.errors&&b.errors.validation?[b.errors.validation]:[]);if(d&&d.length>0){const b=d.length===1?d[0].message:`Multiple errors detected:
|
|
189
|
-
${d.map((N,D)=>`${D+1}. ${N.message}`).join(`
|
|
190
|
-
`)}
|
|
191
|
-
|
|
192
|
-
Showing stack trace of: 0. ${d[0].message}`,T=new Error(b);throw T.stack=d[0].stack,T}f&&f.length>0&&console.warn("Val encountered validation errors:",f),p.useEffect(()=>{s(t?`/${t}`:l)},[t]);const[h,g]=p.useState(null);p.useEffect(()=>{try{new WebSocket(`${window.location.origin.replace("http://","ws://")}/_next/webpack-hmr`).addEventListener("message",T=>{let N;try{N=JSON.parse(T.data)}catch{console.error("Failed to parse HMR")}typeof(N==null?void 0:N.hash)=="string"&&(N==null?void 0:N.action)==="built"&&g(N.hash)})}catch(b){console.warn("Failed to initialize HMR",b)}},[]),p.useEffect(()=>{console.log("(Re)-fetching modules"),e.getTree({patch:!0,includeSchema:!0,includeSource:!0}).then(b=>{Ds.isOk(b)?r(b.value.modules):(i("Could not load modules: "+b.error.message),console.error(b.error))})},[h]);const m=zm(),[_,v]=NO();p.useEffect(()=>{const b=T=>{console.log("popstate",T)};return window.addEventListener("popstate",b),()=>{window.removeEventListener("popstate",b)}},[]);const y=ee.useRef(null),x=p.useCallback(b=>async T=>{const[N,D]=Kt.splitModuleIdAndModulePath(b),M=await T(Kt.createPatchJSONPath(D));return e.postPatches(N,M).then(j=>{if(Ds.isErr(j))throw j.error;if(!h)return e.getTree({treePath:N,patch:!0,includeSchema:!0,includeSource:!0}).then(B=>{Ds.isOk(B)?r(B.value.modules):(i("Could not load modules: "+B.error.message),console.error(B.error))})}).catch(j=>{console.error(j)})},[]);return w.jsx(tE.Provider,{value:{theme:_,setTheme:v,api:e,editMode:"full",session:{status:"not-asked"},highlight:!1,setHighlight:()=>{},setEditMode:()=>{},setWindowSize:()=>{}},children:w.jsxs("div",{id:"val-fullscreen-container",className:"relative font-serif antialiased","data-mode":_,children:[w.jsx("div",{className:"fixed -translate-x-1/2 z-overlay left-1/2 bottom-4",children:w.jsx($O,{api:e})}),w.jsx("div",{id:"val-fullscreen-hover",ref:y}),w.jsx(_C.Provider,{value:{hoverElem:y==null?void 0:y.current},children:w.jsx("div",{className:"text-primary bg-background",children:w.jsxs(js,{children:[w.jsx("div",{className:"px-4 h-[50px] flex items-center justify-center",children:w.jsx(ZE,{})}),w.jsx(Is,{className:"px-4",children:n?w.jsx(JM,{paths:Object.keys(n),setSelectedModuleId:b=>{m(b)}}):!o&&w.jsx("div",{className:"py-4",children:"Loading..."})}),w.jsxs("div",{className:"flex items-center justify-start w-full h-[50px] gap-2 font-serif text-xs",children:[w.jsx("button",{onClick:()=>{history.back()},children:w.jsx(gO,{})}),w.jsx("p",{children:l||"/"})]}),w.jsxs("div",{className:"p-4",children:[o&&w.jsxs("div",{className:"text-lg text-destructive-foreground",children:["ERROR: ",o]}),n&&l&&a&&u!==void 0&&c!==void 0&&w.jsx(wC.Provider,{value:n,children:w.jsx(VM,{path:l,source:u,schema:c,setSelectedPath:s,initOnSubmit:x})})]})]})})})]})})},_C=ee.createContext({hoverElem:null}),UM=()=>ee.useContext(_C);function VM({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:o}){const[,i]=Kt.splitModuleIdAndModulePath(e),l=Kt.resolvePath(i,t,n);if(!l)throw Error("Could not resolve module: "+e);return w.jsx(SC,{path:e,source:l.source,schema:l.schema,setSelectedPath:r,initOnSubmit:o,top:!0})}function SC({path:e,source:t,schema:n,setSelectedPath:r,field:o,initOnSubmit:i,top:l}){return t===null||n.opt?w.jsx(YM,{path:e,source:t,schema:n,field:o,initOnSubmit:i,setSelectedPath:r}):n.type==="object"?typeof t!="object"||Qs(t)?w.jsxs("div",{children:["ERROR: expected object, but found ",typeof t]}):w.jsx(EC,{source:t,path:e,schema:n,initOnSubmit:i,setSelectedPath:r,top:l}):n.type==="array"?typeof t!="object"||!Qs(t)?w.jsxs("div",{children:["ERROR: expected array, but found ",typeof t]}):w.jsx(CC,{source:t,path:e,schema:n,setSelectedPath:r}):n.type==="record"?typeof t!="object"?w.jsxs("div",{children:["ERROR: expected object for ",n.type,", but found ",typeof t]}):Qs(t)?w.jsxs("div",{children:["ERROR: did not expect array for ",n.type]}):w.jsx(HM,{source:t,path:e,schema:n,setSelectedPath:r}):w.jsxs("div",{className:"py-2 gap-y-4",children:[w.jsx("div",{className:"text-left",children:o||e}),w.jsx(JE,{path:e,disabled:!1,source:t,schema:n,onSubmit:i(e)})]})}function EC({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:o,top:i}){return w.jsx("div",{className:dd("flex flex-col gap-y-8",{"border-l-2 border-border pl-6":!i}),children:Object.entries(n.items).map(([l,s])=>{const a=ba(e,l);return w.jsx(SC,{path:a,source:t[l],schema:s,setSelectedPath:r,field:l,initOnSubmit:o},a)})},e)}function HM({path:e,source:t,schema:n,setSelectedPath:r}){const o=zm();return w.jsx("div",{className:"flex flex-col gap-4 p-2",children:Object.entries(t).map(([i,l])=>{const s=ba(e,i);return w.jsx("button",{onClick:()=>{r(s),o(s)},children:w.jsx(KM,{recordKey:i,path:s,source:l,schema:n.item})},s)})},e)}const Dp=170;function KM({recordKey:e,path:t,source:n,schema:r}){const o=ee.useRef(null),[i,l]=p.useState(!1);return p.useEffect(()=>{o.current&&o.current.getBoundingClientRect().height>=Dp&&l(!0)},[]),w.jsxs(Dm,{ref:o,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:Dp},children:[w.jsx("div",{className:"pb-4 font-serif text-left text-accent",children:e}),w.jsx("div",{className:"text-xs",children:w.jsx(Fm,{path:t,source:n,schema:r})}),i&&w.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]},t)}function CC({path:e,source:t,schema:n,setSelectedPath:r}){const o=zm();return w.jsx("div",{className:"flex flex-col gap-4 p-2",children:t.map((i,l)=>{const s=ba(e,l);return w.jsx("button",{onClick:()=>{r(s),o(s)},children:w.jsx(GM,{index:l,path:s,source:i,schema:n.item},s)},s)})},e)}const e1=Dp;function GM({index:e,path:t,source:n,schema:r}){const o=ee.useRef(null),[i,l]=p.useState(!1);return p.useEffect(()=>{o.current&&o.current.getBoundingClientRect().height>=e1&&l(!0)},[]),w.jsxs(Dm,{ref:o,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:e1},children:[w.jsx("div",{className:"pb-4 font-serif text-left uppercase text-accent",children:e+1<10?`0${e+1}`:e+1}),w.jsx("div",{className:"text-xs",children:w.jsx(Fm,{path:t,source:n,schema:r})}),i&&w.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]})}function ba(e,t){const n=Kt.createValPathOfItem(e,t);if(!n)throw Error(`Could not create val path: ${e} of ${t==null?void 0:t.toString()}`);return n}function Fm({path:e,source:t,schema:n}){const[r,o]=p.useState(null),{hoverElem:i}=UM();if(n.type==="object")return w.jsx("div",{className:"grid grid-cols-[min-content_1fr] gap-2 text-left",children:Object.entries(n.items).map(([l])=>w.jsxs(p.Fragment,{children:[w.jsxs("span",{className:"text-muted",children:[l,":"]}),w.jsx("span",{children:w.jsx(Fm,{source:(t==null?void 0:t[l])??null,schema:n.items[l],path:ba(e,l)})})]},ba(e,l)))},e);if(n.type==="array")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):Array.isArray(t)?w.jsxs("span",{children:[w.jsx("span",{className:"text-accent",children:t.length}),w.jsx("span",{children:t.length===1?" item":" items"})]},e):w.jsx("span",{className:"px-2 bg-destructive text-destructive-foreground",children:"Unknown length"},e);if(n.type==="richtext")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):typeof t!="object"?w.jsxs("div",{className:"p-4 text-destructive-foreground bg-destructive",children:["ERROR: ",typeof t," not an object"]},e):!(Ht in t)||t[Ht]!=="richtext"?w.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not richtext"},e):w.jsx(ZM,{children:a_(t)},e);if(n.type==="string")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):w.jsx("span",{children:t});if(n.type==="image"){if(t===null)return w.jsx("span",{className:"text-accent",children:"Empty"},e);if(typeof t!="object")return w.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: not an object"},e);if(!(vn in t)||typeof t[vn]!="string")return w.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not an image"},e);const l=Kt.convertFileSource(t).url;return w.jsxs("span",{onMouseOver:s=>{o({x:s.clientX,y:s.clientY})},onMouseLeave:()=>{o(null)},className:"relative flex items-center justify-start gap-1",children:[w.jsx("a",{href:l,className:"overflow-hidden underline truncate ",children:t[vn]}),r&&i&&$r.createPortal(w.jsx("img",{className:"absolute z-[5] max-w-[10vw]",style:{left:r.x+10,top:r.y+10},src:l}),i)]},e)}else{if(n.type==="boolean")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):w.jsx("span",{className:"text-accent",children:t?"true":"false"},e);if(n.type==="number")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):w.jsx("span",{className:"text-accent",children:t.toString()});if(n.type==="keyOf")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):w.jsx("span",{className:"text-accent",children:t.toString()},e)}return w.jsxs("div",{children:["TODO: ",n.type]},e)}function YM({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:o,field:i}){const[l,s]=p.useState(t!==null);return w.jsxs("div",{className:"flex flex-col gap-y-6",children:[i?w.jsxs("div",{className:"flex items-center justify-start gap-x-4",children:[w.jsx(Pp,{checked:l,onClick:()=>{s(a=>!a)}}),w.jsx("span",{children:i})]}):w.jsx(Pp,{checked:l,onClick:()=>{s(a=>!a)}}),l&&w.jsx(XM,{source:t,schema:n,path:e,setSelectedPath:r,initOnSubmit:o})]},e)}function XM({source:e,path:t,schema:n,setSelectedPath:r,initOnSubmit:o}){if(n.type==="array"){if(typeof e=="object"&&(e===null||Qs(e)))return w.jsx(CC,{source:e===null?[]:e,path:t,schema:n,setSelectedPath:r})}else if(n.type==="object"){if(typeof e=="object"&&(e===null||!Qs(e)))return w.jsx(EC,{source:e,path:t,schema:n,setSelectedPath:r,initOnSubmit:o})}else if(n.type==="richtext"||n.type==="string"||n.type==="image"||n.type==="number"||n.type==="keyOf")return w.jsx(JE,{path:t,disabled:!1,source:e,schema:n,onSubmit:o(t)},t);return w.jsxs("div",{className:"p-4 bg-destructive text-destructive-foreground",children:["ERROR: unexpected source type ",typeof e," for schema type"," ",n.type]})}function Qs(e){return Array.isArray(e)}function QM(e){const t={};return e.forEach(n=>{const r=n.split("/").filter(i=>i!=="");let o=t;r.forEach(i=>{o[i]||(o[i]={}),o=o[i]})}),t}function JM({paths:e,setSelectedModuleId:t}){const n=QM(e);return w.jsx(Zw,{children:Object.entries(n).map(([r,o])=>w.jsx("div",{className:"px-4 py-2",children:w.jsx($C,{name:r,tree:o,moduleId:`/${r}`,setSelectedModuleId:t})},`/${r}`))})}function $C({name:e,tree:t,moduleId:n,setSelectedModuleId:r}){return w.jsxs("div",{children:[w.jsx("button",{onClick:()=>{r(n)},children:e}),Object.entries(t).map(([o,i])=>w.jsx("div",{className:"px-4 py-1",children:w.jsx($C,{name:o,tree:i,moduleId:`${n}/${o}`,setSelectedModuleId:r})},`${n}/${o}`))]})}const t1={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 ZM({children:e}){const t=e;function n(i,l){const s=t1.tags[i];return s&&l?[l,s].join(" "):s||l}function r(i,l){const s=t1.classes[i];return s&&l?[l,s].join(" "):s||l}function o(i,l){var u,c;if(typeof i=="string")return i;if(i.tag==="p")return w.jsx("p",{className:n("p"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="img")return w.jsx("img",{className:n("img"),src:i.src},l);if(i.tag==="ul")return w.jsx("ul",{className:n("ul"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="ol")return w.jsx("ol",{className:n("ol"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="li")return w.jsx("li",{className:n("li"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="span")return w.jsx("span",{className:i.classes.map(d=>{switch(d){case"bold":return r("bold");case"line-through":return r("lineThrough");case"italic":return r("italic")}}).join(" "),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h1")return w.jsx("h1",{className:n("h1"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h2")return w.jsx("h2",{className:n("h2"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h3")return w.jsx("h3",{className:n("h3"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h4")return w.jsx("h4",{className:n("h4"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h5")return w.jsx("h5",{className:n("h5"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h6")return w.jsx("h6",{className:n("h6"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="br")return w.jsx("br",{},l);if(i.tag==="a")return w.jsx("a",{href:i.href,children:i.children.map((d,f)=>o(d,f))},l);console.error("Unknown tag",i.tag);const a=i.tag;return a!=null&&a.tag?ee.createElement(a.tag,{key:l,className:(u=a.class)==null?void 0:u.join(" "),children:(c=a.children)==null?void 0:c.map(o)}):null}return w.jsx("span",{"data-val-path":t.valPath,children:t.children.map((i,l)=>o(i,l))})}const qM=p.createContext(null),zf={didCatch:!1,error:null};class e4 extends p.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=zf}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),l=0;l<o;l++)i[l]=arguments[l];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(zf)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&t4(t.resetKeys,o)){var i,l;(i=(l=this.props).onReset)===null||i===void 0||i.call(l,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(zf)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:l}=this.state;let s=t;if(i){const a={error:l,resetErrorBoundary:this.resetErrorBoundary};if(p.isValidElement(o))s=o;else if(typeof n=="function")s=n(a);else if(r)s=p.createElement(r,a);else throw l}return p.createElement(qM.Provider,{value:{didCatch:i,error:l,resetErrorBoundary:this.resetErrorBoundary}},s)}}function t4(){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 kC="Collapsible",[n4,TC]=ki(kC),[r4,Bm]=n4(kC),o4=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:l,...s}=e,[a=!1,u]=Al({prop:r,defaultProp:o,onChange:l});return p.createElement(r4,{scope:n,disabled:i,contentId:Td(),open:a,onOpenToggle:p.useCallback(()=>u(c=>!c),[u])},p.createElement(Le.div,te({"data-state":Wm(a),"data-disabled":i?"":void 0},s,{ref:t})))}),i4="CollapsibleTrigger",l4=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Bm(i4,n);return p.createElement(Le.button,te({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Wm(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:He(e.onClick,o.onOpenToggle)}))}),bC="CollapsibleContent",s4=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bm(bC,e.__scopeCollapsible);return p.createElement(zl,{present:n||o.open},({present:i})=>p.createElement(a4,te({},r,{ref:t,present:i})))}),a4=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,l=Bm(bC,n),[s,a]=p.useState(r),u=p.useRef(null),c=Qe(t,u),d=p.useRef(0),f=d.current,h=p.useRef(0),g=h.current,m=l.open||s,_=p.useRef(m),v=p.useRef();return p.useEffect(()=>{const y=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(y)},[]),bn(()=>{const y=u.current;if(y){v.current=v.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();d.current=x.height,h.current=x.width,_.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),a(r)}},[l.open,r]),p.createElement(Le.div,te({"data-state":Wm(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!m},i,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style}}),m&&o)});function Wm(e){return e?"open":"closed"}const u4=o4,c4=l4,d4=s4,Ho="Accordion",f4=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Um,h4,p4]=aE(Ho),[jd,Q4]=ki(Ho,[p4,TC]),Vm=TC(),NC=ee.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return ee.createElement(Um.Provider,{scope:e.__scopeAccordion},n==="multiple"?ee.createElement(y4,te({},i,{ref:t})):ee.createElement(v4,te({},o,{ref:t})))});NC.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[RC,g4]=jd(Ho),[PC,m4]=jd(Ho,{collapsible:!1}),v4=ee.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...l}=e,[s,a]=Al({prop:n,defaultProp:r,onChange:o});return ee.createElement(RC,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:a,onItemClose:ee.useCallback(()=>i&&a(""),[i,a])},ee.createElement(PC,{scope:e.__scopeAccordion,collapsible:i},ee.createElement(OC,te({},l,{ref:t}))))}),y4=ee.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[l=[],s]=Al({prop:n,defaultProp:r,onChange:o}),a=ee.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=ee.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return ee.createElement(RC,{scope:e.__scopeAccordion,value:l,onItemOpen:a,onItemClose:u},ee.createElement(PC,{scope:e.__scopeAccordion,collapsible:!0},ee.createElement(OC,te({},i,{ref:t}))))}),[x4,zd]=jd(Ho),OC=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...l}=e,s=ee.useRef(null),a=Qe(s,t),u=h4(n),d=Ig(o)==="ltr",f=He(e.onKeyDown,h=>{var g;if(!f4.includes(h.key))return;const m=h.target,_=u().filter(D=>{var M;return!((M=D.ref.current)!==null&&M!==void 0&&M.disabled)}),v=_.findIndex(D=>D.ref.current===m),y=_.length;if(v===-1)return;h.preventDefault();let x=v;const S=0,k=y-1,b=()=>{x=v+1,x>k&&(x=S)},T=()=>{x=v-1,x<S&&(x=k)};switch(h.key){case"Home":x=S;break;case"End":x=k;break;case"ArrowRight":i==="horizontal"&&(d?b():T());break;case"ArrowDown":i==="vertical"&&b();break;case"ArrowLeft":i==="horizontal"&&(d?T():b());break;case"ArrowUp":i==="vertical"&&T();break}const N=x%y;(g=_[N].ref.current)===null||g===void 0||g.focus()});return ee.createElement(x4,{scope:n,disabled:r,direction:o,orientation:i},ee.createElement(Um.Slot,{scope:n},ee.createElement(Le.div,te({},l,{"data-orientation":i,ref:a,onKeyDown:r?void 0:f}))))}),Ip="AccordionItem",[w4,Hm]=jd(Ip),_4=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=zd(Ip,n),l=g4(Ip,n),s=Vm(n),a=Td(),u=r&&l.value.includes(r)||!1,c=i.disabled||e.disabled;return ee.createElement(w4,{scope:n,open:u,disabled:c,triggerId:a},ee.createElement(u4,te({"data-orientation":i.orientation,"data-state":AC(u)},s,o,{ref:t,disabled:c,open:u,onOpenChange:d=>{d?l.onItemOpen(r):l.onItemClose(r)}})))}),S4="AccordionHeader",E4=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=zd(Ho,n),i=Hm(S4,n);return ee.createElement(Le.h3,te({"data-orientation":o.orientation,"data-state":AC(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),n1="AccordionTrigger",C4=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=zd(Ho,n),i=Hm(n1,n),l=m4(n1,n),s=Vm(n);return ee.createElement(Um.ItemSlot,{scope:n},ee.createElement(c4,te({"aria-disabled":i.open&&!l.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},s,r,{ref:t})))}),$4="AccordionContent",k4=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=zd(Ho,n),i=Hm($4,n),l=Vm(n);return ee.createElement(d4,te({role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation},l,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function AC(e){return e?"open":"closed"}const T4=NC,b4=_4,N4=E4,MC=C4,LC=k4,R4=T4,DC=p.forwardRef(({className:e,...t},n)=>w.jsx(b4,{ref:n,className:st("border-b",e),...t}));DC.displayName="AccordionItem";const IC=p.forwardRef(({className:e,children:t,...n},r)=>w.jsx(N4,{className:"flex",children:w.jsxs(MC,{ref:r,className:st("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,w.jsx(sE,{className:"w-4 h-4 transition-transform duration-200 shrink-0"})]})}));IC.displayName=MC.displayName;const jC=p.forwardRef(({className:e,children:t,...n},r)=>w.jsx(LC,{ref:r,className:st("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...n,children:w.jsx("div",{className:"pt-0 pb-4",children:t})}));jC.displayName=LC.displayName;/**
|
|
193
|
-
* React Router DOM v6.20.0
|
|
194
|
-
*
|
|
195
|
-
* Copyright (c) Remix Software Inc.
|
|
196
|
-
*
|
|
197
|
-
* This source code is licensed under the MIT license found in the
|
|
198
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
199
|
-
*
|
|
200
|
-
* @license MIT
|
|
201
|
-
*/function Gc(){return Gc=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},Gc.apply(this,arguments)}function P4(e,t){return hM({basename:t==null?void 0:t.basename,future:Gc({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:L3({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||O4(),routes:e,mapRouteProperties:FM,window:t==null?void 0:t.window}).initialize()}function O4(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Gc({},t,{errors:A4(t.errors)})),t}function A4(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new Im(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let l=new i(o.message);l.stack="",n[r]=l}catch{}}if(n[r]==null){let i=new Error(o.message);i.stack="",n[r]=i}}else n[r]=o;return n}const M4=p.createContext({isTransitioning:!1}),L4=p.createContext(new Map),D4="startTransition",r1=m1[D4],I4="flushSync",o1=dT[I4];function j4(e){r1?r1(e):e()}function ys(e){o1?o1(e):e()}class z4{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 F4(e){let{fallbackElement:t,router:n,future:r}=e,[o,i]=p.useState(n.state),[l,s]=p.useState(),[a,u]=p.useState({isTransitioning:!1}),[c,d]=p.useState(),[f,h]=p.useState(),[g,m]=p.useState(),_=p.useRef(new Map),{v7_startTransition:v}=r||{},y=p.useCallback(T=>{v?j4(T):T()},[v]),x=p.useCallback((T,N)=>{let{deletedFetchers:D,unstable_flushSync:M,unstable_viewTransitionOpts:j}=N;D.forEach(re=>_.current.delete(re)),T.fetchers.forEach((re,H)=>{re.data!==void 0&&_.current.set(H,re.data)});let B=n.window==null||typeof n.window.document.startViewTransition!="function";if(!j||B){M?ys(()=>i(T)):y(()=>i(T));return}if(M){ys(()=>{f&&(c&&c.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:j.currentLocation,nextLocation:j.nextLocation})});let re=n.window.document.startViewTransition(()=>{ys(()=>i(T))});re.finished.finally(()=>{ys(()=>{d(void 0),h(void 0),s(void 0),u({isTransitioning:!1})})}),ys(()=>h(re));return}f?(c&&c.resolve(),f.skipTransition(),m({state:T,currentLocation:j.currentLocation,nextLocation:j.nextLocation})):(s(T),u({isTransitioning:!0,flushSync:!1,currentLocation:j.currentLocation,nextLocation:j.nextLocation}))},[n.window,f,c,_,y]);p.useLayoutEffect(()=>n.subscribe(x),[n,x]),p.useEffect(()=>{a.isTransitioning&&!a.flushSync&&d(new z4)},[a]),p.useEffect(()=>{if(c&&l&&n.window){let T=l,N=c.promise,D=n.window.document.startViewTransition(async()=>{y(()=>i(T)),await N});D.finished.finally(()=>{d(void 0),h(void 0),s(void 0),u({isTransitioning:!1})}),h(D)}},[y,l,c,n.window]),p.useEffect(()=>{c&&l&&o.location.key===l.location.key&&c.resolve()},[c,f,o.location,l]),p.useEffect(()=>{!a.isTransitioning&&g&&(s(g.state),u({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),m(void 0))},[a.isTransitioning,g]);let S=p.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:T=>n.navigate(T),push:(T,N,D)=>n.navigate(T,{state:N,preventScrollReset:D==null?void 0:D.preventScrollReset}),replace:(T,N,D)=>n.navigate(T,{replace:!0,state:N,preventScrollReset:D==null?void 0:D.preventScrollReset})}),[n]),k=n.basename||"/",b=p.useMemo(()=>({router:n,navigator:S,static:!1,basename:k}),[n,S,k]);return p.createElement(p.Fragment,null,p.createElement(Md.Provider,{value:b},p.createElement(pC.Provider,{value:o},p.createElement(L4.Provider,{value:_.current},p.createElement(M4.Provider,{value:a},p.createElement(zM,{basename:k,location:o.location,navigationType:o.historyAction,navigator:S},o.initialized?p.createElement(B4,{routes:n.routes,state:o}):t))))),null)}function B4(e){let{routes:t,state:n}=e;return bM(t,void 0,n)}var i1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(i1||(i1={}));var l1;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(l1||(l1={}));function W4({error:e,resetErrorBoundary:t}){return console.error(e),w.jsx("div",{className:"absolute top-0 left-0 flex items-center justify-center w-screen h-screen bg-card-foreground",children:w.jsx("div",{className:"w-full h-full p-10",children:w.jsxs("div",{className:"w-full h-full p-10 bg-card text-primary",children:[w.jsxs("div",{className:"flex items-center justify-between",children:[w.jsxs("div",{className:"flex items-center gap-[0.5em] text-lg font-bold text-center py-2",children:[w.jsx(ZE,{})," encountered an error"]}),w.jsx("button",{onClick:t,children:w.jsx(CO,{})})]}),w.jsx("div",{className:"text-4xl font-normal ",children:"Message:"}),w.jsx("pre",{children:e.message}),e.stack&&w.jsx(R4,{type:"single",className:"font-serif",collapsible:!0,defaultValue:"error",children:w.jsxs(DC,{value:"error",children:[w.jsx(IC,{children:"Stack trace:"}),w.jsx(jC,{className:"p-4 bg-popover text-popover-foreground",children:e.stack&&w.jsx("pre",{children:e.stack})})]})})]})})})}function U4(){const e=P4([{path:"/*",element:w.jsx(e4,{fallbackRender:W4,children:w.jsx(WM,{valApi:new ab("/api/val")})})}],{basename:"/api/val/static/edit"});return w.jsx(F4,{router:e})}Ff.createRoot(document.getElementById("root")).render(ee.createElement(ee.StrictMode,null,ee.createElement(U4,null)));
|