agent-remnote 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,58 @@
1
+ function ih(_,R){for(var z=0;z<R.length;z++){const P=R[z];if(typeof P!="string"&&!Array.isArray(P)){for(const oe in P)if(oe!=="default"&&!(oe in _)){const _e=Object.getOwnPropertyDescriptor(P,oe);_e&&Object.defineProperty(_,oe,_e.get?_e:{enumerable:!0,get:()=>P[oe]})}}}return Object.freeze(Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}))}var Dc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oh(_){return _&&_.__esModule&&Object.prototype.hasOwnProperty.call(_,"default")?_.default:_}var $f={exports:{}},Kf={exports:{}},Fe={};/*
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */var Bf=Object.getOwnPropertySymbols,lh=Object.prototype.hasOwnProperty,sh=Object.prototype.propertyIsEnumerable;function ah(_){if(_==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(_)}function uh(){try{if(!Object.assign)return!1;var _=new String("abc");if(_[5]="de",Object.getOwnPropertyNames(_)[0]==="5")return!1;for(var R={},z=0;z<10;z++)R["_"+String.fromCharCode(z)]=z;var P=Object.getOwnPropertyNames(R).map(function(_e){return R[_e]});if(P.join("")!=="0123456789")return!1;var oe={};return"abcdefghijklmnopqrst".split("").forEach(function(_e){oe[_e]=_e}),Object.keys(Object.assign({},oe)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var Gf=uh()?Object.assign:function(_,R){for(var z,P=ah(_),oe,_e=1;_e<arguments.length;_e++){z=Object(arguments[_e]);for(var Oe in z)lh.call(z,Oe)&&(P[Oe]=z[Oe]);if(Bf){oe=Bf(z);for(var be=0;be<oe.length;be++)sh.call(z,oe[be])&&(P[oe[be]]=z[oe[be]])}}return P};/** @license React v17.0.2
6
+ * react.production.min.js
7
+ *
8
+ * Copyright (c) Facebook, Inc. and its affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */var Rd=Gf,ds=60103,qf=60106;Fe.Fragment=60107;Fe.StrictMode=60108;Fe.Profiler=60114;var Yf=60109,Xf=60110,Jf=60112;Fe.Suspense=60113;var ep=60115,tp=60116;if(typeof Symbol=="function"&&Symbol.for){var lr=Symbol.for;ds=lr("react.element"),qf=lr("react.portal"),Fe.Fragment=lr("react.fragment"),Fe.StrictMode=lr("react.strict_mode"),Fe.Profiler=lr("react.profiler"),Yf=lr("react.provider"),Xf=lr("react.context"),Jf=lr("react.forward_ref"),Fe.Suspense=lr("react.suspense"),ep=lr("react.memo"),tp=lr("react.lazy")}var Uf=typeof Symbol=="function"&&Symbol.iterator;function ch(_){return _===null||typeof _!="object"?null:(_=Uf&&_[Uf]||_["@@iterator"],typeof _=="function"?_:null)}function Ma(_){for(var R="https://reactjs.org/docs/error-decoder.html?invariant="+_,z=1;z<arguments.length;z++)R+="&args[]="+encodeURIComponent(arguments[z]);return"Minified React error #"+_+"; visit "+R+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var np={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},rp={};function fs(_,R,z){this.props=_,this.context=R,this.refs=rp,this.updater=z||np}fs.prototype.isReactComponent={};fs.prototype.setState=function(_,R){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error(Ma(85));this.updater.enqueueSetState(this,_,R,"setState")};fs.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function ip(){}ip.prototype=fs.prototype;function Id(_,R,z){this.props=_,this.context=R,this.refs=rp,this.updater=z||np}var Od=Id.prototype=new ip;Od.constructor=Id;Rd(Od,fs.prototype);Od.isPureReactComponent=!0;var bd={current:null},op=Object.prototype.hasOwnProperty,lp={key:!0,ref:!0,__self:!0,__source:!0};function sp(_,R,z){var P,oe={},_e=null,Oe=null;if(R!=null)for(P in R.ref!==void 0&&(Oe=R.ref),R.key!==void 0&&(_e=""+R.key),R)op.call(R,P)&&!lp.hasOwnProperty(P)&&(oe[P]=R[P]);var be=arguments.length-2;if(be===1)oe.children=z;else if(1<be){for(var Re=Array(be),Tt=0;Tt<be;Tt++)Re[Tt]=arguments[Tt+2];oe.children=Re}if(_&&_.defaultProps)for(P in be=_.defaultProps,be)oe[P]===void 0&&(oe[P]=be[P]);return{$$typeof:ds,type:_,key:_e,ref:Oe,props:oe,_owner:bd.current}}function dh(_,R){return{$$typeof:ds,type:_.type,key:R,ref:_.ref,props:_.props,_owner:_._owner}}function Nd(_){return typeof _=="object"&&_!==null&&_.$$typeof===ds}function fh(_){var R={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(z){return R[z]})}var Zf=/\/+/g;function Td(_,R){return typeof _=="object"&&_!==null&&_.key!=null?fh(""+_.key):R.toString(36)}function jc(_,R,z,P,oe){var _e=typeof _;(_e==="undefined"||_e==="boolean")&&(_=null);var Oe=!1;if(_===null)Oe=!0;else switch(_e){case"string":case"number":Oe=!0;break;case"object":switch(_.$$typeof){case ds:case qf:Oe=!0}}if(Oe)return Oe=_,oe=oe(Oe),_=P===""?"."+Td(Oe,0):P,Array.isArray(oe)?(z="",_!=null&&(z=_.replace(Zf,"$&/")+"/"),jc(oe,R,z,"",function(Tt){return Tt})):oe!=null&&(Nd(oe)&&(oe=dh(oe,z+(!oe.key||Oe&&Oe.key===oe.key?"":(""+oe.key).replace(Zf,"$&/")+"/")+_)),R.push(oe)),1;if(Oe=0,P=P===""?".":P+":",Array.isArray(_))for(var be=0;be<_.length;be++){_e=_[be];var Re=P+Td(_e,be);Oe+=jc(_e,R,z,Re,oe)}else if(Re=ch(_),typeof Re=="function")for(_=Re.call(_),be=0;!(_e=_.next()).done;)_e=_e.value,Re=P+Td(_e,be++),Oe+=jc(_e,R,z,Re,oe);else if(_e==="object")throw R=""+_,Error(Ma(31,R==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":R));return Oe}function Ac(_,R,z){if(_==null)return _;var P=[],oe=0;return jc(_,P,"","",function(_e){return R.call(z,_e,oe++)}),P}function ph(_){if(_._status===-1){var R=_._result;R=R(),_._status=0,_._result=R,R.then(function(z){_._status===0&&(z=z.default,_._status=1,_._result=z)},function(z){_._status===0&&(_._status=2,_._result=z)})}if(_._status===1)return _._result;throw _._result}var ap={current:null};function fi(){var _=ap.current;if(_===null)throw Error(Ma(321));return _}var hh={ReactCurrentDispatcher:ap,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:bd,IsSomeRendererActing:{current:!1},assign:Rd};Fe.Children={map:Ac,forEach:function(_,R,z){Ac(_,function(){R.apply(this,arguments)},z)},count:function(_){var R=0;return Ac(_,function(){R++}),R},toArray:function(_){return Ac(_,function(R){return R})||[]},only:function(_){if(!Nd(_))throw Error(Ma(143));return _}};Fe.Component=fs;Fe.PureComponent=Id;Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hh;Fe.cloneElement=function(_,R,z){if(_==null)throw Error(Ma(267,_));var P=Rd({},_.props),oe=_.key,_e=_.ref,Oe=_._owner;if(R!=null){if(R.ref!==void 0&&(_e=R.ref,Oe=bd.current),R.key!==void 0&&(oe=""+R.key),_.type&&_.type.defaultProps)var be=_.type.defaultProps;for(Re in R)op.call(R,Re)&&!lp.hasOwnProperty(Re)&&(P[Re]=R[Re]===void 0&&be!==void 0?be[Re]:R[Re])}var Re=arguments.length-2;if(Re===1)P.children=z;else if(1<Re){be=Array(Re);for(var Tt=0;Tt<Re;Tt++)be[Tt]=arguments[Tt+2];P.children=be}return{$$typeof:ds,type:_.type,key:oe,ref:_e,props:P,_owner:Oe}};Fe.createContext=function(_,R){return R===void 0&&(R=null),_={$$typeof:Xf,_calculateChangedBits:R,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider={$$typeof:Yf,_context:_},_.Consumer=_};Fe.createElement=sp;Fe.createFactory=function(_){var R=sp.bind(null,_);return R.type=_,R};Fe.createRef=function(){return{current:null}};Fe.forwardRef=function(_){return{$$typeof:Jf,render:_}};Fe.isValidElement=Nd;Fe.lazy=function(_){return{$$typeof:tp,_payload:{_status:-1,_result:_},_init:ph}};Fe.memo=function(_,R){return{$$typeof:ep,type:_,compare:R===void 0?null:R}};Fe.useCallback=function(_,R){return fi().useCallback(_,R)};Fe.useContext=function(_,R){return fi().useContext(_,R)};Fe.useDebugValue=function(){};Fe.useEffect=function(_,R){return fi().useEffect(_,R)};Fe.useImperativeHandle=function(_,R,z){return fi().useImperativeHandle(_,R,z)};Fe.useLayoutEffect=function(_,R){return fi().useLayoutEffect(_,R)};Fe.useMemo=function(_,R){return fi().useMemo(_,R)};Fe.useReducer=function(_,R,z){return fi().useReducer(_,R,z)};Fe.useRef=function(_){return fi().useRef(_)};Fe.useState=function(_){return fi().useState(_)};Fe.version="17.0.2";Kf.exports=Fe;var up=Kf.exports,Cd={exports:{}},Cn={},Pd={exports:{}},kd={};/** @license React v0.20.2
13
+ * scheduler.production.min.js
14
+ *
15
+ * Copyright (c) Facebook, Inc. and its affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */var Wf;function mh(){return Wf||(Wf=1,function(_){var R,z,P,oe;if(typeof performance=="object"&&typeof performance.now=="function"){var _e=performance;_.unstable_now=function(){return _e.now()}}else{var Oe=Date,be=Oe.now();_.unstable_now=function(){return Oe.now()-be}}if(typeof window>"u"||typeof MessageChannel!="function"){var Re=null,Tt=null,I=function(){if(Re!==null)try{var M=_.unstable_now();Re(!0,M),Re=null}catch(ee){throw setTimeout(I,0),ee}};R=function(M){Re!==null?setTimeout(R,0,M):(Re=M,setTimeout(I,0))},z=function(M,ee){Tt=setTimeout(M,ee)},P=function(){clearTimeout(Tt)},_.unstable_shouldYield=function(){return!1},oe=_.unstable_forceFrameRate=function(){}}else{var ne=window.setTimeout,d=window.clearTimeout;if(typeof console<"u"){var Pn=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof Pn!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var nt=!1,Ve=null,Ne=-1,Xe=5,Be=0;_.unstable_shouldYield=function(){return _.unstable_now()>=Be},oe=function(){},_.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Xe=0<M?Math.floor(1e3/M):5};var kn=new MessageChannel,ce=kn.port2;kn.port1.onmessage=function(){if(Ve!==null){var M=_.unstable_now();Be=M+Xe;try{Ve(!0,M)?ce.postMessage(null):(nt=!1,Ve=null)}catch(ee){throw ce.postMessage(null),ee}}else nt=!1},R=function(M){Ve=M,nt||(nt=!0,ce.postMessage(null))},z=function(M,ee){Ne=ne(function(){M(_.unstable_now())},ee)},P=function(){d(Ne),Ne=-1}}function q(M,ee){var j=M.length;M.push(ee);e:for(;;){var Ce=j-1>>>1,H=M[Ce];if(H!==void 0&&0<je(H,ee))M[Ce]=ee,M[j]=H,j=Ce;else break e}}function X(M){return M=M[0],M===void 0?null:M}function Ae(M){var ee=M[0];if(ee!==void 0){var j=M.pop();if(j!==ee){M[0]=j;e:for(var Ce=0,H=M.length;Ce<H;){var yt=2*(Ce+1)-1,F=M[yt],rt=yt+1,D=M[rt];if(F!==void 0&&0>je(F,j))D!==void 0&&0>je(D,F)?(M[Ce]=D,M[rt]=j,Ce=rt):(M[Ce]=F,M[yt]=j,Ce=yt);else if(D!==void 0&&0>je(D,j))M[Ce]=D,M[rt]=j,Ce=rt;else break e}}return ee}return null}function je(M,ee){var j=M.sortIndex-ee.sortIndex;return j!==0?j:M.id-ee.id}var ze=[],L=[],Je=1,Te=null,G=3,Ee=!1,U=!1,le=!1;function pe(M){for(var ee=X(L);ee!==null;){if(ee.callback===null)Ae(L);else if(ee.startTime<=M)Ae(L),ee.sortIndex=ee.expirationTime,q(ze,ee);else break;ee=X(L)}}function J(M){if(le=!1,pe(M),!U)if(X(ze)!==null)U=!0,R(he);else{var ee=X(L);ee!==null&&z(J,ee.startTime-M)}}function he(M,ee){U=!1,le&&(le=!1,P()),Ee=!0;var j=G;try{for(pe(ee),Te=X(ze);Te!==null&&(!(Te.expirationTime>ee)||M&&!_.unstable_shouldYield());){var Ce=Te.callback;if(typeof Ce=="function"){Te.callback=null,G=Te.priorityLevel;var H=Ce(Te.expirationTime<=ee);ee=_.unstable_now(),typeof H=="function"?Te.callback=H:Te===X(ze)&&Ae(ze),pe(ee)}else Ae(ze);Te=X(ze)}if(Te!==null)var yt=!0;else{var F=X(L);F!==null&&z(J,F.startTime-ee),yt=!1}return yt}finally{Te=null,G=j,Ee=!1}}var Ue=oe;_.unstable_IdlePriority=5,_.unstable_ImmediatePriority=1,_.unstable_LowPriority=4,_.unstable_NormalPriority=3,_.unstable_Profiling=null,_.unstable_UserBlockingPriority=2,_.unstable_cancelCallback=function(M){M.callback=null},_.unstable_continueExecution=function(){U||Ee||(U=!0,R(he))},_.unstable_getCurrentPriorityLevel=function(){return G},_.unstable_getFirstCallbackNode=function(){return X(ze)},_.unstable_next=function(M){switch(G){case 1:case 2:case 3:var ee=3;break;default:ee=G}var j=G;G=ee;try{return M()}finally{G=j}},_.unstable_pauseExecution=function(){},_.unstable_requestPaint=Ue,_.unstable_runWithPriority=function(M,ee){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var j=G;G=M;try{return ee()}finally{G=j}},_.unstable_scheduleCallback=function(M,ee,j){var Ce=_.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?Ce+j:Ce):j=Ce,M){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=j+H,M={id:Je++,callback:ee,priorityLevel:M,startTime:j,expirationTime:H,sortIndex:-1},j>Ce?(M.sortIndex=j,q(L,M),X(ze)===null&&M===X(L)&&(le?P():le=!0,z(J,j-Ce))):(M.sortIndex=H,q(ze,M),U||Ee||(U=!0,R(he))),M},_.unstable_wrapCallback=function(M){var ee=G;return function(){var j=G;G=ee;try{return M.apply(this,arguments)}finally{G=j}}}}(kd)),kd}var Vf;function gh(){return Vf||(Vf=1,Pd.exports=mh()),Pd.exports}/** @license React v17.0.2
20
+ * react-dom.production.min.js
21
+ *
22
+ * Copyright (c) Facebook, Inc. and its affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var Hf;function yh(){if(Hf)return Cn;Hf=1;var _=up,R=Gf,z=gh();function P(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!_)throw Error(P(227));var oe=new Set,_e={};function Oe(e,n){be(e,n),be(e+"Capture",n)}function be(e,n){for(_e[e]=n,e=0;e<n.length;e++)oe.add(n[e])}var Re=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tt=/^[: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]*$/,I=Object.prototype.hasOwnProperty,ne={},d={};function Pn(e){return I.call(d,e)?!0:I.call(ne,e)?!1:Tt.test(e)?d[e]=!0:(ne[e]=!0,!1)}function nt(e,n,o,s){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return s?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ve(e,n,o,s){if(n===null||typeof n>"u"||nt(e,n,o,s))return!0;if(s)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function Ne(e,n,o,s,u,f,m){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=s,this.attributeNamespace=u,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=m}var Xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Xe[e]=new Ne(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Xe[n]=new Ne(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Xe[e]=new Ne(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Xe[e]=new Ne(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){Xe[e]=new Ne(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Xe[e]=new Ne(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Xe[e]=new Ne(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Xe[e]=new Ne(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Xe[e]=new Ne(e,5,!1,e.toLowerCase(),null,!1,!1)});var Be=/[\-:]([a-z])/g;function kn(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 n=e.replace(Be,kn);Xe[n]=new Ne(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Be,kn);Xe[n]=new Ne(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Be,kn);Xe[n]=new Ne(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Xe[e]=new Ne(e,1,!1,e.toLowerCase(),null,!1,!1)}),Xe.xlinkHref=new Ne("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Xe[e]=new Ne(e,1,!1,e.toLowerCase(),null,!0,!0)});function ce(e,n,o,s){var u=Xe.hasOwnProperty(n)?Xe[n]:null,f=u!==null?u.type===0:s?!1:!(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N");f||(Ve(n,o,u,s)&&(o=null),s||u===null?Pn(n)&&(o===null?e.removeAttribute(n):e.setAttribute(n,""+o)):u.mustUseProperty?e[u.propertyName]=o===null?u.type===3?!1:"":o:(n=u.attributeName,s=u.attributeNamespace,o===null?e.removeAttribute(n):(u=u.type,o=u===3||u===4&&o===!0?"":""+o,s?e.setAttributeNS(s,n,o):e.setAttribute(n,o))))}var q=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=60103,Ae=60106,je=60107,ze=60108,L=60114,Je=60109,Te=60110,G=60112,Ee=60113,U=60120,le=60115,pe=60116,J=60121,he=60128,Ue=60129,M=60130,ee=60131;if(typeof Symbol=="function"&&Symbol.for){var j=Symbol.for;X=j("react.element"),Ae=j("react.portal"),je=j("react.fragment"),ze=j("react.strict_mode"),L=j("react.profiler"),Je=j("react.provider"),Te=j("react.context"),G=j("react.forward_ref"),Ee=j("react.suspense"),U=j("react.suspense_list"),le=j("react.memo"),pe=j("react.lazy"),J=j("react.block"),j("react.scope"),he=j("react.opaque.id"),Ue=j("react.debug_trace_mode"),M=j("react.offscreen"),ee=j("react.legacy_hidden")}var Ce=typeof Symbol=="function"&&Symbol.iterator;function H(e){return e===null||typeof e!="object"?null:(e=Ce&&e[Ce]||e["@@iterator"],typeof e=="function"?e:null)}var yt;function F(e){if(yt===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);yt=n&&n[1]||""}return`
27
+ `+yt+e}var rt=!1;function D(e,n){if(!e||rt)return"";rt=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(w){var s=w}Reflect.construct(e,[],n)}else{try{n.call()}catch(w){s=w}e.call(n.prototype)}else{try{throw Error()}catch(w){s=w}e()}}catch(w){if(w&&s&&typeof w.stack=="string"){for(var u=w.stack.split(`
28
+ `),f=s.stack.split(`
29
+ `),m=u.length-1,y=f.length-1;1<=m&&0<=y&&u[m]!==f[y];)y--;for(;1<=m&&0<=y;m--,y--)if(u[m]!==f[y]){if(m!==1||y!==1)do if(m--,y--,0>y||u[m]!==f[y])return`
30
+ `+u[m].replace(" at new "," at ");while(1<=m&&0<=y);break}}}finally{rt=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?F(e):""}function ps(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=D(e.type,!1),e;case 11:return e=D(e.type.render,!1),e;case 22:return e=D(e.type._render,!1),e;case 1:return e=D(e.type,!0),e;default:return""}}function lt(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 je:return"Fragment";case Ae:return"Portal";case L:return"Profiler";case ze:return"StrictMode";case Ee:return"Suspense";case U:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Te:return(e.displayName||"Context")+".Consumer";case Je:return(e._context.displayName||"Context")+".Provider";case G:var n=e.render;return n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case le:return lt(e.type);case J:return lt(e._render);case pe:n=e._payload,e=e._init;try{return lt(e(n))}catch{}}return null}function Ut(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function hs(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function za(e){var n=hs(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),s=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var u=o.get,f=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(m){s=""+m,f.call(this,m)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(m){s=""+m},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function sr(e){e._valueTracker||(e._valueTracker=za(e))}function po(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),s="";return e&&(s=hs(e)?e.checked?"true":"false":e.value),e=s,e!==o?(n.setValue(e),!0):!1}function ol(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 Z(e,n){var o=n.checked;return R({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function vt(e,n){var o=n.defaultValue==null?"":n.defaultValue,s=n.checked!=null?n.checked:n.defaultChecked;o=Ut(n.value!=null?n.value:o),e._wrapperState={initialChecked:s,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function me(e,n){n=n.checked,n!=null&&ce(e,"checked",n,!1)}function ll(e,n){me(e,n);var o=Ut(n.value),s=n.type;if(o!=null)s==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?ho(e,n.type,o):n.hasOwnProperty("defaultValue")&&ho(e,n.type,Ut(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function kt(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var s=n.type;if(!(s!=="submit"&&s!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function ho(e,n,o){(n!=="number"||ol(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}function ms(e){var n="";return _.Children.forEach(e,function(o){o!=null&&(n+=o)}),n}function Dr(e,n){return e=R({children:void 0},n),(n=ms(n.children))&&(e.children=n),e}function Un(e,n,o,s){if(e=e.options,n){n={};for(var u=0;u<o.length;u++)n["$"+o[u]]=!0;for(o=0;o<e.length;o++)u=n.hasOwnProperty("$"+e[o].value),e[o].selected!==u&&(e[o].selected=u),u&&s&&(e[o].defaultSelected=!0)}else{for(o=""+Ut(o),n=null,u=0;u<e.length;u++){if(e[u].value===o){e[u].selected=!0,s&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Y(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(P(91));return R({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function sn(e,n){var o=n.value;if(o==null){if(o=n.children,n=n.defaultValue,o!=null){if(n!=null)throw Error(P(92));if(Array.isArray(o)){if(!(1>=o.length))throw Error(P(93));o=o[0]}n=o}n==null&&(n=""),o=n}e._wrapperState={initialValue:Ut(o)}}function gs(e,n){var o=Ut(n.value),s=Ut(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),s!=null&&(e.defaultValue=""+s)}function ge(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}var ve={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function Ba(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 ys(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Ba(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var sl,Ua=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,s,u){MSApp.execUnsafeLocalFunction(function(){return e(n,o,s,u)})}:e}(function(e,n){if(e.namespaceURI!==ve.svg||"innerHTML"in e)e.innerHTML=n;else{for(sl=sl||document.createElement("div"),sl.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=sl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function mo(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var go={animationIterationCount:!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},Lc=["Webkit","ms","Moz","O"];Object.keys(go).forEach(function(e){Lc.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),go[n]=go[e]})});function Za(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||go.hasOwnProperty(e)&&go[e]?(""+n).trim():n+"px"}function Wa(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var s=o.indexOf("--")===0,u=Za(o,n[o],s);o==="float"&&(o="cssFloat"),s?e.setProperty(o,u):e[o]=u}}var Va=R({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 Zt(e,n){if(n){if(Va[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(P(60));if(!(typeof n.dangerouslySetInnerHTML=="object"&&"__html"in n.dangerouslySetInnerHTML))throw Error(P(61))}if(n.style!=null&&typeof n.style!="object")throw Error(P(62))}}function al(e,n){if(e.indexOf("-")===-1)return typeof n.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}}function vn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wn=null,_n=null,Xt=null;function pi(e){if(e=Gr(e)){if(typeof wn!="function")throw Error(P(280));var n=e.stateNode;n&&(n=bo(n),wn(e.stateNode,e.type,n))}}function Ar(e){_n?Xt?Xt.push(e):Xt=[e]:_n=e}function jr(){if(_n){var e=_n,n=Xt;if(Xt=_n=null,pi(e),n)for(e=0;e<n.length;e++)pi(n[e])}}function Zn(e,n){return e(n)}function Wn(e,n,o,s,u){return e(n,o,s,u)}function an(){}var hi=Zn,wt=!1,Vn=!1;function He(){(_n!==null||Xt!==null)&&(an(),jr())}function mi(e,n,o){if(Vn)return e(n,o);Vn=!0;try{return hi(e,n,o)}finally{Vn=!1,He()}}function ar(e,n){var o=e.stateNode;if(o===null)return null;var s=bo(o);if(s===null)return null;o=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(P(231,n,typeof o));return o}var Lr=!1;if(Re)try{var ur={};Object.defineProperty(ur,"passive",{get:function(){Lr=!0}}),window.addEventListener("test",ur,ur),window.removeEventListener("test",ur,ur)}catch{Lr=!1}function gi(e,n,o,s,u,f,m,y,w){var C=Array.prototype.slice.call(arguments,3);try{n.apply(o,C)}catch(B){this.onError(B)}}var Nt=!1,Hn=null,cr=!1,Rn=null,Fr={onError:function(e){Nt=!0,Hn=e}};function yi(e,n,o,s,u,f,m,y,w){Nt=!1,Hn=null,gi.apply(Fr,arguments)}function vi(e,n,o,s,u,f,m,y,w){if(yi.apply(this,arguments),Nt){if(Nt){var C=Hn;Nt=!1,Hn=null}else throw Error(P(198));cr||(cr=!0,Rn=C)}}function Qn(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,n.flags&1026&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function In(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function Mr(e){if(Qn(e)!==e)throw Error(P(188))}function zr(e){var n=e.alternate;if(!n){if(n=Qn(e),n===null)throw Error(P(188));return n!==e?null:e}for(var o=e,s=n;;){var u=o.return;if(u===null)break;var f=u.alternate;if(f===null){if(s=u.return,s!==null){o=s;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===o)return Mr(u),e;if(f===s)return Mr(u),n;f=f.sibling}throw Error(P(188))}if(o.return!==s.return)o=u,s=f;else{for(var m=!1,y=u.child;y;){if(y===o){m=!0,o=u,s=f;break}if(y===s){m=!0,s=u,o=f;break}y=y.sibling}if(!m){for(y=f.child;y;){if(y===o){m=!0,o=f,s=u;break}if(y===s){m=!0,s=f,o=u;break}y=y.sibling}if(!m)throw Error(P(189))}}if(o.alternate!==s)throw Error(P(190))}if(o.tag!==3)throw Error(P(188));return o.stateNode.current===o?e:n}function Jt(e){if(e=zr(e),!e)return null;for(var n=e;;){if(n.tag===5||n.tag===6)return n;if(n.child)n.child.return=n,n=n.child;else{if(n===e)break;for(;!n.sibling;){if(!n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}}return null}function xn(e,n){for(var o=e.alternate;n!==null;){if(n===e||n===o)return!0;n=n.return}return!1}var $n,dr,wi,_i,vs=!1,un=[],en=null,cn=null,Kn=null,yo=new Map,te=new Map,vo=[],ws="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 ul(e,n,o,s,u){return{blockedOn:e,domEventName:n,eventSystemFlags:o|16,nativeEvent:u,targetContainers:[s]}}function Ha(e,n){switch(e){case"focusin":case"focusout":en=null;break;case"dragenter":case"dragleave":cn=null;break;case"mouseover":case"mouseout":Kn=null;break;case"pointerover":case"pointerout":yo.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":te.delete(n.pointerId)}}function wo(e,n,o,s,u,f){return e===null||e.nativeEvent!==f?(e=ul(n,o,s,u,f),n!==null&&(n=Gr(n),n!==null&&dr(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function Qa(e,n,o,s,u){switch(n){case"focusin":return en=wo(en,e,n,o,s,u),!0;case"dragenter":return cn=wo(cn,e,n,o,s,u),!0;case"mouseover":return Kn=wo(Kn,e,n,o,s,u),!0;case"pointerover":var f=u.pointerId;return yo.set(f,wo(yo.get(f)||null,e,n,o,s,u)),!0;case"gotpointercapture":return f=u.pointerId,te.set(f,wo(te.get(f)||null,e,n,o,s,u)),!0}return!1}function Fc(e){var n=Kr(e.target);if(n!==null){var o=Qn(n);if(o!==null){if(n=o.tag,n===13){if(n=In(o),n!==null){e.blockedOn=n,_i(e.lanePriority,function(){z.unstable_runWithPriority(e.priority,function(){wi(o)})});return}}else if(n===3&&o.stateNode.hydrate){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cl(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=Cs(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o!==null)return n=Gr(o),n!==null&&dr(n),e.blockedOn=o,!1;n.shift()}return!0}function $a(e,n,o){cl(e)&&o.delete(n)}function Mc(){for(vs=!1;0<un.length;){var e=un[0];if(e.blockedOn!==null){e=Gr(e.blockedOn),e!==null&&$n(e);break}for(var n=e.targetContainers;0<n.length;){var o=Cs(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o!==null){e.blockedOn=o;break}n.shift()}e.blockedOn===null&&un.shift()}en!==null&&cl(en)&&(en=null),cn!==null&&cl(cn)&&(cn=null),Kn!==null&&cl(Kn)&&(Kn=null),yo.forEach($a),te.forEach($a)}function _o(e,n){e.blockedOn===n&&(e.blockedOn=null,vs||(vs=!0,z.unstable_scheduleCallback(z.unstable_NormalPriority,Mc)))}function Ka(e){function n(u){return _o(u,e)}if(0<un.length){_o(un[0],e);for(var o=1;o<un.length;o++){var s=un[o];s.blockedOn===e&&(s.blockedOn=null)}}for(en!==null&&_o(en,e),cn!==null&&_o(cn,e),Kn!==null&&_o(Kn,e),yo.forEach(n),te.forEach(n),o=0;o<vo.length;o++)s=vo[o],s.blockedOn===e&&(s.blockedOn=null);for(;0<vo.length&&(o=vo[0],o.blockedOn===null);)Fc(o),o.blockedOn===null&&vo.shift()}function dl(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var xi={animationend:dl("Animation","AnimationEnd"),animationiteration:dl("Animation","AnimationIteration"),animationstart:dl("Animation","AnimationStart"),transitionend:dl("Transition","TransitionEnd")},_s={},Ga={};Re&&(Ga=document.createElement("div").style,"AnimationEvent"in window||(delete xi.animationend.animation,delete xi.animationiteration.animation,delete xi.animationstart.animation),"TransitionEvent"in window||delete xi.transitionend.transition);function fl(e){if(_s[e])return _s[e];if(!xi[e])return e;var n=xi[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in Ga)return _s[e]=n[o];return e}var qa=fl("animationend"),Ya=fl("animationiteration"),Xa=fl("animationstart"),Ja=fl("transitionend"),eu=new Map,xs=new Map,zc=["abort","abort",qa,"animationEnd",Ya,"animationIteration",Xa,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ja,"transitionEnd","waiting","waiting"];function Es(e,n){for(var o=0;o<e.length;o+=2){var s=e[o],u=e[o+1];u="on"+(u[0].toUpperCase()+u.slice(1)),xs.set(s,n),eu.set(s,u),Oe(u,[s])}}var Bc=z.unstable_now;Bc();var Qe=8;function Ei(e){if(1&e)return Qe=15,1;if(2&e)return Qe=14,2;if(4&e)return Qe=13,4;var n=24&e;return n!==0?(Qe=12,n):e&32?(Qe=11,32):(n=192&e,n!==0?(Qe=10,n):e&256?(Qe=9,256):(n=3584&e,n!==0?(Qe=8,n):e&4096?(Qe=7,4096):(n=4186112&e,n!==0?(Qe=6,n):(n=62914560&e,n!==0?(Qe=5,n):e&67108864?(Qe=4,67108864):e&134217728?(Qe=3,134217728):(n=805306368&e,n!==0?(Qe=2,n):1073741824&e?(Qe=1,1073741824):(Qe=8,e))))))}function Uc(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Zc(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(P(358,e))}}function Si(e,n){var o=e.pendingLanes;if(o===0)return Qe=0;var s=0,u=0,f=e.expiredLanes,m=e.suspendedLanes,y=e.pingedLanes;if(f!==0)s=f,u=Qe=15;else if(f=o&134217727,f!==0){var w=f&~m;w!==0?(s=Ei(w),u=Qe):(y&=f,y!==0&&(s=Ei(y),u=Qe))}else f=o&~m,f!==0?(s=Ei(f),u=Qe):y!==0&&(s=Ei(y),u=Qe);if(s===0)return 0;if(s=31-On(s),s=o&((0>s?0:1<<s)<<1)-1,n!==0&&n!==s&&!(n&m)){if(Ei(n),u<=Qe)return n;Qe=u}if(n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=s;0<n;)o=31-On(n),u=1<<o,s|=e[o],n&=~u;return s}function tu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function pl(e,n){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Ti(24&~n),e===0?pl(10,n):e;case 10:return e=Ti(192&~n),e===0?pl(8,n):e;case 8:return e=Ti(3584&~n),e===0&&(e=Ti(4186112&~n),e===0&&(e=512)),e;case 2:return n=Ti(805306368&~n),n===0&&(n=268435456),n}throw Error(P(358,e))}function Ti(e){return e&-e}function Ss(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function E(e,n,o){e.pendingLanes|=n;var s=n-1;e.suspendedLanes&=s,e.pingedLanes&=s,e=e.eventTimes,n=31-On(n),e[n]=o}var On=Math.clz32?Math.clz32:nu,Wc=Math.log,Vc=Math.LN2;function nu(e){return e===0?32:31-(Wc(e)/Vc|0)|0}var st=z.unstable_UserBlockingPriority,pt=z.unstable_runWithPriority,xo=!0;function Hc(e,n,o,s){wt||an();var u=Ts,f=wt;wt=!0;try{Wn(u,e,n,o,s)}finally{(wt=f)||He()}}function ru(e,n,o,s){pt(st,Ts.bind(null,e,n,o,s))}function Ts(e,n,o,s){if(xo){var u;if((u=(n&4)===0)&&0<un.length&&-1<ws.indexOf(e))e=ul(null,e,n,o,s),un.push(e);else{var f=Cs(e,n,o,s);if(f===null)u&&Ha(e,s);else{if(u){if(-1<ws.indexOf(e)){e=ul(f,e,n,o,s),un.push(e);return}if(Qa(f,e,n,o,s))return;Ha(e,s)}Ni(e,n,s,null,o)}}}}function Cs(e,n,o,s){var u=vn(s);if(u=Kr(u),u!==null){var f=Qn(u);if(f===null)u=null;else{var m=f.tag;if(m===13){if(u=In(f),u!==null)return u;u=null}else if(m===3){if(f.stateNode.hydrate)return f.tag===3?f.stateNode.containerInfo:null;u=null}else f!==u&&(u=null)}}return Ni(e,n,s,u,o),null}var bn=null,Ps=null,k=null;function O(){if(k)return k;var e,n=Ps,o=n.length,s,u="value"in bn?bn.value:bn.textContent,f=u.length;for(e=0;e<o&&n[e]===u[e];e++);var m=o-e;for(s=1;s<=m&&n[o-s]===u[f-s];s++);return k=u.slice(e,1<s?1-s:void 0)}function tn(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Ci(){return!0}function ht(){return!1}function Dt(e){function n(o,s,u,f,m){this._reactName=o,this._targetInst=u,this.type=s,this.nativeEvent=f,this.target=m,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(o=e[y],this[y]=o?o(f):f[y]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Ci:ht,this.isPropagationStopped=ht,this}return R(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Ci)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Ci)},persist:function(){},isPersistent:Ci}),n}var Pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hl=Dt(Pi),Eo=R({},Pi,{view:0,detail:0}),Qc=Dt(Eo),So,ml,it,dn=R({},Eo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:To,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!==it&&(it&&e.type==="mousemove"?(So=e.screenX-it.screenX,ml=e.screenY-it.screenY):ml=So=0,it=e),So)},movementY:function(e){return"movementY"in e?e.movementY:ml}}),gl=Dt(dn),ks=R({},dn,{dataTransfer:0}),Br=Dt(ks),$c=R({},Eo,{relatedTarget:0}),Rs=Dt($c),Kc=R({},Pi,{animationName:0,elapsedTime:0,pseudoElement:0}),iu=Dt(Kc),Gc=R({},Pi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qc=Dt(Gc),ou=R({},Pi,{data:0}),lu=Dt(ou),Yc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yl={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"},su={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vl(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=su[e])?!!n[e]:!1}function To(){return vl}var Gn=R({},Eo,{key:function(e){if(e.key){var n=Yc[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=tn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yl[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:To,charCode:function(e){return e.type==="keypress"?tn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?tn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),au=Dt(Gn),Ur=R({},dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zr=Dt(Ur),uu=R({},Eo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:To}),Is=Dt(uu),cu=R({},Pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),du=Dt(cu),fu=R({},dn,{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}),pu=Dt(fu),hu=[9,13,27,32],Os=Re&&"CompositionEvent"in window,Wr=null;Re&&"documentMode"in document&&(Wr=document.documentMode);var mu=Re&&"TextEvent"in window&&!Wr,gu=Re&&(!Os||Wr&&8<Wr&&11>=Wr),yu=" ",bs=!1;function nn(e,n){switch(e){case"keyup":return hu.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wt=!1;function Nn(e,n){switch(e){case"compositionend":return vu(n);case"keypress":return n.which!==32?null:(bs=!0,yu);case"textInput":return e=n.data,e===yu&&bs?null:e;default:return null}}function Xc(e,n){if(Wt)return e==="compositionend"||!Os&&nn(e,n)?(e=O(),k=Ps=bn=null,Wt=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return gu&&n.locale!=="ko"?null:n.data;default:return null}}var Jc={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 Ns(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Jc[e.type]:n==="textarea"}function Ds(e,n,o,s){Ar(s),n=Sl(n,"onChange"),0<n.length&&(o=new hl("onChange","change",null,o,s),e.push({event:o,listeners:n}))}var ki=null,Ri=null;function ed(e){El(e,0)}function Ii(e){var n=ji(e);if(po(n))return e}function wu(e,n){if(e==="change")return n}var wl=!1;if(Re){var Co;if(Re){var at="oninput"in document;if(!at){var qe=document.createElement("div");qe.setAttribute("oninput","return;"),at=typeof qe.oninput=="function"}Co=at}else Co=!1;wl=Co&&(!document.documentMode||9<document.documentMode)}function As(){ki&&(ki.detachEvent("onpropertychange",js),Ri=ki=null)}function js(e){if(e.propertyName==="value"&&Ii(Ri)){var n=[];if(Ds(n,Ri,e,vn(e)),e=ed,wt)e(n);else{wt=!0;try{Zn(e,n)}finally{wt=!1,He()}}}}function _u(e,n,o){e==="focusin"?(As(),ki=n,Ri=o,ki.attachEvent("onpropertychange",js)):e==="focusout"&&As()}function xu(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ii(Ri)}function Eu(e,n){if(e==="click")return Ii(n)}function Su(e,n){if(e==="input"||e==="change")return Ii(n)}function Tu(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Vt=typeof Object.is=="function"?Object.is:Tu,Ls=Object.prototype.hasOwnProperty;function Po(e,n){if(Vt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var o=Object.keys(e),s=Object.keys(n);if(o.length!==s.length)return!1;for(s=0;s<o.length;s++)if(!Ls.call(n,o[s])||!Vt(e[o[s]],n[o[s]]))return!1;return!0}function _l(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Oi(e,n){var o=_l(e);e=0;for(var s;o;){if(o.nodeType===3){if(s=e+o.textContent.length,e<=n&&s>=n)return{node:o,offset:n-e};e=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=_l(o)}}function ko(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?ko(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Cu(){for(var e=window,n=ol();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=ol(e.document)}return n}function Ro(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var xl=Re&&"documentMode"in document&&11>=document.documentMode,bi=null,Io=null,Vr=null,Fs=!1;function Pu(e,n,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Fs||bi==null||bi!==ol(s)||(s=bi,"selectionStart"in s&&Ro(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Vr&&Po(Vr,s)||(Vr=s,s=Sl(Io,"onSelect"),0<s.length&&(n=new hl("onSelect","select",null,n,o),e.push({event:n,listeners:s}),n.target=bi)))}Es("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Es("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Es(zc,2);for(var ku="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ms=0;Ms<ku.length;Ms++)xs.set(ku[Ms],0);be("onMouseEnter",["mouseout","mouseover"]),be("onMouseLeave",["mouseout","mouseover"]),be("onPointerEnter",["pointerout","pointerover"]),be("onPointerLeave",["pointerout","pointerover"]),Oe("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Oe("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Oe("onBeforeInput",["compositionend","keypress","textInput","paste"]),Oe("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Oe("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Oe("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Oo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ru=new Set("cancel close invalid load scroll toggle".split(" ").concat(Oo));function zs(e,n,o){var s=e.type||"unknown-event";e.currentTarget=o,vi(s,n,void 0,e),e.currentTarget=null}function El(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var s=e[o],u=s.event;s=s.listeners;e:{var f=void 0;if(n)for(var m=s.length-1;0<=m;m--){var y=s[m],w=y.instance,C=y.currentTarget;if(y=y.listener,w!==f&&u.isPropagationStopped())break e;zs(u,y,C),f=w}else for(m=0;m<s.length;m++){if(y=s[m],w=y.instance,C=y.currentTarget,y=y.listener,w!==f&&u.isPropagationStopped())break e;zs(u,y,C),f=w}}}if(cr)throw e=Rn,cr=!1,Rn=null,e}function $e(e,n){var o=bu(n),s=e+"__bubble";o.has(s)||(Ws(n,e,2,!1),o.add(s))}var Bs="_reactListening"+Math.random().toString(36).slice(2);function Us(e){e[Bs]||(e[Bs]=!0,oe.forEach(function(n){Ru.has(n)||Zs(n,!1,e,null),Zs(n,!0,e,null)}))}function Zs(e,n,o,s){var u=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,f=o;e==="selectionchange"&&o.nodeType!==9&&(f=o.ownerDocument);var m=bu(f),y=e+"__"+(n?"capture":"bubble");m.has(y)||(n&&(u|=4),Ws(f,e,u,n),m.add(y))}function Ws(e,n,o,s){var u=xs.get(n);switch(u===void 0?2:u){case 0:u=Hc;break;case 1:u=ru;break;default:u=Ts}o=u.bind(null,n,o,e),u=void 0,!Lr||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),s?u!==void 0?e.addEventListener(n,o,{capture:!0,passive:u}):e.addEventListener(n,o,!0):u!==void 0?e.addEventListener(n,o,{passive:u}):e.addEventListener(n,o,!1)}function Ni(e,n,o,s,u){var f=s;if(!(n&1)&&!(n&2)&&s!==null)e:for(;;){if(s===null)return;var m=s.tag;if(m===3||m===4){var y=s.stateNode.containerInfo;if(y===u||y.nodeType===8&&y.parentNode===u)break;if(m===4)for(m=s.return;m!==null;){var w=m.tag;if((w===3||w===4)&&(w=m.stateNode.containerInfo,w===u||w.nodeType===8&&w.parentNode===u))return;m=m.return}for(;y!==null;){if(m=Kr(y),m===null)return;if(w=m.tag,w===5||w===6){s=f=m;continue e}y=y.parentNode}}s=s.return}mi(function(){var C=f,B=vn(o),re=[];e:{var A=eu.get(e);if(A!==void 0){var K=hl,ue=e;switch(e){case"keypress":if(tn(o)===0)break e;case"keydown":case"keyup":K=au;break;case"focusin":ue="focus",K=Rs;break;case"focusout":ue="blur",K=Rs;break;case"beforeblur":case"afterblur":K=Rs;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=gl;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=Br;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=Is;break;case qa:case Ya:case Xa:K=iu;break;case Ja:K=du;break;case"scroll":K=Qc;break;case"wheel":K=pu;break;case"copy":case"cut":case"paste":K=qc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Zr}var ie=(n&4)!==0,T=!ie&&e==="scroll",x=ie?A!==null?A+"Capture":null:A;ie=[];for(var S=C,b;S!==null;){b=S;var N=b.stateNode;if(b.tag===5&&N!==null&&(b=N,x!==null&&(N=ar(S,x),N!=null&&ie.push(Hr(S,N,b)))),T)break;S=S.return}0<ie.length&&(A=new K(A,ue,null,o,B),re.push({event:A,listeners:ie}))}}if(!(n&7)){e:{if(A=e==="mouseover"||e==="pointerover",K=e==="mouseout"||e==="pointerout",A&&!(n&16)&&(ue=o.relatedTarget||o.fromElement)&&(Kr(ue)||ue[$r]))break e;if((K||A)&&(A=B.window===B?B:(A=B.ownerDocument)?A.defaultView||A.parentWindow:window,K?(ue=o.relatedTarget||o.toElement,K=C,ue=ue?Kr(ue):null,ue!==null&&(T=Qn(ue),ue!==T||ue.tag!==5&&ue.tag!==6)&&(ue=null)):(K=null,ue=C),K!==ue)){if(ie=gl,N="onMouseLeave",x="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(ie=Zr,N="onPointerLeave",x="onPointerEnter",S="pointer"),T=K==null?A:ji(K),b=ue==null?A:ji(ue),A=new ie(N,S+"leave",K,o,B),A.target=T,A.relatedTarget=b,N=null,Kr(B)===C&&(ie=new ie(x,S+"enter",ue,o,B),ie.target=b,ie.relatedTarget=T,N=ie),T=N,K&&ue)t:{for(ie=K,x=ue,S=0,b=ie;b;b=Qr(b))S++;for(b=0,N=x;N;N=Qr(N))b++;for(;0<S-b;)ie=Qr(ie),S--;for(;0<b-S;)x=Qr(x),b--;for(;S--;){if(ie===x||x!==null&&ie===x.alternate)break t;ie=Qr(ie),x=Qr(x)}ie=null}else ie=null;K!==null&&Vs(re,A,K,ie,!1),ue!==null&&T!==null&&Vs(re,T,ue,ie,!0)}}e:{if(A=C?ji(C):window,K=A.nodeName&&A.nodeName.toLowerCase(),K==="select"||K==="input"&&A.type==="file")var ae=wu;else if(Ns(A))if(wl)ae=Su;else{ae=xu;var W=_u}else(K=A.nodeName)&&K.toLowerCase()==="input"&&(A.type==="checkbox"||A.type==="radio")&&(ae=Eu);if(ae&&(ae=ae(e,C))){Ds(re,ae,o,B);break e}W&&W(e,A,C),e==="focusout"&&(W=A._wrapperState)&&W.controlled&&A.type==="number"&&ho(A,"number",A.value)}switch(W=C?ji(C):window,e){case"focusin":(Ns(W)||W.contentEditable==="true")&&(bi=W,Io=C,Vr=null);break;case"focusout":Vr=Io=bi=null;break;case"mousedown":Fs=!0;break;case"contextmenu":case"mouseup":case"dragend":Fs=!1,Pu(re,o,B);break;case"selectionchange":if(xl)break;case"keydown":case"keyup":Pu(re,o,B)}var fe;if(Os)e:{switch(e){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else Wt?nn(e,o)&&(Pe="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(Pe="onCompositionStart");Pe&&(gu&&o.locale!=="ko"&&(Wt||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&Wt&&(fe=O()):(bn=B,Ps="value"in bn?bn.value:bn.textContent,Wt=!0)),W=Sl(C,Pe),0<W.length&&(Pe=new lu(Pe,e,null,o,B),re.push({event:Pe,listeners:W}),fe?Pe.data=fe:(fe=vu(o),fe!==null&&(Pe.data=fe)))),(fe=mu?Nn(e,o):Xc(e,o))&&(C=Sl(C,"onBeforeInput"),0<C.length&&(B=new lu("onBeforeInput","beforeinput",null,o,B),re.push({event:B,listeners:C}),B.data=fe))}El(re,n)})}function Hr(e,n,o){return{instance:e,listener:n,currentTarget:o}}function Sl(e,n){for(var o=n+"Capture",s=[];e!==null;){var u=e,f=u.stateNode;u.tag===5&&f!==null&&(u=f,f=ar(e,o),f!=null&&s.unshift(Hr(e,f,u)),f=ar(e,n),f!=null&&s.push(Hr(e,f,u))),e=e.return}return s}function Qr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Vs(e,n,o,s,u){for(var f=n._reactName,m=[];o!==null&&o!==s;){var y=o,w=y.alternate,C=y.stateNode;if(w!==null&&w===s)break;y.tag===5&&C!==null&&(y=C,u?(w=ar(o,f),w!=null&&m.unshift(Hr(o,w,y))):u||(w=ar(o,f),w!=null&&m.push(Hr(o,w,y)))),o=o.return}m.length!==0&&e.push({event:n,listeners:m})}function Tl(){}var Hs=null,Cl=null;function Iu(e,n){switch(e){case"button":case"input":case"select":case"textarea":return!!n.autoFocus}return!1}function Pl(e,n){return e==="textarea"||e==="option"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Ou=typeof setTimeout=="function"?setTimeout:void 0,td=typeof clearTimeout=="function"?clearTimeout:void 0;function Qs(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Di(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break}return e}function ut(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var mt=0;function nd(e){return{$$typeof:he,toString:e,valueOf:e}}var Ai=Math.random().toString(36).slice(2),fr="__reactFiber$"+Ai,kl="__reactProps$"+Ai,$r="__reactContainer$"+Ai,$s="__reactEvents$"+Ai;function Kr(e){var n=e[fr];if(n)return n;for(var o=e.parentNode;o;){if(n=o[$r]||o[fr]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=ut(e);e!==null;){if(o=e[fr])return o;e=ut(e)}return n}e=o,o=e.parentNode}return null}function Gr(e){return e=e[fr]||e[$r],!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(P(33))}function bo(e){return e[kl]||null}function bu(e){var n=e[$s];return n===void 0&&(n=e[$s]=new Set),n}var Ks=[],pr=-1;function hr(e){return{current:e}}function ye(e){0>pr||(e.current=Ks[pr],Ks[pr]=null,pr--)}function Se(e,n){pr++,Ks[pr]=e.current,e.current=n}var mr={},_t=hr(mr),Ht=hr(!1),qr=mr;function gr(e,n){var o=e.type.contextTypes;if(!o)return mr;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===n)return s.__reactInternalMemoizedMaskedChildContext;var u={},f;for(f in o)u[f]=n[f];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=u),u}function Qt(e){return e=e.childContextTypes,e!=null}function Li(){ye(Ht),ye(_t)}function Nu(e,n,o){if(_t.current!==mr)throw Error(P(168));Se(_t,n),Se(Ht,o)}function Du(e,n,o){var s=e.stateNode;if(e=n.childContextTypes,typeof s.getChildContext!="function")return o;s=s.getChildContext();for(var u in s)if(!(u in e))throw Error(P(108,lt(n)||"Unknown",u));return R({},o,s)}function No(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mr,qr=_t.current,Se(_t,e),Se(Ht,Ht.current),!0}function Gs(e,n,o){var s=e.stateNode;if(!s)throw Error(P(169));o?(e=Du(e,n,qr),s.__reactInternalMemoizedMergedChildContext=e,ye(Ht),ye(_t),Se(_t,e)):ye(Ht),Se(Ht,o)}var qs=null,qn=null,rd=z.unstable_runWithPriority,Ys=z.unstable_scheduleCallback,Fi=z.unstable_cancelCallback,Au=z.unstable_shouldYield,ju=z.unstable_requestPaint,Do=z.unstable_now,id=z.unstable_getCurrentPriorityLevel,Rl=z.unstable_ImmediatePriority,Lu=z.unstable_UserBlockingPriority,Fu=z.unstable_NormalPriority,Mu=z.unstable_LowPriority,Il=z.unstable_IdlePriority,Xs={},od=ju!==void 0?ju:function(){},Dn=null,Ao=null,Js=!1,Ol=Do(),Ct=1e4>Ol?Do:function(){return Do()-Ol};function Mi(){switch(id()){case Rl:return 99;case Lu:return 98;case Fu:return 97;case Mu:return 96;case Il:return 95;default:throw Error(P(332))}}function zu(e){switch(e){case 99:return Rl;case 98:return Lu;case 97:return Fu;case 96:return Mu;case 95:return Il;default:throw Error(P(332))}}function xt(e,n){return e=zu(e),rd(e,n)}function Rt(e,n,o){return e=zu(e),Ys(e,n,o)}function An(){if(Ao!==null){var e=Ao;Ao=null,Fi(e)}bl()}function bl(){if(!Js&&Dn!==null){Js=!0;var e=0;try{var n=Dn;xt(99,function(){for(;e<n.length;e++){var o=n[e];do o=o(!0);while(o!==null)}}),Dn=null}catch(o){throw Dn!==null&&(Dn=Dn.slice(e+1)),Ys(Rl,An),o}finally{Js=!1}}}var ld=q.ReactCurrentBatchConfig;function En(e,n){if(e&&e.defaultProps){n=R({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}var Nl=hr(null),jo=null,yr=null,Dl=null;function ea(){Dl=yr=jo=null}function ta(e){var n=Nl.current;ye(Nl),e.type._context._currentValue=n}function na(e,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)===n){if(o===null||(o.childLanes&n)===n)break;o.childLanes|=n}else e.childLanes|=n,o!==null&&(o.childLanes|=n);e=e.return}}function zi(e,n){jo=e,Dl=yr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(on=!0),e.firstContext=null)}function fn(e,n){if(Dl!==e&&n!==!1&&n!==0)if((typeof n!="number"||n===1073741823)&&(Dl=e,n=1073741823),n={context:e,observedBits:n,next:null},yr===null){if(jo===null)throw Error(P(308));yr=n,jo.dependencies={lanes:0,firstContext:n,responders:null}}else yr=yr.next=n;return e._currentValue}var jn=!1;function ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function Bu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function de(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function De(e,n){if(e=e.updateQueue,e!==null){e=e.shared;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}}function Uu(e,n){var o=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,o===s)){var u=null,f=null;if(o=o.firstBaseUpdate,o!==null){do{var m={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};f===null?u=f=m:f=f.next=m,o=o.next}while(o!==null);f===null?u=f=n:f=f.next=n}else u=f=n;o={baseState:s.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:s.shared,effects:s.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function rn(e,n,o,s){var u=e.updateQueue;jn=!1;var f=u.firstBaseUpdate,m=u.lastBaseUpdate,y=u.shared.pending;if(y!==null){u.shared.pending=null;var w=y,C=w.next;w.next=null,m===null?f=C:m.next=C,m=w;var B=e.alternate;if(B!==null){B=B.updateQueue;var re=B.lastBaseUpdate;re!==m&&(re===null?B.firstBaseUpdate=C:re.next=C,B.lastBaseUpdate=w)}}if(f!==null){re=u.baseState,m=0,B=C=w=null;do{y=f.lane;var A=f.eventTime;if((s&y)===y){B!==null&&(B=B.next={eventTime:A,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});e:{var K=e,ue=f;switch(y=n,A=o,ue.tag){case 1:if(K=ue.payload,typeof K=="function"){re=K.call(A,re,y);break e}re=K;break e;case 3:K.flags=K.flags&-4097|64;case 0:if(K=ue.payload,y=typeof K=="function"?K.call(A,re,y):K,y==null)break e;re=R({},re,y);break e;case 2:jn=!0}}f.callback!==null&&(e.flags|=32,y=u.effects,y===null?u.effects=[f]:y.push(f))}else A={eventTime:A,lane:y,tag:f.tag,payload:f.payload,callback:f.callback,next:null},B===null?(C=B=A,w=re):B=B.next=A,m|=y;if(f=f.next,f===null){if(y=u.shared.pending,y===null)break;f=y.next,y.next=null,u.lastBaseUpdate=y,u.shared.pending=null}}while(!0);B===null&&(w=re),u.baseState=w,u.firstBaseUpdate=C,u.lastBaseUpdate=B,Gi|=m,e.lanes=m,e.memoizedState=re}}function Al(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var s=e[n],u=s.callback;if(u!==null){if(s.callback=null,s=o,typeof u!="function")throw Error(P(191,u));u.call(s)}}}var Zu=new _.Component().refs;function Bi(e,n,o,s){n=e.memoizedState,o=o(s,n),o=o==null?n:R({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var jl={isMounted:function(e){return(e=e._reactInternals)?Qn(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var s=qt(),u=Bn(e),f=de(s,u);f.payload=n,o!=null&&(f.callback=o),De(e,f),tr(e,u,s)},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var s=qt(),u=Bn(e),f=de(s,u);f.tag=1,f.payload=n,o!=null&&(f.callback=o),De(e,f),tr(e,u,s)},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=qt(),s=Bn(e),u=de(o,s);u.tag=2,n!=null&&(u.callback=n),De(e,u),tr(e,s,o)}};function Wu(e,n,o,s,u,f,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,m):n.prototype&&n.prototype.isPureReactComponent?!Po(o,s)||!Po(u,f):!0}function Vu(e,n,o){var s=!1,u=mr,f=n.contextType;return typeof f=="object"&&f!==null?f=fn(f):(u=Qt(n)?qr:_t.current,s=n.contextTypes,f=(s=s!=null)?gr(e,u):mr),n=new n(o,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=jl,e.stateNode=n,n._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=f),n}function Hu(e,n,o,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,s),n.state!==e&&jl.enqueueReplaceState(n,n.state,null)}function ia(e,n,o,s){var u=e.stateNode;u.props=o,u.state=e.memoizedState,u.refs=Zu,ra(e);var f=n.contextType;typeof f=="object"&&f!==null?u.context=fn(f):(f=Qt(n)?qr:_t.current,u.context=gr(e,f)),rn(e,o,u,s),u.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(Bi(e,n,f,o),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(n=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),n!==u.state&&jl.enqueueReplaceState(u,u.state,null),rn(e,o,u,s),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4)}var Ui=Array.isArray;function Lo(e,n,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(P(309));var s=o.stateNode}if(!s)throw Error(P(147,e));var u=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===u?n.ref:(n=function(f){var m=s.refs;m===Zu&&(m=s.refs={}),f===null?delete m[u]:m[u]=f},n._stringRef=u,n)}if(typeof e!="string")throw Error(P(284));if(!o._owner)throw Error(P(290,e))}return e}function Fo(e,n){if(e.type!=="textarea")throw Error(P(31,Object.prototype.toString.call(n)==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":n))}function Qu(e){function n(T,x){if(e){var S=T.lastEffect;S!==null?(S.nextEffect=x,T.lastEffect=x):T.firstEffect=T.lastEffect=x,x.nextEffect=null,x.flags=8}}function o(T,x){if(!e)return null;for(;x!==null;)n(T,x),x=x.sibling;return null}function s(T,x){for(T=new Map;x!==null;)x.key!==null?T.set(x.key,x):T.set(x.index,x),x=x.sibling;return T}function u(T,x){return T=rr(T,x),T.index=0,T.sibling=null,T}function f(T,x,S){return T.index=S,e?(S=T.alternate,S!==null?(S=S.index,S<x?(T.flags=2,x):S):(T.flags=2,x)):x}function m(T){return e&&T.alternate===null&&(T.flags=2),T}function y(T,x,S,b){return x===null||x.tag!==6?(x=Jo(S,T.mode,b),x.return=T,x):(x=u(x,S),x.return=T,x)}function w(T,x,S,b){return x!==null&&x.elementType===S.type?(b=u(x,S.props),b.ref=Lo(T,x,S),b.return=T,b):(b=oo(S.type,S.key,S.props,null,T.mode,b),b.ref=Lo(T,x,S),b.return=T,b)}function C(T,x,S,b){return x===null||x.tag!==4||x.stateNode.containerInfo!==S.containerInfo||x.stateNode.implementation!==S.implementation?(x=el(S,T.mode,b),x.return=T,x):(x=u(x,S.children||[]),x.return=T,x)}function B(T,x,S,b,N){return x===null||x.tag!==7?(x=lo(S,T.mode,b,N),x.return=T,x):(x=u(x,S),x.return=T,x)}function re(T,x,S){if(typeof x=="string"||typeof x=="number")return x=Jo(""+x,T.mode,S),x.return=T,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case X:return S=oo(x.type,x.key,x.props,null,T.mode,S),S.ref=Lo(T,null,x),S.return=T,S;case Ae:return x=el(x,T.mode,S),x.return=T,x}if(Ui(x)||H(x))return x=lo(x,T.mode,S,null),x.return=T,x;Fo(T,x)}return null}function A(T,x,S,b){var N=x!==null?x.key:null;if(typeof S=="string"||typeof S=="number")return N!==null?null:y(T,x,""+S,b);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case X:return S.key===N?S.type===je?B(T,x,S.props.children,b,N):w(T,x,S,b):null;case Ae:return S.key===N?C(T,x,S,b):null}if(Ui(S)||H(S))return N!==null?null:B(T,x,S,b,null);Fo(T,S)}return null}function K(T,x,S,b,N){if(typeof b=="string"||typeof b=="number")return T=T.get(S)||null,y(x,T,""+b,N);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case X:return T=T.get(b.key===null?S:b.key)||null,b.type===je?B(x,T,b.props.children,N,b.key):w(x,T,b,N);case Ae:return T=T.get(b.key===null?S:b.key)||null,C(x,T,b,N)}if(Ui(b)||H(b))return T=T.get(S)||null,B(x,T,b,N,null);Fo(x,b)}return null}function ue(T,x,S,b){for(var N=null,ae=null,W=x,fe=x=0,Pe=null;W!==null&&fe<S.length;fe++){W.index>fe?(Pe=W,W=null):Pe=W.sibling;var we=A(T,W,S[fe],b);if(we===null){W===null&&(W=Pe);break}e&&W&&we.alternate===null&&n(T,W),x=f(we,x,fe),ae===null?N=we:ae.sibling=we,ae=we,W=Pe}if(fe===S.length)return o(T,W),N;if(W===null){for(;fe<S.length;fe++)W=re(T,S[fe],b),W!==null&&(x=f(W,x,fe),ae===null?N=W:ae.sibling=W,ae=W);return N}for(W=s(T,W);fe<S.length;fe++)Pe=K(W,T,fe,S[fe],b),Pe!==null&&(e&&Pe.alternate!==null&&W.delete(Pe.key===null?fe:Pe.key),x=f(Pe,x,fe),ae===null?N=Pe:ae.sibling=Pe,ae=Pe);return e&&W.forEach(function(ir){return n(T,ir)}),N}function ie(T,x,S,b){var N=H(S);if(typeof N!="function")throw Error(P(150));if(S=N.call(S),S==null)throw Error(P(151));for(var ae=N=null,W=x,fe=x=0,Pe=null,we=S.next();W!==null&&!we.done;fe++,we=S.next()){W.index>fe?(Pe=W,W=null):Pe=W.sibling;var ir=A(T,W,we.value,b);if(ir===null){W===null&&(W=Pe);break}e&&W&&ir.alternate===null&&n(T,W),x=f(ir,x,fe),ae===null?N=ir:ae.sibling=ir,ae=ir,W=Pe}if(we.done)return o(T,W),N;if(W===null){for(;!we.done;fe++,we=S.next())we=re(T,we.value,b),we!==null&&(x=f(we,x,fe),ae===null?N=we:ae.sibling=we,ae=we);return N}for(W=s(T,W);!we.done;fe++,we=S.next())we=K(W,T,fe,we.value,b),we!==null&&(e&&we.alternate!==null&&W.delete(we.key===null?fe:we.key),x=f(we,x,fe),ae===null?N=we:ae.sibling=we,ae=we);return e&&W.forEach(function(cd){return n(T,cd)}),N}return function(T,x,S,b){var N=typeof S=="object"&&S!==null&&S.type===je&&S.key===null;N&&(S=S.props.children);var ae=typeof S=="object"&&S!==null;if(ae)switch(S.$$typeof){case X:e:{for(ae=S.key,N=x;N!==null;){if(N.key===ae){switch(N.tag){case 7:if(S.type===je){o(T,N.sibling),x=u(N,S.props.children),x.return=T,T=x;break e}break;default:if(N.elementType===S.type){o(T,N.sibling),x=u(N,S.props),x.ref=Lo(T,N,S),x.return=T,T=x;break e}}o(T,N);break}else n(T,N);N=N.sibling}S.type===je?(x=lo(S.props.children,T.mode,b,S.key),x.return=T,T=x):(b=oo(S.type,S.key,S.props,null,T.mode,b),b.ref=Lo(T,x,S),b.return=T,T=b)}return m(T);case Ae:e:{for(N=S.key;x!==null;){if(x.key===N)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){o(T,x.sibling),x=u(x,S.children||[]),x.return=T,T=x;break e}else{o(T,x);break}else n(T,x);x=x.sibling}x=el(S,T.mode,b),x.return=T,T=x}return m(T)}if(typeof S=="string"||typeof S=="number")return S=""+S,x!==null&&x.tag===6?(o(T,x.sibling),x=u(x,S),x.return=T,T=x):(o(T,x),x=Jo(S,T.mode,b),x.return=T,T=x),m(T);if(Ui(S))return ue(T,x,S,b);if(H(S))return ie(T,x,S,b);if(ae&&Fo(T,S),typeof S>"u"&&!N)switch(T.tag){case 1:case 22:case 0:case 11:case 15:throw Error(P(152,lt(T.type)||"Component"))}return o(T,x)}}var Ll=Qu(!0),Fl=Qu(!1),vr={},$t=hr(vr),Yn=hr(vr),Mo=hr(vr);function Xn(e){if(e===vr)throw Error(P(174));return e}function oa(e,n){switch(Se(Mo,n),Se(Yn,e),Se($t,vr),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:ys(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=ys(n,e)}ye($t),Se($t,n)}function Zi(){ye($t),ye(Yn),ye(Mo)}function Yr(e){Xn(Mo.current);var n=Xn($t.current),o=ys(n,e.type);n!==o&&(Se(Yn,e),Se($t,o))}function wr(e){Yn.current===e&&(ye($t),ye(Yn))}var et=hr(0);function Wi(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&64)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Jn=null,_r=null,Kt=!1;function Vi(e,n){var o=ln(5,null,null,0);o.elementType="DELETED",o.type="DELETED",o.stateNode=n,o.return=e,o.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=o,e.lastEffect=o):e.firstEffect=e.lastEffect=o}function $u(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,!0):!1;case 13:return!1;default:return!1}}function zo(e){if(Kt){var n=_r;if(n){var o=n;if(!$u(e,n)){if(n=Di(o.nextSibling),!n||!$u(e,n)){e.flags=e.flags&-1025|2,Kt=!1,Jn=e;return}Vi(Jn,o)}Jn=e,_r=Di(n.firstChild)}else e.flags=e.flags&-1025|2,Kt=!1,Jn=e}}function Ku(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Jn=e}function Ml(e){if(e!==Jn)return!1;if(!Kt)return Ku(e),Kt=!0,!1;var n=e.type;if(e.tag!==5||n!=="head"&&n!=="body"&&!Pl(n,e.memoizedProps))for(n=_r;n;)Vi(e,n),n=Di(n.nextSibling);if(Ku(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(n===0){_r=Di(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}_r=null}}else _r=Jn?Di(e.stateNode.nextSibling):null;return!0}function Ye(){_r=Jn=null,Kt=!1}var We=[];function la(){for(var e=0;e<We.length;e++)We[e]._workInProgressVersionPrimary=null;We.length=0}var Xr=q.ReactCurrentDispatcher,pn=q.ReactCurrentBatchConfig,Hi=0,ot=null,It=null,gt=null,zl=!1,Ie=!1;function Ge(){throw Error(P(321))}function Bo(e,n){if(n===null)return!1;for(var o=0;o<n.length&&o<e.length;o++)if(!Vt(e[o],n[o]))return!1;return!0}function Ke(e,n,o,s,u,f){if(Hi=f,ot=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Xr.current=e===null||e.memoizedState===null?At:Er,e=o(s,u),Ie){f=0;do{if(Ie=!1,!(25>f))throw Error(P(301));f+=1,gt=It=null,n.updateQueue=null,Xr.current=ec,e=o(s,u)}while(Ie)}if(Xr.current=Wl,n=It!==null&&It.next!==null,Hi=0,gt=It=ot=null,zl=!1,n)throw Error(P(300));return e}function Jr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?ot.memoizedState=gt=e:gt=gt.next=e,gt}function ei(){if(It===null){var e=ot.alternate;e=e!==null?e.memoizedState:null}else e=It.next;var n=gt===null?ot.memoizedState:gt.next;if(n!==null)gt=n,It=e;else{if(e===null)throw Error(P(310));It=e,e={memoizedState:It.memoizedState,baseState:It.baseState,baseQueue:It.baseQueue,queue:It.queue,next:null},gt===null?ot.memoizedState=gt=e:gt=gt.next=e}return gt}function Ln(e,n){return typeof n=="function"?n(e):n}function $(e){var n=ei(),o=n.queue;if(o===null)throw Error(P(311));o.lastRenderedReducer=e;var s=It,u=s.baseQueue,f=o.pending;if(f!==null){if(u!==null){var m=u.next;u.next=f.next,f.next=m}s.baseQueue=u=f,o.pending=null}if(u!==null){u=u.next,s=s.baseState;var y=m=f=null,w=u;do{var C=w.lane;if((Hi&C)===C)y!==null&&(y=y.next={lane:0,action:w.action,eagerReducer:w.eagerReducer,eagerState:w.eagerState,next:null}),s=w.eagerReducer===e?w.eagerState:e(s,w.action);else{var B={lane:C,action:w.action,eagerReducer:w.eagerReducer,eagerState:w.eagerState,next:null};y===null?(m=y=B,f=s):y=y.next=B,ot.lanes|=C,Gi|=C}w=w.next}while(w!==null&&w!==u);y===null?f=s:y.next=m,Vt(s,n.memoizedState)||(on=!0),n.memoizedState=s,n.baseState=f,n.baseQueue=y,o.lastRenderedState=s}return[n.memoizedState,o.dispatch]}function Qi(e){var n=ei(),o=n.queue;if(o===null)throw Error(P(311));o.lastRenderedReducer=e;var s=o.dispatch,u=o.pending,f=n.memoizedState;if(u!==null){o.pending=null;var m=u=u.next;do f=e(f,m.action),m=m.next;while(m!==u);Vt(f,n.memoizedState)||(on=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),o.lastRenderedState=f}return[f,s]}function sa(e,n,o){var s=n._getVersion;s=s(n._source);var u=n._workInProgressVersionPrimary;if(u!==null?e=u===s:(e=e.mutableReadLanes,(e=(Hi&e)===e)&&(n._workInProgressVersionPrimary=s,We.push(n))),e)return o(n._source);throw We.push(n),Error(P(350))}function aa(e,n,o,s){var u=Mt;if(u===null)throw Error(P(349));var f=n._getVersion,m=f(n._source),y=Xr.current,w=y.useState(function(){return sa(u,n,o)}),C=w[1],B=w[0];w=gt;var re=e.memoizedState,A=re.refs,K=A.getSnapshot,ue=re.source;re=re.subscribe;var ie=ot;return e.memoizedState={refs:A,source:n,subscribe:s},y.useEffect(function(){A.getSnapshot=o,A.setSnapshot=C;var T=f(n._source);if(!Vt(m,T)){T=o(n._source),Vt(B,T)||(C(T),T=Bn(ie),u.mutableReadLanes|=T&u.pendingLanes),T=u.mutableReadLanes,u.entangledLanes|=T;for(var x=u.entanglements,S=T;0<S;){var b=31-On(S),N=1<<b;x[b]|=T,S&=~N}}},[o,n,s]),y.useEffect(function(){return s(n._source,function(){var T=A.getSnapshot,x=A.setSnapshot;try{x(T(n._source));var S=Bn(ie);u.mutableReadLanes|=S&u.pendingLanes}catch(b){x(function(){throw b})}})},[n,s]),Vt(K,o)&&Vt(ue,n)&&Vt(re,s)||(e={pending:null,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:B},e.dispatch=C=Zl.bind(null,ot,e),w.queue=e,w.baseQueue=null,B=sa(u,n,o),w.memoizedState=w.baseState=B),B}function Uo(e,n,o){var s=ei();return aa(s,e,n,o)}function ti(e){var n=Jr();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e=n.queue={pending:null,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:e},e=e.dispatch=Zl.bind(null,ot,e),[n.memoizedState,e]}function Zo(e,n,o,s){return e={tag:e,create:n,destroy:o,deps:s,next:null},n=ot.updateQueue,n===null?(n={lastEffect:null},ot.updateQueue=n,n.lastEffect=e.next=e):(o=n.lastEffect,o===null?n.lastEffect=e.next=e:(s=o.next,o.next=e,e.next=s,n.lastEffect=e)),e}function Gu(e){var n=Jr();return e={current:e},n.memoizedState=e}function xr(){return ei().memoizedState}function ni(e,n,o,s){var u=Jr();ot.flags|=e,u.memoizedState=Zo(1|n,o,void 0,s===void 0?null:s)}function ua(e,n,o,s){var u=ei();s=s===void 0?null:s;var f=void 0;if(It!==null){var m=It.memoizedState;if(f=m.destroy,s!==null&&Bo(s,m.deps)){Zo(n,o,f,s);return}}ot.flags|=e,u.memoizedState=Zo(1|n,o,f,s)}function ca(e,n){return ni(516,4,e,n)}function Bl(e,n){return ua(516,4,e,n)}function qu(e,n){return ua(4,2,e,n)}function da(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function fa(e,n,o){return o=o!=null?o.concat([e]):null,ua(4,2,da.bind(null,n,e),o)}function Ul(){}function Yu(e,n){var o=ei();n=n===void 0?null:n;var s=o.memoizedState;return s!==null&&n!==null&&Bo(n,s[1])?s[0]:(o.memoizedState=[e,n],e)}function Xu(e,n){var o=ei();n=n===void 0?null:n;var s=o.memoizedState;return s!==null&&n!==null&&Bo(n,s[1])?s[0]:(e=e(),o.memoizedState=[e,n],e)}function Ju(e,n){var o=Mi();xt(98>o?98:o,function(){e(!0)}),xt(97<o?97:o,function(){var s=pn.transition;pn.transition=1;try{e(!1),n()}finally{pn.transition=s}})}function Zl(e,n,o){var s=qt(),u=Bn(e),f={lane:u,action:o,eagerReducer:null,eagerState:null,next:null},m=n.pending;if(m===null?f.next=f:(f.next=m.next,m.next=f),n.pending=f,m=e.alternate,e===ot||m!==null&&m===ot)Ie=zl=!0;else{if(e.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var y=n.lastRenderedState,w=m(y,o);if(f.eagerReducer=m,f.eagerState=w,Vt(w,y))return}catch{}finally{}tr(e,u,s)}}var Wl={readContext:fn,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useMutableSource:Ge,useOpaqueIdentifier:Ge,unstable_isNewReconciler:!1},At={readContext:fn,useCallback:function(e,n){return Jr().memoizedState=[e,n===void 0?null:n],e},useContext:fn,useEffect:ca,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,ni(4,2,da.bind(null,n,e),o)},useLayoutEffect:function(e,n){return ni(4,2,e,n)},useMemo:function(e,n){var o=Jr();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var s=Jr();return n=o!==void 0?o(n):n,s.memoizedState=s.baseState=n,e=s.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},e=e.dispatch=Zl.bind(null,ot,e),[s.memoizedState,e]},useRef:Gu,useState:ti,useDebugValue:Ul,useDeferredValue:function(e){var n=ti(e),o=n[0],s=n[1];return ca(function(){var u=pn.transition;pn.transition=1;try{s(e)}finally{pn.transition=u}},[e]),o},useTransition:function(){var e=ti(!1),n=e[0];return e=Ju.bind(null,e[1]),Gu(e),[e,n]},useMutableSource:function(e,n,o){var s=Jr();return s.memoizedState={refs:{getSnapshot:n,setSnapshot:null},source:e,subscribe:o},aa(s,e,n,o)},useOpaqueIdentifier:function(){if(Kt){var e=!1,n=nd(function(){throw e||(e=!0,o("r:"+(mt++).toString(36))),Error(P(355))}),o=ti(n)[1];return!(ot.mode&2)&&(ot.flags|=516,Zo(5,function(){o("r:"+(mt++).toString(36))},void 0,null)),n}return n="r:"+(mt++).toString(36),ti(n),n},unstable_isNewReconciler:!1},Er={readContext:fn,useCallback:Yu,useContext:fn,useEffect:Bl,useImperativeHandle:fa,useLayoutEffect:qu,useMemo:Xu,useReducer:$,useRef:xr,useState:function(){return $(Ln)},useDebugValue:Ul,useDeferredValue:function(e){var n=$(Ln),o=n[0],s=n[1];return Bl(function(){var u=pn.transition;pn.transition=1;try{s(e)}finally{pn.transition=u}},[e]),o},useTransition:function(){var e=$(Ln)[0];return[xr().current,e]},useMutableSource:Uo,useOpaqueIdentifier:function(){return $(Ln)[0]},unstable_isNewReconciler:!1},ec={readContext:fn,useCallback:Yu,useContext:fn,useEffect:Bl,useImperativeHandle:fa,useLayoutEffect:qu,useMemo:Xu,useReducer:Qi,useRef:xr,useState:function(){return Qi(Ln)},useDebugValue:Ul,useDeferredValue:function(e){var n=Qi(Ln),o=n[0],s=n[1];return Bl(function(){var u=pn.transition;pn.transition=1;try{s(e)}finally{pn.transition=u}},[e]),o},useTransition:function(){var e=Qi(Ln)[0];return[xr().current,e]},useMutableSource:Uo,useOpaqueIdentifier:function(){return Qi(Ln)[0]},unstable_isNewReconciler:!1},pa=q.ReactCurrentOwner,on=!1;function jt(e,n,o,s){n.child=e===null?Fl(n,null,o,s):Ll(n,e.child,o,s)}function Et(e,n,o,s,u){o=o.render;var f=n.ref;return zi(n,u),s=Ke(e,n,o,s,f,u),e!==null&&!on?(n.updateQueue=e.updateQueue,n.flags&=-517,e.lanes&=~u,Lt(e,n,u)):(n.flags|=1,jt(e,n,s,u),n.child)}function Vl(e,n,o,s,u,f){if(e===null){var m=o.type;return typeof m=="function"&&!io(m)&&m.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=m,ha(e,n,m,s,u,f)):(e=oo(o.type,null,s,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}return m=e.child,!(u&f)&&(u=m.memoizedProps,o=o.compare,o=o!==null?o:Po,o(u,s)&&e.ref===n.ref)?Lt(e,n,f):(n.flags|=1,e=rr(m,s),e.ref=n.ref,e.return=n,n.child=e)}function ha(e,n,o,s,u,f){if(e!==null&&Po(e.memoizedProps,s)&&e.ref===n.ref)if(on=!1,(f&u)!==0)e.flags&16384&&(on=!0);else return n.lanes=e.lanes,Lt(e,n,f);return ga(e,n,o,s,f)}function ma(e,n,o){var s=n.pendingProps,u=s.children,f=e!==null?e.memoizedState:null;if(s.mode==="hidden"||s.mode==="unstable-defer-without-hiding")if(!(n.mode&4))n.memoizedState={baseLanes:0},ls(n,o);else if(o&1073741824)n.memoizedState={baseLanes:0},ls(n,f!==null?f.baseLanes:o);else return e=f!==null?f.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e},ls(n,e),null;else f!==null?(s=f.baseLanes|o,n.memoizedState=null):s=o,ls(n,s);return jt(e,n,u,o),n.child}function tc(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=128)}function ga(e,n,o,s,u){var f=Qt(o)?qr:_t.current;return f=gr(n,f),zi(n,u),o=Ke(e,n,o,s,f,u),e!==null&&!on?(n.updateQueue=e.updateQueue,n.flags&=-517,e.lanes&=~u,Lt(e,n,u)):(n.flags|=1,jt(e,n,o,u),n.child)}function ya(e,n,o,s,u){if(Qt(o)){var f=!0;No(n)}else f=!1;if(zi(n,u),n.stateNode===null)e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),Vu(n,o,s),ia(n,o,s,u),s=!0;else if(e===null){var m=n.stateNode,y=n.memoizedProps;m.props=y;var w=m.context,C=o.contextType;typeof C=="object"&&C!==null?C=fn(C):(C=Qt(o)?qr:_t.current,C=gr(n,C));var B=o.getDerivedStateFromProps,re=typeof B=="function"||typeof m.getSnapshotBeforeUpdate=="function";re||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(y!==s||w!==C)&&Hu(n,m,s,C),jn=!1;var A=n.memoizedState;m.state=A,rn(n,s,m,u),w=n.memoizedState,y!==s||A!==w||Ht.current||jn?(typeof B=="function"&&(Bi(n,o,B,s),w=n.memoizedState),(y=jn||Wu(n,o,y,s,A,w,C))?(re||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(n.flags|=4)):(typeof m.componentDidMount=="function"&&(n.flags|=4),n.memoizedProps=s,n.memoizedState=w),m.props=s,m.state=w,m.context=C,s=y):(typeof m.componentDidMount=="function"&&(n.flags|=4),s=!1)}else{m=n.stateNode,Bu(e,n),y=n.memoizedProps,C=n.type===n.elementType?y:En(n.type,y),m.props=C,re=n.pendingProps,A=m.context,w=o.contextType,typeof w=="object"&&w!==null?w=fn(w):(w=Qt(o)?qr:_t.current,w=gr(n,w));var K=o.getDerivedStateFromProps;(B=typeof K=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(y!==re||A!==w)&&Hu(n,m,s,w),jn=!1,A=n.memoizedState,m.state=A,rn(n,s,m,u);var ue=n.memoizedState;y!==re||A!==ue||Ht.current||jn?(typeof K=="function"&&(Bi(n,o,K,s),ue=n.memoizedState),(C=jn||Wu(n,o,C,s,A,ue,w))?(B||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(s,ue,w),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(s,ue,w)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=256)):(typeof m.componentDidUpdate!="function"||y===e.memoizedProps&&A===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&A===e.memoizedState||(n.flags|=256),n.memoizedProps=s,n.memoizedState=ue),m.props=s,m.state=ue,m.context=w,s=C):(typeof m.componentDidUpdate!="function"||y===e.memoizedProps&&A===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&A===e.memoizedState||(n.flags|=256),s=!1)}return Hl(e,n,o,s,f,u)}function Hl(e,n,o,s,u,f){tc(e,n);var m=(n.flags&64)!==0;if(!s&&!m)return u&&Gs(n,o,!1),Lt(e,n,f);s=n.stateNode,pa.current=n;var y=m&&typeof o.getDerivedStateFromError!="function"?null:s.render();return n.flags|=1,e!==null&&m?(n.child=Ll(n,e.child,null,f),n.child=Ll(n,null,y,f)):jt(e,n,y,f),n.memoizedState=s.state,u&&Gs(n,o,!0),n.child}function va(e){var n=e.stateNode;n.pendingContext?Nu(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Nu(e,n.context,!1),oa(e,n.containerInfo)}var Ql={dehydrated:null,retryLane:0};function Ot(e,n,o){var s=n.pendingProps,u=et.current,f=!1,m;return(m=(n.flags&64)!==0)||(m=e!==null&&e.memoizedState===null?!1:(u&2)!==0),m?(f=!0,n.flags&=-65):e!==null&&e.memoizedState===null||s.fallback===void 0||s.unstable_avoidThisFallback===!0||(u|=1),Se(et,u&1),e===null?(s.fallback!==void 0&&zo(n),e=s.children,u=s.fallback,f?(e=wa(n,e,u,o),n.child.memoizedState={baseLanes:o},n.memoizedState=Ql,e):typeof s.unstable_expectedLoadTime=="number"?(e=wa(n,e,u,o),n.child.memoizedState={baseLanes:o},n.memoizedState=Ql,n.lanes=33554432,e):(o=Xo({mode:"visible",children:e},n.mode,o,null),o.return=n,n.child=o)):e.memoizedState!==null?f?(s=$l(e,n,s.children,s.fallback,o),f=n.child,u=e.child.memoizedState,f.memoizedState=u===null?{baseLanes:o}:{baseLanes:u.baseLanes|o},f.childLanes=e.childLanes&~o,n.memoizedState=Ql,s):(o=_a(e,n,s.children,o),n.memoizedState=null,o):f?(s=$l(e,n,s.children,s.fallback,o),f=n.child,u=e.child.memoizedState,f.memoizedState=u===null?{baseLanes:o}:{baseLanes:u.baseLanes|o},f.childLanes=e.childLanes&~o,n.memoizedState=Ql,s):(o=_a(e,n,s.children,o),n.memoizedState=null,o)}function wa(e,n,o,s){var u=e.mode,f=e.child;return n={mode:"hidden",children:n},!(u&2)&&f!==null?(f.childLanes=0,f.pendingProps=n):f=Xo(n,u,0,null),o=lo(o,u,s,null),f.return=e,o.return=e,f.sibling=o,e.child=f,o}function _a(e,n,o,s){var u=e.child;return e=u.sibling,o=rr(u,{mode:"visible",children:o}),!(n.mode&2)&&(o.lanes=s),o.return=n,o.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,n.firstEffect=n.lastEffect=e),n.child=o}function $l(e,n,o,s,u){var f=n.mode,m=e.child;e=m.sibling;var y={mode:"hidden",children:o};return!(f&2)&&n.child!==m?(o=n.child,o.childLanes=0,o.pendingProps=y,m=o.lastEffect,m!==null?(n.firstEffect=o.firstEffect,n.lastEffect=m,m.nextEffect=null):n.firstEffect=n.lastEffect=null):o=rr(m,y),e!==null?s=rr(e,s):(s=lo(s,f,u,null),s.flags|=2),s.return=n,o.return=n,o.sibling=s,n.child=o,s}function nc(e,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),na(e.return,n)}function Kl(e,n,o,s,u,f){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:o,tailMode:u,lastEffect:f}:(m.isBackwards=n,m.rendering=null,m.renderingStartTime=0,m.last=s,m.tail=o,m.tailMode=u,m.lastEffect=f)}function Wo(e,n,o){var s=n.pendingProps,u=s.revealOrder,f=s.tail;if(jt(e,n,s.children,o),s=et.current,s&2)s=s&1|2,n.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nc(e,o);else if(e.tag===19)nc(e,o);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if(Se(et,s),!(n.mode&2))n.memoizedState=null;else switch(u){case"forwards":for(o=n.child,u=null;o!==null;)e=o.alternate,e!==null&&Wi(e)===null&&(u=o),o=o.sibling;o=u,o===null?(u=n.child,n.child=null):(u=o.sibling,o.sibling=null),Kl(n,!1,u,o,f,n.lastEffect);break;case"backwards":for(o=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&Wi(e)===null){n.child=u;break}e=u.sibling,u.sibling=o,o=u,u=e}Kl(n,!0,o,null,f,n.lastEffect);break;case"together":Kl(n,!1,null,null,void 0,n.lastEffect);break;default:n.memoizedState=null}return n.child}function Lt(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),Gi|=n.lanes,o&n.childLanes){if(e!==null&&n.child!==e.child)throw Error(P(153));if(n.child!==null){for(e=n.child,o=rr(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=rr(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}return null}var Fn,Vo,Gl,xa;Fn=function(e,n){for(var o=n.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Vo=function(){},Gl=function(e,n,o,s){var u=e.memoizedProps;if(u!==s){e=n.stateNode,Xn($t.current);var f=null;switch(o){case"input":u=Z(e,u),s=Z(e,s),f=[];break;case"option":u=Dr(e,u),s=Dr(e,s),f=[];break;case"select":u=R({},u,{value:void 0}),s=R({},s,{value:void 0}),f=[];break;case"textarea":u=Y(e,u),s=Y(e,s),f=[];break;default:typeof u.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=Tl)}Zt(o,s);var m;o=null;for(C in u)if(!s.hasOwnProperty(C)&&u.hasOwnProperty(C)&&u[C]!=null)if(C==="style"){var y=u[C];for(m in y)y.hasOwnProperty(m)&&(o||(o={}),o[m]="")}else C!=="dangerouslySetInnerHTML"&&C!=="children"&&C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&C!=="autoFocus"&&(_e.hasOwnProperty(C)?f||(f=[]):(f=f||[]).push(C,null));for(C in s){var w=s[C];if(y=u?.[C],s.hasOwnProperty(C)&&w!==y&&(w!=null||y!=null))if(C==="style")if(y){for(m in y)!y.hasOwnProperty(m)||w&&w.hasOwnProperty(m)||(o||(o={}),o[m]="");for(m in w)w.hasOwnProperty(m)&&y[m]!==w[m]&&(o||(o={}),o[m]=w[m])}else o||(f||(f=[]),f.push(C,o)),o=w;else C==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,y=y?y.__html:void 0,w!=null&&y!==w&&(f=f||[]).push(C,w)):C==="children"?typeof w!="string"&&typeof w!="number"||(f=f||[]).push(C,""+w):C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&(_e.hasOwnProperty(C)?(w!=null&&C==="onScroll"&&$e("scroll",e),f||y===w||(f=[])):typeof w=="object"&&w!==null&&w.$$typeof===he?w.toString():(f=f||[]).push(C,w))}o&&(f=f||[]).push("style",o);var C=f;(n.updateQueue=C)&&(n.flags|=4)}},xa=function(e,n,o,s){o!==s&&(n.flags|=4)};function ri(e,n){if(!Kt)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ea(e,n,o){var s=n.pendingProps;switch(n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Qt(n.type)&&Li(),null;case 3:return Zi(),ye(Ht),ye(_t),la(),s=n.stateNode,s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Ml(n)?n.flags|=4:s.hydrate||(n.flags|=256)),Vo(n),null;case 5:wr(n);var u=Xn(Mo.current);if(o=n.type,e!==null&&n.stateNode!=null)Gl(e,n,o,s,u),e.ref!==n.ref&&(n.flags|=128);else{if(!s){if(n.stateNode===null)throw Error(P(166));return null}if(e=Xn($t.current),Ml(n)){s=n.stateNode,o=n.type;var f=n.memoizedProps;switch(s[fr]=n,s[kl]=f,o){case"dialog":$e("cancel",s),$e("close",s);break;case"iframe":case"object":case"embed":$e("load",s);break;case"video":case"audio":for(e=0;e<Oo.length;e++)$e(Oo[e],s);break;case"source":$e("error",s);break;case"img":case"image":case"link":$e("error",s),$e("load",s);break;case"details":$e("toggle",s);break;case"input":vt(s,f),$e("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!f.multiple},$e("invalid",s);break;case"textarea":sn(s,f),$e("invalid",s)}Zt(o,f),e=null;for(var m in f)f.hasOwnProperty(m)&&(u=f[m],m==="children"?typeof u=="string"?s.textContent!==u&&(e=["children",u]):typeof u=="number"&&s.textContent!==""+u&&(e=["children",""+u]):_e.hasOwnProperty(m)&&u!=null&&m==="onScroll"&&$e("scroll",s));switch(o){case"input":sr(s),kt(s,f,!0);break;case"textarea":sr(s),ge(s);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(s.onclick=Tl)}s=e,n.updateQueue=s,s!==null&&(n.flags|=4)}else{switch(m=u.nodeType===9?u:u.ownerDocument,e===ve.html&&(e=Ba(o)),e===ve.html?o==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=m.createElement(o,{is:s.is}):(e=m.createElement(o),o==="select"&&(m=e,s.multiple?m.multiple=!0:s.size&&(m.size=s.size))):e=m.createElementNS(e,o),e[fr]=n,e[kl]=s,Fn(e,n,!1,!1),n.stateNode=e,m=al(o,s),o){case"dialog":$e("cancel",e),$e("close",e),u=s;break;case"iframe":case"object":case"embed":$e("load",e),u=s;break;case"video":case"audio":for(u=0;u<Oo.length;u++)$e(Oo[u],e);u=s;break;case"source":$e("error",e),u=s;break;case"img":case"image":case"link":$e("error",e),$e("load",e),u=s;break;case"details":$e("toggle",e),u=s;break;case"input":vt(e,s),u=Z(e,s),$e("invalid",e);break;case"option":u=Dr(e,s);break;case"select":e._wrapperState={wasMultiple:!!s.multiple},u=R({},s,{value:void 0}),$e("invalid",e);break;case"textarea":sn(e,s),u=Y(e,s),$e("invalid",e);break;default:u=s}Zt(o,u);var y=u;for(f in y)if(y.hasOwnProperty(f)){var w=y[f];f==="style"?Wa(e,w):f==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,w!=null&&Ua(e,w)):f==="children"?typeof w=="string"?(o!=="textarea"||w!=="")&&mo(e,w):typeof w=="number"&&mo(e,""+w):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(_e.hasOwnProperty(f)?w!=null&&f==="onScroll"&&$e("scroll",e):w!=null&&ce(e,f,w,m))}switch(o){case"input":sr(e),kt(e,s,!1);break;case"textarea":sr(e),ge(e);break;case"option":s.value!=null&&e.setAttribute("value",""+Ut(s.value));break;case"select":e.multiple=!!s.multiple,f=s.value,f!=null?Un(e,!!s.multiple,f,!1):s.defaultValue!=null&&Un(e,!!s.multiple,s.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=Tl)}Iu(o,s)&&(n.flags|=4)}n.ref!==null&&(n.flags|=128)}return null;case 6:if(e&&n.stateNode!=null)xa(e,n,e.memoizedProps,s);else{if(typeof s!="string"&&n.stateNode===null)throw Error(P(166));o=Xn(Mo.current),Xn($t.current),Ml(n)?(s=n.stateNode,o=n.memoizedProps,s[fr]=n,s.nodeValue!==o&&(n.flags|=4)):(s=(o.nodeType===9?o:o.ownerDocument).createTextNode(s),s[fr]=n,n.stateNode=s)}return null;case 13:return ye(et),s=n.memoizedState,n.flags&64?(n.lanes=o,n):(s=s!==null,o=!1,e===null?n.memoizedProps.fallback!==void 0&&Ml(n):o=e.memoizedState!==null,s&&!o&&n.mode&2&&(e===null&&n.memoizedProps.unstable_avoidThisFallback!==!0||et.current&1?Pt===0&&(Pt=3):((Pt===0||Pt===3)&&(Pt=4),Mt===null||!(Gi&134217727)&&!(Sr&134217727)||kr(Mt,bt))),(s||o)&&(n.flags|=4),null);case 4:return Zi(),Vo(n),e===null&&Us(n.stateNode.containerInfo),null;case 10:return ta(n),null;case 17:return Qt(n.type)&&Li(),null;case 19:if(ye(et),s=n.memoizedState,s===null)return null;if(f=(n.flags&64)!==0,m=s.rendering,m===null)if(f)ri(s,!1);else{if(Pt!==0||e!==null&&e.flags&64)for(e=n.child;e!==null;){if(m=Wi(e),m!==null){for(n.flags|=64,ri(s,!1),f=m.updateQueue,f!==null&&(n.updateQueue=f,n.flags|=4),s.lastEffect===null&&(n.firstEffect=null),n.lastEffect=s.lastEffect,s=o,o=n.child;o!==null;)f=o,e=s,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,m=f.alternate,m===null?(f.childLanes=0,f.lanes=e,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=m.childLanes,f.lanes=m.lanes,f.child=m.child,f.memoizedProps=m.memoizedProps,f.memoizedState=m.memoizedState,f.updateQueue=m.updateQueue,f.type=m.type,e=m.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return Se(et,et.current&1|2),n.child}e=e.sibling}s.tail!==null&&Ct()>Xi&&(n.flags|=64,f=!0,ri(s,!1),n.lanes=33554432)}else{if(!f)if(e=Wi(m),e!==null){if(n.flags|=64,f=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),ri(s,!0),s.tail===null&&s.tailMode==="hidden"&&!m.alternate&&!Kt)return n=n.lastEffect=s.lastEffect,n!==null&&(n.nextEffect=null),null}else 2*Ct()-s.renderingStartTime>Xi&&o!==1073741824&&(n.flags|=64,f=!0,ri(s,!1),n.lanes=33554432);s.isBackwards?(m.sibling=n.child,n.child=m):(o=s.last,o!==null?o.sibling=m:n.child=m,s.last=m)}return s.tail!==null?(o=s.tail,s.rendering=o,s.tail=o.sibling,s.lastEffect=n.lastEffect,s.renderingStartTime=Ct(),o.sibling=null,n=et.current,Se(et,f?n&1|2:n&1),o):null;case 23:case 24:return qo(),e!==null&&e.memoizedState!==null!=(n.memoizedState!==null)&&s.mode!=="unstable-defer-without-hiding"&&(n.flags|=4),null}throw Error(P(156,n.tag))}function Sa(e){switch(e.tag){case 1:Qt(e.type)&&Li();var n=e.flags;return n&4096?(e.flags=n&-4097|64,e):null;case 3:if(Zi(),ye(Ht),ye(_t),la(),n=e.flags,n&64)throw Error(P(285));return e.flags=n&-4097|64,e;case 5:return wr(e),null;case 13:return ye(et),n=e.flags,n&4096?(e.flags=n&-4097|64,e):null;case 19:return ye(et),null;case 4:return Zi(),null;case 10:return ta(e),null;case 23:case 24:return qo(),null;default:return null}}function Ho(e,n){try{var o="",s=n;do o+=ps(s),s=s.return;while(s);var u=o}catch(f){u=`
31
+ Error generating stack: `+f.message+`
32
+ `+f.stack}return{value:e,source:n,stack:u}}function $i(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var sd=typeof WeakMap=="function"?WeakMap:Map;function rc(e,n,o){o=de(-1,o),o.tag=3,o.payload={element:null};var s=n.value;return o.callback=function(){Ji||(Ji=!0,is=s),$i(e,n)},o}function Ta(e,n,o){o=de(-1,o),o.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var u=n.value;o.payload=function(){return $i(e,n),s(u)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(o.callback=function(){typeof s!="function"&&(Sn===null?Sn=new Set([this]):Sn.add(this),$i(e,n));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})}),o}var ic=typeof WeakSet=="function"?WeakSet:Set;function Ft(e){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){nr(e,o)}else n.current=null}function oc(e,n){switch(n.tag){case 0:case 11:case 15:case 22:return;case 1:if(n.flags&256&&e!==null){var o=e.memoizedProps,s=e.memoizedState;e=n.stateNode,n=e.getSnapshotBeforeUpdate(n.elementType===n.type?o:En(n.type,o),s),e.__reactInternalSnapshotBeforeUpdate=n}return;case 3:n.flags&256&&Qs(n.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(P(163))}function Ca(e,n,o){switch(o.tag){case 0:case 11:case 15:case 22:if(n=o.updateQueue,n=n!==null?n.lastEffect:null,n!==null){e=n=n.next;do{if((e.tag&3)===3){var s=e.create;e.destroy=s()}e=e.next}while(e!==n)}if(n=o.updateQueue,n=n!==null?n.lastEffect:null,n!==null){e=n=n.next;do{var u=e;s=u.next,u=u.tag,u&4&&u&1&&(Yt(o,e),fc(o,e)),e=s}while(e!==n)}return;case 1:e=o.stateNode,o.flags&4&&(n===null?e.componentDidMount():(s=o.elementType===o.type?n.memoizedProps:En(o.type,n.memoizedProps),e.componentDidUpdate(s,n.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),n=o.updateQueue,n!==null&&Al(o,n,e);return;case 3:if(n=o.updateQueue,n!==null){if(e=null,o.child!==null)switch(o.child.tag){case 5:e=o.child.stateNode;break;case 1:e=o.child.stateNode}Al(o,n,e)}return;case 5:e=o.stateNode,n===null&&o.flags&4&&Iu(o.type,o.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:o.memoizedState===null&&(o=o.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&Ka(o))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(P(163))}function ct(e,n){for(var o=e;;){if(o.tag===5){var s=o.stateNode;if(n)s=s.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{s=o.stateNode;var u=o.memoizedProps.style;u=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Za("display",u)}}else if(o.tag===6)o.stateNode.nodeValue=n?"":o.memoizedProps;else if((o.tag!==23&&o.tag!==24||o.memoizedState===null||o===e)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)break;for(;o.sibling===null;){if(o.return===null||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function Pa(e,n){if(qn&&typeof qn.onCommitFiberUnmount=="function")try{qn.onCommitFiberUnmount(qs,n)}catch{}switch(n.tag){case 0:case 11:case 14:case 15:case 22:if(e=n.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var o=e=e.next;do{var s=o,u=s.destroy;if(s=s.tag,u!==void 0)if(s&4)Yt(n,o);else{s=n;try{u()}catch(f){nr(s,f)}}o=o.next}while(o!==e)}break;case 1:if(Ft(n),e=n.stateNode,typeof e.componentWillUnmount=="function")try{e.props=n.memoizedProps,e.state=n.memoizedState,e.componentWillUnmount()}catch(f){nr(n,f)}break;case 5:Ft(n);break;case 4:Jl(e,n)}}function ql(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Le(e){return e.tag===5||e.tag===3||e.tag===4}function Yl(e){e:{for(var n=e.return;n!==null;){if(Le(n))break e;n=n.return}throw Error(P(160))}var o=n;switch(n=o.stateNode,o.tag){case 5:var s=!1;break;case 3:n=n.containerInfo,s=!0;break;case 4:n=n.containerInfo,s=!0;break;default:throw Error(P(161))}o.flags&16&&(mo(n,""),o.flags&=-17);e:t:for(o=e;;){for(;o.sibling===null;){if(o.return===null||Le(o.return)){o=null;break e}o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue t;o.child.return=o,o=o.child}if(!(o.flags&2)){o=o.stateNode;break e}}s?Xl(e,o,n):Ki(e,o,n)}function Xl(e,n,o){var s=e.tag,u=s===5||s===6;if(u)e=u?e.stateNode:e.stateNode.instance,n?o.nodeType===8?o.parentNode.insertBefore(e,n):o.insertBefore(e,n):(o.nodeType===8?(n=o.parentNode,n.insertBefore(e,o)):(n=o,n.appendChild(e)),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=Tl));else if(s!==4&&(e=e.child,e!==null))for(Xl(e,n,o),e=e.sibling;e!==null;)Xl(e,n,o),e=e.sibling}function Ki(e,n,o){var s=e.tag,u=s===5||s===6;if(u)e=u?e.stateNode:e.stateNode.instance,n?o.insertBefore(e,n):o.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(Ki(e,n,o),e=e.sibling;e!==null;)Ki(e,n,o),e=e.sibling}function Jl(e,n){for(var o=n,s=!1,u,f;;){if(!s){s=o.return;e:for(;;){if(s===null)throw Error(P(160));switch(u=s.stateNode,s.tag){case 5:f=!1;break e;case 3:u=u.containerInfo,f=!0;break e;case 4:u=u.containerInfo,f=!0;break e}s=s.return}s=!0}if(o.tag===5||o.tag===6){e:for(var m=e,y=o,w=y;;)if(Pa(m,w),w.child!==null&&w.tag!==4)w.child.return=w,w=w.child;else{if(w===y)break e;for(;w.sibling===null;){if(w.return===null||w.return===y)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}f?(m=u,y=o.stateNode,m.nodeType===8?m.parentNode.removeChild(y):m.removeChild(y)):u.removeChild(o.stateNode)}else if(o.tag===4){if(o.child!==null){u=o.stateNode.containerInfo,f=!0,o.child.return=o,o=o.child;continue}}else if(Pa(e,o),o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return,o.tag===4&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function es(e,n){switch(n.tag){case 0:case 11:case 14:case 15:case 22:var o=n.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var s=o=o.next;do(s.tag&3)===3&&(e=s.destroy,s.destroy=void 0,e!==void 0&&e()),s=s.next;while(s!==o)}return;case 1:return;case 5:if(o=n.stateNode,o!=null){s=n.memoizedProps;var u=e!==null?e.memoizedProps:s;e=n.type;var f=n.updateQueue;if(n.updateQueue=null,f!==null){for(o[kl]=s,e==="input"&&s.type==="radio"&&s.name!=null&&me(o,s),al(e,u),n=al(e,s),u=0;u<f.length;u+=2){var m=f[u],y=f[u+1];m==="style"?Wa(o,y):m==="dangerouslySetInnerHTML"?Ua(o,y):m==="children"?mo(o,y):ce(o,m,y,n)}switch(e){case"input":ll(o,s);break;case"textarea":gs(o,s);break;case"select":e=o._wrapperState.wasMultiple,o._wrapperState.wasMultiple=!!s.multiple,f=s.value,f!=null?Un(o,!!s.multiple,f,!1):e!==!!s.multiple&&(s.defaultValue!=null?Un(o,!!s.multiple,s.defaultValue,!0):Un(o,!!s.multiple,s.multiple?[]:"",!1))}}}return;case 6:if(n.stateNode===null)throw Error(P(162));n.stateNode.nodeValue=n.memoizedProps;return;case 3:o=n.stateNode,o.hydrate&&(o.hydrate=!1,Ka(o.containerInfo));return;case 12:return;case 13:n.memoizedState!==null&&(rs=Ct(),ct(n.child,!0)),ii(n);return;case 19:ii(n);return;case 17:return;case 23:case 24:ct(n,n.memoizedState!==null);return}throw Error(P(163))}function ii(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new ic),n.forEach(function(s){var u=ud.bind(null,e,s);o.has(s)||(o.add(s),s.then(u,u))})}}function ts(e,n){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(n=n.memoizedState,n!==null&&n.dehydrated===null):!1}var ka=Math.ceil,Qo=q.ReactCurrentDispatcher,$o=q.ReactCurrentOwner,se=0,Mt=null,dt=null,bt=0,oi=0,Ra=hr(0),Pt=0,ns=null,hn=0,Gi=0,Sr=0,qi=0,Yi=null,rs=0,Xi=1/0;function li(){Xi=Ct()+500}var V=null,Ji=!1,is=null,Sn=null,er=!1,si=null,Mn=90,eo=[],Ko=[],zn=null,Tr=0,Cr=null,ai=-1,Gt=0,to=0,Pr=null,St=!1;function qt(){return se&48?Ct():ai!==-1?ai:ai=Ct()}function Bn(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Mi()===99?1:2;if(Gt===0&&(Gt=hn),ld.transition!==0){to!==0&&(to=Yi!==null?Yi.pendingLanes:0),e=Gt;var n=4186112&~to;return n&=-n,n===0&&(e=4186112&~e,n=e&-e,n===0&&(n=8192)),n}return e=Mi(),se&4&&e===98?e=pl(12,Gt):(e=Uc(e),e=pl(e,Gt)),e}function tr(e,n,o){if(50<Tr)throw Tr=0,Cr=null,Error(P(185));if(e=Go(e,n),e===null)return null;E(e,n,o),e===Mt&&(Sr|=n,Pt===4&&kr(e,bt));var s=Mi();n===1?se&8&&!(se&48)?os(e):(zt(e,o),se===0&&(li(),An())):(!(se&4)||s!==98&&s!==99||(zn===null?zn=new Set([e]):zn.add(e)),zt(e,o)),Yi=e}function Go(e,n){e.lanes|=n;var o=e.alternate;for(o!==null&&(o.lanes|=n),o=e,e=e.return;e!==null;)e.childLanes|=n,o=e.alternate,o!==null&&(o.childLanes|=n),o=e,e=e.return;return o.tag===3?o.stateNode:null}function zt(e,n){for(var o=e.callbackNode,s=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes;0<m;){var y=31-On(m),w=1<<y,C=f[y];if(C===-1){if(!(w&s)||w&u){C=n,Ei(w);var B=Qe;f[y]=10<=B?C+250:6<=B?C+5e3:-1}}else C<=n&&(e.expiredLanes|=w);m&=~w}if(s=Si(e,e===Mt?bt:0),n=Qe,s===0)o!==null&&(o!==Xs&&Fi(o),e.callbackNode=null,e.callbackPriority=0);else{if(o!==null){if(e.callbackPriority===n)return;o!==Xs&&Fi(o)}n===15?(o=os.bind(null,e),Dn===null?(Dn=[o],Ao=Ys(Rl,bl)):Dn.push(o),o=Xs):n===14?o=Rt(99,os.bind(null,e)):(o=Zc(n),o=Rt(o,no.bind(null,e))),e.callbackPriority=n,e.callbackNode=o}}function no(e){if(ai=-1,to=Gt=0,se&48)throw Error(P(327));var n=e.callbackNode;if(Tn()&&e.callbackNode!==n)return null;var o=Si(e,e===Mt?bt:0);if(o===0)return null;var s=o,u=se;se|=16;var f=Ia();(Mt!==e||bt!==s)&&(li(),ro(e,s));do try{cc();break}catch(y){ac(e,y)}while(!0);if(ea(),Qo.current=f,se=u,dt!==null?s=0:(Mt=null,bt=0,s=Pt),hn&Sr)ro(e,0);else if(s!==0){if(s===2&&(se|=64,e.hydrate&&(e.hydrate=!1,Qs(e.containerInfo)),o=tu(e),o!==0&&(s=Yo(e,o))),s===1)throw n=ns,ro(e,0),kr(e,o),zt(e,Ct()),n;switch(e.finishedWork=e.current.alternate,e.finishedLanes=o,s){case 0:case 1:throw Error(P(345));case 2:Rr(e);break;case 3:if(kr(e,o),(o&62914560)===o&&(s=rs+500-Ct(),10<s)){if(Si(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){qt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Ou(Rr.bind(null,e),s);break}Rr(e);break;case 4:if(kr(e,o),(o&4186112)===o)break;for(s=e.eventTimes,u=-1;0<o;){var m=31-On(o);f=1<<m,m=s[m],m>u&&(u=m),o&=~f}if(o=u,o=Ct()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*ka(o/1960))-o,10<o){e.timeoutHandle=Ou(Rr.bind(null,e),o);break}Rr(e);break;case 5:Rr(e);break;default:throw Error(P(329))}}return zt(e,Ct()),e.callbackNode===n?no.bind(null,e):null}function kr(e,n){for(n&=~qi,n&=~Sr,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-On(n),s=1<<o;e[o]=-1,n&=~s}}function os(e){if(se&48)throw Error(P(327));if(Tn(),e===Mt&&e.expiredLanes&bt){var n=bt,o=Yo(e,n);hn&Sr&&(n=Si(e,n),o=Yo(e,n))}else n=Si(e,0),o=Yo(e,n);if(e.tag!==0&&o===2&&(se|=64,e.hydrate&&(e.hydrate=!1,Qs(e.containerInfo)),n=tu(e),n!==0&&(o=Yo(e,n))),o===1)throw o=ns,ro(e,0),kr(e,n),zt(e,Ct()),o;return e.finishedWork=e.current.alternate,e.finishedLanes=n,Rr(e),zt(e,Ct()),null}function ad(){if(zn!==null){var e=zn;zn=null,e.forEach(function(n){n.expiredLanes|=24&n.pendingLanes,zt(n,Ct())})}An()}function lc(e,n){var o=se;se|=1;try{return e(n)}finally{se=o,se===0&&(li(),An())}}function sc(e,n){var o=se;se&=-2,se|=8;try{return e(n)}finally{se=o,se===0&&(li(),An())}}function ls(e,n){Se(Ra,oi),oi|=n,hn|=n}function qo(){oi=Ra.current,ye(Ra)}function ro(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,td(o)),dt!==null)for(o=dt.return;o!==null;){var s=o;switch(s.tag){case 1:s=s.type.childContextTypes,s!=null&&Li();break;case 3:Zi(),ye(Ht),ye(_t),la();break;case 5:wr(s);break;case 4:Zi();break;case 13:ye(et);break;case 19:ye(et);break;case 10:ta(s);break;case 23:case 24:qo()}o=o.return}Mt=e,dt=rr(e.current,null),bt=oi=hn=n,Pt=0,ns=null,qi=Sr=Gi=0}function ac(e,n){do{var o=dt;try{if(ea(),Xr.current=Wl,zl){for(var s=ot.memoizedState;s!==null;){var u=s.queue;u!==null&&(u.pending=null),s=s.next}zl=!1}if(Hi=0,gt=It=ot=null,Ie=!1,$o.current=null,o===null||o.return===null){Pt=1,ns=n,dt=null;break}e:{var f=e,m=o.return,y=o,w=n;if(n=bt,y.flags|=2048,y.firstEffect=y.lastEffect=null,w!==null&&typeof w=="object"&&typeof w.then=="function"){var C=w;if(!(y.mode&2)){var B=y.alternate;B?(y.updateQueue=B.updateQueue,y.memoizedState=B.memoizedState,y.lanes=B.lanes):(y.updateQueue=null,y.memoizedState=null)}var re=(et.current&1)!==0,A=m;do{var K;if(K=A.tag===13){var ue=A.memoizedState;if(ue!==null)K=ue.dehydrated!==null;else{var ie=A.memoizedProps;K=ie.fallback===void 0?!1:ie.unstable_avoidThisFallback!==!0?!0:!re}}if(K){var T=A.updateQueue;if(T===null){var x=new Set;x.add(C),A.updateQueue=x}else T.add(C);if(!(A.mode&2)){if(A.flags|=64,y.flags|=16384,y.flags&=-2981,y.tag===1)if(y.alternate===null)y.tag=17;else{var S=de(-1,1);S.tag=2,De(y,S)}y.lanes|=1;break e}w=void 0,y=n;var b=f.pingCache;if(b===null?(b=f.pingCache=new sd,w=new Set,b.set(C,w)):(w=b.get(C),w===void 0&&(w=new Set,b.set(C,w))),!w.has(y)){w.add(y);var N=hc.bind(null,f,C,y);C.then(N,N)}A.flags|=4096,A.lanes=n;break e}A=A.return}while(A!==null);w=Error((lt(y.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
33
+
34
+ Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Pt!==5&&(Pt=2),w=Ho(w,y),A=m;do{switch(A.tag){case 3:f=w,A.flags|=4096,n&=-n,A.lanes|=n;var ae=rc(A,f,n);Uu(A,ae);break e;case 1:f=w;var W=A.type,fe=A.stateNode;if(!(A.flags&64)&&(typeof W.getDerivedStateFromError=="function"||fe!==null&&typeof fe.componentDidCatch=="function"&&(Sn===null||!Sn.has(fe)))){A.flags|=4096,n&=-n,A.lanes|=n;var Pe=Ta(A,f,n);Uu(A,Pe);break e}}A=A.return}while(A!==null)}Oa(o)}catch(we){n=we,dt===o&&o!==null&&(dt=o=o.return);continue}break}while(!0)}function Ia(){var e=Qo.current;return Qo.current=Wl,e===null?Wl:e}function Yo(e,n){var o=se;se|=16;var s=Ia();Mt===e&&bt===n||ro(e,n);do try{uc();break}catch(u){ac(e,u)}while(!0);if(ea(),se=o,Qo.current=s,dt!==null)throw Error(P(261));return Mt=null,bt=0,Pt}function uc(){for(;dt!==null;)dc(dt)}function cc(){for(;dt!==null&&!Au();)dc(dt)}function dc(e){var n=Da(e.alternate,e,oi);e.memoizedProps=e.pendingProps,n===null?Oa(e):dt=n,$o.current=null}function Oa(e){var n=e;do{var o=n.alternate;if(e=n.return,n.flags&2048){if(o=Sa(n),o!==null){o.flags&=2047,dt=o;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(o=Ea(o,n,oi),o!==null){dt=o;return}if(o=n,o.tag!==24&&o.tag!==23||o.memoizedState===null||oi&1073741824||!(o.mode&4)){for(var s=0,u=o.child;u!==null;)s|=u.lanes|u.childLanes,u=u.sibling;o.childLanes=s}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=n.firstEffect),n.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=n.firstEffect),e.lastEffect=n.lastEffect),1<n.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=n:e.firstEffect=n,e.lastEffect=n))}if(n=n.sibling,n!==null){dt=n;return}dt=n=e}while(n!==null);Pt===0&&(Pt=5)}function Rr(e){var n=Mi();return xt(99,ba.bind(null,e,n)),null}function ba(e,n){do Tn();while(si!==null);if(se&48)throw Error(P(327));var o=e.finishedWork;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(P(177));e.callbackNode=null;var s=o.lanes|o.childLanes,u=s,f=e.pendingLanes&~u;e.pendingLanes=u,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=u,e.mutableReadLanes&=u,e.entangledLanes&=u,u=e.entanglements;for(var m=e.eventTimes,y=e.expirationTimes;0<f;){var w=31-On(f),C=1<<w;u[w]=0,m[w]=-1,y[w]=-1,f&=~C}if(zn!==null&&!(s&24)&&zn.has(e)&&zn.delete(e),e===Mt&&(dt=Mt=null,bt=0),1<o.flags?o.lastEffect!==null?(o.lastEffect.nextEffect=o,s=o.firstEffect):s=o:s=o.firstEffect,s!==null){if(u=se,se|=32,$o.current=null,Hs=xo,m=Cu(),Ro(m)){if("selectionStart"in m)y={start:m.selectionStart,end:m.selectionEnd};else e:if(y=(y=m.ownerDocument)&&y.defaultView||window,(C=y.getSelection&&y.getSelection())&&C.rangeCount!==0){y=C.anchorNode,f=C.anchorOffset,w=C.focusNode,C=C.focusOffset;try{y.nodeType,w.nodeType}catch{y=null;break e}var B=0,re=-1,A=-1,K=0,ue=0,ie=m,T=null;t:for(;;){for(var x;ie!==y||f!==0&&ie.nodeType!==3||(re=B+f),ie!==w||C!==0&&ie.nodeType!==3||(A=B+C),ie.nodeType===3&&(B+=ie.nodeValue.length),(x=ie.firstChild)!==null;)T=ie,ie=x;for(;;){if(ie===m)break t;if(T===y&&++K===f&&(re=B),T===w&&++ue===C&&(A=B),(x=ie.nextSibling)!==null)break;ie=T,T=ie.parentNode}ie=x}y=re===-1||A===-1?null:{start:re,end:A}}else y=null;y=y||{start:0,end:0}}else y=null;Cl={focusedElem:m,selectionRange:y},xo=!1,Pr=null,St=!1,V=s;do try{Na()}catch(we){if(V===null)throw Error(P(330));nr(V,we),V=V.nextEffect}while(V!==null);Pr=null,V=s;do try{for(m=e;V!==null;){var S=V.flags;if(S&16&&mo(V.stateNode,""),S&128){var b=V.alternate;if(b!==null){var N=b.ref;N!==null&&(typeof N=="function"?N(null):N.current=null)}}switch(S&1038){case 2:Yl(V),V.flags&=-3;break;case 6:Yl(V),V.flags&=-3,es(V.alternate,V);break;case 1024:V.flags&=-1025;break;case 1028:V.flags&=-1025,es(V.alternate,V);break;case 4:es(V.alternate,V);break;case 8:y=V,Jl(m,y);var ae=y.alternate;ql(y),ae!==null&&ql(ae)}V=V.nextEffect}}catch(we){if(V===null)throw Error(P(330));nr(V,we),V=V.nextEffect}while(V!==null);if(N=Cl,b=Cu(),S=N.focusedElem,m=N.selectionRange,b!==S&&S&&S.ownerDocument&&ko(S.ownerDocument.documentElement,S)){for(m!==null&&Ro(S)&&(b=m.start,N=m.end,N===void 0&&(N=b),"selectionStart"in S?(S.selectionStart=b,S.selectionEnd=Math.min(N,S.value.length)):(N=(b=S.ownerDocument||document)&&b.defaultView||window,N.getSelection&&(N=N.getSelection(),y=S.textContent.length,ae=Math.min(m.start,y),m=m.end===void 0?ae:Math.min(m.end,y),!N.extend&&ae>m&&(y=m,m=ae,ae=y),y=Oi(S,ae),f=Oi(S,m),y&&f&&(N.rangeCount!==1||N.anchorNode!==y.node||N.anchorOffset!==y.offset||N.focusNode!==f.node||N.focusOffset!==f.offset)&&(b=b.createRange(),b.setStart(y.node,y.offset),N.removeAllRanges(),ae>m?(N.addRange(b),N.extend(f.node,f.offset)):(b.setEnd(f.node,f.offset),N.addRange(b)))))),b=[],N=S;N=N.parentNode;)N.nodeType===1&&b.push({element:N,left:N.scrollLeft,top:N.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<b.length;S++)N=b[S],N.element.scrollLeft=N.left,N.element.scrollTop=N.top}xo=!!Hs,Cl=Hs=null,e.current=o,V=s;do try{for(S=e;V!==null;){var W=V.flags;if(W&36&&Ca(S,V.alternate,V),W&128){b=void 0;var fe=V.ref;if(fe!==null){var Pe=V.stateNode;switch(V.tag){case 5:b=Pe;break;default:b=Pe}typeof fe=="function"?fe(b):fe.current=b}}V=V.nextEffect}}catch(we){if(V===null)throw Error(P(330));nr(V,we),V=V.nextEffect}while(V!==null);V=null,od(),se=u}else e.current=o;if(er)er=!1,si=e,Mn=n;else for(V=s;V!==null;)n=V.nextEffect,V.nextEffect=null,V.flags&8&&(W=V,W.sibling=null,W.stateNode=null),V=n;if(s=e.pendingLanes,s===0&&(Sn=null),s===1?e===Cr?Tr++:(Tr=0,Cr=e):Tr=0,o=o.stateNode,qn&&typeof qn.onCommitFiberRoot=="function")try{qn.onCommitFiberRoot(qs,o,void 0,(o.current.flags&64)===64)}catch{}if(zt(e,Ct()),Ji)throw Ji=!1,e=is,is=null,e;return se&8||An(),null}function Na(){for(;V!==null;){var e=V.alternate;St||Pr===null||(V.flags&8?xn(V,Pr)&&(St=!0):V.tag===13&&ts(e,V)&&xn(V,Pr)&&(St=!0));var n=V.flags;n&256&&oc(e,V),!(n&512)||er||(er=!0,Rt(97,function(){return Tn(),null})),V=V.nextEffect}}function Tn(){if(Mn!==90){var e=97<Mn?97:Mn;return Mn=90,xt(e,Ir)}return!1}function fc(e,n){eo.push(n,e),er||(er=!0,Rt(97,function(){return Tn(),null}))}function Yt(e,n){Ko.push(n,e),er||(er=!0,Rt(97,function(){return Tn(),null}))}function Ir(){if(si===null)return!1;var e=si;if(si=null,se&48)throw Error(P(331));var n=se;se|=32;var o=Ko;Ko=[];for(var s=0;s<o.length;s+=2){var u=o[s],f=o[s+1],m=u.destroy;if(u.destroy=void 0,typeof m=="function")try{m()}catch(w){if(f===null)throw Error(P(330));nr(f,w)}}for(o=eo,eo=[],s=0;s<o.length;s+=2){u=o[s],f=o[s+1];try{var y=u.create;u.destroy=y()}catch(w){if(f===null)throw Error(P(330));nr(f,w)}}for(y=e.current.firstEffect;y!==null;)e=y.nextEffect,y.nextEffect=null,y.flags&8&&(y.sibling=null,y.stateNode=null),y=e;return se=n,An(),!0}function pc(e,n,o){n=Ho(o,n),n=rc(e,n,1),De(e,n),n=qt(),e=Go(e,1),e!==null&&(E(e,1,n),zt(e,n))}function nr(e,n){if(e.tag===3)pc(e,e,n);else for(var o=e.return;o!==null;){if(o.tag===3){pc(o,e,n);break}else if(o.tag===1){var s=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Sn===null||!Sn.has(s))){e=Ho(n,e);var u=Ta(o,e,1);if(De(o,u),u=qt(),o=Go(o,1),o!==null)E(o,1,u),zt(o,u);else if(typeof s.componentDidCatch=="function"&&(Sn===null||!Sn.has(s)))try{s.componentDidCatch(n,e)}catch{}break}}o=o.return}}function hc(e,n,o){var s=e.pingCache;s!==null&&s.delete(n),n=qt(),e.pingedLanes|=e.suspendedLanes&o,Mt===e&&(bt&o)===o&&(Pt===4||Pt===3&&(bt&62914560)===bt&&500>Ct()-rs?ro(e,0):qi|=o),zt(e,n)}function ud(e,n){var o=e.stateNode;o!==null&&o.delete(n),n=0,n===0&&(n=e.mode,n&2?n&4?(Gt===0&&(Gt=hn),n=Ti(62914560&~Gt),n===0&&(n=4194304)):n=Mi()===99?1:2:n=1),o=qt(),e=Go(e,n),e!==null&&(E(e,n,o),zt(e,o))}var Da;Da=function(e,n,o){var s=n.lanes;if(e!==null)if(e.memoizedProps!==n.pendingProps||Ht.current)on=!0;else if(o&s)on=!!(e.flags&16384);else{switch(on=!1,n.tag){case 3:va(n),Ye();break;case 5:Yr(n);break;case 1:Qt(n.type)&&No(n);break;case 4:oa(n,n.stateNode.containerInfo);break;case 10:s=n.memoizedProps.value;var u=n.type._context;Se(Nl,u._currentValue),u._currentValue=s;break;case 13:if(n.memoizedState!==null)return o&n.child.childLanes?Ot(e,n,o):(Se(et,et.current&1),n=Lt(e,n,o),n!==null?n.sibling:null);Se(et,et.current&1);break;case 19:if(s=(o&n.childLanes)!==0,e.flags&64){if(s)return Wo(e,n,o);n.flags|=64}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Se(et,et.current),s)break;return null;case 23:case 24:return n.lanes=0,ma(e,n,o)}return Lt(e,n,o)}else on=!1;switch(n.lanes=0,n.tag){case 2:if(s=n.type,e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),e=n.pendingProps,u=gr(n,_t.current),zi(n,o),u=Ke(null,n,s,e,u,o),n.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0){if(n.tag=1,n.memoizedState=null,n.updateQueue=null,Qt(s)){var f=!0;No(n)}else f=!1;n.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,ra(n);var m=s.getDerivedStateFromProps;typeof m=="function"&&Bi(n,s,m,e),u.updater=jl,n.stateNode=u,u._reactInternals=n,ia(n,s,e,o),n=Hl(null,n,s,!0,f,o)}else n.tag=0,jt(null,n,u,o),n=n.child;return n;case 16:u=n.elementType;e:{switch(e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),e=n.pendingProps,f=u._init,u=f(u._payload),n.type=u,f=n.tag=gc(u),e=En(u,e),f){case 0:n=ga(null,n,u,e,o);break e;case 1:n=ya(null,n,u,e,o);break e;case 11:n=Et(null,n,u,e,o);break e;case 14:n=Vl(null,n,u,En(u.type,e),s,o);break e}throw Error(P(306,u,""))}return n;case 0:return s=n.type,u=n.pendingProps,u=n.elementType===s?u:En(s,u),ga(e,n,s,u,o);case 1:return s=n.type,u=n.pendingProps,u=n.elementType===s?u:En(s,u),ya(e,n,s,u,o);case 3:if(va(n),s=n.updateQueue,e===null||s===null)throw Error(P(282));if(s=n.pendingProps,u=n.memoizedState,u=u!==null?u.element:null,Bu(e,n),rn(n,s,null,o),s=n.memoizedState.element,s===u)Ye(),n=Lt(e,n,o);else{if(u=n.stateNode,(f=u.hydrate)&&(_r=Di(n.stateNode.containerInfo.firstChild),Jn=n,f=Kt=!0),f){if(e=u.mutableSourceEagerHydrationData,e!=null)for(u=0;u<e.length;u+=2)f=e[u],f._workInProgressVersionPrimary=e[u+1],We.push(f);for(o=Fl(n,null,s,o),n.child=o;o;)o.flags=o.flags&-3|1024,o=o.sibling}else jt(e,n,s,o),Ye();n=n.child}return n;case 5:return Yr(n),e===null&&zo(n),s=n.type,u=n.pendingProps,f=e!==null?e.memoizedProps:null,m=u.children,Pl(s,u)?m=null:f!==null&&Pl(s,f)&&(n.flags|=16),tc(e,n),jt(e,n,m,o),n.child;case 6:return e===null&&zo(n),null;case 13:return Ot(e,n,o);case 4:return oa(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=Ll(n,null,s,o):jt(e,n,s,o),n.child;case 11:return s=n.type,u=n.pendingProps,u=n.elementType===s?u:En(s,u),Et(e,n,s,u,o);case 7:return jt(e,n,n.pendingProps,o),n.child;case 8:return jt(e,n,n.pendingProps.children,o),n.child;case 12:return jt(e,n,n.pendingProps.children,o),n.child;case 10:e:{s=n.type._context,u=n.pendingProps,m=n.memoizedProps,f=u.value;var y=n.type._context;if(Se(Nl,y._currentValue),y._currentValue=f,m!==null)if(y=m.value,f=Vt(y,f)?0:(typeof s._calculateChangedBits=="function"?s._calculateChangedBits(y,f):1073741823)|0,f===0){if(m.children===u.children&&!Ht.current){n=Lt(e,n,o);break e}}else for(y=n.child,y!==null&&(y.return=n);y!==null;){var w=y.dependencies;if(w!==null){m=y.child;for(var C=w.firstContext;C!==null;){if(C.context===s&&C.observedBits&f){y.tag===1&&(C=de(-1,o&-o),C.tag=2,De(y,C)),y.lanes|=o,C=y.alternate,C!==null&&(C.lanes|=o),na(y.return,o),w.lanes|=o;break}C=C.next}}else m=y.tag===10&&y.type===n.type?null:y.child;if(m!==null)m.return=y;else for(m=y;m!==null;){if(m===n){m=null;break}if(y=m.sibling,y!==null){y.return=m.return,m=y;break}m=m.return}y=m}jt(e,n,u.children,o),n=n.child}return n;case 9:return u=n.type,f=n.pendingProps,s=f.children,zi(n,o),u=fn(u,f.unstable_observedBits),s=s(u),n.flags|=1,jt(e,n,s,o),n.child;case 14:return u=n.type,f=En(u,n.pendingProps),f=En(u.type,f),Vl(e,n,u,f,s,o);case 15:return ha(e,n,n.type,n.pendingProps,s,o);case 17:return s=n.type,u=n.pendingProps,u=n.elementType===s?u:En(s,u),e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2),n.tag=1,Qt(s)?(e=!0,No(n)):e=!1,zi(n,o),Vu(n,s,u),ia(n,s,u,o),Hl(null,n,s,!0,e,o);case 19:return Wo(e,n,o);case 23:return ma(e,n,o);case 24:return ma(e,n,o)}throw Error(P(156,n.tag))};function mc(e,n,o,s){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,n,o,s){return new mc(e,n,o,s)}function io(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gc(e){if(typeof e=="function")return io(e)?1:0;if(e!=null){if(e=e.$$typeof,e===G)return 11;if(e===le)return 14}return 2}function rr(e,n){var o=e.alternate;return o===null?(o=ln(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null),o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function oo(e,n,o,s,u,f){var m=2;if(s=e,typeof e=="function")io(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case je:return lo(o.children,u,f,n);case Ue:m=8,u|=16;break;case ze:m=8,u|=1;break;case L:return e=ln(12,o,n,u|8),e.elementType=L,e.type=L,e.lanes=f,e;case Ee:return e=ln(13,o,n,u),e.type=Ee,e.elementType=Ee,e.lanes=f,e;case U:return e=ln(19,o,n,u),e.elementType=U,e.lanes=f,e;case M:return Xo(o,u,f,n);case ee:return e=ln(24,o,n,u),e.elementType=ee,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Je:m=10;break e;case Te:m=9;break e;case G:m=11;break e;case le:m=14;break e;case pe:m=16,s=null;break e;case J:m=22;break e}throw Error(P(130,e==null?e:typeof e,""))}return n=ln(m,o,n,u),n.elementType=e,n.type=s,n.lanes=f,n}function lo(e,n,o,s){return e=ln(7,e,s,n),e.lanes=o,e}function Xo(e,n,o,s){return e=ln(23,e,s,n),e.elementType=M,e.lanes=o,e}function Jo(e,n,o){return e=ln(6,e,null,n),e.lanes=o,e}function el(e,n,o){return n=ln(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function yc(e,n,o){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=o,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ss(0),this.expirationTimes=Ss(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ss(0),this.mutableSourceEagerHydrationData=null}function Aa(e,n,o){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ae,key:s==null?null:""+s,children:e,containerInfo:n,implementation:o}}function so(e,n,o,s){var u=n.current,f=qt(),m=Bn(u);e:if(o){o=o._reactInternals;t:{if(Qn(o)!==o||o.tag!==1)throw Error(P(170));var y=o;do{switch(y.tag){case 3:y=y.stateNode.context;break t;case 1:if(Qt(y.type)){y=y.stateNode.__reactInternalMemoizedMergedChildContext;break t}}y=y.return}while(y!==null);throw Error(P(171))}if(o.tag===1){var w=o.type;if(Qt(w)){o=Du(o,w,y);break e}}o=y}else o=mr;return n.context===null?n.context=o:n.pendingContext=o,n=de(f,m),n.payload={element:e},s=s===void 0?null:s,s!==null&&(n.callback=s),De(u,n),tr(u,m,f),m}function ss(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 vc(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function ao(e,n){vc(e,n),(e=e.alternate)&&vc(e,n)}function wc(){return null}function mn(e,n,o){var s=o!=null&&o.hydrationOptions!=null&&o.hydrationOptions.mutableSources||null;if(o=new yc(e,n,o!=null&&o.hydrate===!0),n=ln(3,null,null,n===2?7:n===1?3:0),o.current=n,n.stateNode=o,ra(n),e[$r]=o.current,Us(e.nodeType===8?e.parentNode:e),s)for(e=0;e<s.length;e++){n=s[e];var u=n._getVersion;u=u(n._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[n,u]:o.mutableSourceEagerHydrationData.push(n,u)}this._internalRoot=o}mn.prototype.render=function(e){so(e,this._internalRoot,null,null)},mn.prototype.unmount=function(){var e=this._internalRoot,n=e.containerInfo;so(null,e,null,function(){n[$r]=null})};function gn(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ja(e,n){if(n||(n=e?e.nodeType===9?e.documentElement:e.firstChild:null,n=!(!n||n.nodeType!==1||!n.hasAttribute("data-reactroot"))),!n)for(var o;o=e.lastChild;)e.removeChild(o);return new mn(e,0,n?{hydrate:!0}:void 0)}function uo(e,n,o,s,u){var f=o._reactRootContainer;if(f){var m=f._internalRoot;if(typeof u=="function"){var y=u;u=function(){var C=ss(m);y.call(C)}}so(n,m,e,u)}else{if(f=o._reactRootContainer=ja(o,s),m=f._internalRoot,typeof u=="function"){var w=u;u=function(){var C=ss(m);w.call(C)}}sc(function(){so(n,m,e,u)})}return ss(m)}$n=function(e){if(e.tag===13){var n=qt();tr(e,4,n),ao(e,4)}},dr=function(e){if(e.tag===13){var n=qt();tr(e,67108864,n),ao(e,67108864)}},wi=function(e){if(e.tag===13){var n=qt(),o=Bn(e);tr(e,o,n),ao(e,o)}},_i=function(e,n){return n()},wn=function(e,n,o){switch(n){case"input":if(ll(e,o),n=o.name,o.type==="radio"&&n!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<o.length;n++){var s=o[n];if(s!==e&&s.form===e.form){var u=bo(s);if(!u)throw Error(P(90));po(s),ll(s,u)}}}break;case"textarea":gs(e,o);break;case"select":n=o.value,n!=null&&Un(e,!!o.multiple,n,!1)}},Zn=lc,Wn=function(e,n,o,s,u){var f=se;se|=4;try{return xt(98,e.bind(null,n,o,s,u))}finally{se=f,se===0&&(li(),An())}},an=function(){!(se&49)&&(ad(),Tn())},hi=function(e,n){var o=se;se|=2;try{return e(n)}finally{se=o,se===0&&(li(),An())}};function La(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!gn(n))throw Error(P(200));return Aa(e,n,null,o)}var ui={Events:[Gr,ji,bo,Ar,jr,Tn,{current:!1}]},co={findFiberByHostInstance:Kr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},Fa={bundleType:co.bundleType,version:co.version,rendererPackageName:co.rendererPackageName,rendererConfig:co.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:q.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Jt(e),e===null?null:e.stateNode},findFiberByHostInstance:co.findFiberByHostInstance||wc,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fo.isDisabled&&fo.supportsFiber)try{qs=fo.inject(Fa),qn=fo}catch{}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ui,Cn.createPortal=La,Cn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(P(188)):Error(P(268,Object.keys(e)));return e=Jt(n),e=e===null?null:e.stateNode,e},Cn.flushSync=function(e,n){var o=se;if(o&48)return e(n);se|=1;try{if(e)return xt(99,e.bind(null,n))}finally{se=o,An()}},Cn.hydrate=function(e,n,o){if(!gn(n))throw Error(P(200));return uo(null,e,n,!0,o)},Cn.render=function(e,n,o){if(!gn(n))throw Error(P(200));return uo(null,e,n,!1,o)},Cn.unmountComponentAtNode=function(e){if(!gn(e))throw Error(P(40));return e._reactRootContainer?(sc(function(){uo(null,null,e,!1,function(){e._reactRootContainer=null,e[$r]=null})}),!0):!1},Cn.unstable_batchedUpdates=lc,Cn.unstable_createPortal=function(e,n){return La(e,n,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)},Cn.unstable_renderSubtreeIntoContainer=function(e,n,o,s){if(!gn(o))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return uo(e,n,o,!1,s)},Cn.version="17.0.2",Cn}var Qf;function vh(){if(Qf)return Cd.exports;Qf=1;function _(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_)}catch(R){console.error(R)}}return _(),Cd.exports=yh(),Cd.exports}(function(_,R){var z={},P=Object.defineProperty,oe=Object.defineProperties,_e=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Tt=(nt,Ve,Ne)=>Ve in nt?P(nt,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):nt[Ve]=Ne,I=(nt,Ve)=>{for(var Ne in Ve||(Ve={}))be.call(Ve,Ne)&&Tt(nt,Ne,Ve[Ne]);if(Oe)for(var Ne of Oe(Ve))Re.call(Ve,Ne)&&Tt(nt,Ne,Ve[Ne]);return nt},ne=(nt,Ve)=>oe(nt,_e(Ve)),d=(nt,Ve)=>P(nt,"name",{value:Ve,configurable:!0}),Pn=(nt,Ve,Ne)=>new Promise((Xe,Be)=>{var kn=X=>{try{q(Ne.next(X))}catch(Ae){Be(Ae)}},ce=X=>{try{q(Ne.throw(X))}catch(Ae){Be(Ae)}},q=X=>X.done?Xe(X.value):Promise.resolve(X.value).then(kn,ce);q((Ne=Ne.apply(nt,Ve)).next())});d(function(nt,Ve){_.exports=Ve(up,vh())},"webpackUniversalModuleDefinition")(self,function(nt,Ve){return function(){var Ne={944:function(ce){var q=1e3,X=q*60,Ae=X*60,je=Ae*24,ze=je*7,L=je*365.25;ce.exports=function(U,le){le=le||{};var pe=typeof U;if(pe==="string"&&U.length>0)return Je(U);if(pe==="number"&&isFinite(U))return le.long?G(U):Te(U);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(U))};function Je(U){if(U=String(U),!(U.length>100)){var le=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(U);if(le){var pe=parseFloat(le[1]),J=(le[2]||"ms").toLowerCase();switch(J){case"years":case"year":case"yrs":case"yr":case"y":return pe*L;case"weeks":case"week":case"w":return pe*ze;case"days":case"day":case"d":return pe*je;case"hours":case"hour":case"hrs":case"hr":case"h":return pe*Ae;case"minutes":case"minute":case"mins":case"min":case"m":return pe*X;case"seconds":case"second":case"secs":case"sec":case"s":return pe*q;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return pe;default:return}}}}d(Je,"parse");function Te(U){var le=Math.abs(U);return le>=je?Math.round(U/je)+"d":le>=Ae?Math.round(U/Ae)+"h":le>=X?Math.round(U/X)+"m":le>=q?Math.round(U/q)+"s":U+"ms"}d(Te,"fmtShort");function G(U){var le=Math.abs(U);return le>=je?Ee(U,le,je,"day"):le>=Ae?Ee(U,le,Ae,"hour"):le>=X?Ee(U,le,X,"minute"):le>=q?Ee(U,le,q,"second"):U+" ms"}d(G,"fmtLong");function Ee(U,le,pe,J){var he=le>=pe*1.5;return Math.round(U/pe)+" "+J+(he?"s":"")}d(Ee,"plural")},854:function(ce,q,X){q.formatArgs=je,q.save=ze,q.load=L,q.useColors=Ae,q.storage=Je(),q.destroy=(()=>{let G=!1;return()=>{G||(G=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),q.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Ae(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}d(Ae,"useColors");function je(G){if(G[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+G[0]+(this.useColors?"%c ":" ")+"+"+ce.exports.humanize(this.diff),!this.useColors)return;const Ee="color: "+this.color;G.splice(1,0,Ee,"color: inherit");let U=0,le=0;G[0].replace(/%[a-zA-Z%]/g,pe=>{pe!=="%%"&&(U++,pe==="%c"&&(le=U))}),G.splice(le,0,Ee)}d(je,"formatArgs"),q.log=console.debug||console.log||(()=>{});function ze(G){try{G?q.storage.setItem("debug",G):q.storage.removeItem("debug")}catch{}}d(ze,"save");function L(){let G;try{G=q.storage.getItem("debug")}catch{}return!G&&typeof process<"u"&&"env"in process&&(G=z.DEBUG),G}d(L,"load");function Je(){try{return localStorage}catch{}}d(Je,"localstorage"),ce.exports=X(892)(q);const{formatters:Te}=ce.exports;Te.j=function(G){try{return JSON.stringify(G)}catch(Ee){return"[UnexpectedJSONParseError]: "+Ee.message}}},892:function(ce,q,X){function Ae(je){L.debug=L,L.default=L,L.coerce=le,L.disable=G,L.enable=Te,L.enabled=Ee,L.humanize=X(944),L.destroy=pe,Object.keys(je).forEach(J=>{L[J]=je[J]}),L.names=[],L.skips=[],L.formatters={};function ze(J){let he=0;for(let Ue=0;Ue<J.length;Ue++)he=(he<<5)-he+J.charCodeAt(Ue),he|=0;return L.colors[Math.abs(he)%L.colors.length]}d(ze,"selectColor"),L.selectColor=ze;function L(J){let he,Ue=null,M,ee;function j(...Ce){if(!j.enabled)return;const H=j,yt=Number(new Date),F=yt-(he||yt);H.diff=F,H.prev=he,H.curr=yt,he=yt,Ce[0]=L.coerce(Ce[0]),typeof Ce[0]!="string"&&Ce.unshift("%O");let rt=0;Ce[0]=Ce[0].replace(/%([a-zA-Z%])/g,(D,ps)=>{if(D==="%%")return"%";rt++;const lt=L.formatters[ps];if(typeof lt=="function"){const Ut=Ce[rt];D=lt.call(H,Ut),Ce.splice(rt,1),rt--}return D}),L.formatArgs.call(H,Ce),(H.log||L.log).apply(H,Ce)}return d(j,"debug"),j.namespace=J,j.useColors=L.useColors(),j.color=L.selectColor(J),j.extend=Je,j.destroy=L.destroy,Object.defineProperty(j,"enabled",{enumerable:!0,configurable:!1,get:()=>Ue!==null?Ue:(M!==L.namespaces&&(M=L.namespaces,ee=L.enabled(J)),ee),set:Ce=>{Ue=Ce}}),typeof L.init=="function"&&L.init(j),j}d(L,"createDebug");function Je(J,he){const Ue=L(this.namespace+(typeof he>"u"?":":he)+J);return Ue.log=this.log,Ue}d(Je,"extend");function Te(J){L.save(J),L.namespaces=J,L.names=[],L.skips=[];let he;const Ue=(typeof J=="string"?J:"").split(/[\s,]+/),M=Ue.length;for(he=0;he<M;he++)Ue[he]&&(J=Ue[he].replace(/\*/g,".*?"),J[0]==="-"?L.skips.push(new RegExp("^"+J.slice(1)+"$")):L.names.push(new RegExp("^"+J+"$")))}d(Te,"enable");function G(){const J=[...L.names.map(U),...L.skips.map(U).map(he=>"-"+he)].join(",");return L.enable(""),J}d(G,"disable");function Ee(J){if(J[J.length-1]==="*")return!0;let he,Ue;for(he=0,Ue=L.skips.length;he<Ue;he++)if(L.skips[he].test(J))return!1;for(he=0,Ue=L.names.length;he<Ue;he++)if(L.names[he].test(J))return!0;return!1}d(Ee,"enabled");function U(J){return J.toString().substring(2,J.toString().length-2).replace(/\.\*\?$/,"*")}d(U,"toNamespace");function le(J){return J instanceof Error?J.stack||J.message:J}d(le,"coerce");function pe(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return d(pe,"destroy"),L.enable(L.load()),L}d(Ae,"setup"),ce.exports=Ae},772:function(ce){/*
35
+ object-assign
36
+ (c) Sindre Sorhus
37
+ @license MIT
38
+ */var q=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable;function je(L){if(L==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(L)}d(je,"toObject");function ze(){try{if(!Object.assign)return!1;var L=new String("abc");if(L[5]="de",Object.getOwnPropertyNames(L)[0]==="5")return!1;for(var Je={},Te=0;Te<10;Te++)Je["_"+String.fromCharCode(Te)]=Te;var G=Object.getOwnPropertyNames(Je).map(function(U){return Je[U]});if(G.join("")!=="0123456789")return!1;var Ee={};return"abcdefghijklmnopqrst".split("").forEach(function(U){Ee[U]=U}),Object.keys(Object.assign({},Ee)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}d(ze,"shouldUseNative"),ce.exports=ze()?Object.assign:function(L,Je){for(var Te,G=je(L),Ee,U=1;U<arguments.length;U++){Te=Object(arguments[U]);for(var le in Te)X.call(Te,le)&&(G[le]=Te[le]);if(q){Ee=q(Te);for(var pe=0;pe<Ee.length;pe++)Ae.call(Te,Ee[pe])&&(G[Ee[pe]]=Te[Ee[pe]])}}return G}},346:function(ce,q,X){/** @license React v17.0.2
39
+ * react-jsx-runtime.production.min.js
40
+ *
41
+ * Copyright (c) Facebook, Inc. and its affiliates.
42
+ *
43
+ * This source code is licensed under the MIT license found in the
44
+ * LICENSE file in the root directory of this source tree.
45
+ */X(772);var Ae=X(359),je=60103;if(typeof Symbol=="function"&&Symbol.for){var ze=Symbol.for;je=ze("react.element"),ze("react.fragment")}var L=Ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Je=Object.prototype.hasOwnProperty,Te={key:!0,ref:!0,__self:!0,__source:!0};function G(Ee,U,le){var pe,J={},he=null,Ue=null;le!==void 0&&(he=""+le),U.key!==void 0&&(he=""+U.key),U.ref!==void 0&&(Ue=U.ref);for(pe in U)Je.call(U,pe)&&!Te.hasOwnProperty(pe)&&(J[pe]=U[pe]);if(Ee&&Ee.defaultProps)for(pe in U=Ee.defaultProps,U)J[pe]===void 0&&(J[pe]=U[pe]);return{$$typeof:je,type:Ee,key:he,ref:Ue,props:J,_owner:L.current}}d(G,"q"),q.jsx=G,q.jsxs=G},232:function(ce,q,X){ce.exports=X(346)},359:function(ce){ce.exports=nt},318:function(ce){ce.exports=Ve}},Xe={};function Be(ce){var q=Xe[ce];if(q!==void 0)return q.exports;var X=Xe[ce]={exports:{}};return Ne[ce](X,X.exports,Be),X.exports}d(Be,"__webpack_require__"),function(){Be.n=function(ce){var q=ce&&ce.__esModule?function(){return ce.default}:function(){return ce};return Be.d(q,{a:q}),q}}(),function(){Be.d=function(ce,q){for(var X in q)Be.o(q,X)&&!Be.o(ce,X)&&Object.defineProperty(ce,X,{enumerable:!0,get:q[X]})}}(),function(){Be.o=function(ce,q){return Object.prototype.hasOwnProperty.call(ce,q)}}(),function(){Be.r=function(ce){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ce,"__esModule",{value:!0})}}();var kn={};return function(){Be.r(kn),Be.d(kn,{AppEvents:function(){return j},AppNamespace:function(){return Ai},BuiltInPowerupCodes:function(){return Ur},Card:function(){return Br},CardNamespace:function(){return ks},CheckboxMatcher:function(){return Vt},ComponentFocusableItemType:function(){return pu},DEPRECATED_RICH_TEXT_ELEMENT_TYPES:function(){return Nn},DEPRECATED_RICH_TEXT_ELEMENT_TYPES_TO_NEW_FORMATTING:function(){return Jc},DEPRECATED_RICH_TEXT_FORMATTING_TYPES:function(){return Xc},DateMatcher:function(){return Oi},DateMatcherTypesToDisplayValue:function(){return Pu},DateNamespace:function(){return Gr},DocumentViewer:function(){return Xd},EXAM_SCHEDULER_EXPLANATION_TYPES:function(){return ed},EditorEvents:function(){return G},EditorNamespace:function(){return _t},EmbedComponentType:function(){return nn},EventNamespace:function(){return Li},FocusEvents:function(){return ee},FocusNamespace:function(){return qn},FocusPropsType:function(){return hu},GetCardInfoNodeCardFields:function(){return Co},GlobalEvent:function(){return Je},KnowledgeBaseNamespace:function(){return Do},LegacySearchPortalSingleSelectQueryExpression:function(){return Bs},LoadingSpinnerPlugin:function(){return nf},MessagingEvents:function(){return pe},MessagingNamespace:function(){return Il},MoveUnit:function(){return Ds},MultiSelectMatcher:function(){return Ro},MultiSelectMatcherTypesToDisplayValue:function(){return Ms},NonRelativeMatcherTypes:function(){return bi},NumberMatcher:function(){return _l},NumberMatcherTypesToDisplayValue:function(){return ku},PDFWebReader:function(){return Yd},PORTAL_TYPE:function(){return Ns},PageType_DUPE_1:function(){return wu},PluginAccessScopeType:function(){return Gn},PluginActionPermissionLevel:function(){return To},PluginCommandMenuLocation:function(){return mu},PluginRem:function(){return tn},PowerupEvent:function(){return U},PowerupNamespace:function(){return Ol},PowerupSlotCodeMap:function(){return Zr},PreviewRemCards:function(){return rf},PropertyLocation:function(){return wl},PropertyType:function(){return Wr},QueryExpressionType:function(){return at},QueryNodeType:function(){return qe},QueryRemType:function(){return Su},Query_DUPE_2:function(){return Ct},Queue:function(){return tf},QueueEvent:function(){return Te},QueueInteractionScore:function(){return bs},QueueItemType:function(){return Qr},QueueItemTypeHumanReadable:function(){return Vs},QueueItemTypeHumanReadableTextToSpeech:function(){return Tl},QueueNamespace:function(){return bl},RICH_TEXT_ELEMENT_TYPE:function(){return vu},RICH_TEXT_FORMATTING:function(){return Wt},RNPlugin:function(){return Bo},ReactRNPlugin:function(){return kc},ReaderNamespace:function(){return yr},RegisterPowerupOptions:function(){return Sl},RegisterPropertyOptions:function(){return Hr},RelativeDateMatcher:function(){return ko},RelativeDateMatcherToLabel:function(){return Cu},RelativeDateModifier:function(){return Io},RelativeDatePeriod:function(){return Vr},RemColor:function(){return vl},RemEvent:function(){return Ee},RemHierarchyEditorTree:function(){return ef},RemNamespace:function(){return Ci},RemRichTextEditor:function(){return Jd},RemType:function(){return Is},RemTypeTinyGraph:function(){return cu},RemViewer:function(){return qd},RichText:function(){return Gd},RichTextEditor:function(){return Kd},RichTextNamespace:function(){return Al},SchedulerExplanationType:function(){return Ri},SchedulerNamespace:function(){return Bi},SearchNamespace:function(){return Ui},SearchPortalCheckboxQueryExpression:function(){return Us},SearchPortalDateQueryExpression:function(){return El},SearchPortalGetCardInfoQueryNode:function(){return xu},SearchPortalGroupQueryNode:function(){return js},SearchPortalMultiSelectQueryExpression:function(){return $e},SearchPortalNumberQueryExpression:function(){return zs},SearchPortalQuery:function(){return Ni},SearchPortalQueryExpression:function(){return Ws},SearchPortalRefQueryExpression:function(){return Eu},SearchPortalRemTypeQueryExpression:function(){return Tu},SearchPortalSingleSelectQueryExpression:function(){return Zs},SearchPortalSlotQueryNode:function(){return _u},SearchPortalTextQueryExpression:function(){return Ru},SearchPortalUnaryQueryNode:function(){return As},SelectSourceType:function(){return Ii},SelectionType:function(){return yl},SetRemType:function(){return uu},SettingEvents:function(){return J},SettingsNamespace:function(){return Xn},SidebarEvents:function(){return le},SingleSelectMatcher:function(){return xl},SingleSelectMatcherTypesToDisplayValue:function(){return Oo},SpecialPluginCallback:function(){return ki},StorageEvents:function(){return he},StorageNamespace:function(){return Wi},TextMatcher:function(){return Ls},TextMatcherTypesToDisplayValue:function(){return Fs},TextMatchersAllowedWithoutPrimaryQuery:function(){return Po},WidgetEvents:function(){return Ue},WidgetLocation:function(){return au},WidgetNamespace:function(){return zo},WindowEvents:function(){return M},WindowNamespace:function(){return Xr},createReactiveApi:function(){return _d},declareIndexPlugin:function(){return df},filterAsync:function(){return Sf},isAppEvent:function(){return Ce},numberValidatorSig:function(){return yu},parseManifest:function(){return th},remTypeTinyGraphToNormal:function(){return fu},remTypeToTinyGraphType:function(){return du},renderWidget:function(){return cf},richTextFormatNameCodeMap:function(){return su},stringValidatorSig:function(){return gu},useAPIEventListener:function(){return Rc},useGetRemsByIdsReactive:function(){return gf},useLocalStorageState:function(){return wf},useOnMessageBroadcast:function(){return ff},usePlugin:function(){return ci},useRunAsync:function(){return Ef},useSessionStorageState:function(){return vf},useSyncedStorageState:function(){return _f},useTrackerPlugin:function(){return bf}});var ce={};Be.r(ce),Be.d(ce,{VERSION:function(){return sa},after:function(){return rr},all:function(){return Fa},allKeys:function(){return ii},any:function(){return fo},assign:function(){return Xi},before:function(){return oo},bind:function(){return fc},bindAll:function(){return pc},chain:function(){return Rr},chunk:function(){return Ld},clone:function(){return Sn},collect:function(){return gn},compact:function(){return Pe},compose:function(){return gc},constant:function(){return Ea},contains:function(){return e},countBy:function(){return ue},create:function(){return is},debounce:function(){return mc},default:function(){return pp},defaults:function(){return li},defer:function(){return ud},delay:function(){return hc},detect:function(){return ao},difference:function(){return ir},drop:function(){return W},each:function(){return mn},escape:function(){return ad},every:function(){return Fa},extend:function(){return rs},extendOwn:function(){return Xi},filter:function(){return ui},find:function(){return ao},findIndex:function(){return el},findKey:function(){return Xo},findLastIndex:function(){return yc},findWhere:function(){return wc},first:function(){return ae},flatten:function(){return we},foldl:function(){return uo},foldr:function(){return La},forEach:function(){return mn},functions:function(){return qi},get:function(){return Ko},groupBy:function(){return A},has:function(){return zn},head:function(){return ae},identity:function(){return Tr},include:function(){return e},includes:function(){return e},indexBy:function(){return K},indexOf:function(){return ss},initial:function(){return N},inject:function(){return uo},intersection:function(){return Dd},invert:function(){return Sr},invoke:function(){return n},isArguments:function(){return Gl},isArray:function(){return Lt},isArrayBuffer:function(){return Hl},isBoolean:function(){return on},isDataView:function(){return Wo},isDate:function(){return ma},isElement:function(){return jt},isEmpty:function(){return Pa},isEqual:function(){return es},isError:function(){return ga},isFinite:function(){return xa},isFunction:function(){return Ot},isMap:function(){return oi},isMatch:function(){return ql},isNaN:function(){return ri},isNull:function(){return ec},isNumber:function(){return ha},isObject:function(){return Er},isRegExp:function(){return tc},isSet:function(){return Pt},isString:function(){return Vl},isSymbol:function(){return ya},isTypedArray:function(){return ic},isUndefined:function(){return pa},isWeakMap:function(){return Ra},isWeakSet:function(){return ns},iteratee:function(){return Pr},keys:function(){return ct},last:function(){return fe},lastIndexOf:function(){return vc},map:function(){return gn},mapObject:function(){return qt},matcher:function(){return Cr},matches:function(){return Cr},max:function(){return u},memoize:function(){return nr},methods:function(){return qi},min:function(){return f},mixin:function(){return dd},negate:function(){return io},noop:function(){return Bn},now:function(){return no},object:function(){return Ad},omit:function(){return b},once:function(){return lo},pairs:function(){return Gi},partial:function(){return Tn},partition:function(){return ie},pick:function(){return S},pluck:function(){return o},property:function(){return ai},propertyOf:function(){return tr},random:function(){return zt},range:function(){return jd},reduce:function(){return uo},reduceRight:function(){return La},reject:function(){return co},rest:function(){return W},restArguments:function(){return At},result:function(){return cc},sample:function(){return w},select:function(){return ui},shuffle:function(){return C},size:function(){return T},some:function(){return fo},sortBy:function(){return B},sortedIndex:function(){return Aa},tail:function(){return W},take:function(){return ae},tap:function(){return er},template:function(){return uc},templateSettings:function(){return ls},throttle:function(){return Da},times:function(){return Go},toArray:function(){return y},toPath:function(){return si},transpose:function(){return xc},unescape:function(){return sc},union:function(){return dp},uniq:function(){return _c},unique:function(){return _c},uniqueId:function(){return Oa},unzip:function(){return xc},values:function(){return hn},where:function(){return s},without:function(){return cd},wrap:function(){return ln},zip:function(){return fp}});var q=Object.defineProperty,X=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,ze=d((t,r,i)=>r in t?q(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"__defNormalProp"),L=d((t,r)=>{for(var i in r||(r={}))Ae.call(r,i)&&ze(t,i,r[i]);if(X)for(var i of X(r))je.call(r,i)&&ze(t,i,r[i]);return t},"__spreadValues");const Je={GlobalOpenRem:"global.open-rem",URLChange:"global.url-change"},Te={QueueLoadCard:"queue.load-card",QueueCompleteCard:"queue.complete-card",QueueEnter:"queue.enter",QueueExit:"queue.exit",RevealAnswer:"queue.reveal-answer"},G={EditorSelectionChanged:"editor.selection-changed",EditorTextEdited:"editor.text-edited"},Ee={RemChanged:"rem.changed",GlobalRemChanged:"global.rem.changed"},U={PowerupSlotChanged:"powerup.slot.changed",ClickRemReference:"powerup.click-rem-reference",MouseOverLink:"powerup.mouse-enter-link",MouseOutLink:"powerup.mouse-out-link",SetTodoStatus:"powerup.todo.set-status"},le={ClickSidebarItem:"sidebar.click-item"},pe={MessageBroadcast:"messaging.broadcast"},J={SettingChanged:"setting.changed"},he={StorageSessionChange:"storage.session.changed",StorageSyncedChange:"storage.synced.changed",StorageLocalChange:"storage.local.changed"},Ue={FakeEmbedComponentDimensionChange:"widget.virtual-embed-dimension-change",FakeEmbedDOMEvent:"widget.virtual-embed-dom-event",StealKeyEvent:"widget.steal-key-event"},M={FocusedPaneChange:"window.focusedPane.changed",CurrentWindowTreeChange:"window.PaneIdWindowTree.changed"},ee={FocusedRemChange:"window.focusedRem.changed",FocusedPortalChange:"window.focusedPortal.changed"},j=L(L(L(L(L(L(L(L(L(L(L(L({onActivate:"onActivate",onDeactivate:"onDeactivate",setDarkMode:"setDarkMode",setCustomCSS:"setCustomCSS"},M),pe),le),U),Ee),Je),Te),he),Ue),G),J),ee);function Ce(t){return Object.values(j).includes(t)}d(Ce,"isAppEvent");var H;(function(t){t.assertEqual=a=>a;function r(a){}d(r,"assertIs"),t.assertIs=r;function i(a){throw new Error}d(i,"assertNever"),t.assertNever=i,t.arrayToEnum=a=>{const c={};for(const p of a)c[p]=p;return c},t.getValidEnumValues=a=>{const c=t.objectKeys(a).filter(h=>typeof a[a[h]]!="number"),p={};for(const h of c)p[h]=a[h];return t.objectValues(p)},t.objectValues=a=>t.objectKeys(a).map(function(c){return a[c]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const c=[];for(const p in a)Object.prototype.hasOwnProperty.call(a,p)&&c.push(p);return c},t.find=(a,c)=>{for(const p of a)if(c(p))return p},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function l(a,c=" | "){return a.map(p=>typeof p=="string"?`'${p}'`:p).join(c)}d(l,"joinValues"),t.joinValues=l,t.jsonStringifyReplacer=(a,c)=>typeof c=="bigint"?c.toString():c})(H||(H={}));var yt;(function(t){t.mergeShapes=(r,i)=>I(I({},r),i)})(yt||(yt={}));const F=H.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),rt=d(t=>{switch(typeof t){case"undefined":return F.undefined;case"string":return F.string;case"number":return isNaN(t)?F.nan:F.number;case"boolean":return F.boolean;case"function":return F.function;case"bigint":return F.bigint;case"symbol":return F.symbol;case"object":return Array.isArray(t)?F.array:t===null?F.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?F.promise:typeof Map<"u"&&t instanceof Map?F.map:typeof Set<"u"&&t instanceof Set?F.set:typeof Date<"u"&&t instanceof Date?F.date:F.object;default:return F.unknown}},"getParsedType"),D=H.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ps=d(t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson");class lt extends Error{constructor(r){super(),this.issues=[],this.addIssue=l=>{this.issues=[...this.issues,l]},this.addIssues=(l=[])=>{this.issues=[...this.issues,...l]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=r}get errors(){return this.issues}format(r){const i=r||function(c){return c.message},l={_errors:[]},a=d(c=>{for(const p of c.issues)if(p.code==="invalid_union")p.unionErrors.map(a);else if(p.code==="invalid_return_type")a(p.returnTypeError);else if(p.code==="invalid_arguments")a(p.argumentsError);else if(p.path.length===0)l._errors.push(i(p));else{let h=l,g=0;for(;g<p.path.length;){const v=p.path[g];g===p.path.length-1?(h[v]=h[v]||{_errors:[]},h[v]._errors.push(i(p))):h[v]=h[v]||{_errors:[]},h=h[v],g++}}},"processError");return a(this),l}toString(){return this.message}get message(){return JSON.stringify(this.issues,H.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(r=i=>i.message){const i={},l=[];for(const a of this.issues)a.path.length>0?(i[a.path[0]]=i[a.path[0]]||[],i[a.path[0]].push(r(a))):l.push(r(a));return{formErrors:l,fieldErrors:i}}get formErrors(){return this.flatten()}}d(lt,"ZodError"),lt.create=t=>new lt(t);const Ut=d((t,r)=>{let i;switch(t.code){case D.invalid_type:t.received===F.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case D.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,H.jsonStringifyReplacer)}`;break;case D.unrecognized_keys:i=`Unrecognized key(s) in object: ${H.joinValues(t.keys,", ")}`;break;case D.invalid_union:i="Invalid input";break;case D.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${H.joinValues(t.options)}`;break;case D.invalid_enum_value:i=`Invalid enum value. Expected ${H.joinValues(t.options)}, received '${t.received}'`;break;case D.invalid_arguments:i="Invalid function arguments";break;case D.invalid_return_type:i="Invalid function return type";break;case D.invalid_date:i="Invalid date";break;case D.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(i=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?i=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?i=`Invalid input: must end with "${t.validation.endsWith}"`:H.assertNever(t.validation):t.validation!=="regex"?i=`Invalid ${t.validation}`:i="Invalid";break;case D.too_small:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:i="Invalid input";break;case D.too_big:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?i=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:i="Invalid input";break;case D.custom:i="Invalid input";break;case D.invalid_intersection_types:i="Intersection results could not be merged";break;case D.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case D.not_finite:i="Number must be finite";break;default:i=r.defaultError,H.assertNever(t)}return{message:i}},"errorMap");let hs=Ut;function za(t){hs=t}d(za,"setErrorMap");function sr(){return hs}d(sr,"getErrorMap");const po=d(t=>{const{data:r,path:i,errorMaps:l,issueData:a}=t,c=[...i,...a.path||[]],p=ne(I({},a),{path:c});let h="";const g=l.filter(v=>!!v).slice().reverse();for(const v of g)h=v(p,{data:r,defaultError:h}).message;return ne(I({},a),{path:c,message:a.message||h})},"makeIssue"),ol=[];function Z(t,r){const i=po({issueData:r,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,sr(),Ut].filter(l=>!!l)});t.common.issues.push(i)}d(Z,"addIssueToContext");class vt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(r,i){const l=[];for(const a of i){if(a.status==="aborted")return me;a.status==="dirty"&&r.dirty(),l.push(a.value)}return{status:r.value,value:l}}static mergeObjectAsync(r,i){return Pn(this,null,function*(){const l=[];for(const a of i)l.push({key:yield a.key,value:yield a.value});return vt.mergeObjectSync(r,l)})}static mergeObjectSync(r,i){const l={};for(const a of i){const{key:c,value:p}=a;if(c.status==="aborted"||p.status==="aborted")return me;c.status==="dirty"&&r.dirty(),p.status==="dirty"&&r.dirty(),c.value!=="__proto__"&&(typeof p.value<"u"||a.alwaysSet)&&(l[c.value]=p.value)}return{status:r.value,value:l}}}d(vt,"ParseStatus");const me=Object.freeze({status:"aborted"}),ll=d(t=>({status:"dirty",value:t}),"DIRTY"),kt=d(t=>({status:"valid",value:t}),"OK"),ho=d(t=>t.status==="aborted","isAborted"),ms=d(t=>t.status==="dirty","isDirty"),Dr=d(t=>t.status==="valid","isValid"),Un=d(t=>typeof Promise<"u"&&t instanceof Promise,"isAsync");var Y;(function(t){t.errToObj=r=>typeof r=="string"?{message:r}:r||{},t.toString=r=>typeof r=="string"?r:r?.message})(Y||(Y={}));class sn{constructor(r,i,l,a){this._cachedPath=[],this.parent=r,this.data=i,this._path=l,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}d(sn,"ParseInputLazyPath");const gs=d((t,r)=>{if(Dr(r))return{success:!0,data:r.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const i=new lt(t.common.issues);return this._error=i,this._error}}},"handleResult");function ge(t){if(!t)return{};const{errorMap:r,invalid_type_error:i,required_error:l,description:a}=t;if(r&&(i||l))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return r?{errorMap:r,description:a}:{errorMap:d((c,p)=>c.code!=="invalid_type"?{message:p.defaultError}:typeof p.data>"u"?{message:l??p.defaultError}:{message:i??p.defaultError},"customMap"),description:a}}d(ge,"processCreateParams");class ve{constructor(r){this.spa=this.safeParseAsync,this._def=r,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(r){return rt(r.data)}_getOrReturnCtx(r,i){return i||{common:r.parent.common,data:r.data,parsedType:rt(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}_processInputParams(r){return{status:new vt,ctx:{common:r.parent.common,data:r.data,parsedType:rt(r.data),schemaErrorMap:this._def.errorMap,path:r.path,parent:r.parent}}}_parseSync(r){const i=this._parse(r);if(Un(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(r){const i=this._parse(r);return Promise.resolve(i)}parse(r,i){const l=this.safeParse(r,i);if(l.success)return l.data;throw l.error}safeParse(r,i){var l;const a={common:{issues:[],async:(l=i?.async)!==null&&l!==void 0?l:!1,contextualErrorMap:i?.errorMap},path:i?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:rt(r)},c=this._parseSync({data:r,path:a.path,parent:a});return gs(a,c)}parseAsync(r,i){return Pn(this,null,function*(){const l=yield this.safeParseAsync(r,i);if(l.success)return l.data;throw l.error})}safeParseAsync(r,i){return Pn(this,null,function*(){const l={common:{issues:[],contextualErrorMap:i?.errorMap,async:!0},path:i?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:r,parsedType:rt(r)},a=this._parse({data:r,path:l.path,parent:l}),c=yield Un(a)?a:Promise.resolve(a);return gs(l,c)})}refine(r,i){const l=d(a=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(a):i,"getIssueProperties");return this._refinement((a,c)=>{const p=r(a),h=d(()=>c.addIssue(I({code:D.custom},l(a))),"setError");return typeof Promise<"u"&&p instanceof Promise?p.then(g=>g?!0:(h(),!1)):p?!0:(h(),!1)})}refinement(r,i){return this._refinement((l,a)=>r(l)?!0:(a.addIssue(typeof i=="function"?i(l,a):i),!1))}_refinement(r){return new Jt({schema:this,typeName:te.ZodEffects,effect:{type:"refinement",refinement:r}})}superRefine(r){return this._refinement(r)}optional(){return xn.create(this,this._def)}nullable(){return $n.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return wt.create(this,this._def)}promise(){return zr.create(this,this._def)}or(r){return mi.create([this,r],this._def)}and(r){return gi.create(this,r,this._def)}transform(r){return new Jt(ne(I({},ge(this._def)),{schema:this,typeName:te.ZodEffects,effect:{type:"transform",transform:r}}))}default(r){const i=typeof r=="function"?r:()=>r;return new dr(ne(I({},ge(this._def)),{innerType:this,defaultValue:i,typeName:te.ZodDefault}))}brand(){return new un(I({typeName:te.ZodBranded,type:this},ge(this._def)))}catch(r){const i=typeof r=="function"?r:()=>r;return new wi(ne(I({},ge(this._def)),{innerType:this,catchValue:i,typeName:te.ZodCatch}))}describe(r){const i=this.constructor;return new i(ne(I({},this._def),{description:r}))}pipe(r){return en.create(this,r)}readonly(){return cn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}d(ve,"ZodType");const Ba=/^c[^\s-]{8,}$/i,ys=/^[a-z][a-z0-9]*$/,sl=/[0-9A-HJKMNP-TV-Z]{26}/,Ua=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,mo=/^([A-Z0-9_+-]+\.?)*[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,go=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),Lc=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Za=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Wa=d(t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"),"datetimeRegex");function Va(t,r){return!!((r==="v4"||!r)&&Lc.test(t)||(r==="v6"||!r)&&Za.test(t))}d(Va,"isValidIP");class Zt extends ve{constructor(){super(...arguments),this._regex=(r,i,l)=>this.refinement(a=>r.test(a),I({validation:i,code:D.invalid_string},Y.errToObj(l))),this.nonempty=r=>this.min(1,Y.errToObj(r)),this.trim=()=>new Zt(ne(I({},this._def),{checks:[...this._def.checks,{kind:"trim"}]})),this.toLowerCase=()=>new Zt(ne(I({},this._def),{checks:[...this._def.checks,{kind:"toLowerCase"}]})),this.toUpperCase=()=>new Zt(ne(I({},this._def),{checks:[...this._def.checks,{kind:"toUpperCase"}]}))}_parse(r){if(this._def.coerce&&(r.data=String(r.data)),this._getType(r)!==F.string){const a=this._getOrReturnCtx(r);return Z(a,{code:D.invalid_type,expected:F.string,received:a.parsedType}),me}const i=new vt;let l;for(const a of this._def.checks)if(a.kind==="min")r.data.length<a.value&&(l=this._getOrReturnCtx(r,l),Z(l,{code:D.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="max")r.data.length>a.value&&(l=this._getOrReturnCtx(r,l),Z(l,{code:D.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="length"){const c=r.data.length>a.value,p=r.data.length<a.value;(c||p)&&(l=this._getOrReturnCtx(r,l),c?Z(l,{code:D.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):p&&Z(l,{code:D.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),i.dirty())}else if(a.kind==="email")mo.test(r.data)||(l=this._getOrReturnCtx(r,l),Z(l,{validation:"email",code:D.invalid_string,message:a.message}),i.dirty());else if(a.kind==="emoji")go.test(r.data)||(l=this._getOrReturnCtx(r,l),Z(l,{validation:"emoji",code:D.invalid_string,message:a.message}),i.dirty());else if(a.kind==="uuid")Ua.test(r.data)||(l=this._getOrReturnCtx(r,l),Z(l,{validation:"uuid",code:D.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid")Ba.test(r.data)||(l=this._getOrReturnCtx(r,l),Z(l,{validation:"cuid",code:D.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid2")ys.test(r.data)||(l=this._getOrReturnCtx(r,l),Z(l,{validation:"cuid2",code:D.invalid_string,message:a.message}),i.dirty());else if(a.kind==="ulid")sl.test(r.data)||(l=this._getOrReturnCtx(r,l),Z(l,{validation:"ulid",code:D.invalid_string,message:a.message}),i.dirty());else if(a.kind==="url")try{new URL(r.data)}catch{l=this._getOrReturnCtx(r,l),Z(l,{validation:"url",code:D.invalid_string,message:a.message}),i.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(r.data)||(l=this._getOrReturnCtx(r,l),Z(l,{validation:"regex",code:D.invalid_string,message:a.message}),i.dirty())):a.kind==="trim"?r.data=r.data.trim():a.kind==="includes"?r.data.includes(a.value,a.position)||(l=this._getOrReturnCtx(r,l),Z(l,{code:D.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),i.dirty()):a.kind==="toLowerCase"?r.data=r.data.toLowerCase():a.kind==="toUpperCase"?r.data=r.data.toUpperCase():a.kind==="startsWith"?r.data.startsWith(a.value)||(l=this._getOrReturnCtx(r,l),Z(l,{code:D.invalid_string,validation:{startsWith:a.value},message:a.message}),i.dirty()):a.kind==="endsWith"?r.data.endsWith(a.value)||(l=this._getOrReturnCtx(r,l),Z(l,{code:D.invalid_string,validation:{endsWith:a.value},message:a.message}),i.dirty()):a.kind==="datetime"?Wa(a).test(r.data)||(l=this._getOrReturnCtx(r,l),Z(l,{code:D.invalid_string,validation:"datetime",message:a.message}),i.dirty()):a.kind==="ip"?Va(r.data,a.version)||(l=this._getOrReturnCtx(r,l),Z(l,{validation:"ip",code:D.invalid_string,message:a.message}),i.dirty()):H.assertNever(a);return{status:i.value,value:r.data}}_addCheck(r){return new Zt(ne(I({},this._def),{checks:[...this._def.checks,r]}))}email(r){return this._addCheck(I({kind:"email"},Y.errToObj(r)))}url(r){return this._addCheck(I({kind:"url"},Y.errToObj(r)))}emoji(r){return this._addCheck(I({kind:"emoji"},Y.errToObj(r)))}uuid(r){return this._addCheck(I({kind:"uuid"},Y.errToObj(r)))}cuid(r){return this._addCheck(I({kind:"cuid"},Y.errToObj(r)))}cuid2(r){return this._addCheck(I({kind:"cuid2"},Y.errToObj(r)))}ulid(r){return this._addCheck(I({kind:"ulid"},Y.errToObj(r)))}ip(r){return this._addCheck(I({kind:"ip"},Y.errToObj(r)))}datetime(r){var i;return typeof r=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:r}):this._addCheck(I({kind:"datetime",precision:typeof r?.precision>"u"?null:r?.precision,offset:(i=r?.offset)!==null&&i!==void 0?i:!1},Y.errToObj(r?.message)))}regex(r,i){return this._addCheck(I({kind:"regex",regex:r},Y.errToObj(i)))}includes(r,i){return this._addCheck(I({kind:"includes",value:r,position:i?.position},Y.errToObj(i?.message)))}startsWith(r,i){return this._addCheck(I({kind:"startsWith",value:r},Y.errToObj(i)))}endsWith(r,i){return this._addCheck(I({kind:"endsWith",value:r},Y.errToObj(i)))}min(r,i){return this._addCheck(I({kind:"min",value:r},Y.errToObj(i)))}max(r,i){return this._addCheck(I({kind:"max",value:r},Y.errToObj(i)))}length(r,i){return this._addCheck(I({kind:"length",value:r},Y.errToObj(i)))}get isDatetime(){return!!this._def.checks.find(r=>r.kind==="datetime")}get isEmail(){return!!this._def.checks.find(r=>r.kind==="email")}get isURL(){return!!this._def.checks.find(r=>r.kind==="url")}get isEmoji(){return!!this._def.checks.find(r=>r.kind==="emoji")}get isUUID(){return!!this._def.checks.find(r=>r.kind==="uuid")}get isCUID(){return!!this._def.checks.find(r=>r.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(r=>r.kind==="cuid2")}get isULID(){return!!this._def.checks.find(r=>r.kind==="ulid")}get isIP(){return!!this._def.checks.find(r=>r.kind==="ip")}get minLength(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxLength(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}}d(Zt,"ZodString"),Zt.create=t=>{var r;return new Zt(I({checks:[],typeName:te.ZodString,coerce:(r=t?.coerce)!==null&&r!==void 0?r:!1},ge(t)))};function al(t,r){const i=(t.toString().split(".")[1]||"").length,l=(r.toString().split(".")[1]||"").length,a=i>l?i:l,c=parseInt(t.toFixed(a).replace(".","")),p=parseInt(r.toFixed(a).replace(".",""));return c%p/Math.pow(10,a)}d(al,"floatSafeRemainder");class vn extends ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(r){if(this._def.coerce&&(r.data=Number(r.data)),this._getType(r)!==F.number){const a=this._getOrReturnCtx(r);return Z(a,{code:D.invalid_type,expected:F.number,received:a.parsedType}),me}let i;const l=new vt;for(const a of this._def.checks)a.kind==="int"?H.isInteger(r.data)||(i=this._getOrReturnCtx(r,i),Z(i,{code:D.invalid_type,expected:"integer",received:"float",message:a.message}),l.dirty()):a.kind==="min"?(a.inclusive?r.data<a.value:r.data<=a.value)&&(i=this._getOrReturnCtx(r,i),Z(i,{code:D.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),l.dirty()):a.kind==="max"?(a.inclusive?r.data>a.value:r.data>=a.value)&&(i=this._getOrReturnCtx(r,i),Z(i,{code:D.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),l.dirty()):a.kind==="multipleOf"?al(r.data,a.value)!==0&&(i=this._getOrReturnCtx(r,i),Z(i,{code:D.not_multiple_of,multipleOf:a.value,message:a.message}),l.dirty()):a.kind==="finite"?Number.isFinite(r.data)||(i=this._getOrReturnCtx(r,i),Z(i,{code:D.not_finite,message:a.message}),l.dirty()):H.assertNever(a);return{status:l.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,Y.toString(i))}gt(r,i){return this.setLimit("min",r,!1,Y.toString(i))}lte(r,i){return this.setLimit("max",r,!0,Y.toString(i))}lt(r,i){return this.setLimit("max",r,!1,Y.toString(i))}setLimit(r,i,l,a){return new vn(ne(I({},this._def),{checks:[...this._def.checks,{kind:r,value:i,inclusive:l,message:Y.toString(a)}]}))}_addCheck(r){return new vn(ne(I({},this._def),{checks:[...this._def.checks,r]}))}int(r){return this._addCheck({kind:"int",message:Y.toString(r)})}positive(r){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Y.toString(r)})}negative(r){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Y.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Y.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Y.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:Y.toString(i)})}finite(r){return this._addCheck({kind:"finite",message:Y.toString(r)})}safe(r){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Y.toString(r)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Y.toString(r)})}get minValue(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}get isInt(){return!!this._def.checks.find(r=>r.kind==="int"||r.kind==="multipleOf"&&H.isInteger(r.value))}get isFinite(){let r=null,i=null;for(const l of this._def.checks){if(l.kind==="finite"||l.kind==="int"||l.kind==="multipleOf")return!0;l.kind==="min"?(i===null||l.value>i)&&(i=l.value):l.kind==="max"&&(r===null||l.value<r)&&(r=l.value)}return Number.isFinite(i)&&Number.isFinite(r)}}d(vn,"ZodNumber"),vn.create=t=>new vn(I({checks:[],typeName:te.ZodNumber,coerce:t?.coerce||!1},ge(t)));class wn extends ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(r){if(this._def.coerce&&(r.data=BigInt(r.data)),this._getType(r)!==F.bigint){const a=this._getOrReturnCtx(r);return Z(a,{code:D.invalid_type,expected:F.bigint,received:a.parsedType}),me}let i;const l=new vt;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?r.data<a.value:r.data<=a.value)&&(i=this._getOrReturnCtx(r,i),Z(i,{code:D.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),l.dirty()):a.kind==="max"?(a.inclusive?r.data>a.value:r.data>=a.value)&&(i=this._getOrReturnCtx(r,i),Z(i,{code:D.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),l.dirty()):a.kind==="multipleOf"?r.data%a.value!==BigInt(0)&&(i=this._getOrReturnCtx(r,i),Z(i,{code:D.not_multiple_of,multipleOf:a.value,message:a.message}),l.dirty()):H.assertNever(a);return{status:l.value,value:r.data}}gte(r,i){return this.setLimit("min",r,!0,Y.toString(i))}gt(r,i){return this.setLimit("min",r,!1,Y.toString(i))}lte(r,i){return this.setLimit("max",r,!0,Y.toString(i))}lt(r,i){return this.setLimit("max",r,!1,Y.toString(i))}setLimit(r,i,l,a){return new wn(ne(I({},this._def),{checks:[...this._def.checks,{kind:r,value:i,inclusive:l,message:Y.toString(a)}]}))}_addCheck(r){return new wn(ne(I({},this._def),{checks:[...this._def.checks,r]}))}positive(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Y.toString(r)})}negative(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Y.toString(r)})}nonpositive(r){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Y.toString(r)})}nonnegative(r){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Y.toString(r)})}multipleOf(r,i){return this._addCheck({kind:"multipleOf",value:r,message:Y.toString(i)})}get minValue(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r}get maxValue(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r}}d(wn,"ZodBigInt"),wn.create=t=>{var r;return new wn(I({checks:[],typeName:te.ZodBigInt,coerce:(r=t?.coerce)!==null&&r!==void 0?r:!1},ge(t)))};class _n extends ve{_parse(r){if(this._def.coerce&&(r.data=!!r.data),this._getType(r)!==F.boolean){const i=this._getOrReturnCtx(r);return Z(i,{code:D.invalid_type,expected:F.boolean,received:i.parsedType}),me}return kt(r.data)}}d(_n,"ZodBoolean"),_n.create=t=>new _n(I({typeName:te.ZodBoolean,coerce:t?.coerce||!1},ge(t)));class Xt extends ve{_parse(r){if(this._def.coerce&&(r.data=new Date(r.data)),this._getType(r)!==F.date){const a=this._getOrReturnCtx(r);return Z(a,{code:D.invalid_type,expected:F.date,received:a.parsedType}),me}if(isNaN(r.data.getTime())){const a=this._getOrReturnCtx(r);return Z(a,{code:D.invalid_date}),me}const i=new vt;let l;for(const a of this._def.checks)a.kind==="min"?r.data.getTime()<a.value&&(l=this._getOrReturnCtx(r,l),Z(l,{code:D.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),i.dirty()):a.kind==="max"?r.data.getTime()>a.value&&(l=this._getOrReturnCtx(r,l),Z(l,{code:D.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),i.dirty()):H.assertNever(a);return{status:i.value,value:new Date(r.data.getTime())}}_addCheck(r){return new Xt(ne(I({},this._def),{checks:[...this._def.checks,r]}))}min(r,i){return this._addCheck({kind:"min",value:r.getTime(),message:Y.toString(i)})}max(r,i){return this._addCheck({kind:"max",value:r.getTime(),message:Y.toString(i)})}get minDate(){let r=null;for(const i of this._def.checks)i.kind==="min"&&(r===null||i.value>r)&&(r=i.value);return r!=null?new Date(r):null}get maxDate(){let r=null;for(const i of this._def.checks)i.kind==="max"&&(r===null||i.value<r)&&(r=i.value);return r!=null?new Date(r):null}}d(Xt,"ZodDate"),Xt.create=t=>new Xt(I({checks:[],coerce:t?.coerce||!1,typeName:te.ZodDate},ge(t)));class pi extends ve{_parse(r){if(this._getType(r)!==F.symbol){const i=this._getOrReturnCtx(r);return Z(i,{code:D.invalid_type,expected:F.symbol,received:i.parsedType}),me}return kt(r.data)}}d(pi,"ZodSymbol"),pi.create=t=>new pi(I({typeName:te.ZodSymbol},ge(t)));class Ar extends ve{_parse(r){if(this._getType(r)!==F.undefined){const i=this._getOrReturnCtx(r);return Z(i,{code:D.invalid_type,expected:F.undefined,received:i.parsedType}),me}return kt(r.data)}}d(Ar,"ZodUndefined"),Ar.create=t=>new Ar(I({typeName:te.ZodUndefined},ge(t)));class jr extends ve{_parse(r){if(this._getType(r)!==F.null){const i=this._getOrReturnCtx(r);return Z(i,{code:D.invalid_type,expected:F.null,received:i.parsedType}),me}return kt(r.data)}}d(jr,"ZodNull"),jr.create=t=>new jr(I({typeName:te.ZodNull},ge(t)));class Zn extends ve{constructor(){super(...arguments),this._any=!0}_parse(r){return kt(r.data)}}d(Zn,"ZodAny"),Zn.create=t=>new Zn(I({typeName:te.ZodAny},ge(t)));class Wn extends ve{constructor(){super(...arguments),this._unknown=!0}_parse(r){return kt(r.data)}}d(Wn,"ZodUnknown"),Wn.create=t=>new Wn(I({typeName:te.ZodUnknown},ge(t)));class an extends ve{_parse(r){const i=this._getOrReturnCtx(r);return Z(i,{code:D.invalid_type,expected:F.never,received:i.parsedType}),me}}d(an,"ZodNever"),an.create=t=>new an(I({typeName:te.ZodNever},ge(t)));class hi extends ve{_parse(r){if(this._getType(r)!==F.undefined){const i=this._getOrReturnCtx(r);return Z(i,{code:D.invalid_type,expected:F.void,received:i.parsedType}),me}return kt(r.data)}}d(hi,"ZodVoid"),hi.create=t=>new hi(I({typeName:te.ZodVoid},ge(t)));class wt extends ve{_parse(r){const{ctx:i,status:l}=this._processInputParams(r),a=this._def;if(i.parsedType!==F.array)return Z(i,{code:D.invalid_type,expected:F.array,received:i.parsedType}),me;if(a.exactLength!==null){const p=i.data.length>a.exactLength.value,h=i.data.length<a.exactLength.value;(p||h)&&(Z(i,{code:p?D.too_big:D.too_small,minimum:h?a.exactLength.value:void 0,maximum:p?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),l.dirty())}if(a.minLength!==null&&i.data.length<a.minLength.value&&(Z(i,{code:D.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),l.dirty()),a.maxLength!==null&&i.data.length>a.maxLength.value&&(Z(i,{code:D.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),l.dirty()),i.common.async)return Promise.all([...i.data].map((p,h)=>a.type._parseAsync(new sn(i,p,i.path,h)))).then(p=>vt.mergeArray(l,p));const c=[...i.data].map((p,h)=>a.type._parseSync(new sn(i,p,i.path,h)));return vt.mergeArray(l,c)}get element(){return this._def.type}min(r,i){return new wt(ne(I({},this._def),{minLength:{value:r,message:Y.toString(i)}}))}max(r,i){return new wt(ne(I({},this._def),{maxLength:{value:r,message:Y.toString(i)}}))}length(r,i){return new wt(ne(I({},this._def),{exactLength:{value:r,message:Y.toString(i)}}))}nonempty(r){return this.min(1,r)}}d(wt,"ZodArray"),wt.create=(t,r)=>new wt(I({type:t,minLength:null,maxLength:null,exactLength:null,typeName:te.ZodArray},ge(r)));function Vn(t){if(t instanceof He){const r={};for(const i in t.shape){const l=t.shape[i];r[i]=xn.create(Vn(l))}return new He(ne(I({},t._def),{shape:()=>r}))}else return t instanceof wt?new wt(ne(I({},t._def),{type:Vn(t.element)})):t instanceof xn?xn.create(Vn(t.unwrap())):t instanceof $n?$n.create(Vn(t.unwrap())):t instanceof Nt?Nt.create(t.items.map(r=>Vn(r))):t}d(Vn,"deepPartialify");class He extends ve{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const r=this._def.shape(),i=H.objectKeys(r);return this._cached={shape:r,keys:i}}_parse(r){if(this._getType(r)!==F.object){const g=this._getOrReturnCtx(r);return Z(g,{code:D.invalid_type,expected:F.object,received:g.parsedType}),me}const{status:i,ctx:l}=this._processInputParams(r),{shape:a,keys:c}=this._getCached(),p=[];if(!(this._def.catchall instanceof an&&this._def.unknownKeys==="strip"))for(const g in l.data)c.includes(g)||p.push(g);const h=[];for(const g of c){const v=a[g],Q=l.data[g];h.push({key:{status:"valid",value:g},value:v._parse(new sn(l,Q,l.path,g)),alwaysSet:g in l.data})}if(this._def.catchall instanceof an){const g=this._def.unknownKeys;if(g==="passthrough")for(const v of p)h.push({key:{status:"valid",value:v},value:{status:"valid",value:l.data[v]}});else if(g==="strict")p.length>0&&(Z(l,{code:D.unrecognized_keys,keys:p}),i.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const v of p){const Q=l.data[v];h.push({key:{status:"valid",value:v},value:g._parse(new sn(l,Q,l.path,v)),alwaysSet:v in l.data})}}return l.common.async?Promise.resolve().then(()=>Pn(this,null,function*(){const g=[];for(const v of h){const Q=yield v.key;g.push({key:Q,value:yield v.value,alwaysSet:v.alwaysSet})}return g})).then(g=>vt.mergeObjectSync(i,g)):vt.mergeObjectSync(i,h)}get shape(){return this._def.shape()}strict(r){return Y.errToObj,new He(I(ne(I({},this._def),{unknownKeys:"strict"}),r!==void 0?{errorMap:(i,l)=>{var a,c,p,h;const g=(p=(c=(a=this._def).errorMap)===null||c===void 0?void 0:c.call(a,i,l).message)!==null&&p!==void 0?p:l.defaultError;return i.code==="unrecognized_keys"?{message:(h=Y.errToObj(r).message)!==null&&h!==void 0?h:g}:{message:g}}}:{}))}strip(){return new He(ne(I({},this._def),{unknownKeys:"strip"}))}passthrough(){return new He(ne(I({},this._def),{unknownKeys:"passthrough"}))}extend(r){return new He(ne(I({},this._def),{shape:()=>I(I({},this._def.shape()),r)}))}merge(r){return new He({unknownKeys:r._def.unknownKeys,catchall:r._def.catchall,shape:()=>I(I({},this._def.shape()),r._def.shape()),typeName:te.ZodObject})}setKey(r,i){return this.augment({[r]:i})}catchall(r){return new He(ne(I({},this._def),{catchall:r}))}pick(r){const i={};return H.objectKeys(r).forEach(l=>{r[l]&&this.shape[l]&&(i[l]=this.shape[l])}),new He(ne(I({},this._def),{shape:()=>i}))}omit(r){const i={};return H.objectKeys(this.shape).forEach(l=>{r[l]||(i[l]=this.shape[l])}),new He(ne(I({},this._def),{shape:()=>i}))}deepPartial(){return Vn(this)}partial(r){const i={};return H.objectKeys(this.shape).forEach(l=>{const a=this.shape[l];r&&!r[l]?i[l]=a:i[l]=a.optional()}),new He(ne(I({},this._def),{shape:()=>i}))}required(r){const i={};return H.objectKeys(this.shape).forEach(l=>{if(r&&!r[l])i[l]=this.shape[l];else{let a=this.shape[l];for(;a instanceof xn;)a=a._def.innerType;i[l]=a}}),new He(ne(I({},this._def),{shape:()=>i}))}keyof(){return Qn(H.objectKeys(this.shape))}}d(He,"ZodObject"),He.create=(t,r)=>new He(I({shape:()=>t,unknownKeys:"strip",catchall:an.create(),typeName:te.ZodObject},ge(r))),He.strictCreate=(t,r)=>new He(I({shape:()=>t,unknownKeys:"strict",catchall:an.create(),typeName:te.ZodObject},ge(r))),He.lazycreate=(t,r)=>new He(I({shape:t,unknownKeys:"strip",catchall:an.create(),typeName:te.ZodObject},ge(r)));class mi extends ve{_parse(r){const{ctx:i}=this._processInputParams(r),l=this._def.options;function a(c){for(const h of c)if(h.result.status==="valid")return h.result;for(const h of c)if(h.result.status==="dirty")return i.common.issues.push(...h.ctx.common.issues),h.result;const p=c.map(h=>new lt(h.ctx.common.issues));return Z(i,{code:D.invalid_union,unionErrors:p}),me}if(d(a,"handleResults"),i.common.async)return Promise.all(l.map(c=>Pn(this,null,function*(){const p=ne(I({},i),{common:ne(I({},i.common),{issues:[]}),parent:null});return{result:yield c._parseAsync({data:i.data,path:i.path,parent:p}),ctx:p}}))).then(a);{let c;const p=[];for(const g of l){const v=ne(I({},i),{common:ne(I({},i.common),{issues:[]}),parent:null}),Q=g._parseSync({data:i.data,path:i.path,parent:v});if(Q.status==="valid")return Q;Q.status==="dirty"&&!c&&(c={result:Q,ctx:v}),v.common.issues.length&&p.push(v.common.issues)}if(c)return i.common.issues.push(...c.ctx.common.issues),c.result;const h=p.map(g=>new lt(g));return Z(i,{code:D.invalid_union,unionErrors:h}),me}}get options(){return this._def.options}}d(mi,"ZodUnion"),mi.create=(t,r)=>new mi(I({options:t,typeName:te.ZodUnion},ge(r)));const ar=d(t=>t instanceof yi?ar(t.schema):t instanceof Jt?ar(t.innerType()):t instanceof vi?[t.value]:t instanceof In?t.options:t instanceof Mr?Object.keys(t.enum):t instanceof dr?ar(t._def.innerType):t instanceof Ar?[void 0]:t instanceof jr?[null]:null,"getDiscriminator");class Lr extends ve{_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==F.object)return Z(i,{code:D.invalid_type,expected:F.object,received:i.parsedType}),me;const l=this.discriminator,a=i.data[l],c=this.optionsMap.get(a);return c?i.common.async?c._parseAsync({data:i.data,path:i.path,parent:i}):c._parseSync({data:i.data,path:i.path,parent:i}):(Z(i,{code:D.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[l]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(r,i,l){const a=new Map;for(const c of i){const p=ar(c.shape[r]);if(!p)throw new Error(`A discriminator value for key \`${r}\` could not be extracted from all schema options`);for(const h of p){if(a.has(h))throw new Error(`Discriminator property ${String(r)} has duplicate value ${String(h)}`);a.set(h,c)}}return new Lr(I({typeName:te.ZodDiscriminatedUnion,discriminator:r,options:i,optionsMap:a},ge(l)))}}d(Lr,"ZodDiscriminatedUnion");function ur(t,r){const i=rt(t),l=rt(r);if(t===r)return{valid:!0,data:t};if(i===F.object&&l===F.object){const a=H.objectKeys(r),c=H.objectKeys(t).filter(h=>a.indexOf(h)!==-1),p=I(I({},t),r);for(const h of c){const g=ur(t[h],r[h]);if(!g.valid)return{valid:!1};p[h]=g.data}return{valid:!0,data:p}}else if(i===F.array&&l===F.array){if(t.length!==r.length)return{valid:!1};const a=[];for(let c=0;c<t.length;c++){const p=t[c],h=r[c],g=ur(p,h);if(!g.valid)return{valid:!1};a.push(g.data)}return{valid:!0,data:a}}else return i===F.date&&l===F.date&&+t==+r?{valid:!0,data:t}:{valid:!1}}d(ur,"mergeValues");class gi extends ve{_parse(r){const{status:i,ctx:l}=this._processInputParams(r),a=d((c,p)=>{if(ho(c)||ho(p))return me;const h=ur(c.value,p.value);return h.valid?((ms(c)||ms(p))&&i.dirty(),{status:i.value,value:h.data}):(Z(l,{code:D.invalid_intersection_types}),me)},"handleParsed");return l.common.async?Promise.all([this._def.left._parseAsync({data:l.data,path:l.path,parent:l}),this._def.right._parseAsync({data:l.data,path:l.path,parent:l})]).then(([c,p])=>a(c,p)):a(this._def.left._parseSync({data:l.data,path:l.path,parent:l}),this._def.right._parseSync({data:l.data,path:l.path,parent:l}))}}d(gi,"ZodIntersection"),gi.create=(t,r,i)=>new gi(I({left:t,right:r,typeName:te.ZodIntersection},ge(i)));class Nt extends ve{_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.parsedType!==F.array)return Z(l,{code:D.invalid_type,expected:F.array,received:l.parsedType}),me;if(l.data.length<this._def.items.length)return Z(l,{code:D.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&l.data.length>this._def.items.length&&(Z(l,{code:D.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const a=[...l.data].map((c,p)=>{const h=this._def.items[p]||this._def.rest;return h?h._parse(new sn(l,c,l.path,p)):null}).filter(c=>!!c);return l.common.async?Promise.all(a).then(c=>vt.mergeArray(i,c)):vt.mergeArray(i,a)}get items(){return this._def.items}rest(r){return new Nt(ne(I({},this._def),{rest:r}))}}d(Nt,"ZodTuple"),Nt.create=(t,r)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Nt(I({items:t,typeName:te.ZodTuple,rest:null},ge(r)))};class Hn extends ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.parsedType!==F.object)return Z(l,{code:D.invalid_type,expected:F.object,received:l.parsedType}),me;const a=[],c=this._def.keyType,p=this._def.valueType;for(const h in l.data)a.push({key:c._parse(new sn(l,h,l.path,h)),value:p._parse(new sn(l,l.data[h],l.path,h))});return l.common.async?vt.mergeObjectAsync(i,a):vt.mergeObjectSync(i,a)}get element(){return this._def.valueType}static create(r,i,l){return i instanceof ve?new Hn(I({keyType:r,valueType:i,typeName:te.ZodRecord},ge(l))):new Hn(I({keyType:Zt.create(),valueType:r,typeName:te.ZodRecord},ge(i)))}}d(Hn,"ZodRecord");class cr extends ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.parsedType!==F.map)return Z(l,{code:D.invalid_type,expected:F.map,received:l.parsedType}),me;const a=this._def.keyType,c=this._def.valueType,p=[...l.data.entries()].map(([h,g],v)=>({key:a._parse(new sn(l,h,l.path,[v,"key"])),value:c._parse(new sn(l,g,l.path,[v,"value"]))}));if(l.common.async){const h=new Map;return Promise.resolve().then(()=>Pn(this,null,function*(){for(const g of p){const v=yield g.key,Q=yield g.value;if(v.status==="aborted"||Q.status==="aborted")return me;(v.status==="dirty"||Q.status==="dirty")&&i.dirty(),h.set(v.value,Q.value)}return{status:i.value,value:h}}))}else{const h=new Map;for(const g of p){const v=g.key,Q=g.value;if(v.status==="aborted"||Q.status==="aborted")return me;(v.status==="dirty"||Q.status==="dirty")&&i.dirty(),h.set(v.value,Q.value)}return{status:i.value,value:h}}}}d(cr,"ZodMap"),cr.create=(t,r,i)=>new cr(I({valueType:r,keyType:t,typeName:te.ZodMap},ge(i)));class Rn extends ve{_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.parsedType!==F.set)return Z(l,{code:D.invalid_type,expected:F.set,received:l.parsedType}),me;const a=this._def;a.minSize!==null&&l.data.size<a.minSize.value&&(Z(l,{code:D.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),i.dirty()),a.maxSize!==null&&l.data.size>a.maxSize.value&&(Z(l,{code:D.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),i.dirty());const c=this._def.valueType;function p(g){const v=new Set;for(const Q of g){if(Q.status==="aborted")return me;Q.status==="dirty"&&i.dirty(),v.add(Q.value)}return{status:i.value,value:v}}d(p,"finalizeSet");const h=[...l.data.values()].map((g,v)=>c._parse(new sn(l,g,l.path,v)));return l.common.async?Promise.all(h).then(g=>p(g)):p(h)}min(r,i){return new Rn(ne(I({},this._def),{minSize:{value:r,message:Y.toString(i)}}))}max(r,i){return new Rn(ne(I({},this._def),{maxSize:{value:r,message:Y.toString(i)}}))}size(r,i){return this.min(r,i).max(r,i)}nonempty(r){return this.min(1,r)}}d(Rn,"ZodSet"),Rn.create=(t,r)=>new Rn(I({valueType:t,minSize:null,maxSize:null,typeName:te.ZodSet},ge(r)));class Fr extends ve{constructor(){super(...arguments),this.validate=this.implement}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==F.function)return Z(i,{code:D.invalid_type,expected:F.function,received:i.parsedType}),me;function l(h,g){return po({data:h,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,sr(),Ut].filter(v=>!!v),issueData:{code:D.invalid_arguments,argumentsError:g}})}d(l,"makeArgsIssue");function a(h,g){return po({data:h,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,sr(),Ut].filter(v=>!!v),issueData:{code:D.invalid_return_type,returnTypeError:g}})}d(a,"makeReturnsIssue");const c={errorMap:i.common.contextualErrorMap},p=i.data;if(this._def.returns instanceof zr){const h=this;return kt(function(...g){return Pn(this,null,function*(){const v=new lt([]),Q=yield h._def.args.parseAsync(g,c).catch(Bt=>{throw v.addIssue(l(g,Bt)),v}),xe=yield Reflect.apply(p,this,Q);return yield h._def.returns._def.type.parseAsync(xe,c).catch(Bt=>{throw v.addIssue(a(xe,Bt)),v})})})}else{const h=this;return kt(function(...g){const v=h._def.args.safeParse(g,c);if(!v.success)throw new lt([l(g,v.error)]);const Q=Reflect.apply(p,this,v.data),xe=h._def.returns.safeParse(Q,c);if(!xe.success)throw new lt([a(Q,xe.error)]);return xe.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...r){return new Fr(ne(I({},this._def),{args:Nt.create(r).rest(Wn.create())}))}returns(r){return new Fr(ne(I({},this._def),{returns:r}))}implement(r){return this.parse(r)}strictImplement(r){return this.parse(r)}static create(r,i,l){return new Fr(I({args:r||Nt.create([]).rest(Wn.create()),returns:i||Wn.create(),typeName:te.ZodFunction},ge(l)))}}d(Fr,"ZodFunction");class yi extends ve{get schema(){return this._def.getter()}_parse(r){const{ctx:i}=this._processInputParams(r);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}d(yi,"ZodLazy"),yi.create=(t,r)=>new yi(I({getter:t,typeName:te.ZodLazy},ge(r)));class vi extends ve{_parse(r){if(r.data!==this._def.value){const i=this._getOrReturnCtx(r);return Z(i,{received:i.data,code:D.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:r.data}}get value(){return this._def.value}}d(vi,"ZodLiteral"),vi.create=(t,r)=>new vi(I({value:t,typeName:te.ZodLiteral},ge(r)));function Qn(t,r){return new In(I({values:t,typeName:te.ZodEnum},ge(r)))}d(Qn,"createZodEnum");class In extends ve{_parse(r){if(typeof r.data!="string"){const i=this._getOrReturnCtx(r),l=this._def.values;return Z(i,{expected:H.joinValues(l),received:i.parsedType,code:D.invalid_type}),me}if(this._def.values.indexOf(r.data)===-1){const i=this._getOrReturnCtx(r),l=this._def.values;return Z(i,{received:i.data,code:D.invalid_enum_value,options:l}),me}return kt(r.data)}get options(){return this._def.values}get enum(){const r={};for(const i of this._def.values)r[i]=i;return r}get Values(){const r={};for(const i of this._def.values)r[i]=i;return r}get Enum(){const r={};for(const i of this._def.values)r[i]=i;return r}extract(r){return In.create(r)}exclude(r){return In.create(this.options.filter(i=>!r.includes(i)))}}d(In,"ZodEnum"),In.create=Qn;class Mr extends ve{_parse(r){const i=H.getValidEnumValues(this._def.values),l=this._getOrReturnCtx(r);if(l.parsedType!==F.string&&l.parsedType!==F.number){const a=H.objectValues(i);return Z(l,{expected:H.joinValues(a),received:l.parsedType,code:D.invalid_type}),me}if(i.indexOf(r.data)===-1){const a=H.objectValues(i);return Z(l,{received:l.data,code:D.invalid_enum_value,options:a}),me}return kt(r.data)}get enum(){return this._def.values}}d(Mr,"ZodNativeEnum"),Mr.create=(t,r)=>new Mr(I({values:t,typeName:te.ZodNativeEnum},ge(r)));class zr extends ve{unwrap(){return this._def.type}_parse(r){const{ctx:i}=this._processInputParams(r);if(i.parsedType!==F.promise&&i.common.async===!1)return Z(i,{code:D.invalid_type,expected:F.promise,received:i.parsedType}),me;const l=i.parsedType===F.promise?i.data:Promise.resolve(i.data);return kt(l.then(a=>this._def.type.parseAsync(a,{path:i.path,errorMap:i.common.contextualErrorMap})))}}d(zr,"ZodPromise"),zr.create=(t,r)=>new zr(I({type:t,typeName:te.ZodPromise},ge(r)));class Jt extends ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(r){const{status:i,ctx:l}=this._processInputParams(r),a=this._def.effect||null,c={addIssue:p=>{Z(l,p),p.fatal?i.abort():i.dirty()},get path(){return l.path}};if(c.addIssue=c.addIssue.bind(c),a.type==="preprocess"){const p=a.transform(l.data,c);return l.common.issues.length?{status:"dirty",value:l.data}:l.common.async?Promise.resolve(p).then(h=>this._def.schema._parseAsync({data:h,path:l.path,parent:l})):this._def.schema._parseSync({data:p,path:l.path,parent:l})}if(a.type==="refinement"){const p=d(h=>{const g=a.refinement(h,c);if(l.common.async)return Promise.resolve(g);if(g instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h},"executeRefinement");if(l.common.async===!1){const h=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});return h.status==="aborted"?me:(h.status==="dirty"&&i.dirty(),p(h.value),{status:i.value,value:h.value})}else return this._def.schema._parseAsync({data:l.data,path:l.path,parent:l}).then(h=>h.status==="aborted"?me:(h.status==="dirty"&&i.dirty(),p(h.value).then(()=>({status:i.value,value:h.value}))))}if(a.type==="transform")if(l.common.async===!1){const p=this._def.schema._parseSync({data:l.data,path:l.path,parent:l});if(!Dr(p))return p;const h=a.transform(p.value,c);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:i.value,value:h}}else return this._def.schema._parseAsync({data:l.data,path:l.path,parent:l}).then(p=>Dr(p)?Promise.resolve(a.transform(p.value,c)).then(h=>({status:i.value,value:h})):p);H.assertNever(a)}}d(Jt,"ZodEffects"),Jt.create=(t,r,i)=>new Jt(I({schema:t,typeName:te.ZodEffects,effect:r},ge(i))),Jt.createWithPreprocess=(t,r,i)=>new Jt(I({schema:r,effect:{type:"preprocess",transform:t},typeName:te.ZodEffects},ge(i)));class xn extends ve{_parse(r){return this._getType(r)===F.undefined?kt(void 0):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}d(xn,"ZodOptional"),xn.create=(t,r)=>new xn(I({innerType:t,typeName:te.ZodOptional},ge(r)));class $n extends ve{_parse(r){return this._getType(r)===F.null?kt(null):this._def.innerType._parse(r)}unwrap(){return this._def.innerType}}d($n,"ZodNullable"),$n.create=(t,r)=>new $n(I({innerType:t,typeName:te.ZodNullable},ge(r)));class dr extends ve{_parse(r){const{ctx:i}=this._processInputParams(r);let l=i.data;return i.parsedType===F.undefined&&(l=this._def.defaultValue()),this._def.innerType._parse({data:l,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}d(dr,"ZodDefault"),dr.create=(t,r)=>new dr(I({innerType:t,typeName:te.ZodDefault,defaultValue:typeof r.default=="function"?r.default:()=>r.default},ge(r)));class wi extends ve{_parse(r){const{ctx:i}=this._processInputParams(r),l=ne(I({},i),{common:ne(I({},i.common),{issues:[]})}),a=this._def.innerType._parse({data:l.data,path:l.path,parent:I({},l)});return Un(a)?a.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new lt(l.common.issues)},input:l.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new lt(l.common.issues)},input:l.data})}}removeCatch(){return this._def.innerType}}d(wi,"ZodCatch"),wi.create=(t,r)=>new wi(I({innerType:t,typeName:te.ZodCatch,catchValue:typeof r.catch=="function"?r.catch:()=>r.catch},ge(r)));class _i extends ve{_parse(r){if(this._getType(r)!==F.nan){const i=this._getOrReturnCtx(r);return Z(i,{code:D.invalid_type,expected:F.nan,received:i.parsedType}),me}return{status:"valid",value:r.data}}}d(_i,"ZodNaN"),_i.create=t=>new _i(I({typeName:te.ZodNaN},ge(t)));const vs=Symbol("zod_brand");class un extends ve{_parse(r){const{ctx:i}=this._processInputParams(r),l=i.data;return this._def.type._parse({data:l,path:i.path,parent:i})}unwrap(){return this._def.type}}d(un,"ZodBranded");class en extends ve{_parse(r){const{status:i,ctx:l}=this._processInputParams(r);if(l.common.async)return d(()=>Pn(this,null,function*(){const a=yield this._def.in._parseAsync({data:l.data,path:l.path,parent:l});return a.status==="aborted"?me:a.status==="dirty"?(i.dirty(),ll(a.value)):this._def.out._parseAsync({data:a.value,path:l.path,parent:l})}),"handleAsync")();{const a=this._def.in._parseSync({data:l.data,path:l.path,parent:l});return a.status==="aborted"?me:a.status==="dirty"?(i.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:l.path,parent:l})}}static create(r,i){return new en({in:r,out:i,typeName:te.ZodPipeline})}}d(en,"ZodPipeline");class cn extends ve{_parse(r){const i=this._def.innerType._parse(r);return Dr(i)&&(i.value=Object.freeze(i.value)),i}}d(cn,"ZodReadonly"),cn.create=(t,r)=>new cn(I({innerType:t,typeName:te.ZodReadonly},ge(r)));const Kn=d((t,r={},i)=>t?Zn.create().superRefine((l,a)=>{var c,p;if(!t(l)){const h=typeof r=="function"?r(l):typeof r=="string"?{message:r}:r,g=(p=(c=h.fatal)!==null&&c!==void 0?c:i)!==null&&p!==void 0?p:!0,v=typeof h=="string"?{message:h}:h;a.addIssue(ne(I({code:"custom"},v),{fatal:g}))}}):Zn.create(),"custom"),yo={object:He.lazycreate};var te;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(te||(te={}));const vo=d((t,r={message:`Input not instance of ${t.name}`})=>Kn(i=>i instanceof t,r),"instanceOfType"),ws=Zt.create,ul=vn.create,Ha=_i.create,wo=wn.create,Qa=_n.create,Fc=Xt.create,cl=pi.create,$a=Ar.create,Mc=jr.create,_o=Zn.create,Ka=Wn.create,dl=an.create,xi=hi.create,_s=wt.create,Ga=He.create,fl=He.strictCreate,qa=mi.create,Ya=Lr.create,Xa=gi.create,Ja=Nt.create,eu=Hn.create,xs=cr.create,zc=Rn.create,Es=Fr.create,Bc=yi.create,Qe=vi.create,Ei=In.create,Uc=Mr.create,Zc=zr.create,Si=Jt.create,tu=xn.create,pl=$n.create,Ti=Jt.createWithPreprocess,Ss=en.create;var E=Object.freeze({__proto__:null,defaultErrorMap:Ut,setErrorMap:za,getErrorMap:sr,makeIssue:po,EMPTY_PATH:ol,addIssueToContext:Z,ParseStatus:vt,INVALID:me,DIRTY:ll,OK:kt,isAborted:ho,isDirty:ms,isValid:Dr,isAsync:Un,get util(){return H},get objectUtil(){return yt},ZodParsedType:F,getParsedType:rt,ZodType:ve,ZodString:Zt,ZodNumber:vn,ZodBigInt:wn,ZodBoolean:_n,ZodDate:Xt,ZodSymbol:pi,ZodUndefined:Ar,ZodNull:jr,ZodAny:Zn,ZodUnknown:Wn,ZodNever:an,ZodVoid:hi,ZodArray:wt,ZodObject:He,ZodUnion:mi,ZodDiscriminatedUnion:Lr,ZodIntersection:gi,ZodTuple:Nt,ZodRecord:Hn,ZodMap:cr,ZodSet:Rn,ZodFunction:Fr,ZodLazy:yi,ZodLiteral:vi,ZodEnum:In,ZodNativeEnum:Mr,ZodPromise:zr,ZodEffects:Jt,ZodTransformer:Jt,ZodOptional:xn,ZodNullable:$n,ZodDefault:dr,ZodCatch:wi,ZodNaN:_i,BRAND:vs,ZodBranded:un,ZodPipeline:en,ZodReadonly:cn,custom:Kn,Schema:ve,ZodSchema:ve,late:yo,get ZodFirstPartyTypeKind(){return te},coerce:{string:t=>Zt.create(ne(I({},t),{coerce:!0})),number:t=>vn.create(ne(I({},t),{coerce:!0})),boolean:t=>_n.create(ne(I({},t),{coerce:!0})),bigint:t=>wn.create(ne(I({},t),{coerce:!0})),date:t=>Xt.create(ne(I({},t),{coerce:!0}))},any:_o,array:_s,bigint:wo,boolean:Qa,date:Fc,discriminatedUnion:Ya,effect:Si,enum:Ei,function:Es,instanceof:vo,intersection:Xa,lazy:Bc,literal:Qe,map:xs,nan:Ha,nativeEnum:Uc,never:dl,null:Mc,nullable:pl,number:ul,object:Ga,oboolean:d(()=>Qa().optional(),"oboolean"),onumber:d(()=>ul().optional(),"onumber"),optional:tu,ostring:d(()=>ws().optional(),"ostring"),pipeline:Ss,preprocess:Ti,promise:Zc,record:eu,set:zc,strictObject:fl,string:ws,symbol:cl,transformer:Si,tuple:Ja,undefined:$a,union:qa,unknown:Ka,void:xi,NEVER:me,ZodIssueCode:D,quotelessJson:ps,ZodError:lt});function On(t,r){return(i,l)=>t(i,l,r)}d(On,"makeNamespacedCall");var Wc=Object.defineProperty,Vc=d((t,r,i)=>r in t?Wc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"base_defNormalProp"),nu=d((t,r,i)=>(Vc(t,typeof r!="symbol"?r+"":r,i),i),"__publicField");class st{constructor(r,i){nu(this,"_call"),nu(this,"call"),this._call=r,this.call=On(this._call,i)}}d(st,"NamespaceBase");function pt(t){return typeof t=="string"?t:t instanceof tn?t._id:t}d(pt,"getRemId");const xo=d(t=>t.map(pt),"getRemIds");var Hc=Object.defineProperty,ru=Object.getOwnPropertySymbols,Ts=Object.prototype.hasOwnProperty,Cs=Object.prototype.propertyIsEnumerable,bn=d((t,r,i)=>r in t?Hc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rem_defNormalProp"),Ps=d((t,r)=>{for(var i in r||(r={}))Ts.call(r,i)&&bn(t,i,r[i]);if(ru)for(var i of ru(r))Cs.call(r,i)&&bn(t,i,r[i]);return t},"rem_spreadValues"),k=d((t,r,i)=>(bn(t,typeof r!="symbol"?r+"":r,i),i),"rem_publicField"),O=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"__async");class tn{constructor(r,i){k(this,"_id"),k(this,"createdAt"),k(this,"localUpdatedAt"),k(this,"updatedAt"),k(this,"parent"),k(this,"children"),k(this,"type"),k(this,"text"),k(this,"backText"),k(this,"_callMethod"),k(this,"call",(l,a)=>O(this,null,function*(){return yield this._callMethod(l,Ps({remId:this._id},a),Dt)})),k(this,"callAndReturnRem",(l,a)=>O(this,null,function*(){const c=yield this.call(l,a);if(c)return new tn(c,this._callMethod.bind(this))})),k(this,"callAndReturnManyRem",(l,a)=>O(this,null,function*(){const c=yield this.call(l,a);return c?c.map(p=>new tn(p,this._callMethod.bind(this))):[]})),k(this,"setTableFilter",l=>O(this,null,function*(){return yield this.call("setTableFilter",{filter:l})})),k(this,"isTable",()=>O(this,null,function*(){return yield this.call("isTable",{})})),k(this,"allRemInFolderQueue",()=>O(this,null,function*(){return((yield this.call("allRemInFolderQueue",{}))||[]).map(l=>new tn(l,this._callMethod.bind(this)))})),k(this,"positionAmongstSiblings",l=>O(this,null,function*(){return this.call("positionAmongstSiblings",{portalId:l})})),k(this,"positionAmongstVisibleSiblings",l=>O(this,null,function*(){return this.call("positionAmongstVisibleSiblings",{portalId:l})})),k(this,"hasPowerup",l=>O(this,null,function*(){return yield this.call("hasPowerup",{powerupCode:l})})),k(this,"getHiddenExplicitlyIncludedState",l=>O(this,null,function*(){return yield this.call("getHiddenExplicitlyIncludedState",{portalId:l})})),k(this,"setHiddenExplicitlyIncludedState",(l,a)=>O(this,null,function*(){return yield this.call("setHiddenExplicitlyIncludedState",{hiddenExplicitlyIncludedState:l,portalId:a})})),k(this,"getLastPracticed",()=>O(this,null,function*(){return yield this.call("getLastPracticed",{})})),k(this,"addPowerup",l=>O(this,null,function*(){return yield this.call("addPowerup",{powerupCode:l})})),k(this,"getLastTimeMovedTo",()=>O(this,null,function*(){return yield this.call("getLastTimeMovedTo",{})})),k(this,"getSchemaVersion",()=>O(this,null,function*(){return yield this.call("getSchemaVersion",{})})),k(this,"embeddedQueueViewMode",()=>O(this,null,function*(){return yield this.call("embeddedQueueViewMode",{})})),k(this,"isCollapsed",l=>O(this,null,function*(){return yield this.call("isCollapsed",{portalId:l})})),k(this,"setIsCollapsed",(l,a)=>O(this,null,function*(){return yield this.call("setIsCollapsed",{isCollapsed:l,portalId:a})})),k(this,"timesSelectedInSearch",()=>O(this,null,function*(){return yield this.call("timesSelectedInSearch",{})})),k(this,"getPortalType",()=>O(this,null,function*(){return yield this.call("getPortalType",{})})),k(this,"getPortalDirectlyIncludedRem",()=>O(this,null,function*(){return yield this.call("getPortalDirectlyIncludedRem",{})})),k(this,"getType",()=>O(this,null,function*(){return yield this.call("getType",{})})),k(this,"setPowerupProperty",(l,a,c)=>O(this,null,function*(){const p=Object.values(Ur).includes(l)?Zr[l][a]:a;return yield this.call("setPowerupProperty",{powerupCode:l,powerupSlot:p,value:c})})),k(this,"getPowerupProperty",(l,a)=>O(this,null,function*(){const c=Object.values(Ur).includes(l)?Zr[l][a]:a;return yield this.call("getPowerupProperty",{powerupCode:l,powerupSlot:c})})),k(this,"getPowerupPropertyAsRem",(l,a)=>O(this,null,function*(){const c=Object.values(Ur).includes(l)?Zr[l][a]:a;return yield this.callAndReturnRem("getPowerupPropertyAsRem",{powerupCode:l,powerupSlot:c})})),k(this,"getTagPropertyAsRem",l=>O(this,null,function*(){return yield this.callAndReturnRem("getTagPropertyAsRem",{propertyId:l})})),k(this,"getPowerupPropertyAsRichText",(l,a)=>O(this,null,function*(){const c=Object.values(Ur).includes(l)?Zr[l][a]:a;return yield this.call("getPowerupPropertyAsRichText",{powerupCode:l,powerupSlot:c})})),k(this,"setText",l=>O(this,null,function*(){return yield this.call("setText",{text:l})})),k(this,"setBackText",l=>O(this,null,function*(){return yield this.call("setBackText",{backText:l})})),k(this,"getTagPropertyValue",l=>O(this,null,function*(){return yield this.call("getTagPropertyValue",{propertyId:l})})),k(this,"getPropertyType",()=>O(this,null,function*(){return yield this.call("getPropertyType",{})})),k(this,"setTagPropertyValue",(l,a)=>O(this,null,function*(){return yield this.call("setTagPropertyValue",{propertyId:l,value:a})})),k(this,"removeTag",(l,a=!1)=>O(this,null,function*(){return yield this.call(a?"removeTagAndSlots":"removeTag",{tagId:l})})),k(this,"removePowerup",l=>O(this,null,function*(){return yield this.call("removePowerup",{powerupCode:l})})),k(this,"addTag",l=>O(this,null,function*(){const a=pt(l);return yield this.call("addTag",{tagId:a})})),k(this,"remove",()=>O(this,null,function*(){return yield this.call("remove",{})})),k(this,"getTagRems",()=>O(this,null,function*(){return this.callAndReturnManyRem("getTagRems",{})})),k(this,"addToPortal",l=>O(this,null,function*(){const a=pt(l);return yield this.call("addToPortal",{portalId:a})})),k(this,"removeFromPortal",l=>O(this,null,function*(){const a=pt(l);return yield this.call("removeFromPortal",{portalId:a})})),k(this,"setParent",(l,a)=>O(this,null,function*(){const c=pt(l);return yield this.call("setParent",{parentId:c,positionAmongstSiblings:a})})),k(this,"getOrCreateAliasWithText",l=>O(this,null,function*(){return yield this.callAndReturnRem("getOrCreateAliasWithText",{aliasText:l})})),k(this,"getChildrenRem",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("getChildrenRem")})),k(this,"allRemInDocumentOrPortal",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("allRemInDocumentOrPortal")})),k(this,"expand",(l,a)=>O(this,null,function*(){const c=pt(l);return yield this.call("expand",{portalId:c,recurse:a})})),k(this,"collapse",l=>O(this,null,function*(){const a=pt(l);return yield this.call("collapse",{portalId:a})})),k(this,"siblingRem",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("siblingRem")})),k(this,"visibleSiblingRem",l=>O(this,null,function*(){return yield this.callAndReturnManyRem("visibleSiblingRem",{portalId:l})})),k(this,"taggedRem",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("taggedRem")})),k(this,"ancestorTagRem",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("ancestorTagRem")})),k(this,"descendantTagRem",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("descendantTagRem")})),k(this,"getDescendants",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("getDescendants")})),k(this,"getCards",()=>O(this,null,function*(){const l=yield this.call("getCards");return l?.map(a=>new Br(a,this._callMethod))||[]})),k(this,"getAliases",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("getAliases")})),k(this,"getParentRem",()=>O(this,null,function*(){return yield this.callAndReturnRem("getParentRem")})),k(this,"portalsAndDocumentsIn",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("portalsAndDocumentsIn")})),k(this,"merge",l=>O(this,null,function*(){return yield this.call("merge",{remIdToMergeIntoThisOne:l})})),k(this,"mergeAndSetAlias",l=>O(this,null,function*(){const a=pt(l);return yield this.call("mergeAndSetAlias",{remIdToMergeIntoThisOne:a})})),k(this,"indent",l=>O(this,null,function*(){const a=pt(l);return yield this.call("indent",{portalId:a})})),k(this,"outdent",l=>O(this,null,function*(){const a=pt(l);return yield this.call("outdent",{portalId:a})})),k(this,"setType",l=>O(this,null,function*(){return yield this.call("setType",{type:l})})),k(this,"remsReferencingThis",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("remsReferencingThis")})),k(this,"remsBeingReferenced",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("remsBeingReferenced")})),k(this,"deepRemsBeingReferenced",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("deepRemsBeingReferenced")})),k(this,"getSources",()=>O(this,null,function*(){return yield this.callAndReturnManyRem("getSources")})),k(this,"addSource",l=>O(this,null,function*(){const a=pt(l);return yield this.call("addSource",{sourceId:a})})),k(this,"removeSource",l=>O(this,null,function*(){const a=pt(l);return yield this.call("removeSource",{sourceId:a})})),k(this,"isDocument",()=>O(this,null,function*(){return yield this.call("isDocument")})),k(this,"setIsDocument",l=>O(this,null,function*(){return yield this.call("setIsDocument",{isDocument:l})})),k(this,"isListItem",()=>O(this,null,function*(){return yield this.call("isListItem")})),k(this,"setIsListItem",l=>O(this,null,function*(){return yield this.call("setIsListItem",{isListItem:l})})),k(this,"isCardItem",()=>O(this,null,function*(){return yield this.call("isMultilineCard")})),k(this,"setIsCardItem",l=>O(this,null,function*(){return yield this.call("setIsMultilineCard",{isCardItem:l})})),k(this,"isQuote",()=>O(this,null,function*(){return yield this.call("isQuote")})),k(this,"setIsQuote",l=>O(this,null,function*(){yield this.call("setIsQuote",{isQuote:l})})),k(this,"isCode",()=>O(this,null,function*(){return yield this.call("isCode")})),k(this,"setIsCode",l=>O(this,null,function*(){yield this.call("setIsCode",{isCode:l})})),k(this,"isTodo",()=>O(this,null,function*(){return yield this.call("isTodo")})),k(this,"setIsTodo",l=>O(this,null,function*(){yield this.call("setIsTodo",{isTodo:l})})),k(this,"getTodoStatus",()=>O(this,null,function*(){return yield this.call("getTodoStatus")})),k(this,"setTodoStatus",l=>O(this,null,function*(){return yield this.call("setTodoStatus",{todoStatus:l})})),k(this,"getFontSize",()=>O(this,null,function*(){return yield this.call("getFontSize")})),k(this,"setFontSize",l=>O(this,null,function*(){return yield this.call("setFontSize",{fontSize:l})})),k(this,"getHighlightColor",()=>O(this,null,function*(){return yield this.call("getHighlightColor")})),k(this,"setHighlightColor",l=>O(this,null,function*(){return yield this.call("setHighlightColor",{highlightColor:l})})),k(this,"isPowerup",()=>O(this,null,function*(){return yield this.call("isPowerup")})),k(this,"isPowerupEnum",()=>O(this,null,function*(){return yield this.call("isPowerupEnum")})),k(this,"isPowerupPropertyListItem",()=>O(this,null,function*(){return yield this.call("isPowerupPropertyListItem")})),k(this,"isPowerupSlot",()=>O(this,null,function*(){return yield this.call("isPowerupSlot")})),k(this,"isPowerupProperty",()=>O(this,null,function*(){return yield this.call("isPowerupProperty")})),k(this,"isSlot",()=>O(this,null,function*(){return yield this.call("isSlot")})),k(this,"setIsSlot",l=>O(this,null,function*(){return yield this.call("setIsSlot",{isSlot:l})})),k(this,"isProperty",()=>O(this,null,function*(){return yield this.call("isSlot")})),k(this,"setIsProperty",l=>O(this,null,function*(){return yield this.call("setIsSlot",{isSlot:l})})),k(this,"openRemInContext",l=>O(this,null,function*(){yield this.call("openRemInContext",{portalId:l})})),k(this,"openRemAsPage",()=>O(this,null,function*(){yield this.call("openRemAsPage")})),k(this,"getEnablePractice",()=>O(this,null,function*(){return yield this.call("getEnablePractice")})),k(this,"getPracticeDirection",()=>O(this,null,function*(){return yield this.call("getPracticeDirection")})),k(this,"setEnablePractice",l=>O(this,null,function*(){return yield this.call("setEnablePractice",{enablePractice:l})})),k(this,"setPracticeDirection",l=>O(this,null,function*(){return yield this.call("setPracticeDirection",{direction:l})})),k(this,"copyPortalReferenceToClipboard",()=>O(this,null,function*(){return yield this.call("copyPortalReferenceToClipboard")})),k(this,"copyTagReferenceToClipboard",()=>O(this,null,function*(){return yield this.call("copyTagReferenceToClipboard")})),k(this,"copyReferenceToClipboard",()=>O(this,null,function*(){return yield this.call("copyReferenceToClipboard")})),k(this,"scrollToReaderHighlight",()=>O(this,null,function*(){return yield this.call("scrollToReaderHighlight")})),k(this,"isFolder",()=>O(this,null,function*(){return yield this.call("isFolder")})),k(this,"setIsFolder",l=>O(this,null,function*(){return yield this.call("setIsFolder",{isFolder:l})})),this._id=r._id,this.parent=r.parent,this.children=r.children,this.type=r.type,this.text=r.text,this.backText=r.backText,this.updatedAt=r.u,this.localUpdatedAt=r.o,this.createdAt=r.createdAt,this._callMethod=i}}d(tn,"RemObject");class Ci extends st{constructor(r){super(r,Dt),k(this,"findOne",i=>O(this,null,function*(){if(!i)return;const l=yield this.call("findOne",{remId:i});if(l)return new ht(l,this.call)})),k(this,"createSingleRemWithMarkdown",(i,l)=>O(this,null,function*(){const a=yield this.call("createSingleRemWithMarkdown",{markdown:i,parentId:l});return a&&new ht(a,this.call)})),k(this,"createTreeWithMarkdown",(i,l)=>O(this,null,function*(){return((yield this.call("createTreeWithMarkdown",{markdown:i,parentId:l}))||[]).map(a=>new ht(a,this.call))})),k(this,"findByName",(i,l)=>O(this,null,function*(){const a=yield this.call("findByName",{name:i,parentId:l});if(a)return new ht(a,this.call)})),k(this,"moveRems",(i,l,a,c)=>O(this,null,function*(){const p=xo(i),h=pt(l),g=pt(c);yield this.call("moveRems",{portalId:g,remIds:p,newParentId:h,positionAmongstSiblings:a})})),k(this,"getAll",()=>O(this,null,function*(){return((yield this.call("getAll",{}))||[]).map(i=>new ht(i,this._call))})),k(this,"findMany",i=>O(this,null,function*(){const l=xo(i),a=yield this.call("findMany",{remIds:l});if(a)return a.map(c=>new ht(c,this._call))})),k(this,"createPortal",()=>O(this,null,function*(){const i=yield this.call("createPortal",{});return i?new ht(i,this._call):void 0})),k(this,"createLinkRem",(i,l=!0)=>O(this,null,function*(){const a=yield this.call("createLinkRem",{url:i,addTitle:l});if(a)return new ht(a,this._call)})),k(this,"createTable",i=>O(this,null,function*(){const l=pt(i),a=yield this.call("createTable",{existingTagId:l});if(a)return new ht(a,this._call)})),k(this,"createRem",()=>O(this,null,function*(){const i=yield this.call("createRem",{});if(i)return new ht(i,this._call)}))}}d(Ci,"RemNamespace");const ht=tn,Dt="rem";var Pi=Object.defineProperty,hl=Object.getOwnPropertySymbols,Eo=Object.prototype.hasOwnProperty,Qc=Object.prototype.propertyIsEnumerable,So=d((t,r,i)=>r in t?Pi(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"card_defNormalProp"),ml=d((t,r)=>{for(var i in r||(r={}))Eo.call(r,i)&&So(t,i,r[i]);if(hl)for(var i of hl(r))Qc.call(r,i)&&So(t,i,r[i]);return t},"card_spreadValues"),it=d((t,r,i)=>(So(t,typeof r!="symbol"?r+"":r,i),i),"card_publicField"),dn=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"card_async");const gl="card";class ks extends st{constructor(r){super(r,gl),it(this,"findOne",i=>dn(this,null,function*(){if(!i)return;const l=yield this.call("findOne",{id:i});return l?new Br(l,this._call):void 0})),it(this,"getAll",()=>dn(this,null,function*(){const i=yield this.call("getAll",{});return i?.map(l=>new Br(l,this._call))||[]})),it(this,"findMany",i=>dn(this,null,function*(){const l=yield this.call("findMany",{ids:i});return l?.map(a=>new Br(a,this._call))||[]}))}}d(ks,"CardNamespace");class Br extends st{constructor(r,i){super(i,gl),it(this,"_id"),it(this,"remId"),it(this,"type"),it(this,"createdAt"),it(this,"repetitionHistory"),it(this,"nextRepetitionTime"),it(this,"timesWrongInRow"),it(this,"lastRepetitionTime"),it(this,"callCard",(a,c)=>dn(this,null,function*(){return yield this._call(a,ml({id:this._id},c),gl)})),it(this,"callRem",(a,c)=>dn(this,null,function*(){return yield this._call(a,ml({},c),Dt)})),it(this,"getType",()=>dn(this,null,function*(){return yield this.callCard("getType",{id:this._id})})),it(this,"getRem",()=>dn(this,null,function*(){return yield this.callRem("findOne",{remId:this.remId})})),it(this,"remove",()=>dn(this,null,function*(){return yield this.callCard("remove",{})})),it(this,"updateCardRepetitionStatus",a=>dn(this,null,function*(){return yield this.callCard("updateCardRepetitionStatus",{score:a})})),this._id=r._id,this.remId=r.remId;const l=r.cardType;this.type=l==="f"?"forward":l==="b"?"backward":{clozeId:l},this.createdAt=r.createdAt,this.repetitionHistory=r.history,this.nextRepetitionTime=r.activeNextTime,this.timesWrongInRow=r.timesWrongInRow}}d(Br,"Card");var $c=Object.defineProperty,Rs=Object.defineProperties,Kc=Object.getOwnPropertyDescriptors,iu=Object.getOwnPropertySymbols,Gc=Object.prototype.hasOwnProperty,qc=Object.prototype.propertyIsEnumerable,ou=d((t,r,i)=>r in t?$c(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"interfaces_defNormalProp"),lu=d((t,r)=>{for(var i in r||(r={}))Gc.call(r,i)&&ou(t,i,r[i]);if(iu)for(var i of iu(r))qc.call(r,i)&&ou(t,i,r[i]);return t},"interfaces_spreadValues"),Yc=d((t,r)=>Rs(t,Kc(r)),"__spreadProps"),yl=(t=>(t.Rem="Rem",t.Text="Text",t.PDF="PDF",t.WebReader="WebReader",t))(yl||{});const su={quote:"q",underline:"u",bold:"b",italic:"l"};var vl=(t=>(t[t.undefined=0]="undefined",t[t.Red=1]="Red",t[t.Orange=2]="Orange",t[t.Yellow=3]="Yellow",t[t.Green=4]="Green",t[t.Blue=6]="Blue",t[t.Purple=5]="Purple",t[t.Gray=7]="Gray",t[t.Brown=8]="Brown",t[t.Pink=9]="Pink",t))(vl||{}),To=(t=>(t.Read="Read",t.ReadCreate="ReadCreate",t.ReadCreateModify="ReadCreateModify",t.ReadCreateModifyDelete="ReadCreateModifyDelete",t))(To||{}),Gn=(t=>(t.All="All",t.DescendantsOfName="DescendantsOfName",t.DescendantsOfId="DescendantsOfId",t.Powerup="Powerup",t.FocusedSubtree="FocusedSubtree",t.KnowledgeBaseInfo="KnowledgeBaseInfo",t))(Gn||{}),au=(t=>(t.FloatingWidget="FloatingWidget",t.PaneHeader="PaneHeader",t.Index="Index",t.TopBar="TopBar",t.QueueToolbar="QueueToolbar",t.QueueBelowTopBar="QueueBelowTopBar",t.DocumentAboveToolbar="AboveDocumentToolbar",t.DocumentBelowToolbar="DocumentBelowToolbar",t.DocumentBelowEditor="DocumentBelowEditor",t.DocumentBelowTitle="DocumentBelowTitle",t.SidebarEnd="SidebarEnd",t.RemReferencePopupStart="RemReferencePopupStart",t.RemReferencePopupRight="RemReferencePopupRight",t.Pane="Pane",t.FlashcardAnswerButtons="FlashcardAnswerButtons",t.FlashcardAnswer="FlashcardAnswer",t.Flashcard="Flashcard",t.FlashcardExtraDetail="FlashcardExtraDetail",t.FlashcardUnder="FlashcardUnder",t.RightSidebar="RightSidebar",t.LeftSidebar="LeftSidebar",t.Popup="Popup",t.UnderRemEditor="UnderRemEditor",t.RightSideOfEditor="RightSideOfEditor",t.SelectedTextMenu="SelectedTextMenu",t.PDFHighlightToolbarLocation="PDFHighlightToolbarLocation",t.PDFHighlightPopupLocation="PDFHighlightPopupLocation",t.DeckPage="DeckPage",t.LearningProgressPage="LearningProgressPage",t))(au||{}),Ur=(t=>(t.Aliases="l",t.AutoSort="a",t.AppliedTemplates="at",t.AutoTemplate="m",t.CustomCSS="c",t.DailyDocument="d",t.DisableCards="u",t.Divider="dv",t.Document="o",t.DocumentSidebar="s",t.EditLater="e",t.Emoji="j",t.ExtraCardDetail="x",t.Header="r",t.Highlight="h",t.Link="b",t.List="i",t.MultipleChoice="mc",t.MultiLineCard="w",t.PDFPageNumber="pn",t.PDFHighlight="n",t.QuickAdd="q",t.Quote="qt",t.RestoredFromTrash="rt",t.Slot="y",t.Sources="os",t.SuperPrivate="k",t.TableOfContent="toc",t.TextToSpeech="tts",t.EmbedWebsite="ew",t.UsedAsTag="g",t.Todo="t",t.UploadedFile="f",t.WebHighlight="p",t.Website="z",t.Code="cd",t.TypeInAnswer="ty",t.Deck="de",t.SearchPortal="sp",t.Collection="ct",t.HTMLHighlight="hh",t.HideQueueAncestors="ha",t.ImportedDocument="id",t.Image="im",t.SavedDocuments="sd",t.Callout="clo",t))(Ur||{});const Zr={ha:{},l:{Aliases:"a"},ct:{Template:"t"},a:{SortDirection:"d"},cd:{Language:"l",DontWrap:"w",DontBoundHeight:"b"},m:{},c:{},d:{Timestamp:"s",Date:"d"},u:{},o:{Status:"s",DeprecatedSource:"o"},s:{},dv:{},e:{Message:"m"},j:{},x:{},r:{Size:"s"},h:{Color:"c"},b:{URL:"u",Title:"t",ReadPercent:"r",LastReadDate:"d",FileURL:"f"},i:{},w:{},n:{Data:"d",PdfId:"p"},hh:{Data:"d",HTMLId:"h"},pn:{},q:{},qt:{},rt:{Date:"d"},y:{SelectTag:"t",ExtraSlotsOnFrontOfCard:"f",ExtraSlotsOnBackOfCard:"b"},os:{Sources:"os"},at:{Templates:"t"},sp:{Query:"q",Filter:"f",AutomaticBacklinkSearchPortalFor:"b",DontIncludeNestedDescendants:"s"},k:{},g:{AutoActivate:"a",Pinned:"p",CollapseConfigure:"c",PrimaryColumnName:"n"},t:{Status:"s"},ew:{URL:"u",WIDTH:"w",HEIGHT:"h"},toc:{},tts:{},f:{Type:"t",URL:"u",Name:"n",Authors:"a",Keywords:"k",Title:"i",ViewerData:"v",ReadPercent:"r",LastReadDate:"d",HasNoTextLayer:"tl",Theme:"h"},p:{Data:"d",Url:"w"},z:{Hostname:"u"},clo:{BulletIcon:"b"},ty:{},de:{Topics:"t",Status:"s",MaxNewCardsPerDay:"m",MaxTotalCardsPerDay:"c",ExamSchedulerDate:"e",RetrievabilityPeriodStartDate:"r",ConsolidationPeriodStartDate:"pmd",ConsolidationPeriodReIntroSectionLength:"pml",ExamConfig:"ec",SavedExamInfo:"ei",ExamSchedulerDesiredStability:"eds",ExamSchedulerMaxNewCardsPerDay:"emnc",ExamSchedulerMaxTotalCardsPerDay:"emtc",ExamSchedulerCollection:"emcd"},id:{},sd:{},mc:{},im:{Image:"i"}};var uu=(t=>(t[t.DEFAULT_TYPE=void 0]="DEFAULT_TYPE",t[t.CONCEPT=1]="CONCEPT",t[t.DESCRIPTOR=2]="DESCRIPTOR",t))(uu||{}),Is=(t=>(t[t.DEFAULT_TYPE=void 0]="DEFAULT_TYPE",t[t.CONCEPT=1]="CONCEPT",t[t.DESCRIPTOR=2]="DESCRIPTOR",t[t.DEPRECATED_BASIC_CARD=4]="DEPRECATED_BASIC_CARD",t[t.PORTAL=6]="PORTAL",t[t.DEPRECATED_SLOT=3]="DEPRECATED_SLOT",t[t.DEPRECATED_PATTERN=5]="DEPRECATED_PATTERN",t[t.DEPRECATED_COLLECTION=7]="DEPRECATED_COLLECTION",t[t.DEPRECATED_TEXT=8]="DEPRECATED_TEXT",t))(Is||{}),cu=(t=>(t[t.DEFAULT_TYPE=0]="DEFAULT_TYPE",t[t.CONCEPT=1]="CONCEPT",t[t.DESCRIPTOR=2]="DESCRIPTOR",t[t.PORTAL=3]="PORTAL",t))(cu||{});function du(t){switch(t){case 1:return 1;case 2:return 2;case 6:return 3;default:return 0}}d(du,"remTypeToTinyGraphType");function fu(t){switch(t){case 1:return 1;case 2:return 2;case 3:return 6;default:return Is.DEFAULT_TYPE}}d(fu,"remTypeTinyGraphToNormal");var pu=(t=>(t.MultipleWindows="multipleWindows",t.MultipleWindowsPanel="multipleWindowsPanel",t.Dropdown="Dropdown",t.Breadcrumbs="Breadcrumbs",t.FloatingDiscussion="floatingDiscussion",t.WindowManager="windowManager",t.RemPage="RemPage",t.WindowPane="windowPane",t.MobileTabBar="MobileTabBar",t.Document="document",t.NotificationPanel="notificationPanel",t.EmojiPicker="EmojiPicker",t.HierarchyEditorTree="hierarchyEditorTree",t.ChangeCodeLanguage="ChangeCodeLanguage",t.HierarchyEditorTreePortal="hierarchyEditorTreePortal",t.HierarchyEditorTreeRem="hierarchyEditorTreeRem",t.RichTextEditor="richTextEditor",t.RichTextEditorItem="richTextEditorItem",t.RichTextEditorAliasPopup="richTextEditorAliasPopup",t.TableCellList="tableCellList",t.TableCellPopup="tableCellPopup",t.Table="Table",t.ColumnConfigurationMenu="columnConfigurationMenu",t.Popup="popup",t.Omnibar="omnibar",t.QuickAdd="quickAdd",t.Date="date",t.Queue="queue",t.TypeAnswerBox="typeAnswerBox",t.QueryBuilder="queryBuilder",t.PublishedKnowledgeBase="publishedKnowledgeBase",t.ArticleViewer="articleViewer",t.Article="article",t.FullPageSearch="fullPageSearch",t.ExtraDate="extraDate",t.DropToOpenAsDocument="dropToOpenAsDocument",t.TableSearch="TableSearch",t.PDF="pdf",t.PdfPageNumber="pdfPageNumber",t.NotesPopup="notesPopup",t.PDFUploader="pdfUploader",t.Reader="reader",t.RemSearchPopup="remSearchPopup",t.Debugger="debugger",t.SelectRem="selectRem",t.ExpressionSelect="ExpressionSelect",t.HiddenChildren="hiddenChildren",t.TableTitle="tableTitle",t.TableTagTitle="tableTagTitle",t.TableColumnTitle="tableColumnTitle",t.Toolbar="toolbar",t.Title="title",t.SidebarTitleEdit="sidebarTitleEdit",t.ArticleQueue="articleQueue",t.UserDocument="userDocument",t.DocumentSidebar="documentSidebar",t.RightSidebar="rightSidebar",t.Documents="documents",t.AudioVideo="audioVideo",t.ImageNode="imageNode",t.QueryNodeEditor="queryNodeEditor",t.LinkBox="linkBox",t.SelectedTextMenu="selectedTextMenu",t.RemReferenceNode="remReferenceNode",t.DeckTopicsList="deckTopics",t.DeckTopic="deckTopic",t.AddDeckTopic="addDeckTopic",t.DocSources="docSources",t.DocTags="docTags",t.AddSources="addSources",t.AddTags="addTags",t.InlineLink="inlineLink",t.ImageSelector="imageSelector",t.Latex="latex",t.Image="image",t.Cloze="cloze",t.Alias="alias",t.QueueFolderDropdownSelector="queueFolderDropdownSelector",t.CustomEditLaterMessage="customEditLaterMessage",t.DocumentParents="documentParents",t.AreaHighlight="areaHighlight",t.WindowOne="windowOne",t.WindowTwo="windowTwo",t.Replace="replace",t.Find="find",t.Tag="tag",t.TagBar="tagBar",t.Menu="menu",t.Screenshot="screenshot",t.HelpMessage="helpMessage",t.AddNode="addNode",t.EditEdge="editEdge",t.Controls="controls",t.DocumentSource="documentSource",t.Merge="merge",t.HierarchyEditorTemplateFields="hierarchyEditorTemplateFields",t.SearchExistingTable="searchExistingTable",t.FieldKey="fieldKey",t.PluginRemRichTextEditor="pluginRemRichTextEditor",t.PluginRichTextViewer="pluginRichTextViewer",t.RemHierarchyEditorTree="remHierarchyEditorTree",t.PluginQueue="pluginQueue",t.RichTextEditorFakeEmbed="richTextEditorFakeEmbed",t.DocumentHeader="documentHeader",t.EmbedWebsite="embedWebsite",t.TemplateValueEditor="TemplateValueEditor",t.TemplateValueTextEditor="TemplateValueTextEditor",t.Key="key",t.Value="value",t.CtrlF="ctrlF",t.CtrlFFind="ctrlFind",t.CtrlFReplace="ctrlReplace",t.CtrlFFilter="ctrlFilter",t.SearchResult="searchResult",t.SearchResultItem="searchResultItem",t.FocusableInput="focusableInput",t.UpvoteDownvoteFeedback="UpvoteDownvoteFeedback",t.RightSidebarHelpInput="RightSidebarHelpInput",t.LeftSidebarTutorial="LeftSidebarTutorial",t.CardTableSearchQuery="cardTableSearchQuery",t.Tab="tab",t.ExamDeckRemSearchPopup="ExamDeckRemSearchPopup",t.RightSideImagePopup="RightSideImagePopup",t.RightSideUploadedImagePopup="RightSideUploadedImagePopup",t.RemDocumentSidebar="RemDocumentSidebar",t.RemEmoji="remEmoji",t.FlashcardPreview="FlashcardPreview",t.HoverPreview="HoverPreview",t))(pu||{}),hu=(t=>(t.Text="text",t.SelectedRange="selectedRange",t))(hu||{}),Os=(t=>(t.Global="global",t.RemFocused="rem-focused",t.RemSelected="rem-selected",t))(Os||{}),Wr=(t=>(t[t.IMPLICIT_TEXT=void 0]="IMPLICIT_TEXT",t.NUMBER="number",t.DEPRECATED_TITLE="title",t.TEXT="text",t.CHECKBOX="checkbox",t.DATE="date",t.MULTI_SELECT="multi_select",t.SINGLE_SELECT="single_select",t.CREATED_AT="created_at",t.LAST_UPDATED="last_updated",t.IMAGE="image",t.URL="url",t.DEFINITION="definition",t))(Wr||{}),mu=(t=>(t.PropertyConfigMenu="PropertyConfigMenu",t.QueueMenu="QueueMenu",t.ReaderMenu="ReaderMenu",t.PDFHighlightPopupLocation="PDFHighlightPopupLocation",t.DocumentMenu="DocumentMenu",t))(mu||{});const gu=E.union([E.object({type:E.literal("email")}),E.object({type:E.literal("url")}),E.object({type:E.literal("regex"),arg:E.string()}),E.object({type:E.literal("startsWith"),arg:E.string()}),E.object({type:E.literal("endsWith"),arg:E.string()}),E.object({type:E.literal("min"),arg:E.number().positive()}),E.object({type:E.literal("max"),arg:E.number().positive()}),E.object({type:E.literal("length"),arg:E.number().positive()})]),yu=E.union([E.object({type:E.literal("gte"),arg:E.number()}),E.object({type:E.literal("min"),arg:E.number()}),E.object({type:E.literal("gt"),arg:E.number()}),E.object({type:E.literal("lt"),arg:E.number()}),E.object({type:E.literal("lte"),arg:E.number()}),E.object({type:E.literal("int")}),E.object({type:E.literal("multipleOf"),arg:E.number()}),E.object({type:E.literal("step"),arg:E.number()}),E.object({type:E.literal("positive")}),E.object({type:E.literal("negative")}),E.object({type:E.literal("max"),arg:E.number()})]);var bs=(t=>(t[t.TOO_EARLY=.01]="TOO_EARLY",t[t.AGAIN=0]="AGAIN",t[t.HARD=.5]="HARD",t[t.GOOD=1]="GOOD",t[t.EASY=1.5]="EASY",t[t.VIEWED_AS_LEECH=2]="VIEWED_AS_LEECH",t[t.RESET=3]="RESET",t[t.MANUAL_DATE=4]="MANUAL_DATE",t[t.MANUAL_EASE=5]="MANUAL_EASE",t))(bs||{}),nn=(t=>(t.Queue="Queue",t.PreviewRemCards="ViewAsCard",t.LoadingSpinner="LoadingSpinner",t.RichTextEditor="RichTextEditor",t.RichText="RichTextViewer",t.RemRichTextEditor="RemRichTextEditor",t.RemViewer="RemViewer",t.RemHierarchyEditorTree="RemHierarchyEditorTree",t.PDFWebReader="PDFWebReader",t.DocumentViewer="DocumentViewer",t))(nn||{});const vu={REM:"q",IMAGE:"i",AUDIO:"a",PLUGIN:"p",DRAWING:"r",GLOBAL_NAME:"g",DEPRECATED_CODE:"o",ANNOTATION:"n",TEXT:"m",LATEX:"x",CARD_DELIMITER:"s",FLASHCARD_ICON:"fi",DYNAMIC_ICON:"di",ADD_ICON:"ai"},Wt={CLOZE:"cId",UNDERLINE:"u",SUBSCRIPT:"sub",SUPERSCRIPT:"sup",BOLD:"b",STRIKETHROUGH:"str",ITALIC:"l",INLINE_LINK:"qId",INLINE_CODE:"q",QUOTE:"qt",HIDDEN_CLOZE:"hiddenCloze",REVEALED_CLOZE:"revealedCloze",HIGHLIGHT:"h",TEXT_COLOR:"tc",DEPRECATED_LINK:"url",CODE:"code",CODE_LANGUAGE:"language",COMMENT_ID:"c",CLOZE_HINT:"cloze-hint",CARD_HINT_FRONT:"card-hint-front",CARD_HINT_BACK:"card-hint-back",MULTILINE_CARD_HINT:"multiline-card-item-hint"},Nn={UNDERLINE:"u",BOLD:"b",ITALIC:"t",INLINE_CODE:"c",CLOZE:"e",HIDDEN_CLOZE:"z",LINK:"l",HIGHLIGHT:"h",DATE:"d"},Xc={LATEX:"x"},Jc={[Nn.UNDERLINE]:Wt.UNDERLINE,[Nn.BOLD]:Wt.BOLD,[Nn.ITALIC]:Wt.ITALIC,[Nn.INLINE_CODE]:Wt.INLINE_CODE,[Nn.CLOZE]:Wt.CLOZE,[Nn.HIDDEN_CLOZE]:Wt.HIDDEN_CLOZE,[Nn.LINK]:Wt.DEPRECATED_LINK,[Nn.HIGHLIGHT]:Wt.HIGHLIGHT,[Nn.DATE]:!0};var Ns=(t=>(t[t.PORTAL=void 0]="PORTAL",t[t.EMBEDDED_QUEUE=2]="EMBEDDED_QUEUE",t[t.SCAFFOLD=3]="SCAFFOLD",t[t.SEARCH_PORTAL=4]="SEARCH_PORTAL",t))(Ns||{}),Ds=(t=>(t[t.OFFSET=0]="OFFSET",t[t.UNIT=1]="UNIT",t[t.CHARACTER=2]="CHARACTER",t[t.WORD=3]="WORD",t[t.WORD_START=4]="WORD_START",t[t.WORD_END=5]="WORD_END",t[t.LINE=6]="LINE",t))(Ds||{}),ki=(t=>(t.SRSScheduleCard="SRSScheduleCard",t.GetNextCard="GetNextCard",t))(ki||{}),Ri=(t=>(t.RetrievabilityPeriodPreExam="pre_exam",t.MaintenancePeriod="maintenance_period",t.EnterConsolidationPeriod="enter_consolidation_period",t.ConsolidationPeriod="consolidation_period",t.NotGoodEnoughForExam="exam_not_good",t.PostponedExamStartDate="postpone_start",t.NormalRepetition="normal_repetition",t))(Ri||{});const ed=["pre_exam","maintenance_period","enter_consolidation_period","consolidation_period","exam_not_good","postpone_start"];var Ii=(t=>(t[t.Enum=void 0]="Enum",t.AnyRem="any",t.Relation="relation",t))(Ii||{}),wu=(t=>(t.Queue="Queue",t))(wu||{}),wl=(t=>(t.RIGHT="right",t.BELOW="label",t.ONLY_DOCUMENT="only_document",t.ONLY_IN_TABLE="only_table",t[t.INLINE=void 0]="INLINE",t))(wl||{}),Co=(t=>(t.NumReviews="num_reviews",t.DueDate="due_date",t.IsEnabled="is_enabled",t.IsDue="is_due",t.IsLeech="is_leech",t.CardMasteryLevel="card_mastery_level",t.CreatedAt="created_at",t))(Co||{}),at=(t=>(t.Text="Text",t.Reference="Reference",t.Portal="Portal",t.Tag="Tag",t.TagWithoutInheritance="TagWithoutInheritance",t.Connection="Connection",t.IsDescendantOf="IsDescendantOf",t.InDocument="InDocument",t.RemType="RemType",t.Date="Date",t.MultiSelect="Multi Select",t.LegacyMultiSelect="MultiSelect",t.SingleSelect="Single Select",t.LegacySingleSelect="SingleSelect",t.Checkbox="Checkbox",t.Number="NumberExpression",t))(at||{}),qe=(t=>(t.Or="or",t.And="and",t.Not="not",t.Expression="expression",t.GetSlot="get_slot",t.GetCardInfo="get_card_info",t))(qe||{});const As=E.object({exp:E.literal("not"),exp1:E.lazy(()=>Ni)}),js=E.object({exp:E.union([E.literal("and"),E.literal("or")]),exps:E.lazy(()=>Ni.array()),cannotRemove:E.boolean().optional()}),_u=E.object({exp:E.literal("get_slot"),slotRemId:E.string(),exps:E.lazy(()=>Ni)}),xu=E.object({exp:E.literal("get_card_info"),cardField:E.nativeEnum(Co),exp1:E.lazy(()=>Ni)}),Eu=E.object({exp:E.literal("expression"),refType:E.enum(["Reference","Portal","Tag","TagWithoutInheritance","IsDescendantOf","InDocument","Connection"]),remId:E.string(),cannotRemove:E.boolean().optional(),cannotAdd:E.boolean().optional()}),Su=E.enum(["concept","descriptor","none"]),Tu=E.object({exp:E.literal("expression"),refType:E.literal("RemType"),remType:Su});var Vt=(t=>(t.Checked="checked",t.Unchecked="unchecked",t))(Vt||{}),Ls=(t=>(t.Contains="contains",t.DoesNotContain="doesNotContain",t.Is="is",t.IsNot="notIs",t.StartsWith="startsWith",t.EndsWith="endsWith",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t.DefaultContains="",t))(Ls||{});const Po=["contains","is","startsWith","endsWith",""];var _l=(t=>(t.Is="is",t.IsNot="notIs",t.GreaterThan="greaterThan",t.LessThan="lessThan",t.GreaterThanOrEquals="greaterThanOrEquals",t.LessThanOrEquals="lessThanOrEquals",t.IsEmpty="notEmpty",t.IsNotEmpty="empty",t))(_l||{}),Oi=(t=>(t.Is="is",t.IsBefore="before",t.IsAfter="after",t.IsOnOrBefore="onOrBefore",t.IsOnOrAfter="onOrAfter",t.IsBetween="between",t.IsRelativeToToday="relativeToToday",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(Oi||{}),ko=(t=>(t.Today="today",t.StartOfTheWeek="startoftheweek",t.StartOfTheMonth="startofthemonth",t.StartOfTheYear="startoftheyear",t.EndOfTheWeek="endoftheweek",t.EndOfTheMonth="endofthemonth",t.EndOfTheYear="endoftheyear",t))(ko||{});const Cu={today:"Today",startoftheweek:"Start of the week",startofthemonth:"Start of the month",startoftheyear:"Start of the year",endoftheweek:"End of the week",endofthemonth:"End of the month",endoftheyear:"End of the year"};var Ro=(t=>(t.Contains="contains",t.DoesNotContain="doesNotContains",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(Ro||{}),xl=(t=>(t.Is="is",t.IsNot="notIs",t.IsEmpty="empty",t.IsNotEmpty="notEmpty",t))(xl||{});const bi=Object.values(Oi).filter(t=>t!=="relativeToToday");var Io=(t=>(t.Past="past",t.Next="next",t.This="this",t))(Io||{}),Vr=(t=>(t.Day="day",t.Week="week",t.Month="month",t.Year="year",t))(Vr||{});const Fs={"":"contains",contains:"contains",is:"is",notIs:"is not",doesNotContain:"does not contain",startsWith:"starts with",endsWith:"ends with",empty:"is empty",notEmpty:"is not empty"},Pu={is:"is",empty:"is empty",notEmpty:"is not empty",after:"is after",before:"is before",between:"is between",onOrAfter:"is on or after",onOrBefore:"is on or before",relativeToToday:"is relative to today"},ku={is:"is",notIs:"is not",notEmpty:"is empty",empty:"is not empty",greaterThan:"is greater than",lessThan:"is less than",greaterThanOrEquals:"is greater than or equals",lessThanOrEquals:"is less than or equals"},Ms={contains:"contains",doesNotContains:"does not contains",empty:"is empty",notEmpty:"is not empty"},Oo={is:"is",notIs:"is not",empty:"is empty",notEmpty:"is not empty"},Ru=E.object({exp:E.literal("expression"),refType:E.literal("Text"),text:E.string(),matcherType:E.nativeEnum(Ls)}),zs=E.object({exp:E.literal("expression"),refType:E.literal("NumberExpression"),text:E.string(),matcherType:E.nativeEnum(_l)}),El=E.object({exp:E.literal("expression"),refType:E.literal("Date"),date:E.string().optional(),optionalDate:E.string().optional(),dateRelativeMatcher:E.nativeEnum(ko).optional(),optionalDateRelativeMatcher:E.nativeEnum(ko).optional(),relativeDateModifier:E.nativeEnum(Io).optional(),relativePeriodOffset:E.number().optional(),relativeDatePeriod:E.nativeEnum(Vr).optional(),matcherType:E.nativeEnum(Oi)}),$e=E.object({exp:E.literal("expression"),refType:E.literal("Multi Select"),matcherType:E.nativeEnum(Ro),remIds:E.array(E.string()).optional()}),Bs=E.object({exp:E.literal("expression"),refType:E.literal("SingleSelect"),matcherType:E.nativeEnum(xl),remId:E.string().optional()}),Us=E.object({exp:E.literal("expression"),refType:E.literal("Checkbox"),value:E.nativeEnum(Vt)}),Zs=E.object({exp:E.literal("expression"),refType:E.literal("Single Select"),matcherType:E.nativeEnum(xl),remIds:E.array(E.string()).optional()}),Ws=E.lazy(()=>E.union([Eu,Ru,zs,Tu,El,$e,Zs,Bs,Us,El])),Ni=E.lazy(()=>E.union([As,js,_u,xu,Ws])),Hr=E.object({code:E.string(),name:E.string(),onlyProgrammaticModifying:E.boolean().optional(),hidden:E.boolean().optional(),enumValues:E.record(E.string()).optional(),defaultEnumValue:E.string().optional(),propertyType:E.nativeEnum(Wr).optional(),propertyLocation:E.nativeEnum(wl).optional(),selectSourceType:E.nativeEnum(Ii).optional(),dontPublishToSharedArticle:E.boolean().optional()}),Sl=E.union([E.object({slots:Hr.array()}),E.object({properties:Hr.array()})]);var Qr=(t=>(t[t.ForwardCard=1]="ForwardCard",t[t.BackwardCard=2]="BackwardCard",t[t.EditInQueue=3]="EditInQueue",t[t.QueueNoticeCard=4]="QueueNoticeCard",t[t.ClozeCard=5]="ClozeCard",t[t.DocumentCard=6]="DocumentCard",t[t.SelectCluster=7]="SelectCluster",t[t.SubFolderSelector=8]="SubFolderSelector",t[t.DailyTargetGoalSelector=10]="DailyTargetGoalSelector",t[t.StreakGoalSelector=11]="StreakGoalSelector",t[t.AddExtraNewOrStaleCards=12]="AddExtraNewOrStaleCards",t[t.SignUpToSaveProgress=14]="SignUpToSaveProgress",t[t.Plugin=15]="Plugin",t[t.DailyCheckpoint=16]="DailyCheckpoint",t[t.Checkpoint=17]="Checkpoint",t[t.Leech=18]="Leech",t[t.StartExamPractice=19]="StartExamPractice",t[t.EndExamPractice=20]="EndExamPractice",t[t.TransitionOutOfActive=21]="TransitionOutOfActive",t[t.PracticeBuried=22]="PracticeBuried",t[t.PracticeAgainForExamTomorrowSlide=23]="PracticeAgainForExamTomorrowSlide",t[t.OfflineImageCards=24]="OfflineImageCards",t[t.PrivateCards=25]="PrivateCards",t))(Qr||{});const Vs={1:"Forward Card",2:"Backward Card",3:"Edit in Queue",4:"Queue Notice Card",5:"Cloze Card",6:"Document Card",7:"Select Cluster",8:"Subfolder Selector",10:"Daily Target Goal Selector",11:"Streak Goal Selector",12:"Add Extra New or Stale Cards",14:"Sign Up to Save Progress",15:"Plugin",16:"Daily Checkpoint",21:"Transition Out Of Active",17:"Checkpoint",18:"Leech",19:"Start Exam Practice",20:"End Exam Practice",22:"Practice Buried",23:"Practice Again for Exam Tomorrow",24:"Offline Image Cards",25:"Private Cards"},Tl=Yc(lu({},Vs),{18:"It looks like you're struggling to learn and retain this card."});var Hs=Be(854),Cl=Be.n(Hs),Iu=Object.defineProperty,Pl=Object.getOwnPropertySymbols,Ou=Object.prototype.hasOwnProperty,td=Object.prototype.propertyIsEnumerable,Qs=d((t,r,i)=>r in t?Iu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"app_defNormalProp"),Di=d((t,r)=>{var i={};for(var l in t)Ou.call(t,l)&&r.indexOf(l)<0&&(i[l]=t[l]);if(t!=null&&Pl)for(var l of Pl(t))r.indexOf(l)<0&&td.call(t,l)&&(i[l]=t[l]);return i},"__objRest"),ut=d((t,r,i)=>(Qs(t,typeof r!="symbol"?r+"":r,i),i),"app_publicField"),mt=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"app_async");const nd="app";class Ai extends st{constructor(r,i){super(r,nd),ut(this,"plugin"),ut(this,"waitForInitialSync",()=>mt(this,null,function*(){yield this._call("waitForInitialSync",{})})),ut(this,"registerPowerup",l=>mt(this,null,function*(){yield this._call("registerPowerup",l)})),ut(this,"registerWidget",(l,a,c)=>mt(this,null,function*(){yield this._call("registerWidget",{fileName:l,location:a,options:c})})),ut(this,"unregisterWidget",(l,a)=>mt(this,null,function*(){yield this._call("unregisterWidget",{fileName:l,location:a})})),ut(this,"registerCommand",l=>mt(this,null,function*(){const a=l,{action:c}=a,p=Di(a,["action"]),h=l.id;this.plugin.model[h]=c,yield this._call("registerCommand",p)})),ut(this,"registerSidebarButton",l=>mt(this,null,function*(){const{id:a,name:c,action:p}=l;this.plugin.model[a]=p,yield this._call("registerSidebarButton",{id:a,name:c})})),ut(this,"registerRemMenuItem",l=>mt(this,null,function*(){const{id:a,name:c,action:p}=l;this.plugin.model[a]=p,yield this._call("registerRemMenuItem",{id:a,name:c})})),ut(this,"registerMenuItem",l=>mt(this,null,function*(){const{id:a,name:c,action:p,location:h}=l;this.plugin.model[a]=p,yield this._call("registerMenuItem",{id:a,name:c,location:h})})),ut(this,"unregisterMenuItem",l=>mt(this,null,function*(){yield this._call("unregisterMenuItem",{id:l})})),ut(this,"stealKeys",l=>mt(this,null,function*(){yield this._call("stealKeys",{keys:l})})),ut(this,"releaseKeys",l=>mt(this,null,function*(){yield this._call("releaseKeys",{keys:l})})),ut(this,"registerCSS",(l,a)=>mt(this,null,function*(){yield this._call("registerCSS",{id:l,css:a})})),ut(this,"registerStatusBarItem",(l,a)=>mt(this,null,function*(){yield this._call("registerStatusBarItem",{id:l,html:a})})),ut(this,"getOperatingSystem",()=>mt(this,null,function*(){return yield this._call("getOperatingSystem",{})})),ut(this,"getPlatform",()=>mt(this,null,function*(){return yield this._call("getPlatform",{})})),ut(this,"registerCallback",(l,a)=>{this.plugin.model[l]=a}),ut(this,"transaction",l=>mt(this,null,function*(){const a=Math.random().toString();this.registerCallback(a,l);const c=yield this._call("transaction",{id:a});return delete this.plugin.model[a],c})),ut(this,"toast",l=>mt(this,null,function*(){yield this._call("toast",{message:l,options:{}})})),this.plugin=i}}d(Ai,"AppNamespace");var fr=Object.defineProperty,kl=d((t,r,i)=>r in t?fr(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"date_defNormalProp"),$r=d((t,r,i)=>(kl(t,typeof r!="symbol"?r+"":r,i),i),"date_publicField"),$s=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"date_async");const Kr="date";class Gr extends st{constructor(r){super(r,Kr),$r(this,"getDailyDoc",i=>$s(this,null,function*(){const l=yield this.call("getDailyDoc",{date:i});if(l)return new ht(l,this._call)})),$r(this,"getTodaysDoc",()=>$s(this,null,function*(){const i=yield this.call("getTodaysDoc",{});if(i)return new ht(i,this._call)}))}}d(Gr,"DateNamespace");var ji=Object.defineProperty,bo=Object.getOwnPropertySymbols,bu=Object.prototype.hasOwnProperty,Ks=Object.prototype.propertyIsEnumerable,pr=d((t,r,i)=>r in t?ji(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"editor_defNormalProp"),hr=d((t,r)=>{for(var i in r||(r={}))bu.call(r,i)&&pr(t,i,r[i]);if(bo)for(var i of bo(r))Ks.call(r,i)&&pr(t,i,r[i]);return t},"editor_spreadValues"),ye=d((t,r,i)=>(pr(t,typeof r!="symbol"?r+"":r,i),i),"editor_publicField"),Se=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"editor_async");const mr="editor";class _t extends st{constructor(r){super(r,mr),ye(this,"setText",i=>Se(this,null,function*(){return this.call("setText",{richText:i})})),ye(this,"copy",()=>Se(this,null,function*(){return this.call("copy",{})})),ye(this,"cut",()=>Se(this,null,function*(){return this.call("cut",{})})),ye(this,"deleteCharacters",(i,l)=>Se(this,null,function*(){return this.call("deleteCharacters",{characters:i,direction:l})})),ye(this,"delete",()=>Se(this,null,function*(){return this.call("delete",{})})),ye(this,"getSelectedRem",()=>Se(this,null,function*(){const i=yield this.getSelection();return i&&i.type===yl.Rem?i:void 0})),ye(this,"getSelectedText",()=>Se(this,null,function*(){const i=yield this.getSelection();return i&&i.type===yl.Text?i:void 0})),ye(this,"getSelection",()=>Se(this,null,function*(){return this.call("getSelection",{})})),ye(this,"selectRem",(i,l)=>Se(this,null,function*(){return this.call("setSelectedLines",{range:i,portalId:l})})),ye(this,"selectText",i=>Se(this,null,function*(){return this.call("setSelectedRichText",hr({},i))})),ye(this,"collapseSelection",i=>Se(this,null,function*(){return this.call("collapseSelection",{to:i})})),ye(this,"undo",()=>Se(this,null,function*(){return this.call("undo",{})})),ye(this,"redo",()=>Se(this,null,function*(){return this.call("redo",{})})),ye(this,"moveCaret",(i,l)=>Se(this,null,function*(){return this.call("moveCaret",{amount:i,unit:l})})),ye(this,"moveCaretVertical",i=>Se(this,null,function*(){return this.call("moveCaretVertical",{direction:i})})),ye(this,"getCaretPosition",()=>Se(this,null,function*(){return this.call("getCaretPosition",{})})),ye(this,"insertPlainText",i=>Se(this,null,function*(){return this.call("insertPlainText",{string:i})})),ye(this,"insertRichText",i=>Se(this,null,function*(){return this.call("insertRichText",{richText:i})})),ye(this,"insertMarkdown",i=>Se(this,null,function*(){return this.call("insertMarkdown",{markdown:i})})),ye(this,"getFocusedEditorText",()=>Se(this,null,function*(){return this.call("getFocusedEditorText",{})}))}}d(_t,"EditorNamespace");var Ht=Object.defineProperty,qr=d((t,r,i)=>r in t?Ht(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"event_defNormalProp"),gr=d((t,r,i)=>(qr(t,typeof r!="symbol"?r+"":r,i),i),"event_publicField");const Qt="event";class Li extends st{constructor(r,i){super(r,Qt),gr(this,"plugin"),gr(this,"addListener",(l,a,c)=>{l in this.plugin.listeners||(this.plugin.listeners[l]=new Map),this.plugin.listeners[l].get(a)||this.plugin.listeners[l].set(a,[]),!this.plugin.listeners[l].get(a).includes(c)&&(this.plugin.listeners[l].get(a).push(c),this._call("events.addListener",{eventId:l,listenerKey:a}))}),gr(this,"removeListener",(l,a,c)=>{const p=this.plugin.listeners[l];if(!p)return;const h=p.get(a);if(h){if(c){const g=h.indexOf(c);if(g==-1)return;h.splice(g,1)}else h.splice(0,h.length);h.length===0&&(p.delete(a),this._call("events.removeListener",{eventId:l,listenerKey:a}))}}),this.plugin=i}}d(Li,"EventNamespace");var Nu=Object.defineProperty,Du=d((t,r,i)=>r in t?Nu(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"focus_defNormalProp"),No=d((t,r,i)=>(Du(t,typeof r!="symbol"?r+"":r,i),i),"focus_publicField"),Gs=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"focus_async");const qs="focus";class qn extends st{constructor(r){super(r,qs),No(this,"getFocusedRem",()=>Gs(this,null,function*(){const i=yield this.call("getFocusedRem",{});return i?new ht(i,this._call):void 0})),No(this,"getFocusedPortal",()=>Gs(this,null,function*(){const i=yield this.call("getFocusedPortal",{});return i?new ht(i,this._call):void 0}))}}d(qn,"FocusNamespace");var rd=Object.defineProperty,Ys=d((t,r,i)=>r in t?rd(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"knowledge_base_defNormalProp"),Fi=d((t,r,i)=>(Ys(t,typeof r!="symbol"?r+"":r,i),i),"knowledge_base_publicField"),Au=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"knowledge_base_async");const ju="kb";class Do{constructor(r){Fi(this,"_call"),Fi(this,"call"),Fi(this,"getCurrentKnowledgeBaseData",()=>Au(this,null,function*(){return this.call("getCurrentKnowledgeBaseData",{})})),Fi(this,"isPrimaryKnowledgeBase",()=>Au(this,null,function*(){return this.call("isPrimaryKnowledgeBase",{})})),this._call=r,this.call=On(this._call,ju)}}d(Do,"KnowledgeBaseNamespace");var id=Object.defineProperty,Rl=d((t,r,i)=>r in t?id(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"messaging_defNormalProp"),Lu=d((t,r,i)=>(Rl(t,typeof r!="symbol"?r+"":r,i),i),"messaging_publicField"),Fu=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"messaging_async");const Mu="messaging";class Il extends st{constructor(r){super(r,Mu),Lu(this,"broadcast",i=>Fu(this,null,function*(){return this.call("broadcast",{message:i})}))}}d(Il,"MessagingNamespace");var Xs=Object.defineProperty,od=d((t,r,i)=>r in t?Xs(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"powerup_defNormalProp"),Dn=d((t,r,i)=>(od(t,typeof r!="symbol"?r+"":r,i),i),"powerup_publicField"),Ao=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"powerup_async");const Js="powerup";class Ol extends st{constructor(r){super(r,Js),Dn(this,"getPowerupByCode",i=>Ao(this,null,function*(){const l=yield this.call("getPowerupByCode",{powerupCode:i});if(l)return new ht(l,this._call)})),Dn(this,"getPowerupSlotByCode",(i,l)=>Ao(this,null,function*(){const a=Object.values(Ur).includes(i)?Zr[i][l]:l,c=yield this.call("getPowerupSlotByCode",{powerupCode:i,powerupSlot:a});if(c)return new ht(c,this._call)}))}}d(Ol,"PowerupNamespace");class Ct{static and(r){return{exp:qe.And,exps:r}}static or(r){return{exp:qe.Or,exps:r}}static not(r){return{exp:qe.Not,exp1:r}}static cardInfo(r,i){return{exp:qe.GetCardInfo,cardField:r,exp1:i}}static tableColumn(r,i){return{exp:qe.GetSlot,slotRemId:r,exps:i}}static hasReferenceTo(r){return{exp:qe.Expression,refType:at.Reference,remId:r}}static text(r,i){return{exp:qe.Expression,refType:at.Text,text:i||"",matcherType:r}}static documentsThatContain(r){return{exp:qe.Expression,refType:at.Portal,remId:r}}static isTaggedWith(r){return{exp:qe.Expression,refType:at.Tag,remId:r}}static isDirectlyTaggedWith(r){return{exp:qe.Expression,refType:at.TagWithoutInheritance,remId:r}}static isDescendantOf(r){return{exp:qe.Expression,refType:at.IsDescendantOf,remId:r}}static isInDocument(r){return{exp:qe.Expression,refType:at.InDocument,remId:r}}static hasAnyConnectionTo(r){return{exp:qe.Expression,refType:at.Connection,remId:r}}static hasRemType(r){return{exp:qe.Expression,refType:at.RemType,remType:r}}static tagWithoutInheritance(r){return{exp:qe.Expression,refType:at.TagWithoutInheritance,remId:r}}static multiSelect(r,i){return{exp:qe.Expression,refType:at.MultiSelect,matcherType:r,remIds:i}}static singleSelect(r,i){return{exp:qe.Expression,refType:at.SingleSelect,matcherType:r,remIds:i}}static checkbox(r){return{exp:qe.Expression,refType:at.Checkbox,value:r}}static date(r,i,l){return{exp:qe.Expression,refType:at.Date,matcherType:r,date:typeof i=="string"||i==null?void 0:i.toISOString(),dateRelativeMatcher:typeof i=="string"?i:void 0,optionalDate:typeof l=="string"||l==null?void 0:l.toISOString(),optionalDateRelativeMatcher:typeof l=="string"?l:void 0}}static dateRelativeToToday(r,i,l){return{exp:qe.Expression,refType:at.Date,matcherType:Oi.IsRelativeToToday,relativeDateModifier:r,relativePeriodOffset:l,relativeDatePeriod:i}}static number(r,i){return{exp:qe.Expression,refType:at.Number,text:i?.toString()||"",matcherType:r}}}d(Ct,"Query_DUPE_2");var Mi=Object.defineProperty,zu=d((t,r,i)=>r in t?Mi(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"queue_defNormalProp"),xt=d((t,r,i)=>(zu(t,typeof r!="symbol"?r+"":r,i),i),"queue_publicField"),Rt=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"queue_async");const An="queue";class bl extends st{constructor(r){super(r,An),xt(this,"getAverageTimePerCard",()=>Rt(this,null,function*(){return yield this.call("getAverageTimePerCard",{})})),xt(this,"getCurrentQueueScreenType",()=>Rt(this,null,function*(){return yield this.call("getCurrentQueueScreenType",{})})),xt(this,"goBackToPreviousCard",()=>Rt(this,null,function*(){yield this.call("goBackToPreviousCard",{})})),xt(this,"hasRevealedAnswer",()=>Rt(this,null,function*(){return yield this.call("hasRevealedAnswer",{})})),xt(this,"showAnswer",()=>Rt(this,null,function*(){yield this.call("showAnswer",{})})),xt(this,"rateCurrentCard",i=>Rt(this,null,function*(){yield this.call("rateCurrentCard",{score:i})})),xt(this,"isTypeAnswerEnabled",()=>Rt(this,null,function*(){return yield this.call("isTypeAnswerEnabled",{})})),xt(this,"getCurrentCard",()=>Rt(this,null,function*(){const i=yield this.call("getCurrentCard",{});return i?new Br(i,this._call):void 0})),xt(this,"getNumRemainingCards",()=>Rt(this,null,function*(){return yield this.call("getNumRemainingCards",{})})),xt(this,"getCurrentStreak",()=>Rt(this,null,function*(){return yield this.call("getCurrentStreak",{})})),xt(this,"removeCurrentCardFromQueue",(i=!0)=>Rt(this,null,function*(){yield this.call("removeCurrentCardFromQueue",{addToBackStack:i})})),xt(this,"inLookbackMode",()=>Rt(this,null,function*(){return yield this.call("inLookbackMode",{})}))}}d(bl,"QueueNamespace");var ld=Object.defineProperty,En=d((t,r,i)=>r in t?ld(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"reader_defNormalProp"),Nl=d((t,r,i)=>(En(t,typeof r!="symbol"?r+"":r,i),i),"reader_publicField"),jo=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"reader_async");class yr extends st{constructor(r){super(r,"reader"),Nl(this,"callAndReturnRem",(i,l)=>jo(this,null,function*(){const a=yield this.call(i,l||{});if(a)return new ht(a,this._call)}))}addHighlight(){return jo(this,null,function*(){return this.callAndReturnRem("addHighlight")})}}d(yr,"ReaderNamespace");var Dl=Object.defineProperty,ea=Object.defineProperties,ta=Object.getOwnPropertyDescriptors,na=Object.getOwnPropertySymbols,zi=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,jn=d((t,r,i)=>r in t?Dl(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rich_text_defNormalProp"),ra=d((t,r)=>{for(var i in r||(r={}))zi.call(r,i)&&jn(t,i,r[i]);if(na)for(var i of na(r))fn.call(r,i)&&jn(t,i,r[i]);return t},"rich_text_spreadValues"),Bu=d((t,r)=>ea(t,ta(r)),"rich_text_spreadProps"),de=d((t,r,i)=>(jn(t,typeof r!="symbol"?r+"":r,i),i),"rich_text_publicField"),De=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"rich_text_async");const Uu="richText";class rn{constructor(r){de(this,"richText",[]),de(this,"richTextNamespace"),de(this,"code",(i,l)=>(this.richText.push({i:"m",code:!0,language:l,text:i}),this)),de(this,"image",(i,l,a)=>(this.richText.push({i:"i",url:i,width:l,height:a}),this)),de(this,"rem",i=>{const l={i:"q",_id:pt(i)};return this.richText.push(l),this}),de(this,"text",(i,l=[])=>{if(l.length===0)return this.richText.push(i),this;const a=Object.fromEntries(l.map(c=>vl[c]?["h",vl[c]]:[su[c],!0])||[]);return this.richText.push(Bu(ra({i:"m"},a),{text:i})),this}),de(this,"audio",i=>(this.richText.push({i:"a",url:i,onlyAudio:!0}),this)),de(this,"latex",(i,l=!1)=>(this.richText.push({i:"x",text:i,block:l}),this)),de(this,"video",i=>(this.richText.push({i:"a",url:i,onlyAudio:!1}),this)),de(this,"newline",()=>(this.richText.push(`
46
+ `),this)),de(this,"value",()=>this.richTextNamespace.normalize(this.richText)),this.richTextNamespace=r}}d(rn,"RichTextBuilder");class Al extends st{constructor(r){super(r,Uu),de(this,"indexOfElementAt",(i,l)=>De(this,null,function*(){return this.call("indexOfElementAt",{richText:i,position:l})})),de(this,"normalize",i=>De(this,null,function*(){return this.call("normalize",{richText:i})})),de(this,"removeTextFormatFromRange",(i,l,a,c)=>De(this,null,function*(){return this.call("removeTextFormatFromRange",{text:i,start:l,end:a,format:c})})),de(this,"applyTextFormatToRange",(i,l,a,c)=>De(this,null,function*(){return this.call("applyTextFormatToRange",{text:i,start:l,end:a,format:c})})),de(this,"toggleTextFormatOnRange",(i,l,a,c)=>De(this,null,function*(){return this.call("toggleTextFormatOnRange",{text:i,start:l,end:a,format:c})})),de(this,"replaceAllRichText",(i,l,a)=>De(this,null,function*(){return this.call("replaceAllRichText",{richText:i,findText:l,replacementText:a})})),de(this,"splitRichText",(i,l)=>De(this,null,function*(){return this.call("splitRichText",{richText:i,splitText:l})})),de(this,"empty",(i,l)=>De(this,null,function*(){return this.call("empty",{richText:i,allowSpaces:l})})),de(this,"indexOf",(i,l,a)=>De(this,null,function*(){return this.call("indexOf",{richText:i,character:l,startChar:a})})),de(this,"toHTML",i=>De(this,null,function*(){return this.call("toHTML",{richText:i})})),de(this,"length",i=>De(this,null,function*(){return this.call("length",{richText:i})})),de(this,"trimEnd",i=>De(this,null,function*(){return this.call("trimEnd",{richText:i})})),de(this,"trimStart",i=>De(this,null,function*(){return this.call("trimStart",{richText:i})})),de(this,"trim",i=>De(this,null,function*(){return this.call("trim",{richText:i})})),de(this,"split",(i,l)=>De(this,null,function*(){return this.call("split",{richText:i,separationCharacter:l})})),de(this,"deepGetRemAndAliasIdsFromRichText",i=>De(this,null,function*(){return this.call("deepGetRemAndAliasIdsFromRichText",{richText:i})})),de(this,"deepGetRemIdsFromRichText",i=>De(this,null,function*(){return this.call("deepGetRemIdsFromRichText",{richText:i})})),de(this,"findAllExternalURLs",i=>De(this,null,function*(){return this.call("findAllExternalURLs",{richText:i})})),de(this,"getRemAndAliasIdsFromRichText",i=>De(this,null,function*(){return this.call("getRemAndAliasIdsFromRichText",{richText:i})})),de(this,"getRemIdsFromRichText",i=>De(this,null,function*(){return this.call("getRemIdsFromRichText",{richText:i})})),de(this,"equals",(i,l)=>De(this,null,function*(){return this.call("equals",{richText1:i,richText2:l})})),de(this,"substring",(i,l,a)=>De(this,null,function*(){return this.call("substring",{richText:i,start:l,end:a})})),de(this,"charAt",(i,l)=>De(this,null,function*(){return this.call("charAt",{richText:i,index:l})})),de(this,"toString",i=>De(this,null,function*(){return this.call("toString",{richText:i})})),de(this,"toMarkdown",i=>De(this,null,function*(){return this.call("toMarkdown",{richText:i})})),de(this,"parseFromMarkdown",i=>De(this,null,function*(){return this.call("parseFromMarkdown",{markdown:i})})),de(this,"parseAndInsertHtml",(i,l)=>De(this,null,function*(){const a=pt(l);return this.call("parseAndInsertHtml",{html:i,remId:a})}))}get code(){return new rn(this).code}get image(){return new rn(this).image}get rem(){return new rn(this).rem}get text(){return new rn(this).text}get audio(){return new rn(this).audio}get latex(){return new rn(this).latex}get video(){return new rn(this).video}get newline(){return new rn(this).newline}}d(Al,"RichTextNamespace");const Zu="scheduler";class Bi extends st{constructor(r){super(r,Zu)}registerCustomScheduler(r,i){return this.call("registerCustomScheduler",{name:r,parameters:i})}}d(Bi,"SchedulerNamespace");var jl=Object.defineProperty,Wu=d((t,r,i)=>r in t?jl(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"search_defNormalProp"),Vu=d((t,r,i)=>(Wu(t,typeof r!="symbol"?r+"":r,i),i),"search_publicField"),Hu=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"search_async");const ia="search";class Ui extends st{constructor(r){super(r,ia),Vu(this,"search",(i,l,a)=>Hu(this,null,function*(){const c=pt(l);return((yield this.call("search",{queryText:i,searchContextRemId:c,options:a}))||[]).map(p=>new ht(p,this._call))}))}}d(Ui,"SearchNamespace");var Lo=Object.defineProperty,Fo=Object.getOwnPropertySymbols,Qu=Object.prototype.hasOwnProperty,Ll=Object.prototype.propertyIsEnumerable,Fl=d((t,r,i)=>r in t?Lo(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"settings_defNormalProp"),vr=d((t,r)=>{for(var i in r||(r={}))Qu.call(r,i)&&Fl(t,i,r[i]);if(Fo)for(var i of Fo(r))Ll.call(r,i)&&Fl(t,i,r[i]);return t},"settings_spreadValues"),$t=d((t,r,i)=>(Fl(t,typeof r!="symbol"?r+"":r,i),i),"settings_publicField"),Yn=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"settings_async");const Mo="settings";class Xn extends st{constructor(r){super(r,Mo),$t(this,"registerDropdownSetting",i=>Yn(this,null,function*(){return this.call("registerDropdownSetting",vr({},i))})),$t(this,"registerBooleanSetting",i=>Yn(this,null,function*(){return this.call("registerBooleanSetting",vr({},i))})),$t(this,"registerStringSetting",i=>Yn(this,null,function*(){return this.call("registerStringSetting",vr({},i))})),$t(this,"registerNumberSetting",i=>Yn(this,null,function*(){return this.call("registerNumberSetting",vr({},i))})),$t(this,"getSetting",i=>Yn(this,null,function*(){return yield this.call("getSetting",{settingId:i})}))}}d(Xn,"SettingsNamespace");var oa=Object.defineProperty,Zi=d((t,r,i)=>r in t?oa(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"storage_defNormalProp"),Yr=d((t,r,i)=>(Zi(t,typeof r!="symbol"?r+"":r,i),i),"storage_publicField"),wr=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"storage_async");const et="storage";class Wi extends st{constructor(r){super(r,et),Yr(this,"setSession",(i,l)=>wr(this,null,function*(){return this.call("setSession",{key:i,value:l})})),Yr(this,"getSession",i=>wr(this,null,function*(){if(i)return this.call("getSession",{key:i})})),Yr(this,"setSynced",(i,l)=>wr(this,null,function*(){return this.call("setSynced",{key:i,value:l})})),Yr(this,"getSynced",i=>wr(this,null,function*(){if(i)return this.call("getSynced",{key:i})})),Yr(this,"setLocal",(i,l)=>wr(this,null,function*(){return this.call("setLocal",{key:i,value:l})})),Yr(this,"getLocal",i=>wr(this,null,function*(){if(i)return this.call("getLocal",{key:i})}))}}d(Wi,"StorageNamespace");var Jn=Object.defineProperty,_r=d((t,r,i)=>r in t?Jn(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"widget_defNormalProp"),Kt=d((t,r,i)=>(_r(t,typeof r!="symbol"?r+"":r,i),i),"widget_publicField"),Vi=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"widget_async");const $u="widget";class zo extends st{constructor(r){super(r,$u),Kt(this,"getWidgetsAtLocation",(i,l)=>Vi(this,null,function*(){return this.call("getWidgetsAtLocation",{location:i,remId:l})})),Kt(this,"getDimensions",i=>Vi(this,null,function*(){return this.call("getDimensions",{widgetInstanceId:i})})),Kt(this,"openPopup",(i,l,a)=>Vi(this,null,function*(){return this.call("openPopup",{widgetFileName:i,contextData:l,clickOutsideToClose:a})})),Kt(this,"closePopup",(i=!0)=>Vi(this,null,function*(){return this.call("closePopup",{restoreFocus:i})})),Kt(this,"getWidgetContext",()=>Vi(this,null,function*(){return this.call("getWidgetContext",{})}))}}d(zo,"WidgetNamespace");var Ku=Object.defineProperty,Ml=d((t,r,i)=>r in t?Ku(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"window_defNormalProp"),Ye=d((t,r,i)=>(Ml(t,typeof r!="symbol"?r+"":r,i),i),"window_publicField"),We=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"window_async");const la="window";class Xr extends st{constructor(r){super(r,la),Ye(this,"stealKeys",(i,l)=>We(this,null,function*(){yield this.call("stealKeys",{keys:l,id:i})})),Ye(this,"releaseKeys",(i,l)=>We(this,null,function*(){yield this.call("releaseKeys",{keys:l,id:i})})),Ye(this,"openFloatingWidget",(i,l,a,c)=>We(this,null,function*(){return yield this.call("openFloatingWidget",{fileName:i,position:l,classContainer:a,closeWhenClickOutside:c})})),Ye(this,"closeFloatingWidget",i=>We(this,null,function*(){return yield this.call("closeFloatingWidget",{floatingWidgetId:i})})),Ye(this,"isFloatingWidgetOpen",i=>We(this,null,function*(){return yield this.call("isFloatingWidgetOpen",{floatingWidgetId:i})})),Ye(this,"setFloatingWidgetPosition",(i,l)=>We(this,null,function*(){return yield this.call("setFloatingWidgetPosition",{floatingWidgetId:i,position:l})})),Ye(this,"closeAllFloatingWidgets",()=>We(this,null,function*(){return yield this.call("closeAllFloatingWidgets",{})})),Ye(this,"getCurrentWindowTree",()=>We(this,null,function*(){return yield this.call("getCurrentWindowTree",{})})),Ye(this,"setRemWindowTree",i=>We(this,null,function*(){return yield this.call("setRemWindowTree",{tree:i})})),Ye(this,"getLastFocusedPane",()=>We(this,null,function*(){return yield this.call("getLastFocusedPane",{})})),Ye(this,"setCurrentWindowTreeFromString",i=>We(this,null,function*(){return yield this.call("setCurrentWindowTreeFromString",{treeString:i})})),Ye(this,"getOpenPaneIds",()=>We(this,null,function*(){return yield this.call("getOpenPaneIds",{})})),Ye(this,"getFocusedPaneId",()=>We(this,null,function*(){return yield this.call("getFocusedPaneId",{})})),Ye(this,"setFocusedPaneId",i=>We(this,null,function*(){return yield this.call("setFocusedPaneId",{paneId:i})})),Ye(this,"getURL",()=>We(this,null,function*(){return yield this.call("getURL",{})})),Ye(this,"setURL",i=>We(this,null,function*(){return yield this.call("setURL",{url:i})})),Ye(this,"openRem",i=>We(this,null,function*(){return yield this.call("openRem",{remId:i._id})})),Ye(this,"getOpenPaneRemIds",()=>We(this,null,function*(){return yield this.call("getOpenPaneRemIds",{})})),Ye(this,"getOpenPaneRemId",i=>We(this,null,function*(){if(i)return yield this.call("getOpenPaneRemId",{paneId:i})})),Ye(this,"openWidgetInPane",(i,l)=>We(this,null,function*(){return yield this.call("openWidgetInPane",{fileName:i,contextData:l})})),Ye(this,"openWidgetInRightSidebar",(i,l)=>We(this,null,function*(){return yield this.call("openWidgetInRightSidebar",{fileName:i,contextData:l})})),Ye(this,"isOnPage",i=>We(this,null,function*(){return yield this.call("isOnPage",{page:i})}))}}d(Xr,"WindowNamespace");var pn=Object.defineProperty,Hi=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,gt=d((t,r,i)=>r in t?pn(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"plugin_base_defNormalProp"),zl=d((t,r)=>{for(var i in r||(r={}))ot.call(r,i)&&gt(t,i,r[i]);if(Hi)for(var i of Hi(r))It.call(r,i)&&gt(t,i,r[i]);return t},"plugin_base_spreadValues"),Ie=d((t,r,i)=>(gt(t,typeof r!="symbol"?r+"":r,i),i),"plugin_base_publicField"),Ge=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"plugin_base_async");class Bo{constructor(){Ie(this,"apiCallPromise",{}),Ie(this,"model",{}),Ie(this,"listeners",{}),Ie(this,"usedMessageIds",1),Ie(this,"widgetInstanceId"),Ie(this,"inSandbox"),Ie(this,"isNative"),Ie(this,"rootURL"),Ie(this,"mountDiv"),Ie(this,"widgetBodyResizeObserver",null),Ie(this,"widgetOptions"),Ie(this,"manifest"),Ie(this,"id"),Ie(this,"app",new Ai(this._call.bind(this),this)),Ie(this,"editor",new _t(this._call.bind(this))),Ie(this,"event",new Li(this._call.bind(this),this)),Ie(this,"messaging",new Il(this._call.bind(this))),Ie(this,"focus",new qn(this._call.bind(this))),Ie(this,"date",new Gr(this._call.bind(this))),Ie(this,"widget",new zo(this._call.bind(this))),Ie(this,"window",new Xr(this._call.bind(this))),Ie(this,"powerup",new Ol(this._call.bind(this))),Ie(this,"richText",new Al(this._call.bind(this))),Ie(this,"rem",new Ci(this._call.bind(this))),Ie(this,"card",new ks(this._call.bind(this))),Ie(this,"storage",new Wi(this._call.bind(this))),Ie(this,"settings",new Xn(this._call.bind(this))),Ie(this,"search",new Ui(this._call.bind(this))),Ie(this,"kb",new Do(this._call.bind(this))),Ie(this,"scheduler",new Bi(this._call.bind(this))),Ie(this,"queue",new bl(this._call.bind(this))),Ie(this,"reader",new yr(this._call.bind(this))),window.onmessage=r=>{this._receive(r)},this.pluginLogger=Cl()(`plugin:${this.id||"Plugin"}`),this.logApi=Cl()(`plugin:API:${this.id||"Plugin"}`),this.logApi("START"),this.event.addListener(j.onActivate,void 0,this.receiveActivateMessage.bind(this)),this.event.addListener(j.onDeactivate,void 0,this.receiveDeactivateMessage.bind(this)),this.event.addListener(j.setDarkMode,void 0,this.setDarkMode.bind(this)),this.event.addListener(j.setCustomCSS,void 0,this.setCustomCSS.bind(this)),this._call("askToActivate",{})}pluginLogger(...r){}logApi(...r){}setDarkMode({darkMode:r}){this.inSandbox&&(document.body.classList.add(r?"dark":"light"),document.body.classList.remove(r?"light":"dark"))}setCustomCSS({cssBlocks:r,cssUrls:i}){const l=document.getElementsByTagName("head")[0];for(const a of[...l.children])a.classList.contains("custom-css")&&a.remove();for(const a of r){const c=document.createElement("style");c.classList.add("custom-css"),c.innerHTML=a,l.appendChild(c)}for(const a of i){const c=document.createElement("link");c.classList.add("custom-css"),c.rel="stylesheet",c.href=a,l.appendChild(c)}}track(r){let i=!1,l=!1,a=!1,c=[];const p=d(()=>{if(i){for(const{event:h,key:g}of c.flatMap(v=>v.reactiveDeps))this.event.removeListener(h,g,p);return}else l?a=!0:(l=!0,d(()=>Ge(this,null,function*(){c=yield _d(this,r,p,()=>{},c||[]),l=!1,a&&(a=!1,p())}),"effect")())},"run");return p(),()=>{i=!0}}loadManifest(){return Ge(this,null,function*(){if(!this.manifest)try{const r=yield fetch(this.rootURL+"manifest.json");if(r.ok){const i=yield r.json();this.manifest=i,this.id=i.id}}catch(r){console.log("Failed to load manifest.json",r)}})}receiveActivateMessage(r){return Ge(this,null,function*(){var i,l,a,c,p;if(!r.inSandbox&&!((i=window.activeWidgetIds)!=null&&i.has(r.widgetInstanceId))){console.error("Not activating widget",r.widgetInstanceId,"as it is already unmounted");return}if(!r.inSandbox&&!r.mountDiv)throw new Error("Native plugin didn't receive mountDiv");const h=r.inSandbox?this.createMountDiv():r.mountDiv;this.inSandbox=r.inSandbox,this.isNative=!r.inSandbox,this.widgetOptions=r.widgetOptions,this.widgetInstanceId=r.widgetInstanceId,this.rootURL=r.rootURL,this.mountDiv=h,yield this.loadManifest(),this.isNative&&(window.widgetIdToWidget[this.widgetInstanceId]=this),this.onActivate(h,r.rootURL);const g=(a=(l=r.widgetOptions)==null?void 0:l.dimensions)==null?void 0:a.height,v=(p=(c=r.widgetOptions)==null?void 0:c.dimensions)==null?void 0:p.width;if(v=="auto"&&r.inSandbox&&(h.style.display="inline-block"),(g==="auto"||v==="auto")&&this.autoAdjustWidgetContainerDimension(),r.inSandbox&&(g==="auto"&&(document.documentElement.style.overflowY="hidden"),v==="auto"&&(document.documentElement.style.overflowX="hidden")),r.inSandbox)for(const Q of r.styleSheetHREFs){const xe=document.createElement("link");xe.href=Q,xe.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(xe)}yield this._call("activateCompleted",{})})}receiveDeactivateMessage(r){return Ge(this,null,function*(){this.widgetBodyResizeObserver&&this.widgetBodyResizeObserver.disconnect(),this.onDeactivate()})}createMountDiv(){const r=document.createElement("div");return document.body.appendChild(r),r}log(...r){this.pluginLogger(r)}_call(r,i,l){return Ge(this,null,function*(){const a=this.usedMessageIds++;typeof l=="string"?r=l+"."+r:typeof l=="object"&&(r=[...l,r].join("."));const c={pluginId:this.id,widgetInstanceId:this.widgetInstanceId,methodName:r,args:i,messageId:a,isIntendedForRemNoteAPIMain:!0};this.logApi("Call",a);const p=this.isNative?window:window.parent,h=yield new Promise(g=>{this.apiCallPromise[a]=g;try{p.postMessage(c,"*")}catch{console.error(`Failed to call plugin method with arguments: ${r} ${i}`)}});if(this.logApi("Got response",h),h!=null&&h.error)throw new Error("Plugin Error: "+h.error);return h?.response})}_receive(r){return Ge(this,null,function*(){var i,l,a;if((i=r.data)!=null&&i.isIntendedForRemNoteAPIPlugin){const c=r.data;if("messageId"in c){const p=c.messageId;this.logApi("API _receive",p,c,this.apiCallPromise[p]),this.apiCallPromise[p](c),delete this.apiCallPromise[p]}else if("callbackId"in c){const p=this.model[c.callbackId];p||console.error(`Tried to execute callback ${c.callbackId}, but it was not registered`);const h=yield p?.(c.args);c.callbackReturnValueHandlerId&&this._call("handleCallbackResponse",{result:h,callbackReturnValueHandlerId:c.callbackReturnValueHandlerId},"callback")}else if("eventId"in c){if(!Ce(c.eventId))throw new Error("Invalid event "+c.eventId);(a=(l=this.listeners[c.eventId])==null?void 0:l.get(c.listenerKey))==null||a.forEach(p=>p(c.args))}}})}autoAdjustWidgetContainerDimension(){return Ge(this,null,function*(){const r=new ResizeObserver(l=>{for(let a of l)if(a.contentBoxSize){const c=window.getComputedStyle(a.target),p=parseFloat(c.getPropertyValue("margin-block-start"))||0,h=parseFloat(c.getPropertyValue("margin-block-end"))||0,g=parseFloat(c.getPropertyValue("margin-inline-start"))||0,v=parseFloat(c.getPropertyValue("margin-inline-end"))||0,Q={height:a.contentBoxSize[0].blockSize+p+h,width:a.contentBoxSize[0].inlineSize+g+v};this._call("widgetEvents.updateWidgetContainerDimension",Q)}}),i=this.inSandbox?this.mountDiv:this.mountDiv.firstChild;i&&(r.observe(i),this.widgetBodyResizeObserver=r)})}createFakeEmbedComponent(r){return Ge(this,null,function*(){return this._call("widgetEvents.createFakeEmbedComponent",r)})}unmountFakeEmbedComponent(r){return Ge(this,null,function*(){return this._call("widgetEvents.unmountFakeEmbedComponent",{id:r})})}updateFakeEmbedComponentRect(r,i){return Ge(this,null,function*(){return this._call("widgetEvents.updateFakeEmbedComponentRect",zl({id:r},i))})}updateFakeEmbedExternalProps(r,i){return Ge(this,null,function*(){return this._call("widgetEvents.updateFakeEmbedExternalProps",{id:r,externalProps:i})})}ping(){return Ge(this,null,function*(){return yield this._call("ping",{})})}}d(Bo,"RNPlugin");var Ke=Be(232);let Jr=d(t=>crypto.getRandomValues(new Uint8Array(t)),"random"),ei=d((t,r,i)=>{let l=(2<<Math.log(t.length-1)/Math.LN2)-1,a=-~(1.6*l*r/t.length);return(c=r)=>{let p="";for(;;){let h=i(a),g=a;for(;g--;)if(p+=t[h[g]&l]||"",p.length===c)return p}}},"customRandom");d((t,r=21)=>ei(t,r,Jr),"customAlphabet");let Ln=d((t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((r,i)=>(i&=63,i<36?r+=i.toString(36):i<62?r+=(i-26).toString(36).toUpperCase():i>62?r+="-":r+="_",r),""),"nanoid");var $=Be(359),Qi=Be.n($),sa="1.13.6",aa=typeof self=="object"&&self.self===self&&self||typeof Dc=="object"&&Dc.global===Dc&&Dc||Function("return this")()||{},Uo=Array.prototype,ti=Object.prototype,Zo=typeof Symbol<"u"?Symbol.prototype:null,Gu=Uo.push,xr=Uo.slice,ni=ti.toString,ua=ti.hasOwnProperty,ca=typeof ArrayBuffer<"u",Bl=typeof DataView<"u",qu=Array.isArray,da=Object.keys,fa=Object.create,Ul=ca&&ArrayBuffer.isView,Yu=isNaN,Xu=isFinite,Ju=!{toString:null}.propertyIsEnumerable("toString"),Zl=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Wl=Math.pow(2,53)-1;function At(t,r){return r=r==null?t.length-1:+r,function(){for(var i=Math.max(arguments.length-r,0),l=Array(i),a=0;a<i;a++)l[a]=arguments[a+r];switch(r){case 0:return t.call(this,l);case 1:return t.call(this,arguments[0],l);case 2:return t.call(this,arguments[0],arguments[1],l)}var c=Array(r+1);for(a=0;a<r;a++)c[a]=arguments[a];return c[r]=l,t.apply(this,c)}}d(At,"restArguments");function Er(t){var r=typeof t;return r==="function"||r==="object"&&!!t}d(Er,"isObject");function ec(t){return t===null}d(ec,"isNull");function pa(t){return t===void 0}d(pa,"isUndefined");function on(t){return t===!0||t===!1||ni.call(t)==="[object Boolean]"}d(on,"isBoolean");function jt(t){return!!(t&&t.nodeType===1)}d(jt,"isElement");function Et(t){var r="[object "+t+"]";return function(i){return ni.call(i)===r}}d(Et,"tagTester");var Vl=Et("String"),ha=Et("Number"),ma=Et("Date"),tc=Et("RegExp"),ga=Et("Error"),ya=Et("Symbol"),Hl=Et("ArrayBuffer"),va=Et("Function"),Ql=aa.document&&aa.document.childNodes;typeof Int8Array!="object"&&typeof Ql!="function"&&(va=d(function(t){return typeof t=="function"||!1},"isFunction"));var Ot=va,wa=Et("Object"),_a=Bl&&wa(new DataView(new ArrayBuffer(8))),$l=typeof Map<"u"&&wa(new Map),nc=Et("DataView");function Kl(t){return t!=null&&Ot(t.getInt8)&&Hl(t.buffer)}d(Kl,"ie10IsDataView");var Wo=_a?Kl:nc,Lt=qu||Et("Array");function Fn(t,r){return t!=null&&ua.call(t,r)}d(Fn,"has");var Vo=Et("Arguments");(function(){Vo(arguments)||(Vo=d(function(t){return Fn(t,"callee")},"isArguments"))})();var Gl=Vo;function xa(t){return!ya(t)&&Xu(t)&&!isNaN(parseFloat(t))}d(xa,"isFinite_isFinite");function ri(t){return ha(t)&&Yu(t)}d(ri,"isNaN_isNaN");function Ea(t){return function(){return t}}d(Ea,"constant");function Sa(t){return function(r){var i=t(r);return typeof i=="number"&&i>=0&&i<=Wl}}d(Sa,"createSizePropertyCheck");function Ho(t){return function(r){return r?.[t]}}d(Ho,"shallowProperty");var $i=Ho("byteLength"),sd=Sa($i),rc=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function Ta(t){return Ul?Ul(t)&&!Wo(t):sd(t)&&rc.test(ni.call(t))}d(Ta,"isTypedArray");var ic=ca?Ta:Ea(!1),Ft=Ho("length");function oc(t){for(var r={},i=t.length,l=0;l<i;++l)r[t[l]]=!0;return{contains:function(a){return r[a]===!0},push:function(a){return r[a]=!0,t.push(a)}}}d(oc,"emulatedSet");function Ca(t,r){r=oc(r);var i=Zl.length,l=t.constructor,a=Ot(l)&&l.prototype||ti,c="constructor";for(Fn(t,c)&&!r.contains(c)&&r.push(c);i--;)c=Zl[i],c in t&&t[c]!==a[c]&&!r.contains(c)&&r.push(c)}d(Ca,"collectNonEnumProps");function ct(t){if(!Er(t))return[];if(da)return da(t);var r=[];for(var i in t)Fn(t,i)&&r.push(i);return Ju&&Ca(t,r),r}d(ct,"keys");function Pa(t){if(t==null)return!0;var r=Ft(t);return typeof r=="number"&&(Lt(t)||Vl(t)||Gl(t))?r===0:Ft(ct(t))===0}d(Pa,"isEmpty");function ql(t,r){var i=ct(r),l=i.length;if(t==null)return!l;for(var a=Object(t),c=0;c<l;c++){var p=i[c];if(r[p]!==a[p]||!(p in a))return!1}return!0}d(ql,"isMatch");function Le(t){if(t instanceof Le)return t;if(!(this instanceof Le))return new Le(t);this._wrapped=t}d(Le,"_"),Le.VERSION=sa,Le.prototype.value=function(){return this._wrapped},Le.prototype.valueOf=Le.prototype.toJSON=Le.prototype.value,Le.prototype.toString=function(){return String(this._wrapped)};function Yl(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,$i(t))}d(Yl,"toBufferView");var Xl="[object DataView]";function Ki(t,r,i,l){if(t===r)return t!==0||1/t===1/r;if(t==null||r==null)return!1;if(t!==t)return r!==r;var a=typeof t;return a!=="function"&&a!=="object"&&typeof r!="object"?!1:Jl(t,r,i,l)}d(Ki,"eq");function Jl(t,r,i,l){t instanceof Le&&(t=t._wrapped),r instanceof Le&&(r=r._wrapped);var a=ni.call(t);if(a!==ni.call(r))return!1;if(_a&&a=="[object Object]"&&Wo(t)){if(!Wo(r))return!1;a=Xl}switch(a){case"[object RegExp]":case"[object String]":return""+t==""+r;case"[object Number]":return+t!=+t?+r!=+r:+t==0?1/+t===1/r:+t==+r;case"[object Date]":case"[object Boolean]":return+t==+r;case"[object Symbol]":return Zo.valueOf.call(t)===Zo.valueOf.call(r);case"[object ArrayBuffer]":case Xl:return Jl(Yl(t),Yl(r),i,l)}var c=a==="[object Array]";if(!c&&ic(t)){var p=$i(t);if(p!==$i(r))return!1;if(t.buffer===r.buffer&&t.byteOffset===r.byteOffset)return!0;c=!0}if(!c){if(typeof t!="object"||typeof r!="object")return!1;var h=t.constructor,g=r.constructor;if(h!==g&&!(Ot(h)&&h instanceof h&&Ot(g)&&g instanceof g)&&"constructor"in t&&"constructor"in r)return!1}i=i||[],l=l||[];for(var v=i.length;v--;)if(i[v]===t)return l[v]===r;if(i.push(t),l.push(r),c){if(v=t.length,v!==r.length)return!1;for(;v--;)if(!Ki(t[v],r[v],i,l))return!1}else{var Q=ct(t),xe;if(v=Q.length,ct(r).length!==v)return!1;for(;v--;)if(xe=Q[v],!(Fn(r,xe)&&Ki(t[xe],r[xe],i,l)))return!1}return i.pop(),l.pop(),!0}d(Jl,"deepEq");function es(t,r){return Ki(t,r)}d(es,"isEqual");function ii(t){if(!Er(t))return[];var r=[];for(var i in t)r.push(i);return Ju&&Ca(t,r),r}d(ii,"allKeys");function ts(t){var r=Ft(t);return function(i){if(i==null)return!1;var l=ii(i);if(Ft(l))return!1;for(var a=0;a<r;a++)if(!Ot(i[t[a]]))return!1;return t!==dt||!Ot(i[ka])}}d(ts,"ie11fingerprint");var ka="forEach",Qo="has",$o=["clear","delete"],se=["get",Qo,"set"],Mt=$o.concat(ka,se),dt=$o.concat(se),bt=["add"].concat($o,ka,Qo),oi=$l?ts(Mt):Et("Map"),Ra=$l?ts(dt):Et("WeakMap"),Pt=$l?ts(bt):Et("Set"),ns=Et("WeakSet");function hn(t){for(var r=ct(t),i=r.length,l=Array(i),a=0;a<i;a++)l[a]=t[r[a]];return l}d(hn,"values");function Gi(t){for(var r=ct(t),i=r.length,l=Array(i),a=0;a<i;a++)l[a]=[r[a],t[r[a]]];return l}d(Gi,"pairs");function Sr(t){for(var r={},i=ct(t),l=0,a=i.length;l<a;l++)r[t[i[l]]]=i[l];return r}d(Sr,"invert");function qi(t){var r=[];for(var i in t)Ot(t[i])&&r.push(i);return r.sort()}d(qi,"functions");function Yi(t,r){return function(i){var l=arguments.length;if(r&&(i=Object(i)),l<2||i==null)return i;for(var a=1;a<l;a++)for(var c=arguments[a],p=t(c),h=p.length,g=0;g<h;g++){var v=p[g];(!r||i[v]===void 0)&&(i[v]=c[v])}return i}}d(Yi,"createAssigner");var rs=Yi(ii),Xi=Yi(ct),li=Yi(ii,!0);function V(){return function(){}}d(V,"ctor");function Ji(t){if(!Er(t))return{};if(fa)return fa(t);var r=V();r.prototype=t;var i=new r;return r.prototype=null,i}d(Ji,"baseCreate");function is(t,r){var i=Ji(t);return r&&Xi(i,r),i}d(is,"create");function Sn(t){return Er(t)?Lt(t)?t.slice():rs({},t):t}d(Sn,"clone");function er(t,r){return r(t),t}d(er,"tap");function si(t){return Lt(t)?t:[t]}d(si,"toPath"),Le.toPath=si;function Mn(t){return Le.toPath(t)}d(Mn,"_toPath_toPath");function eo(t,r){for(var i=r.length,l=0;l<i;l++){if(t==null)return;t=t[r[l]]}return i?t:void 0}d(eo,"deepGet");function Ko(t,r,i){var l=eo(t,Mn(r));return pa(l)?i:l}d(Ko,"get");function zn(t,r){r=Mn(r);for(var i=r.length,l=0;l<i;l++){var a=r[l];if(!Fn(t,a))return!1;t=t[a]}return!!i}d(zn,"has_has");function Tr(t){return t}d(Tr,"identity");function Cr(t){return t=Xi({},t),function(r){return ql(r,t)}}d(Cr,"matcher");function ai(t){return t=Mn(t),function(r){return eo(r,t)}}d(ai,"property");function Gt(t,r,i){if(r===void 0)return t;switch(i??3){case 1:return function(l){return t.call(r,l)};case 3:return function(l,a,c){return t.call(r,l,a,c)};case 4:return function(l,a,c,p){return t.call(r,l,a,c,p)}}return function(){return t.apply(r,arguments)}}d(Gt,"optimizeCb");function to(t,r,i){return t==null?Tr:Ot(t)?Gt(t,r,i):Er(t)&&!Lt(t)?Cr(t):ai(t)}d(to,"baseIteratee");function Pr(t,r){return to(t,r,1/0)}d(Pr,"iteratee"),Le.iteratee=Pr;function St(t,r,i){return Le.iteratee!==Pr?Le.iteratee(t,r):to(t,r,i)}d(St,"cb");function qt(t,r,i){r=St(r,i);for(var l=ct(t),a=l.length,c={},p=0;p<a;p++){var h=l[p];c[h]=r(t[h],h,t)}return c}d(qt,"mapObject");function Bn(){}d(Bn,"noop");function tr(t){return t==null?Bn:function(r){return Ko(t,r)}}d(tr,"propertyOf");function Go(t,r,i){var l=Array(Math.max(0,t));r=Gt(r,i,1);for(var a=0;a<t;a++)l[a]=r(a);return l}d(Go,"times");function zt(t,r){return r==null&&(r=t,t=0),t+Math.floor(Math.random()*(r-t+1))}d(zt,"random_random");var no=Date.now||function(){return new Date().getTime()};function kr(t){var r=d(function(c){return t[c]},"escaper"),i="(?:"+ct(t).join("|")+")",l=RegExp(i),a=RegExp(i,"g");return function(c){return c=c==null?"":""+c,l.test(c)?c.replace(a,r):c}}d(kr,"createEscaper");var os={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},ad=kr(os),lc=Sr(os),sc=kr(lc),ls=Le.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},qo=/(.)^/,ro={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ac=/\\|'|\r|\n|\u2028|\u2029/g;function Ia(t){return"\\"+ro[t]}d(Ia,"escapeChar");var Yo=/^\s*(\w|\$)+\s*$/;function uc(t,r,i){!r&&i&&(r=i),r=li({},r,Le.templateSettings);var l=RegExp([(r.escape||qo).source,(r.interpolate||qo).source,(r.evaluate||qo).source].join("|")+"|$","g"),a=0,c="__p+='";t.replace(l,function(v,Q,xe,Bt,ke){return c+=t.slice(a,ke).replace(ac,Ia),a=ke+v.length,Q?c+=`'+
47
+ ((__t=(`+Q+`))==null?'':_.escape(__t))+
48
+ '`:xe?c+=`'+
49
+ ((__t=(`+xe+`))==null?'':__t)+
50
+ '`:Bt&&(c+=`';
51
+ `+Bt+`
52
+ __p+='`),v}),c+=`';
53
+ `;var p=r.variable;if(p){if(!Yo.test(p))throw new Error("variable is not a bare identifier: "+p)}else c=`with(obj||{}){
54
+ `+c+`}
55
+ `,p="obj";c=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
56
+ `+c+`return __p;
57
+ `;var h;try{h=new Function(p,"_",c)}catch(v){throw v.source=c,v}var g=d(function(v){return h.call(this,v,Le)},"template");return g.source="function("+p+`){
58
+ `+c+"}",g}d(uc,"template");function cc(t,r,i){r=Mn(r);var l=r.length;if(!l)return Ot(i)?i.call(t):i;for(var a=0;a<l;a++){var c=t?.[r[a]];c===void 0&&(c=i,a=l),t=Ot(c)?c.call(t):c}return t}d(cc,"result");var dc=0;function Oa(t){var r=++dc+"";return t?t+r:r}d(Oa,"uniqueId");function Rr(t){var r=Le(t);return r._chain=!0,r}d(Rr,"chain");function ba(t,r,i,l,a){if(!(l instanceof r))return t.apply(i,a);var c=Ji(t.prototype),p=t.apply(c,a);return Er(p)?p:c}d(ba,"executeBound");var Na=At(function(t,r){var i=Na.placeholder,l=d(function(){for(var a=0,c=r.length,p=Array(c),h=0;h<c;h++)p[h]=r[h]===i?arguments[a++]:r[h];for(;a<arguments.length;)p.push(arguments[a++]);return ba(t,l,this,this,p)},"bound");return l});Na.placeholder=Le;var Tn=Na,fc=At(function(t,r,i){if(!Ot(t))throw new TypeError("Bind must be called on a function");var l=At(function(a){return ba(t,l,r,this,i.concat(a))});return l}),Yt=Sa(Ft);function Ir(t,r,i,l){if(l=l||[],!r&&r!==0)r=1/0;else if(r<=0)return l.concat(t);for(var a=l.length,c=0,p=Ft(t);c<p;c++){var h=t[c];if(Yt(h)&&(Lt(h)||Gl(h)))if(r>1)Ir(h,r-1,i,l),a=l.length;else for(var g=0,v=h.length;g<v;)l[a++]=h[g++];else i||(l[a++]=h)}return l}d(Ir,"flatten");var pc=At(function(t,r){r=Ir(r,!1,!1);var i=r.length;if(i<1)throw new Error("bindAll must be passed function names");for(;i--;){var l=r[i];t[l]=fc(t[l],t)}return t});function nr(t,r){var i=d(function(l){var a=i.cache,c=""+(r?r.apply(this,arguments):l);return Fn(a,c)||(a[c]=t.apply(this,arguments)),a[c]},"memoize");return i.cache={},i}d(nr,"memoize");var hc=At(function(t,r,i){return setTimeout(function(){return t.apply(null,i)},r)}),ud=Tn(hc,Le,1);function Da(t,r,i){var l,a,c,p,h=0;i||(i={});var g=d(function(){h=i.leading===!1?0:no(),l=null,p=t.apply(a,c),l||(a=c=null)},"later"),v=d(function(){var Q=no();!h&&i.leading===!1&&(h=Q);var xe=r-(Q-h);return a=this,c=arguments,xe<=0||xe>r?(l&&(clearTimeout(l),l=null),h=Q,p=t.apply(a,c),l||(a=c=null)):!l&&i.trailing!==!1&&(l=setTimeout(g,xe)),p},"throttled");return v.cancel=function(){clearTimeout(l),h=0,l=a=c=null},v}d(Da,"throttle");function mc(t,r,i){var l,a,c,p,h,g=d(function(){var Q=no()-a;r>Q?l=setTimeout(g,r-Q):(l=null,i||(p=t.apply(h,c)),l||(c=h=null))},"later"),v=At(function(Q){return h=this,c=Q,a=no(),l||(l=setTimeout(g,r),i&&(p=t.apply(h,c))),p});return v.cancel=function(){clearTimeout(l),l=c=h=null},v}d(mc,"debounce");function ln(t,r){return Tn(r,t)}d(ln,"wrap");function io(t){return function(){return!t.apply(this,arguments)}}d(io,"negate");function gc(){var t=arguments,r=t.length-1;return function(){for(var i=r,l=t[r].apply(this,arguments);i--;)l=t[i].call(this,l);return l}}d(gc,"compose");function rr(t,r){return function(){if(--t<1)return r.apply(this,arguments)}}d(rr,"after");function oo(t,r){var i;return function(){return--t>0&&(i=r.apply(this,arguments)),t<=1&&(r=null),i}}d(oo,"before");var lo=Tn(oo,2);function Xo(t,r,i){r=St(r,i);for(var l=ct(t),a,c=0,p=l.length;c<p;c++)if(a=l[c],r(t[a],a,t))return a}d(Xo,"findKey");function Jo(t){return function(r,i,l){i=St(i,l);for(var a=Ft(r),c=t>0?0:a-1;c>=0&&c<a;c+=t)if(i(r[c],c,r))return c;return-1}}d(Jo,"createPredicateIndexFinder");var el=Jo(1),yc=Jo(-1);function Aa(t,r,i,l){i=St(i,l,1);for(var a=i(r),c=0,p=Ft(t);c<p;){var h=Math.floor((c+p)/2);i(t[h])<a?c=h+1:p=h}return c}d(Aa,"sortedIndex");function so(t,r,i){return function(l,a,c){var p=0,h=Ft(l);if(typeof c=="number")t>0?p=c>=0?c:Math.max(c+h,p):h=c>=0?Math.min(c+1,h):c+h+1;else if(i&&c&&h)return c=i(l,a),l[c]===a?c:-1;if(a!==a)return c=r(xr.call(l,p,h),ri),c>=0?c+p:-1;for(c=t>0?p:h-1;c>=0&&c<h;c+=t)if(l[c]===a)return c;return-1}}d(so,"createIndexFinder");var ss=so(1,el,Aa),vc=so(-1,yc);function ao(t,r,i){var l=Yt(t)?el:Xo,a=l(t,r,i);if(a!==void 0&&a!==-1)return t[a]}d(ao,"find");function wc(t,r){return ao(t,Cr(r))}d(wc,"findWhere");function mn(t,r,i){r=Gt(r,i);var l,a;if(Yt(t))for(l=0,a=t.length;l<a;l++)r(t[l],l,t);else{var c=ct(t);for(l=0,a=c.length;l<a;l++)r(t[c[l]],c[l],t)}return t}d(mn,"each");function gn(t,r,i){r=St(r,i);for(var l=!Yt(t)&&ct(t),a=(l||t).length,c=Array(a),p=0;p<a;p++){var h=l?l[p]:p;c[p]=r(t[h],h,t)}return c}d(gn,"map");function ja(t){var r=d(function(i,l,a,c){var p=!Yt(i)&&ct(i),h=(p||i).length,g=t>0?0:h-1;for(c||(a=i[p?p[g]:g],g+=t);g>=0&&g<h;g+=t){var v=p?p[g]:g;a=l(a,i[v],v,i)}return a},"reducer");return function(i,l,a,c){var p=arguments.length>=3;return r(i,Gt(l,c,4),a,p)}}d(ja,"createReduce");var uo=ja(1),La=ja(-1);function ui(t,r,i){var l=[];return r=St(r,i),mn(t,function(a,c,p){r(a,c,p)&&l.push(a)}),l}d(ui,"filter");function co(t,r,i){return ui(t,io(St(r)),i)}d(co,"reject");function Fa(t,r,i){r=St(r,i);for(var l=!Yt(t)&&ct(t),a=(l||t).length,c=0;c<a;c++){var p=l?l[c]:c;if(!r(t[p],p,t))return!1}return!0}d(Fa,"every");function fo(t,r,i){r=St(r,i);for(var l=!Yt(t)&&ct(t),a=(l||t).length,c=0;c<a;c++){var p=l?l[c]:c;if(r(t[p],p,t))return!0}return!1}d(fo,"some");function e(t,r,i,l){return Yt(t)||(t=hn(t)),(typeof i!="number"||l)&&(i=0),ss(t,r,i)>=0}d(e,"contains");var n=At(function(t,r,i){var l,a;return Ot(r)?a=r:(r=Mn(r),l=r.slice(0,-1),r=r[r.length-1]),gn(t,function(c){var p=a;if(!p){if(l&&l.length&&(c=eo(c,l)),c==null)return;p=c[r]}return p==null?p:p.apply(c,i)})});function o(t,r){return gn(t,ai(r))}d(o,"pluck");function s(t,r){return ui(t,Cr(r))}d(s,"where");function u(t,r,i){var l=-1/0,a=-1/0,c,p;if(r==null||typeof r=="number"&&typeof t[0]!="object"&&t!=null){t=Yt(t)?t:hn(t);for(var h=0,g=t.length;h<g;h++)c=t[h],c!=null&&c>l&&(l=c)}else r=St(r,i),mn(t,function(v,Q,xe){p=r(v,Q,xe),(p>a||p===-1/0&&l===-1/0)&&(l=v,a=p)});return l}d(u,"max");function f(t,r,i){var l=1/0,a=1/0,c,p;if(r==null||typeof r=="number"&&typeof t[0]!="object"&&t!=null){t=Yt(t)?t:hn(t);for(var h=0,g=t.length;h<g;h++)c=t[h],c!=null&&c<l&&(l=c)}else r=St(r,i),mn(t,function(v,Q,xe){p=r(v,Q,xe),(p<a||p===1/0&&l===1/0)&&(l=v,a=p)});return l}d(f,"min");var m=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function y(t){return t?Lt(t)?xr.call(t):Vl(t)?t.match(m):Yt(t)?gn(t,Tr):hn(t):[]}d(y,"toArray");function w(t,r,i){if(r==null||i)return Yt(t)||(t=hn(t)),t[zt(t.length-1)];var l=y(t),a=Ft(l);r=Math.max(Math.min(r,a),0);for(var c=a-1,p=0;p<r;p++){var h=zt(p,c),g=l[p];l[p]=l[h],l[h]=g}return l.slice(0,r)}d(w,"sample");function C(t){return w(t,1/0)}d(C,"shuffle");function B(t,r,i){var l=0;return r=St(r,i),o(gn(t,function(a,c,p){return{value:a,index:l++,criteria:r(a,c,p)}}).sort(function(a,c){var p=a.criteria,h=c.criteria;if(p!==h){if(p>h||p===void 0)return 1;if(p<h||h===void 0)return-1}return a.index-c.index}),"value")}d(B,"sortBy");function re(t,r){return function(i,l,a){var c=r?[[],[]]:{};return l=St(l,a),mn(i,function(p,h){var g=l(p,h,i);t(c,p,g)}),c}}d(re,"group");var A=re(function(t,r,i){Fn(t,i)?t[i].push(r):t[i]=[r]}),K=re(function(t,r,i){t[i]=r}),ue=re(function(t,r,i){Fn(t,i)?t[i]++:t[i]=1}),ie=re(function(t,r,i){t[i?0:1].push(r)},!0);function T(t){return t==null?0:Yt(t)?t.length:ct(t).length}d(T,"size");function x(t,r,i){return r in i}d(x,"keyInObj");var S=At(function(t,r){var i={},l=r[0];if(t==null)return i;Ot(l)?(r.length>1&&(l=Gt(l,r[1])),r=ii(t)):(l=x,r=Ir(r,!1,!1),t=Object(t));for(var a=0,c=r.length;a<c;a++){var p=r[a],h=t[p];l(h,p,t)&&(i[p]=h)}return i}),b=At(function(t,r){var i=r[0],l;return Ot(i)?(i=io(i),r.length>1&&(l=r[1])):(r=gn(Ir(r,!1,!1),String),i=d(function(a,c){return!e(r,c)},"iteratee")),S(t,i,l)});function N(t,r,i){return xr.call(t,0,Math.max(0,t.length-(r==null||i?1:r)))}d(N,"initial");function ae(t,r,i){return t==null||t.length<1?r==null||i?void 0:[]:r==null||i?t[0]:N(t,t.length-r)}d(ae,"first");function W(t,r,i){return xr.call(t,r==null||i?1:r)}d(W,"rest");function fe(t,r,i){return t==null||t.length<1?r==null||i?void 0:[]:r==null||i?t[t.length-1]:W(t,Math.max(0,t.length-r))}d(fe,"last");function Pe(t){return ui(t,Boolean)}d(Pe,"compact");function we(t,r){return Ir(t,r,!1)}d(we,"flatten_flatten");var ir=At(function(t,r){return r=Ir(r,!0,!0),ui(t,function(i){return!e(r,i)})}),cd=At(function(t,r){return ir(t,r)});function _c(t,r,i,l){on(r)||(l=i,i=r,r=!1),i!=null&&(i=St(i,l));for(var a=[],c=[],p=0,h=Ft(t);p<h;p++){var g=t[p],v=i?i(g,p,t):g;r&&!i?((!p||c!==v)&&a.push(g),c=v):i?e(c,v)||(c.push(v),a.push(g)):e(a,g)||a.push(g)}return a}d(_c,"uniq");var dp=At(function(t){return _c(Ir(t,!0,!0))});function Dd(t){for(var r=[],i=arguments.length,l=0,a=Ft(t);l<a;l++){var c=t[l];if(!e(r,c)){var p;for(p=1;p<i&&e(arguments[p],c);p++);p===i&&r.push(c)}}return r}d(Dd,"intersection");function xc(t){for(var r=t&&u(t,Ft).length||0,i=Array(r),l=0;l<r;l++)i[l]=o(t,l);return i}d(xc,"unzip");var fp=At(xc);function Ad(t,r){for(var i={},l=0,a=Ft(t);l<a;l++)r?i[t[l]]=r[l]:i[t[l][0]]=t[l][1];return i}d(Ad,"object");function jd(t,r,i){r==null&&(r=t||0,t=0),i||(i=r<t?-1:1);for(var l=Math.max(Math.ceil((r-t)/i),0),a=Array(l),c=0;c<l;c++,t+=i)a[c]=t;return a}d(jd,"range");function Ld(t,r){if(r==null||r<1)return[];for(var i=[],l=0,a=t.length;l<a;)i.push(xr.call(t,l,l+=r));return i}d(Ld,"chunk");function Ec(t,r){return t._chain?Le(r).chain():r}d(Ec,"chainResult");function dd(t){return mn(qi(t),function(r){var i=Le[r]=t[r];Le.prototype[r]=function(){var l=[this._wrapped];return Gu.apply(l,arguments),Ec(this,i.apply(Le,l))}}),Le}d(dd,"mixin"),mn(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=Uo[t];Le.prototype[t]=function(){var i=this._wrapped;return i!=null&&(r.apply(i,arguments),(t==="shift"||t==="splice")&&i.length===0&&delete i[0]),Ec(this,i)}}),mn(["concat","join","slice"],function(t){var r=Uo[t];Le.prototype[t]=function(){var i=this._wrapped;return i!=null&&(i=r.apply(i,arguments)),Ec(this,i)}});var pp=Le,fd=dd(ce);fd._=fd;var pd=fd,hp=Object.defineProperty,mp=d((t,r,i)=>r in t?hp(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"AncestorScrollDetector_defNormalProp"),hd=d((t,r,i)=>(mp(t,typeof r!="symbol"?r+"":r,i),i),"AncestorScrollDetector_publicField");class Fd{constructor(r){hd(this,"tree",new Map),hd(this,"rootNode"),hd(this,"handleScroll",i=>{if(!i.target)return;const l=i.target;this.tree.get(l)&&l.querySelectorAll(".js-fake-embed").forEach(a=>{const c=this.tree.get(a);c&&c.callback&&c.callback(l)})}),this.rootNode=r}addListener(r,i){var l;if(!((l=this.rootNode)!=null&&l.contains(r))||this.tree.has(r))return;let a=r;for(this.tree.set(a,{node:a,children:new Map,leaf:!0,callback:i});a&&a.parentElement;){const c=this.tree.get(a.parentElement);if(c){c.children.set(a,!0);break}this.tree.set(a.parentElement,{node:a.parentElement,children:new Map([[a,!0]])}),a.parentElement.addEventListener("scroll",this.handleScroll),a=a.parentElement}}removeListener(r){const i=this.tree.get(r);if(!i||!i.leaf)return;let l=r;for(;l;){const a=this.tree.get(l);if(!a)break;const c=l.parentElement?this.tree.get(l.parentElement):null;if(l!==this.rootNode&&!c||c&&!c.children.has(l)||(c&&c?.children.delete(l),a.children.size!==0)||(l.removeEventListener("scroll",this.handleScroll),this.tree.delete(l),!c))break;l=c.node}}}d(Fd,"AncestorScrollDetector");const md=(0,$.createContext)({}),gp=d(({root:t,children:r})=>{const i=(0,$.useMemo)(()=>new Fd(t),[]);return(0,Ke.jsx)(md.Provider,{value:i,children:r})},"AncestorScrollDetectorProvider"),yp=d(()=>(0,$.useContext)(md),"useAncestorScrollDetector"),Md=(0,$.createContext)(null),vp=d(({plugin:t,children:r})=>(0,Ke.jsx)(Md.Provider,{value:t,children:r}),"PluginProvider"),ci=d(()=>{const t=(0,$.useContext)(Md);if(!t)throw new Error("You must wrap any RemNote API hooks in a <PluginProvider/>");return t},"usePlugin"),zd=(0,$.createContext)(null),wp=d(({pluginRoot:t,children:r})=>(0,Ke.jsx)(zd.Provider,{value:t,children:r}),"PluginRootProvider"),_p=d(()=>(0,$.useContext)(zd),"usePluginRootDivRef");function Bd(t){return{all:t=t||new Map,on:function(r,i){var l=t.get(r);l?l.push(i):t.set(r,[i])},off:function(r,i){var l=t.get(r);l&&(i?l.splice(l.indexOf(i)>>>0,1):t.set(r,[]))},emit:function(r,i){var l=t.get(r);l&&l.slice().map(function(a){a(i)}),(l=t.get("*"))&&l.slice().map(function(a){a(r,i)})}}}d(Bd,"mitt");const Sc=Bd();var Tc=(t=>(t.PluginBodyResizeOrTreeRenders="PluginBodyResizeOrTreeRenders",t))(Tc||{});const xp=d((t,r)=>{(0,$.useEffect)(()=>(Sc.on(t,r),()=>Sc.off(t,r)),[t,r])},"useEvent");function Ud(t){const r=$.useRef(t),i=$.useRef(0);return pd.isEqual(t,r.current)||(r.current=t,i.current+=1),$.useMemo(()=>r.current,[i.current])}d(Ud,"useDeepCompareMemoize");function Zd(t,r){return $.useEffect(t,Ud(r))}d(Zd,"useDeepCompareEffectNoCheck");var Ep=Object.defineProperty,Sp=Object.defineProperties,Tp=Object.getOwnPropertyDescriptors,Cc=Object.getOwnPropertySymbols,Wd=Object.prototype.hasOwnProperty,Vd=Object.prototype.propertyIsEnumerable,Hd=d((t,r,i)=>r in t?Ep(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"FakeEmbed_defNormalProp"),or=d((t,r)=>{for(var i in r||(r={}))Wd.call(r,i)&&Hd(t,i,r[i]);if(Cc)for(var i of Cc(r))Vd.call(r,i)&&Hd(t,i,r[i]);return t},"FakeEmbed_spreadValues"),Cp=d((t,r)=>Sp(t,Tp(r)),"FakeEmbed_spreadProps"),Pp=d((t,r)=>{var i={};for(var l in t)Wd.call(t,l)&&r.indexOf(l)<0&&(i[l]=t[l]);if(t!=null&&Cc)for(var l of Cc(t))r.indexOf(l)<0&&Vd.call(t,l)&&(i[l]=t[l]);return i},"FakeEmbed_objRest"),kp=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"FakeEmbed_async");const Rp=d(t=>typeof t=="string"&&/[0-9]{1,}%/.test(t)?parseInt(t.replace("%","")):void 0,"parsePercentage"),Ip=d(t=>typeof t=="string"&&/[0-9]{1,}px/.test(t)?parseInt(t.replace("px","")):void 0,"parsePx"),Pc=d((t,r)=>{const i=Rp(r),l=Ip(r);return i?t*i/100:l||null},"dimensionToNumber"),Op=d(({maxWidth:t,maxHeight:r,width:i,height:l,constraintWidth:a,constraintHeight:c})=>{const p=typeof i=="string"&&i!=="auto"?Pc(a,i):i,h=typeof t=="string"?Pc(a,t):t,g=typeof l=="string"&&l!=="auto"?Pc(c,l):l,v=typeof r=="string"?Pc(c,r):r;return{width:p,maxWidth:h,height:g,maxHeight:v}},"calculateStyles");function Qd(t){return t.clientHeight<t.scrollHeight}d(Qd,"isVerticallyScrollable");function $d(t){return t.clientWidth<t.scrollWidth}d($d,"isHorizontallScrollable");const bp=d(({componentType:t,externalProps:r,maxHeight:i=null,maxWidth:l=null,height:a="auto",width:c="auto",constraintRef:p="parent"})=>{var h,g,v,Q,xe,Bt;((g=(h=window?.Env)==null?void 0:h.deploy)!=null&&g.isDevelopment||(Q=(v=window?.Env)==null?void 0:v.deploy)!=null&&Q.isStaging||(Bt=(xe=window?.Env)==null?void 0:xe.app)!=null&&Bt.isCypress)&&(console.error("You imported the wrong component!"),alert("You imported the wrong component!"));const ke=(0,$.useRef)(null),Ze=ci(),us=_p(),yn=(0,$.useRef)(),[cs,nh]=(0,$.useState)(!1),xd=yp(),Nc=(0,$.useRef)(),di=(0,$.useRef)({height:a,width:c,maxHeight:i,maxWidth:l}),tl=(0,$.useRef)(),jf=(0,$.useCallback)(Me=>{!ke.current||Me.height===void 0||Me.width===void 0||Ze.isNative||(ke.current.style.height=Me.height+"px",ke.current.style.width=Me.width+"px")},[]),Lf=d(Me=>{var tt;Me.type=="wheel"?rh(Me):(tt=ke.current)==null||tt.dispatchEvent(new Event(Me.type,Cp(or({},Me),{bubbles:!0})))},"onDOMEvent"),rh=(0,$.useCallback)(Me=>{if(!(!ke.current||Me.deltaY===void 0||Me.deltaX===void 0)){if(Me.deltaY){let tt=ke.current;for(;tt&&!Qd(tt);)tt=tt.parentElement;tt&&(tt.scrollTop+=Me.deltaY)}if(Me.deltaX){let tt=ke.current;for(;tt&&!$d(tt);)tt=tt.parentElement;tt&&(tt.scrollLeft+=Me.deltaX)}}},[]),Ff=d(()=>{if(!yn.current||!Ze)return;const Me=Nc.current?Op({constraintWidth:Nc.current.constraintWidth,constraintHeight:Nc.current.constraintHeight,height:di.current.height,width:di.current.width,maxHeight:di.current.maxHeight,maxWidth:di.current.maxWidth}):{height:di.current.height,width:di.current.width,maxHeight:di.current.maxHeight,maxWidth:di.current.maxWidth};Ze.updateFakeEmbedComponentRect(yn.current,Me)},"updateDimensions"),Mf=d(()=>{var Me;if(!(Ze!=null&&Ze.inSandbox)||!ke.current||!yn.current)return;const{top:tt,left:nl}=ke.current.getBoundingClientRect(),rl=((Me=us?.current)==null?void 0:Me.getBoundingClientRect())||{top:0,left:0},Nr=tt-rl.top,il=nl-rl.left;tl.current&&tl?.current.top===Nr&&tl?.current.left===il||(tl.current={left:il,top:Nr},Ze.updateFakeEmbedComponentRect(yn.current,{top:Nr,left:il}))},"handleResizeOrScrollEvent");(0,$.useEffect)(()=>{if(Ze||console.error("You must wrap your components in a <PluginProvider/> or a renderWidget call."),!Ze||!ke.current)return;Ed();const Me=Ln();return kp(void 0,null,function*(){var tt;const{top:nl,left:rl}=ke.current.getBoundingClientRect();tl.current={top:nl,left:rl};const Nr=((tt=us?.current)==null?void 0:tt.getBoundingClientRect())||{top:0,left:0},il=nl-Nr.top,Sd=rl-Nr.left;Ze.event.addListener(j.FakeEmbedComponentDimensionChange,Me,jf),Ze.event.addListener(j.FakeEmbedDOMEvent,Me,Lf),Ze.isNative&&window.nativePluginDivs.set("virtual-"+Me,ke.current),yield Ze.createFakeEmbedComponent({id:Me,type:t,top:il,left:Sd,externalProps:r}),yn.current=Me,nh(!0)}),()=>{yn.current&&(Ze.unmountFakeEmbedComponent(yn.current),Ze.isNative&&window.nativePluginDivs.delete("virtual-"+Me),Ze.event.removeListener(j.FakeEmbedComponentDimensionChange,yn.current,jf),Ze.event.removeListener(j.FakeEmbedDOMEvent,yn.current,Lf))}},[]);function Ed(){try{JSON.stringify(r)}catch{throw console.error("ExternalProps are not serializable.",r),new Error(`All props passed to a RemNote React Component must be JSON serializable. Check the devtools to see your props for your ${t} component.`)}}d(Ed,"throwErrorIfExternalPropsAreNotSerializable");function zf(){Ed(),yn.current&&Ze.updateFakeEmbedExternalProps(yn.current,r)}return d(zf,"updateExternalProps"),Zd(zf,[r]),(0,$.useEffect)(()=>{cs&&(di.current={maxHeight:i,maxWidth:l,height:a,width:c},Ff())},[i,l,c,a,cs]),(0,$.useEffect)(()=>{var Me;if(Ze!=null&&Ze.inSandbox&&yn.current&&cs&&p){const tt=p==="parent"?(Me=ke.current)==null?void 0:Me.parentElement:p.current;if(!tt)return;const nl=new ResizeObserver(rl=>{for(const Nr of rl)if(Nr.contentBoxSize){const il=Nr.contentBoxSize[0].inlineSize,Sd=Nr.contentBoxSize[0].blockSize;Nc.current={constraintHeight:Sd,constraintWidth:il},Ff()}});return nl.observe(tt),()=>nl.disconnect()}else return},[p,cs]),xp(Tc.PluginBodyResizeOrTreeRenders,Mf),(0,$.useLayoutEffect)(()=>{if(!(!cs||!ke.current||!xd))return xd.addListener(ke.current,pd.debounce(Mf,10)),()=>{ke.current&&xd.removeListener(ke.current)}},[cs]),(0,$.useEffect)(()=>()=>{Ze&&yn.current&&Ze.unmountFakeEmbedComponent(yn.current)},[]),(0,Ke.jsx)("div",{ref:ke,className:"js-fake-embed"})},"FakeEmbedHost"),Or=d(t=>{const r=t,{width:i,maxHeight:l,constraintRef:a,height:c,maxWidth:p,componentType:h}=r,g=Pp(r,["width","maxHeight","constraintRef","height","maxWidth","componentType"]);return(0,Ke.jsx)(bp,{componentType:h,externalProps:g,width:i,height:c,maxHeight:l,maxWidth:p,constraintRef:a})},"FakeEmbedHostConcrete");class Kd extends $.Component{render(){return(0,Ke.jsx)(Or,or({componentType:nn.RichTextEditor},this.props))}}d(Kd,"RichTextEditor");class Gd extends $.Component{render(){return(0,Ke.jsx)(Or,or({componentType:nn.RichText},this.props))}}d(Gd,"RichText");class qd extends $.Component{render(){return(0,Ke.jsx)(Or,or({componentType:nn.RemViewer},this.props))}}d(qd,"RemViewer");class Yd extends $.Component{render(){return(0,Ke.jsx)(Or,or({componentType:nn.PDFWebReader},this.props))}}d(Yd,"PDFWebReader");class Xd extends $.Component{render(){return(0,Ke.jsx)(Or,or({componentType:nn.DocumentViewer},this.props))}}d(Xd,"DocumentViewer");class Jd extends $.Component{render(){return(0,Ke.jsx)(Or,or({componentType:nn.RemRichTextEditor},this.props))}}d(Jd,"RemRichTextEditor");class ef extends $.Component{render(){return(0,Ke.jsx)(Or,or({componentType:nn.RemHierarchyEditorTree},this.props))}}d(ef,"RemHierarchyEditorTree");class tf extends $.Component{render(){return(0,Ke.jsx)(Or,or({componentType:nn.Queue},this.props))}}d(tf,"Queue");class nf extends $.Component{render(){return(0,Ke.jsx)(Or,or({componentType:nn.LoadingSpinner},this.props))}}d(nf,"LoadingSpinnerPlugin");class rf extends $.Component{render(){return(0,Ke.jsx)(Or,or({componentType:nn.PreviewRemCards},this.props))}}d(rf,"PreviewRemCards");function gd(t){var r,i,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(i=gd(t[r]))&&(l&&(l+=" "),l+=i);else for(r in t)t[r]&&(l&&(l+=" "),l+=r);return l}d(gd,"r");function of(){for(var t,r,i=0,l="";i<arguments.length;)(t=arguments[i++])&&(r=gd(t))&&(l&&(l+=" "),l+=r);return l}d(of,"clsx");var Np=of,Dp=Be(318),lf=Be.n(Dp),Ap=Object.defineProperty,jp=d((t,r,i)=>r in t?Ap(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"PluginRenderer_defNormalProp"),sf=d((t,r,i)=>(jp(t,typeof r!="symbol"?r+"":r,i),i),"PluginRenderer_publicField"),af=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"PluginRenderer_async");const Lp=d(({plugin:t,children:r})=>{const i=(0,$.useRef)(null);(0,$.useEffect)(()=>{if(!i.current||!t.inSandbox)return;const h=new ResizeObserver(()=>{i.current&&Sc.emit(Tc.PluginBodyResizeOrTreeRenders)}),g=new MutationObserver(v=>{for(const Q of v)(Q.type==="attributes"||Q.type==="childList")&&Sc.emit(Tc.PluginBodyResizeOrTreeRenders)});return g.observe(i.current,{attributes:!0,childList:!0,subtree:!0}),h.observe(i.current),()=>{i.current&&(h.disconnect(),g.disconnect())}},[]);const l=t.inSandbox?{current:document.getElementsByTagName("html")[0]}:i,a=t.inSandbox?document.getElementsByTagName("html")[0]:t.mountDiv,c=t.inSandbox?gp:uf,p=(0,Ke.jsx)("div",{ref:i,className:Np("plugin rn-clr-content-primary font-inter",t.id==="demo-tabs"&&"fade-on-hide-ui"),"data-plugin-id":t.id,children:r});return(0,Ke.jsx)(vp,{plugin:t,children:(0,Ke.jsx)(wp,{pluginRoot:l,children:(0,Ke.jsx)(c,{root:a,children:p})})})},"PluginWrapper");function uf(t){return(0,Ke.jsx)(md.Provider,{value:null,children:t.children})}d(uf,"NoScrollDetector");class kc extends Bo{constructor(r,i){super(),sf(this,"initReact"),sf(this,"onDeactivateReact"),this.initReact=r,this.onDeactivateReact=i}onActivate(r,i){return af(this,null,function*(){this.initReact(this,r,i)})}onDeactivate(){return af(this,null,function*(){this.onDeactivateReact(this)})}}d(kc,"ReactRNPlugin");const cf=d(t=>{const r=d(i=>{const l=d((c,p,h)=>lf().render((0,Ke.jsxs)($.StrictMode,{children:[(0,Ke.jsx)(Lp,{plugin:c,children:(0,Ke.jsx)(t,{})}),(0,Ke.jsx)("link",{rel:"stylesheet",href:`${h}App.css`,as:"style",type:"text/css",crossOrigin:"anonymous"})]}),p),"initReact"),a=d(c=>{console.log("onDeactivateReact"),lf().unmountComponentAtNode(c.mountDiv)},"onDeactivateReact");return i?(window.__plugin?(console.log("[HMR] Hot reloading RemNote plugin widget."),a(window.__plugin),l(window.__plugin,window.__plugin.mountDiv,window.__plugin.rootURL)):window.__plugin=new kc(l,a),window.__plugin):new kc(l,a)},"makePlugin");try{const i=new URL(IMPORT_META.url).searchParams,l=i.get("widgetName"),a=i.get("pluginId");window.nativePluginRenderers.set(`${a}.${l}`,r)}catch{r(!0)}},"renderWidget");function df(t,r){function i(){const l=ci();return(0,$.useEffect)(()=>(l&&t(l),()=>{l&&r(l)}),[l]),null}d(i,"IndexWidget"),cf(i)}d(df,"declareIndexPlugin");function ff(t){return Rc(j.MessageBroadcast,void 0,t)}d(ff,"useOnMessageBroadcast");function Rc(t,r,i){const l=ci();(0,$.useEffect)(()=>(l.event.addListener(t,r,i),()=>{l.event.removeListener(t,r,i)}),[t,r,i])}d(Rc,"useAPIEventListener");var Fp=Object.defineProperty,pf=Object.getOwnPropertySymbols,Mp=Object.prototype.hasOwnProperty,zp=Object.prototype.propertyIsEnumerable,hf=d((t,r,i)=>r in t?Fp(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,"rem_hooks_defNormalProp"),Bp=d((t,r)=>{for(var i in r||(r={}))Mp.call(r,i)&&hf(t,i,r[i]);if(pf)for(var i of pf(r))zp.call(r,i)&&hf(t,i,r[i]);return t},"rem_hooks_spreadValues"),Up=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"rem_hooks_async");function yd(t,r){const i=new Set(r);return t.filter(l=>!i.has(l))}d(yd,"rem_hooks_difference");function mf(t){return t.filter(r=>r)}d(mf,"rem_hooks_compact");function gf(t){const r=ci(),i=mf(t||[]),[l,a]=(0,$.useState)({}),[c,p]=(0,$.useState)(i.map(xe=>l[xe])),h=d((xe,Bt)=>{Bt&&a(ke=>{const Ze=Bp({},ke);return Ze[xe]=Bt,p(i.map(us=>Ze[us])),Ze})},"setRem"),g=d(xe=>Up(this,null,function*(){h(xe,yield r.rem.findOne(xe))}),"refetchRem"),v=(0,$.useRef)([]),Q=(0,$.useRef)(new Map);return(0,$.useEffect)(()=>{const xe=yd(i,v.current),Bt=yd(v.current,i);for(const ke of xe){const Ze=d(()=>g(ke),"listener");Q.current.set(ke,Ze),r.event.addListener(j.RemChanged,ke,Ze),g(ke)}for(const ke of Bt)r.event.removeListener(j.RemChanged,ke,Q.current.get(ke));p(i.map(ke=>l[ke])),v.current=i},[i.length,...i]),(0,$.useEffect)(()=>()=>{for(const xe of v.current)r.event.removeListener(j.RemChanged,xe,Q.current.get(xe))},[]),c}d(gf,"useGetRemsByIdsReactive");var yf=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"storage_hooks_async");function Ic(t,r,i,l,a,c){const[p,h]=(0,$.useState)(c),g=d(()=>yf(this,null,function*(){r&&h((yield l(r))||c)}),"refetchValue");return(0,$.useEffect)(()=>{g()},[r]),Rc(i,r,v=>{h(v)}),[p,d(v=>yf(this,null,function*(){yield a(r,v)}),"setValue")]}d(Ic,"useStorageStateInternal");function vf(t,r){const i=ci();return Ic(i,t,j.StorageSessionChange,i.storage.getSession,i.storage.setSession,r)}d(vf,"useSessionStorageState");function wf(t,r){const i=ci();return Ic(i,t,j.StorageLocalChange,i.storage.getLocal,i.storage.setLocal,r)}d(wf,"useLocalStorageState");function _f(t,r){const i=ci();return Ic(i,t,j.StorageSyncedChange,i.storage.getSynced,i.storage.setSynced,r)}d(_f,"useSyncedStorageState");var xf=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"react_hooks_async");function Ef(t,r){const[i,l]=(0,$.useState)(void 0);return(0,$.useEffect)(()=>{xf(this,null,function*(){return l(yield t())})},r),i}d(Ef,"useRunAsync");function Sf(t,r){return xf(this,null,function*(){const i=[],l=yield Promise.all(t.map(a=>r(a)));for(const[a,c]of pd.zip(l,t))a&&i.push(c);return i})}d(Sf,"filterAsync");const Zp=["card","editor","focus","messaging","powerup","rem","richText","settings","storage","widget","window","search"],ft=d(t=>({event:j.RemChanged,key:typeof t=="string"?t:typeof t=="object"?t._id:void 0}),"remReactiveDep"),br=d(t=>({event:t,key:void 0}),"noKeyDep"),Tf={allRemInDocumentOrPortal:{resultDeps:t=>t.map(ft)},deepRemsBeingReferenced:{resultDeps:t=>t.map(ft)},getAliases:{resultDeps:t=>t.map(ft)},getDescendants:{resultDeps:t=>t.map(ft)},getSources:{resultDeps:t=>t.map(ft)},getTagRems:{resultDeps:t=>t.map(ft)},getParentRem:{resultDeps:t=>[ft(t)]},getChildrenRem:{resultDeps:t=>t.map(ft)},getPortalDirectlyIncludedRem:{resultDeps:t=>t.map(ft)},portalsAndDocumentsIn:{resultDeps:t=>t.map(ft)},remsBeingReferenced:{resultDeps:t=>t.map(ft)},remsReferencingThis:{resultDeps:t=>t.map(ft)},siblingRem:{resultDeps:t=>t.map(ft)},taggedRem:{resultDeps:t=>t.map(ft)}},Cf={rem:{findByName:{resultDeps:t=>[ft(t)]},findOne:{argsDeps:t=>[ft(t[0])]},findMany:{argsDeps:t=>t[0].map(ft)},getAll:{resultDeps:t=>t.map(ft)}},powerup:{getPowerupSlotByCode:{resultDeps:t=>[ft(t)]},getPowerupByCode:{resultDeps:t=>[ft(t)]}},settings:{getSetting:{argsDeps:t=>[{event:j.SettingChanged,key:t[0]}]}},card:{},storage:{getLocal:{argsDeps:t=>[{event:j.StorageLocalChange,key:t[0]}]},getSession:{argsDeps:t=>[{event:j.StorageSessionChange,key:t[0]}]},getSynced:{argsDeps:t=>[{event:j.StorageSyncedChange,key:t[0]}]}},window:{getCurrentWindowTree:{argsDeps:()=>[br(j.CurrentWindowTreeChange)]},getFocusedPaneId:{argsDeps:()=>[br(j.FocusedPaneChange)]}},editor:{getFocusedEditorText:{argsDeps:()=>[br(j.FocusedRemChange),br(j.EditorTextEdited)]},getSelection:{argsDeps:()=>[br(j.EditorSelectionChanged)]},getSelectedRem:{argsDeps:()=>[br(j.EditorSelectionChanged)]},getSelectedText:{argsDeps:()=>[br(j.EditorSelectionChanged)]},getCaretPosition:{argsDeps:()=>[br(j.EditorSelectionChanged)]}},focus:{getFocusedRem:{argsDeps:()=>[br(j.FocusedRemChange)],resultDeps:t=>[ft(t)]},getFocusedPortal:{argsDeps:()=>[br(j.FocusedPortalChange)],resultDeps:t=>[ft(t)]}}};var Oc=d((t,r,i)=>new Promise((l,a)=>{var c=d(g=>{try{h(i.next(g))}catch(v){a(v)}},"fulfilled"),p=d(g=>{try{h(i.throw(g))}catch(v){a(v)}},"rejected"),h=d(g=>g.done?l(g.value):Promise.resolve(g.value).then(c,p),"step");h((i=i.apply(t,r)).next())}),"useTracker_async");function Pf(t){return Zp.includes(t)}d(Pf,"isNamespacedProp");const Wp=d((t,r)=>Array.isArray(t)&&t[0]instanceof tn?t.map(i=>vd(i,r)):t&&t instanceof tn?vd(t,r):t,"wrapResult"),kf=d((t,r,i,l)=>new Proxy(t,{apply:(a,c,p)=>Oc(void 0,null,function*(){const h=yield a.apply(c,p);return l(r,c,i,p,h),Wp(h,l)})}),"wrapFunctionCall");function vd(t,r){return new Proxy(t,{get(i,l){var a;return typeof i[l]=="function"&&(a=Tf)!=null&&a[l]?kf(i[l],void 0,l,r):i[l]}})}d(vd,"interceptReactiveRemCalls");function Rf(t,r,i){return new Proxy(r,{get(l,a){var c,p;return typeof a=="string"&&typeof l[a]=="function"&&(p=(c=Cf)==null?void 0:c[t])!=null&&p[a]?kf(l[a],t,a,i):l[a]}})}d(Rf,"interceptReactiveAPICalls");function If(t,r){return new Proxy(t,{get(i,l){return Pf(l)?Rf(l,i[l],r):i[l]}})}d(If,"interceptAPINamespaceAccesses");function wd(t){return new Set(t?.map(({reactiveDeps:r})=>r.map(bc)).flat())}d(wd,"subscriptionsToSubscriptionSet");function bc(t){const{event:r,key:i}=t;return`${r}.${i}`}d(bc,"reactiveDepToKey");const Vp=d(t=>{const r=[];return{proxy:If(t,(i,l,a,c,p)=>{var h,g,v,Q,xe,Bt;const ke=i?(g=(h=Cf)==null?void 0:h[i])==null?void 0:g[a]:(v=Tf)==null?void 0:v[a],Ze=[...((Q=ke.thisDeps)==null?void 0:Q.call(ke,l))||[],...((xe=ke.argsDeps)==null?void 0:xe.call(ke,c))||[],...((Bt=ke.resultDeps)==null?void 0:Bt.call(ke,p))||[]];r.push({methodName:a,args:c,reactiveDeps:Ze})}),subscriptions:r}},"wrapApiWithListen"),_d=d((t,r,i,l,a)=>Oc(void 0,null,function*(){const c=Vp(t);return yield d(()=>Oc(void 0,null,function*(){c.subscriptions.length;const p=yield r(c.proxy);l(p)}),"changeHandler")(),Of(t,i,a,c.subscriptions),c.subscriptions}),"createReactiveApi");function Of(t,r,i,l){const a=wd(i||[]),c=wd(l);i?.forEach(({reactiveDeps:p})=>{for(const h of p)if(!c.has(bc(h))){const{event:g,key:v}=h;t.event.removeListener(g,v,r)}}),l?.forEach(({reactiveDeps:p})=>{for(const h of p)if(!a.has(bc(h))){const{event:g,key:v}=h;t.event.addListener(g,v,r)}})}d(Of,"updateListeners");function bf(t,r=[]){const i=ci(),[l,a]=Qi().useState(),c=(0,$.useRef)(!1),p=(0,$.useRef)(!1),h=(0,$.useRef)(),g=(0,$.useRef)(t);g.current=t;const v=d(()=>{c.current?p.current=!0:(c.current=!0,d(()=>Oc(this,null,function*(){h.current=yield _d(i,g.current,v,a,h.current||[]),c.current=!1,p.current&&(p.current=!1,v())}),"effect")())},"run");return Qi().useEffect(v,r),l}d(bf,"useTrackerPlugin");const Hp=/^[-_a-zA-Z0-9]+$/,Qp=E.nativeEnum(To);E.nativeEnum(Gn);const as=E.object({level:Qp}),$p=E.object({type:E.literal(Gn.KnowledgeBaseInfo)}).merge(as),Kp=E.object({type:E.literal(Gn.All)}).merge(as),Gp=E.object({type:E.literal(Gn.DescendantsOfName),remName:E.string()}).merge(as),qp=E.object({type:E.literal(Gn.DescendantsOfId),remId:E.string()}).merge(as),Yp=E.object({type:E.literal(Gn.Powerup),powerupCode:E.string()}).merge(as),Xp=E.object({type:E.literal(Gn.FocusedSubtree)}).merge(as),Jp=E.union([Kp,Gp,qp,Yp,Xp,$p]),Nf=E.object({major:E.number().gte(0),minor:E.number().gte(0),patch:E.number().gte(0)}),Df=E.object({id:E.string().min(5).max(100).refine(t=>Hp.test(t),"Plugin ids may consist only of lowercase Latin letters a-z, A-Z, hyphens, underscores, and digits 0-9"),name:E.string().min(3).max(100),version:Nf,manifestVersion:E.literal(1),requestNative:E.boolean(),requiredScopes:E.array(Jp),repoUrl:E.string().url(),author:E.string().min(3).max(100),enableOnMobile:E.boolean(),theme:E.union([E.literal("dark"),E.literal("light")]).array().optional(),minimumRemNoteVersion:Nf.optional(),description:E.string().max(200).optional(),projectUrl:E.string().url().optional(),supportUrl:E.string().url().optional(),changelogUrl:E.string().url().optional(),unlisted:E.boolean().optional()}),eh=Df.merge(E.object({repoUrl:E.string().url().optional()}));d(t=>`${t.field}: ${t.message}`,"formatValidationError");const Af=d(t=>{const r=t.errors,i=[];for(const l of r){const{code:a,message:c,path:p}=l,h={field:p.join(".")?p.join("."):"Root Object",message:`${c} (${a})`};"expected"in l&&(h.expected=l.expected),"received"in l&&(h.received=l.received),i.push(h)}return i},"prettifyZodErrors"),th=d(t=>{const r=Df.safeParse(t);return r.success?r:{success:!1,errors:Af(r.error)}},"parseManifest");d(t=>{const r=eh.safeParse(t);return r.success?r:{success:!1,errors:Af(r.error)}},"parseSnippetManifest")}(),kn}()})})($f);var cp=$f.exports;const wh=oh(cp),_h=ih({__proto__:null,default:wh},[cp]);export{cp as d,oh as g,_h as i,up as r};