@edpire/sdk 0.12.0 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";var EdpireSDK=(()=>{var yne=Object.create;var Wg=Object.defineProperty,bne=Object.defineProperties,xne=Object.getOwnPropertyDescriptor,vne=Object.getOwnPropertyDescriptors,wne=Object.getOwnPropertyNames,Ob=Object.getOwnPropertySymbols,kne=Object.getPrototypeOf,Uw=Object.prototype.hasOwnProperty,vz=Object.prototype.propertyIsEnumerable;var jw=(e,t,r)=>t in e?Wg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,te=(e,t)=>{for(var r in t||(t={}))Uw.call(t,r)&&jw(e,r,t[r]);if(Ob)for(var r of Ob(t))vz.call(t,r)&&jw(e,r,t[r]);return e},Ue=(e,t)=>bne(e,vne(t));var wz=e=>typeof e=="symbol"?e:e+"",Pn=(e,t)=>{var r={};for(var n in e)Uw.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ob)for(var n of Ob(e))t.indexOf(n)<0&&vz.call(e,n)&&(r[n]=e[n]);return r};var wt=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ci=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pb=(e,t)=>{for(var r in t)Wg(e,r,{get:t[r],enumerable:!0})},kz=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of wne(t))!Uw.call(e,a)&&a!==r&&Wg(e,a,{get:()=>t[a],enumerable:!(n=xne(t,a))||n.enumerable});return e};var Ee=(e,t,r)=>(r=e!=null?yne(kne(e)):{},kz(t||!e||!e.__esModule?Wg(r,"default",{value:e,enumerable:!0}):r,e)),Sne=e=>kz(Wg({},"__esModule",{value:!0}),e);var ed=(e,t,r)=>jw(e,typeof t!="symbol"?t+"":t,r);var zz=Ci(vr=>{"use strict";var Gw=Symbol.for("react.transitional.element"),Cne=Symbol.for("react.portal"),Mne=Symbol.for("react.fragment"),_ne=Symbol.for("react.strict_mode"),Ane=Symbol.for("react.profiler"),Lne=Symbol.for("react.consumer"),Tne=Symbol.for("react.context"),Ene=Symbol.for("react.forward_ref"),Dne=Symbol.for("react.suspense"),Ine=Symbol.for("react.memo"),Az=Symbol.for("react.lazy"),zne=Symbol.for("react.activity"),Sz=Symbol.iterator;function Bne(e){return e===null||typeof e!="object"?null:(e=Sz&&e[Sz]||e["@@iterator"],typeof e=="function"?e:null)}var Lz={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Tz=Object.assign,Ez={};function Yh(e,t,r){this.props=e,this.context=t,this.refs=Ez,this.updater=r||Lz}Yh.prototype.isReactComponent={};Yh.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dz(){}Dz.prototype=Yh.prototype;function Ww(e,t,r){this.props=e,this.context=t,this.refs=Ez,this.updater=r||Lz}var Xw=Ww.prototype=new Dz;Xw.constructor=Ww;Tz(Xw,Yh.prototype);Xw.isPureReactComponent=!0;var Cz=Array.isArray;function Vw(){}var oa={H:null,A:null,T:null,S:null},Iz=Object.prototype.hasOwnProperty;function Yw(e,t,r){var n=r.ref;return{$$typeof:Gw,type:e,key:t,ref:n!==void 0?n:null,props:r}}function Rne(e,t){return Yw(e.type,t,e.props)}function Jw(e){return typeof e=="object"&&e!==null&&e.$$typeof===Gw}function Nne(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Mz=/\/+/g;function Kw(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Nne(""+e.key):t.toString(36)}function One(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Vw,Vw):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Xh(e,t,r,n,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Gw:case Cne:o=!0;break;case Az:return o=e._init,Xh(o(e._payload),t,r,n,a)}}if(o)return a=a(e),o=n===""?"."+Kw(e,0):n,Cz(a)?(r="",o!=null&&(r=o.replace(Mz,"$&/")+"/"),Xh(a,t,r,"",function(u){return u})):a!=null&&(Jw(a)&&(a=Rne(a,r+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(Mz,"$&/")+"/")+o)),t.push(a)),1;o=0;var s=n===""?".":n+":";if(Cz(e))for(var l=0;l<e.length;l++)n=e[l],i=s+Kw(n,l),o+=Xh(n,t,r,i,a);else if(l=Bne(e),typeof l=="function")for(e=l.call(e),l=0;!(n=e.next()).done;)n=n.value,i=s+Kw(n,l++),o+=Xh(n,t,r,i,a);else if(i==="object"){if(typeof e.then=="function")return Xh(One(e),t,r,n,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return o}function Fb(e,t,r){if(e==null)return e;var n=[],a=0;return Xh(e,n,"","",function(i){return t.call(r,i,a++)}),n}function Pne(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var _z=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Fne={map:Fb,forEach:function(e,t,r){Fb(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Fb(e,function(){t++}),t},toArray:function(e){return Fb(e,function(t){return t})||[]},only:function(e){if(!Jw(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};vr.Activity=zne;vr.Children=Fne;vr.Component=Yh;vr.Fragment=Mne;vr.Profiler=Ane;vr.PureComponent=Ww;vr.StrictMode=_ne;vr.Suspense=Dne;vr.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=oa;vr.__COMPILER_RUNTIME={__proto__:null,c:function(e){return oa.H.useMemoCache(e)}};vr.cache=function(e){return function(){return e.apply(null,arguments)}};vr.cacheSignal=function(){return null};vr.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=Tz({},e.props),a=e.key;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)!Iz.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(n[i]=t[i]);var i=arguments.length-2;if(i===1)n.children=r;else if(1<i){for(var o=Array(i),s=0;s<i;s++)o[s]=arguments[s+2];n.children=o}return Yw(e.type,a,n)};vr.createContext=function(e){return e={$$typeof:Tne,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Lne,_context:e},e};vr.createElement=function(e,t,r){var n,a={},i=null;if(t!=null)for(n in t.key!==void 0&&(i=""+t.key),t)Iz.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(a[n]=t[n]);var o=arguments.length-2;if(o===1)a.children=r;else if(1<o){for(var s=Array(o),l=0;l<o;l++)s[l]=arguments[l+2];a.children=s}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)a[n]===void 0&&(a[n]=o[n]);return Yw(e,i,a)};vr.createRef=function(){return{current:null}};vr.forwardRef=function(e){return{$$typeof:Ene,render:e}};vr.isValidElement=Jw;vr.lazy=function(e){return{$$typeof:Az,_payload:{_status:-1,_result:e},_init:Pne}};vr.memo=function(e,t){return{$$typeof:Ine,type:e,compare:t===void 0?null:t}};vr.startTransition=function(e){var t=oa.T,r={};oa.T=r;try{var n=e(),a=oa.S;a!==null&&a(r,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(Vw,_z)}catch(i){_z(i)}finally{t!==null&&r.types!==null&&(t.types=r.types),oa.T=t}};vr.unstable_useCacheRefresh=function(){return oa.H.useCacheRefresh()};vr.use=function(e){return oa.H.use(e)};vr.useActionState=function(e,t,r){return oa.H.useActionState(e,t,r)};vr.useCallback=function(e,t){return oa.H.useCallback(e,t)};vr.useContext=function(e){return oa.H.useContext(e)};vr.useDebugValue=function(){};vr.useDeferredValue=function(e,t){return oa.H.useDeferredValue(e,t)};vr.useEffect=function(e,t){return oa.H.useEffect(e,t)};vr.useEffectEvent=function(e){return oa.H.useEffectEvent(e)};vr.useId=function(){return oa.H.useId()};vr.useImperativeHandle=function(e,t,r){return oa.H.useImperativeHandle(e,t,r)};vr.useInsertionEffect=function(e,t){return oa.H.useInsertionEffect(e,t)};vr.useLayoutEffect=function(e,t){return oa.H.useLayoutEffect(e,t)};vr.useMemo=function(e,t){return oa.H.useMemo(e,t)};vr.useOptimistic=function(e,t){return oa.H.useOptimistic(e,t)};vr.useReducer=function(e,t,r){return oa.H.useReducer(e,t,r)};vr.useRef=function(e){return oa.H.useRef(e)};vr.useState=function(e){return oa.H.useState(e)};vr.useSyncExternalStore=function(e,t,r){return oa.H.useSyncExternalStore(e,t,r)};vr.useTransition=function(){return oa.H.useTransition()};vr.version="19.2.3"});var _t=Ci((s8e,Bz)=>{"use strict";Bz.exports=zz()});var Uz=Ci(xa=>{"use strict";function tk(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,a=e[n];if(0<qb(a,t))e[n]=t,e[r]=a,r=n;else break e}}function _u(e){return e.length===0?null:e[0]}function Hb(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,a=e.length,i=a>>>1;n<i;){var o=2*(n+1)-1,s=e[o],l=o+1,u=e[l];if(0>qb(s,r))l<a&&0>qb(u,s)?(e[n]=u,e[l]=r,n=l):(e[n]=s,e[o]=r,n=o);else if(l<a&&0>qb(u,r))e[n]=u,e[l]=r,n=l;else break e}}return t}function qb(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}xa.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Rz=performance,xa.unstable_now=function(){return Rz.now()}):(Zw=Date,Nz=Zw.now(),xa.unstable_now=function(){return Zw.now()-Nz});var Rz,Zw,Nz,Ac=[],td=[],qne=1,rl=null,ro=3,rk=!1,Xg=!1,Yg=!1,nk=!1,Fz=typeof setTimeout=="function"?setTimeout:null,qz=typeof clearTimeout=="function"?clearTimeout:null,Oz=typeof setImmediate!="undefined"?setImmediate:null;function $b(e){for(var t=_u(td);t!==null;){if(t.callback===null)Hb(td);else if(t.startTime<=e)Hb(td),t.sortIndex=t.expirationTime,tk(Ac,t);else break;t=_u(td)}}function ak(e){if(Yg=!1,$b(e),!Xg)if(_u(Ac)!==null)Xg=!0,Zh||(Zh=!0,Jh());else{var t=_u(td);t!==null&&ik(ak,t.startTime-e)}}var Zh=!1,Jg=-1,$z=5,Hz=-1;function jz(){return nk?!0:!(xa.unstable_now()-Hz<$z)}function Qw(){if(nk=!1,Zh){var e=xa.unstable_now();Hz=e;var t=!0;try{e:{Xg=!1,Yg&&(Yg=!1,qz(Jg),Jg=-1),rk=!0;var r=ro;try{t:{for($b(e),rl=_u(Ac);rl!==null&&!(rl.expirationTime>e&&jz());){var n=rl.callback;if(typeof n=="function"){rl.callback=null,ro=rl.priorityLevel;var a=n(rl.expirationTime<=e);if(e=xa.unstable_now(),typeof a=="function"){rl.callback=a,$b(e),t=!0;break t}rl===_u(Ac)&&Hb(Ac),$b(e)}else Hb(Ac);rl=_u(Ac)}if(rl!==null)t=!0;else{var i=_u(td);i!==null&&ik(ak,i.startTime-e),t=!1}}break e}finally{rl=null,ro=r,rk=!1}t=void 0}}finally{t?Jh():Zh=!1}}}var Jh;typeof Oz=="function"?Jh=function(){Oz(Qw)}:typeof MessageChannel!="undefined"?(ek=new MessageChannel,Pz=ek.port2,ek.port1.onmessage=Qw,Jh=function(){Pz.postMessage(null)}):Jh=function(){Fz(Qw,0)};var ek,Pz;function ik(e,t){Jg=Fz(function(){e(xa.unstable_now())},t)}xa.unstable_IdlePriority=5;xa.unstable_ImmediatePriority=1;xa.unstable_LowPriority=4;xa.unstable_NormalPriority=3;xa.unstable_Profiling=null;xa.unstable_UserBlockingPriority=2;xa.unstable_cancelCallback=function(e){e.callback=null};xa.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$z=0<e?Math.floor(1e3/e):5};xa.unstable_getCurrentPriorityLevel=function(){return ro};xa.unstable_next=function(e){switch(ro){case 1:case 2:case 3:var t=3;break;default:t=ro}var r=ro;ro=t;try{return e()}finally{ro=r}};xa.unstable_requestPaint=function(){nk=!0};xa.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=ro;ro=e;try{return t()}finally{ro=r}};xa.unstable_scheduleCallback=function(e,t,r){var n=xa.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return a=r+a,e={id:qne++,callback:t,priorityLevel:e,startTime:r,expirationTime:a,sortIndex:-1},r>n?(e.sortIndex=r,tk(td,e),_u(Ac)===null&&e===_u(td)&&(Yg?(qz(Jg),Jg=-1):Yg=!0,ik(ak,r-n))):(e.sortIndex=a,tk(Ac,e),Xg||rk||(Xg=!0,Zh||(Zh=!0,Jh()))),e};xa.unstable_shouldYield=jz;xa.unstable_wrapCallback=function(e){var t=ro;return function(){var r=ro;ro=t;try{return e.apply(this,arguments)}finally{ro=r}}}});var Vz=Ci((u8e,Kz)=>{"use strict";Kz.exports=Uz()});var Wz=Ci(Mo=>{"use strict";var $ne=_t();function Gz(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function rd(){}var Co={d:{f:rd,r:function(){throw Error(Gz(522))},D:rd,C:rd,L:rd,m:rd,X:rd,S:rd,M:rd},p:0,findDOMNode:null},Hne=Symbol.for("react.portal");function jne(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Hne,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}var Zg=$ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function jb(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Mo.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Co;Mo.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Gz(299));return jne(e,t,null,r)};Mo.flushSync=function(e){var t=Zg.T,r=Co.p;try{if(Zg.T=null,Co.p=2,e)return e()}finally{Zg.T=t,Co.p=r,Co.d.f()}};Mo.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Co.d.C(e,t))};Mo.prefetchDNS=function(e){typeof e=="string"&&Co.d.D(e)};Mo.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,n=jb(r,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Co.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:n,integrity:a,fetchPriority:i}):r==="script"&&Co.d.X(e,{crossOrigin:n,integrity:a,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Mo.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=jb(t.as,t.crossOrigin);Co.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Co.d.M(e)};Mo.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,n=jb(r,t.crossOrigin);Co.d.L(e,r,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Mo.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=jb(t.as,t.crossOrigin);Co.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Co.d.m(e)};Mo.requestFormReset=function(e){Co.d.r(e)};Mo.unstable_batchedUpdates=function(e,t){return e(t)};Mo.useFormState=function(e,t,r){return Zg.H.useFormState(e,t,r)};Mo.useFormStatus=function(){return Zg.H.useHostTransitionStatus()};Mo.version="19.2.3"});var Qh=Ci((d8e,Yz)=>{"use strict";function Xz(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xz)}catch(e){console.error(e)}}Xz(),Yz.exports=Wz()});var lP=Ci(h6=>{"use strict";var gi=Vz(),kR=_t(),Une=Qh();function Ve(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function SR(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function P4(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function CR(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function MR(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Jz(e){if(P4(e)!==e)throw Error(Ve(188))}function Kne(e){var t=e.alternate;if(!t){if(t=P4(e),t===null)throw Error(Ve(188));return t!==e?null:e}for(var r=e,n=t;;){var a=r.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){r=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===r)return Jz(a),e;if(i===n)return Jz(a),t;i=i.sibling}throw Error(Ve(188))}if(r.return!==n.return)r=a,n=i;else{for(var o=!1,s=a.child;s;){if(s===r){o=!0,r=a,n=i;break}if(s===n){o=!0,n=a,r=i;break}s=s.sibling}if(!o){for(s=i.child;s;){if(s===r){o=!0,r=i,n=a;break}if(s===n){o=!0,n=i,r=a;break}s=s.sibling}if(!o)throw Error(Ve(189))}}if(r.alternate!==n)throw Error(Ve(190))}if(r.tag!==3)throw Error(Ve(188));return r.stateNode.current===r?e:t}function _R(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=_R(e),t!==null)return t;e=e.sibling}return null}var ua=Object.assign,Vne=Symbol.for("react.element"),Ub=Symbol.for("react.transitional.element"),o4=Symbol.for("react.portal"),i1=Symbol.for("react.fragment"),AR=Symbol.for("react.strict_mode"),Fk=Symbol.for("react.profiler"),LR=Symbol.for("react.consumer"),Rc=Symbol.for("react.context"),BS=Symbol.for("react.forward_ref"),qk=Symbol.for("react.suspense"),$k=Symbol.for("react.suspense_list"),RS=Symbol.for("react.memo"),nd=Symbol.for("react.lazy"),Hk=Symbol.for("react.activity"),Gne=Symbol.for("react.memo_cache_sentinel"),Zz=Symbol.iterator;function Qg(e){return e===null||typeof e!="object"?null:(e=Zz&&e[Zz]||e["@@iterator"],typeof e=="function"?e:null)}var Wne=Symbol.for("react.client.reference");function jk(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Wne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case i1:return"Fragment";case Fk:return"Profiler";case AR:return"StrictMode";case qk:return"Suspense";case $k:return"SuspenseList";case Hk:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case o4:return"Portal";case Rc:return e.displayName||"Context";case LR:return(e._context.displayName||"Context")+".Consumer";case BS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case RS:return t=e.displayName||null,t!==null?t:jk(e.type)||"Memo";case nd:t=e._payload,e=e._init;try{return jk(e(t))}catch(r){}}return null}var s4=Array.isArray,ur=kR.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,hn=Une.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Gf={pending:!1,data:null,method:null,action:null},Uk=[],o1=-1;function Du(e){return{current:e}}function Ai(e){0>o1||(e.current=Uk[o1],Uk[o1]=null,o1--)}function Xn(e,t){o1++,Uk[o1]=e.current,e.current=t}var Eu=Du(null),C4=Du(null),hd=Du(null),S5=Du(null);function C5(e,t){switch(Xn(hd,t),Xn(C4,e),Xn(Eu,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?iR(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=iR(t),e=WO(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ai(Eu),Xn(Eu,e)}function C1(){Ai(Eu),Ai(C4),Ai(hd)}function Kk(e){e.memoizedState!==null&&Xn(S5,e);var t=Eu.current,r=WO(t,e.type);t!==r&&(Xn(C4,e),Xn(Eu,r))}function M5(e){C4.current===e&&(Ai(Eu),Ai(C4)),S5.current===e&&(Ai(S5),R4._currentValue=Gf)}var ok,Qz;function jf(e){if(ok===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);ok=t&&t[1]||"",Qz=-1<r.stack.indexOf(`
1
+ "use strict";var EdpireSDK=(()=>{var yne=Object.create;var Wg=Object.defineProperty,bne=Object.defineProperties,xne=Object.getOwnPropertyDescriptor,vne=Object.getOwnPropertyDescriptors,wne=Object.getOwnPropertyNames,Ob=Object.getOwnPropertySymbols,kne=Object.getPrototypeOf,Uw=Object.prototype.hasOwnProperty,vz=Object.prototype.propertyIsEnumerable;var jw=(e,t,r)=>t in e?Wg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,te=(e,t)=>{for(var r in t||(t={}))Uw.call(t,r)&&jw(e,r,t[r]);if(Ob)for(var r of Ob(t))vz.call(t,r)&&jw(e,r,t[r]);return e},Ue=(e,t)=>bne(e,vne(t));var wz=e=>typeof e=="symbol"?e:e+"",Pn=(e,t)=>{var r={};for(var n in e)Uw.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ob)for(var n of Ob(e))t.indexOf(n)<0&&vz.call(e,n)&&(r[n]=e[n]);return r};var wt=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ci=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pb=(e,t)=>{for(var r in t)Wg(e,r,{get:t[r],enumerable:!0})},kz=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of wne(t))!Uw.call(e,a)&&a!==r&&Wg(e,a,{get:()=>t[a],enumerable:!(n=xne(t,a))||n.enumerable});return e};var Ee=(e,t,r)=>(r=e!=null?yne(kne(e)):{},kz(t||!e||!e.__esModule?Wg(r,"default",{value:e,enumerable:!0}):r,e)),Sne=e=>kz(Wg({},"__esModule",{value:!0}),e);var ed=(e,t,r)=>jw(e,typeof t!="symbol"?t+"":t,r);var zz=Ci(vr=>{"use strict";var Gw=Symbol.for("react.transitional.element"),Cne=Symbol.for("react.portal"),Mne=Symbol.for("react.fragment"),_ne=Symbol.for("react.strict_mode"),Ane=Symbol.for("react.profiler"),Lne=Symbol.for("react.consumer"),Tne=Symbol.for("react.context"),Ene=Symbol.for("react.forward_ref"),Dne=Symbol.for("react.suspense"),Ine=Symbol.for("react.memo"),Az=Symbol.for("react.lazy"),zne=Symbol.for("react.activity"),Sz=Symbol.iterator;function Bne(e){return e===null||typeof e!="object"?null:(e=Sz&&e[Sz]||e["@@iterator"],typeof e=="function"?e:null)}var Lz={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Tz=Object.assign,Ez={};function Yh(e,t,r){this.props=e,this.context=t,this.refs=Ez,this.updater=r||Lz}Yh.prototype.isReactComponent={};Yh.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dz(){}Dz.prototype=Yh.prototype;function Ww(e,t,r){this.props=e,this.context=t,this.refs=Ez,this.updater=r||Lz}var Xw=Ww.prototype=new Dz;Xw.constructor=Ww;Tz(Xw,Yh.prototype);Xw.isPureReactComponent=!0;var Cz=Array.isArray;function Vw(){}var oa={H:null,A:null,T:null,S:null},Iz=Object.prototype.hasOwnProperty;function Yw(e,t,r){var n=r.ref;return{$$typeof:Gw,type:e,key:t,ref:n!==void 0?n:null,props:r}}function Rne(e,t){return Yw(e.type,t,e.props)}function Jw(e){return typeof e=="object"&&e!==null&&e.$$typeof===Gw}function Nne(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Mz=/\/+/g;function Kw(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Nne(""+e.key):t.toString(36)}function One(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Vw,Vw):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Xh(e,t,r,n,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Gw:case Cne:o=!0;break;case Az:return o=e._init,Xh(o(e._payload),t,r,n,a)}}if(o)return a=a(e),o=n===""?"."+Kw(e,0):n,Cz(a)?(r="",o!=null&&(r=o.replace(Mz,"$&/")+"/"),Xh(a,t,r,"",function(u){return u})):a!=null&&(Jw(a)&&(a=Rne(a,r+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(Mz,"$&/")+"/")+o)),t.push(a)),1;o=0;var s=n===""?".":n+":";if(Cz(e))for(var l=0;l<e.length;l++)n=e[l],i=s+Kw(n,l),o+=Xh(n,t,r,i,a);else if(l=Bne(e),typeof l=="function")for(e=l.call(e),l=0;!(n=e.next()).done;)n=n.value,i=s+Kw(n,l++),o+=Xh(n,t,r,i,a);else if(i==="object"){if(typeof e.then=="function")return Xh(One(e),t,r,n,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return o}function Fb(e,t,r){if(e==null)return e;var n=[],a=0;return Xh(e,n,"","",function(i){return t.call(r,i,a++)}),n}function Pne(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var _z=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Fne={map:Fb,forEach:function(e,t,r){Fb(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Fb(e,function(){t++}),t},toArray:function(e){return Fb(e,function(t){return t})||[]},only:function(e){if(!Jw(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};vr.Activity=zne;vr.Children=Fne;vr.Component=Yh;vr.Fragment=Mne;vr.Profiler=Ane;vr.PureComponent=Ww;vr.StrictMode=_ne;vr.Suspense=Dne;vr.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=oa;vr.__COMPILER_RUNTIME={__proto__:null,c:function(e){return oa.H.useMemoCache(e)}};vr.cache=function(e){return function(){return e.apply(null,arguments)}};vr.cacheSignal=function(){return null};vr.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=Tz({},e.props),a=e.key;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)!Iz.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(n[i]=t[i]);var i=arguments.length-2;if(i===1)n.children=r;else if(1<i){for(var o=Array(i),s=0;s<i;s++)o[s]=arguments[s+2];n.children=o}return Yw(e.type,a,n)};vr.createContext=function(e){return e={$$typeof:Tne,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Lne,_context:e},e};vr.createElement=function(e,t,r){var n,a={},i=null;if(t!=null)for(n in t.key!==void 0&&(i=""+t.key),t)Iz.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(a[n]=t[n]);var o=arguments.length-2;if(o===1)a.children=r;else if(1<o){for(var s=Array(o),l=0;l<o;l++)s[l]=arguments[l+2];a.children=s}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)a[n]===void 0&&(a[n]=o[n]);return Yw(e,i,a)};vr.createRef=function(){return{current:null}};vr.forwardRef=function(e){return{$$typeof:Ene,render:e}};vr.isValidElement=Jw;vr.lazy=function(e){return{$$typeof:Az,_payload:{_status:-1,_result:e},_init:Pne}};vr.memo=function(e,t){return{$$typeof:Ine,type:e,compare:t===void 0?null:t}};vr.startTransition=function(e){var t=oa.T,r={};oa.T=r;try{var n=e(),a=oa.S;a!==null&&a(r,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(Vw,_z)}catch(i){_z(i)}finally{t!==null&&r.types!==null&&(t.types=r.types),oa.T=t}};vr.unstable_useCacheRefresh=function(){return oa.H.useCacheRefresh()};vr.use=function(e){return oa.H.use(e)};vr.useActionState=function(e,t,r){return oa.H.useActionState(e,t,r)};vr.useCallback=function(e,t){return oa.H.useCallback(e,t)};vr.useContext=function(e){return oa.H.useContext(e)};vr.useDebugValue=function(){};vr.useDeferredValue=function(e,t){return oa.H.useDeferredValue(e,t)};vr.useEffect=function(e,t){return oa.H.useEffect(e,t)};vr.useEffectEvent=function(e){return oa.H.useEffectEvent(e)};vr.useId=function(){return oa.H.useId()};vr.useImperativeHandle=function(e,t,r){return oa.H.useImperativeHandle(e,t,r)};vr.useInsertionEffect=function(e,t){return oa.H.useInsertionEffect(e,t)};vr.useLayoutEffect=function(e,t){return oa.H.useLayoutEffect(e,t)};vr.useMemo=function(e,t){return oa.H.useMemo(e,t)};vr.useOptimistic=function(e,t){return oa.H.useOptimistic(e,t)};vr.useReducer=function(e,t,r){return oa.H.useReducer(e,t,r)};vr.useRef=function(e){return oa.H.useRef(e)};vr.useState=function(e){return oa.H.useState(e)};vr.useSyncExternalStore=function(e,t,r){return oa.H.useSyncExternalStore(e,t,r)};vr.useTransition=function(){return oa.H.useTransition()};vr.version="19.2.3"});var _t=Ci((l8e,Bz)=>{"use strict";Bz.exports=zz()});var Uz=Ci(xa=>{"use strict";function tk(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,a=e[n];if(0<qb(a,t))e[n]=t,e[r]=a,r=n;else break e}}function _u(e){return e.length===0?null:e[0]}function Hb(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,a=e.length,i=a>>>1;n<i;){var o=2*(n+1)-1,s=e[o],l=o+1,u=e[l];if(0>qb(s,r))l<a&&0>qb(u,s)?(e[n]=u,e[l]=r,n=l):(e[n]=s,e[o]=r,n=o);else if(l<a&&0>qb(u,r))e[n]=u,e[l]=r,n=l;else break e}}return t}function qb(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}xa.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Rz=performance,xa.unstable_now=function(){return Rz.now()}):(Zw=Date,Nz=Zw.now(),xa.unstable_now=function(){return Zw.now()-Nz});var Rz,Zw,Nz,Ac=[],td=[],qne=1,rl=null,ro=3,rk=!1,Xg=!1,Yg=!1,nk=!1,Fz=typeof setTimeout=="function"?setTimeout:null,qz=typeof clearTimeout=="function"?clearTimeout:null,Oz=typeof setImmediate!="undefined"?setImmediate:null;function $b(e){for(var t=_u(td);t!==null;){if(t.callback===null)Hb(td);else if(t.startTime<=e)Hb(td),t.sortIndex=t.expirationTime,tk(Ac,t);else break;t=_u(td)}}function ak(e){if(Yg=!1,$b(e),!Xg)if(_u(Ac)!==null)Xg=!0,Zh||(Zh=!0,Jh());else{var t=_u(td);t!==null&&ik(ak,t.startTime-e)}}var Zh=!1,Jg=-1,$z=5,Hz=-1;function jz(){return nk?!0:!(xa.unstable_now()-Hz<$z)}function Qw(){if(nk=!1,Zh){var e=xa.unstable_now();Hz=e;var t=!0;try{e:{Xg=!1,Yg&&(Yg=!1,qz(Jg),Jg=-1),rk=!0;var r=ro;try{t:{for($b(e),rl=_u(Ac);rl!==null&&!(rl.expirationTime>e&&jz());){var n=rl.callback;if(typeof n=="function"){rl.callback=null,ro=rl.priorityLevel;var a=n(rl.expirationTime<=e);if(e=xa.unstable_now(),typeof a=="function"){rl.callback=a,$b(e),t=!0;break t}rl===_u(Ac)&&Hb(Ac),$b(e)}else Hb(Ac);rl=_u(Ac)}if(rl!==null)t=!0;else{var i=_u(td);i!==null&&ik(ak,i.startTime-e),t=!1}}break e}finally{rl=null,ro=r,rk=!1}t=void 0}}finally{t?Jh():Zh=!1}}}var Jh;typeof Oz=="function"?Jh=function(){Oz(Qw)}:typeof MessageChannel!="undefined"?(ek=new MessageChannel,Pz=ek.port2,ek.port1.onmessage=Qw,Jh=function(){Pz.postMessage(null)}):Jh=function(){Fz(Qw,0)};var ek,Pz;function ik(e,t){Jg=Fz(function(){e(xa.unstable_now())},t)}xa.unstable_IdlePriority=5;xa.unstable_ImmediatePriority=1;xa.unstable_LowPriority=4;xa.unstable_NormalPriority=3;xa.unstable_Profiling=null;xa.unstable_UserBlockingPriority=2;xa.unstable_cancelCallback=function(e){e.callback=null};xa.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$z=0<e?Math.floor(1e3/e):5};xa.unstable_getCurrentPriorityLevel=function(){return ro};xa.unstable_next=function(e){switch(ro){case 1:case 2:case 3:var t=3;break;default:t=ro}var r=ro;ro=t;try{return e()}finally{ro=r}};xa.unstable_requestPaint=function(){nk=!0};xa.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=ro;ro=e;try{return t()}finally{ro=r}};xa.unstable_scheduleCallback=function(e,t,r){var n=xa.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return a=r+a,e={id:qne++,callback:t,priorityLevel:e,startTime:r,expirationTime:a,sortIndex:-1},r>n?(e.sortIndex=r,tk(td,e),_u(Ac)===null&&e===_u(td)&&(Yg?(qz(Jg),Jg=-1):Yg=!0,ik(ak,r-n))):(e.sortIndex=a,tk(Ac,e),Xg||rk||(Xg=!0,Zh||(Zh=!0,Jh()))),e};xa.unstable_shouldYield=jz;xa.unstable_wrapCallback=function(e){var t=ro;return function(){var r=ro;ro=t;try{return e.apply(this,arguments)}finally{ro=r}}}});var Vz=Ci((c8e,Kz)=>{"use strict";Kz.exports=Uz()});var Wz=Ci(Mo=>{"use strict";var $ne=_t();function Gz(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function rd(){}var Co={d:{f:rd,r:function(){throw Error(Gz(522))},D:rd,C:rd,L:rd,m:rd,X:rd,S:rd,M:rd},p:0,findDOMNode:null},Hne=Symbol.for("react.portal");function jne(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Hne,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}var Zg=$ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function jb(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Mo.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Co;Mo.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Gz(299));return jne(e,t,null,r)};Mo.flushSync=function(e){var t=Zg.T,r=Co.p;try{if(Zg.T=null,Co.p=2,e)return e()}finally{Zg.T=t,Co.p=r,Co.d.f()}};Mo.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Co.d.C(e,t))};Mo.prefetchDNS=function(e){typeof e=="string"&&Co.d.D(e)};Mo.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,n=jb(r,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Co.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:n,integrity:a,fetchPriority:i}):r==="script"&&Co.d.X(e,{crossOrigin:n,integrity:a,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Mo.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=jb(t.as,t.crossOrigin);Co.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Co.d.M(e)};Mo.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,n=jb(r,t.crossOrigin);Co.d.L(e,r,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Mo.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=jb(t.as,t.crossOrigin);Co.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Co.d.m(e)};Mo.requestFormReset=function(e){Co.d.r(e)};Mo.unstable_batchedUpdates=function(e,t){return e(t)};Mo.useFormState=function(e,t,r){return Zg.H.useFormState(e,t,r)};Mo.useFormStatus=function(){return Zg.H.useHostTransitionStatus()};Mo.version="19.2.3"});var Qh=Ci((f8e,Yz)=>{"use strict";function Xz(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xz)}catch(e){console.error(e)}}Xz(),Yz.exports=Wz()});var lP=Ci(h6=>{"use strict";var gi=Vz(),kR=_t(),Une=Qh();function Ve(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function SR(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function P4(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function CR(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function MR(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Jz(e){if(P4(e)!==e)throw Error(Ve(188))}function Kne(e){var t=e.alternate;if(!t){if(t=P4(e),t===null)throw Error(Ve(188));return t!==e?null:e}for(var r=e,n=t;;){var a=r.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){r=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===r)return Jz(a),e;if(i===n)return Jz(a),t;i=i.sibling}throw Error(Ve(188))}if(r.return!==n.return)r=a,n=i;else{for(var o=!1,s=a.child;s;){if(s===r){o=!0,r=a,n=i;break}if(s===n){o=!0,n=a,r=i;break}s=s.sibling}if(!o){for(s=i.child;s;){if(s===r){o=!0,r=i,n=a;break}if(s===n){o=!0,n=i,r=a;break}s=s.sibling}if(!o)throw Error(Ve(189))}}if(r.alternate!==n)throw Error(Ve(190))}if(r.tag!==3)throw Error(Ve(188));return r.stateNode.current===r?e:t}function _R(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=_R(e),t!==null)return t;e=e.sibling}return null}var ua=Object.assign,Vne=Symbol.for("react.element"),Ub=Symbol.for("react.transitional.element"),o4=Symbol.for("react.portal"),i1=Symbol.for("react.fragment"),AR=Symbol.for("react.strict_mode"),Fk=Symbol.for("react.profiler"),LR=Symbol.for("react.consumer"),Rc=Symbol.for("react.context"),BS=Symbol.for("react.forward_ref"),qk=Symbol.for("react.suspense"),$k=Symbol.for("react.suspense_list"),RS=Symbol.for("react.memo"),nd=Symbol.for("react.lazy"),Hk=Symbol.for("react.activity"),Gne=Symbol.for("react.memo_cache_sentinel"),Zz=Symbol.iterator;function Qg(e){return e===null||typeof e!="object"?null:(e=Zz&&e[Zz]||e["@@iterator"],typeof e=="function"?e:null)}var Wne=Symbol.for("react.client.reference");function jk(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Wne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case i1:return"Fragment";case Fk:return"Profiler";case AR:return"StrictMode";case qk:return"Suspense";case $k:return"SuspenseList";case Hk:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case o4:return"Portal";case Rc:return e.displayName||"Context";case LR:return(e._context.displayName||"Context")+".Consumer";case BS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case RS:return t=e.displayName||null,t!==null?t:jk(e.type)||"Memo";case nd:t=e._payload,e=e._init;try{return jk(e(t))}catch(r){}}return null}var s4=Array.isArray,ur=kR.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,hn=Une.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Gf={pending:!1,data:null,method:null,action:null},Uk=[],o1=-1;function Du(e){return{current:e}}function Ai(e){0>o1||(e.current=Uk[o1],Uk[o1]=null,o1--)}function Xn(e,t){o1++,Uk[o1]=e.current,e.current=t}var Eu=Du(null),C4=Du(null),hd=Du(null),S5=Du(null);function C5(e,t){switch(Xn(hd,t),Xn(C4,e),Xn(Eu,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?iR(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=iR(t),e=WO(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ai(Eu),Xn(Eu,e)}function C1(){Ai(Eu),Ai(C4),Ai(hd)}function Kk(e){e.memoizedState!==null&&Xn(S5,e);var t=Eu.current,r=WO(t,e.type);t!==r&&(Xn(C4,e),Xn(Eu,r))}function M5(e){C4.current===e&&(Ai(Eu),Ai(C4)),S5.current===e&&(Ai(S5),R4._currentValue=Gf)}var ok,Qz;function jf(e){if(ok===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);ok=t&&t[1]||"",Qz=-1<r.stack.indexOf(`
2
2
  at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
3
3
  `+ok+e+Qz}var sk=!1;function lk(e,t){if(!e||sk)return"";sk=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(p){var d=p}Reflect.construct(e,[],f)}else{try{f.call()}catch(p){d=p}e.call(f.prototype)}}else{try{throw Error()}catch(p){d=p}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(p){if(p&&d&&typeof p.stack=="string")return[p.stack,d.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=n.DetermineComponentFrameRoot(),o=i[0],s=i[1];if(o&&s){var l=o.split(`
4
4
  `),u=s.split(`
@@ -6,7 +6,7 @@
6
6
  `+l[n].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=n&&0<=a);break}}}finally{sk=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?jf(r):""}function Xne(e,t){switch(e.tag){case 26:case 27:case 5:return jf(e.type);case 16:return jf("Lazy");case 13:return e.child!==t&&t!==null?jf("Suspense Fallback"):jf("Suspense");case 19:return jf("SuspenseList");case 0:case 15:return lk(e.type,!1);case 11:return lk(e.type.render,!1);case 1:return lk(e.type,!0);case 31:return jf("Activity");default:return""}}function eB(e){try{var t="",r=null;do t+=Xne(e,r),r=e,e=e.return;while(e);return t}catch(n){return`
7
7
  Error generating stack: `+n.message+`
8
8
  `+n.stack}}var Vk=Object.prototype.hasOwnProperty,NS=gi.unstable_scheduleCallback,uk=gi.unstable_cancelCallback,Yne=gi.unstable_shouldYield,Jne=gi.unstable_requestPaint,As=gi.unstable_now,Zne=gi.unstable_getCurrentPriorityLevel,TR=gi.unstable_ImmediatePriority,ER=gi.unstable_UserBlockingPriority,_5=gi.unstable_NormalPriority,Qne=gi.unstable_LowPriority,DR=gi.unstable_IdlePriority,eae=gi.log,tae=gi.unstable_setDisableYieldValue,F4=null,Ls=null;function ud(e){if(typeof eae=="function"&&tae(e),Ls&&typeof Ls.setStrictMode=="function")try{Ls.setStrictMode(F4,e)}catch(t){}}var Ts=Math.clz32?Math.clz32:aae,rae=Math.log,nae=Math.LN2;function aae(e){return e>>>=0,e===0?32:31-(rae(e)/nae|0)|0}var Kb=256,Vb=262144,Gb=4194304;function Uf(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Z5(e,t,r){var n=e.pendingLanes;if(n===0)return 0;var a=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=n&134217727;return s!==0?(n=s&~i,n!==0?a=Uf(n):(o&=s,o!==0?a=Uf(o):r||(r=s&~e,r!==0&&(a=Uf(r))))):(s=n&~i,s!==0?a=Uf(s):o!==0?a=Uf(o):r||(r=n&~e,r!==0&&(a=Uf(r)))),a===0?0:t!==0&&t!==a&&(t&i)===0&&(i=a&-a,r=t&-t,i>=r||i===32&&(r&4194048)!==0)?t:a}function q4(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function iae(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function IR(){var e=Gb;return Gb<<=1,(Gb&62914560)===0&&(Gb=4194304),e}function ck(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function $4(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function oae(e,t,r,n,a,i){var o=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(r=o&~r;0<r;){var c=31-Ts(r),f=1<<c;s[c]=0,l[c]=-1;var d=u[c];if(d!==null)for(u[c]=null,c=0;c<d.length;c++){var p=d[c];p!==null&&(p.lane&=-536870913)}r&=~f}n!==0&&zR(e,n,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function zR(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Ts(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|r&261930}function BR(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Ts(r),a=1<<n;a&t|e[n]&t&&(e[n]|=t),r&=~a}}function RR(e,t){var r=t&-t;return r=(r&42)!==0?1:OS(r),(r&(e.suspendedLanes|t))!==0?0:r}function OS(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function PS(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function NR(){var e=hn.p;return e!==0?e:(e=window.event,e===void 0?32:iP(e.type))}function tB(e,t){var r=hn.p;try{return hn.p=e,t()}finally{hn.p=r}}var Ad=Math.random().toString(36).slice(2),qi="__reactFiber$"+Ad,es="__reactProps$"+Ad,R1="__reactContainer$"+Ad,Gk="__reactEvents$"+Ad,sae="__reactListeners$"+Ad,lae="__reactHandles$"+Ad,rB="__reactResources$"+Ad,H4="__reactMarker$"+Ad;function FS(e){delete e[qi],delete e[es],delete e[Gk],delete e[sae],delete e[lae]}function s1(e){var t=e[qi];if(t)return t;for(var r=e.parentNode;r;){if(t=r[R1]||r[qi]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=cR(e);e!==null;){if(r=e[qi])return r;e=cR(e)}return t}e=r,r=e.parentNode}return null}function N1(e){if(e=e[qi]||e[R1]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function l4(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(Ve(33))}function y1(e){var t=e[rB];return t||(t=e[rB]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _i(e){e[H4]=!0}var OR=new Set,PR={};function np(e,t){M1(e,t),M1(e+"Capture",t)}function M1(e,t){for(PR[e]=t,e=0;e<t.length;e++)OR.add(t[e])}var uae=RegExp("^[: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]*$"),nB={},aB={};function cae(e){return Vk.call(aB,e)?!0:Vk.call(nB,e)?!1:uae.test(e)?aB[e]=!0:(nB[e]=!0,!1)}function l5(e,t,r){if(cae(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function Wb(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function Lc(e,t,r,n){if(n===null)e.removeAttribute(r);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+n)}}function al(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function FR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dae(e,t,r){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wk(e){if(!e._valueTracker){var t=FR(e)?"checked":"value";e._valueTracker=dae(e,t,""+e[t])}}function qR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=FR(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function A5(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}var fae=/[\n"\\]/g;function sl(e){return e.replace(fae,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xk(e,t,r,n,a,i,o,s){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+al(t)):e.value!==""+al(t)&&(e.value=""+al(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Yk(e,o,al(t)):r!=null?Yk(e,o,al(r)):n!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+al(s):e.removeAttribute("name")}function $R(e,t,r,n,a,i,o,s){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||r!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Wk(e);return}r=r!=null?""+al(r):"",t=t!=null?""+al(t):r,s||t===e.value||(e.value=t),e.defaultValue=t}n=n!=null?n:a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=s?e.checked:!!n,e.defaultChecked=!!n,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Wk(e)}function Yk(e,t,r){t==="number"&&A5(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function b1(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&n&&(e[r].defaultSelected=!0)}else{for(r=""+al(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function HR(e,t,r){if(t!=null&&(t=""+al(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+al(r):""}function jR(e,t,r,n){if(t==null){if(n!=null){if(r!=null)throw Error(Ve(92));if(s4(n)){if(1<n.length)throw Error(Ve(93));n=n[0]}r=n}r==null&&(r=""),t=r}r=al(t),e.defaultValue=r,n=e.textContent,n===r&&n!==""&&n!==null&&(e.value=n),Wk(e)}function _1(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var pae=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function iB(e,t,r){var n=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,r):typeof r!="number"||r===0||pae.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function UR(e,t,r){if(t!=null&&typeof t!="object")throw Error(Ve(62));if(e=e.style,r!=null){for(var n in r)!r.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var a in t)n=t[a],t.hasOwnProperty(a)&&r[a]!==n&&iB(e,a,n)}else for(var i in t)t.hasOwnProperty(i)&&iB(e,i,t[i])}function qS(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hae=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),mae=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function u5(e){return mae.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Nc(){}var Jk=null;function $S(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var l1=null,x1=null;function oB(e){var t=N1(e);if(t&&(e=t.stateNode)){var r=e[es]||null;e:switch(e=t.stateNode,t.type){case"input":if(Xk(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+sl(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var a=n[es]||null;if(!a)throw Error(Ve(90));Xk(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<r.length;t++)n=r[t],n.form===e.form&&qR(n)}break e;case"textarea":HR(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&b1(e,!!r.multiple,t,!1)}}}var dk=!1;function KR(e,t,r){if(dk)return e(t,r);dk=!0;try{var n=e(t);return n}finally{if(dk=!1,(l1!==null||x1!==null)&&(c6(),l1&&(t=l1,e=x1,x1=l1=null,oB(t),e)))for(t=0;t<e.length;t++)oB(e[t])}}function M4(e,t){var r=e.stateNode;if(r===null)return null;var n=r[es]||null;if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Ve(231,t,typeof r));return r}var $c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),Zk=!1;if($c)try{e1={},Object.defineProperty(e1,"passive",{get:function(){Zk=!0}}),window.addEventListener("test",e1,e1),window.removeEventListener("test",e1,e1)}catch(e){Zk=!1}var e1,cd=null,HS=null,c5=null;function VR(){if(c5)return c5;var e,t=HS,r=t.length,n,a="value"in cd?cd.value:cd.textContent,i=a.length;for(e=0;e<r&&t[e]===a[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===a[i-n];n++);return c5=a.slice(e,1<n?1-n:void 0)}function d5(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Xb(){return!0}function sB(){return!1}function ts(e){function t(r,n,a,i,o){this._reactName=r,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Xb:sB,this.isPropagationStopped=sB,this}return ua(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Xb)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Xb)},persist:function(){},isPersistent:Xb}),t}var ap={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Q5=ts(ap),j4=ua({},ap,{view:0,detail:0}),gae=ts(j4),fk,pk,e4,e6=ua({},j4,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jS,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!==e4&&(e4&&e.type==="mousemove"?(fk=e.screenX-e4.screenX,pk=e.screenY-e4.screenY):pk=fk=0,e4=e),fk)},movementY:function(e){return"movementY"in e?e.movementY:pk}}),lB=ts(e6),yae=ua({},e6,{dataTransfer:0}),bae=ts(yae),xae=ua({},j4,{relatedTarget:0}),hk=ts(xae),vae=ua({},ap,{animationName:0,elapsedTime:0,pseudoElement:0}),wae=ts(vae),kae=ua({},ap,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sae=ts(kae),Cae=ua({},ap,{data:0}),uB=ts(Cae),Mae={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_ae={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"},Aae={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lae(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Aae[e])?!!t[e]:!1}function jS(){return Lae}var Tae=ua({},j4,{key:function(e){if(e.key){var t=Mae[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=d5(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_ae[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jS,charCode:function(e){return e.type==="keypress"?d5(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?d5(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Eae=ts(Tae),Dae=ua({},e6,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cB=ts(Dae),Iae=ua({},j4,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jS}),zae=ts(Iae),Bae=ua({},ap,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rae=ts(Bae),Nae=ua({},e6,{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}),Oae=ts(Nae),Pae=ua({},ap,{newState:0,oldState:0}),Fae=ts(Pae),qae=[9,13,27,32],US=$c&&"CompositionEvent"in window,d4=null;$c&&"documentMode"in document&&(d4=document.documentMode);var $ae=$c&&"TextEvent"in window&&!d4,GR=$c&&(!US||d4&&8<d4&&11>=d4),dB=" ",fB=!1;function WR(e,t){switch(e){case"keyup":return qae.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function XR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var u1=!1;function Hae(e,t){switch(e){case"compositionend":return XR(t);case"keypress":return t.which!==32?null:(fB=!0,dB);case"textInput":return e=t.data,e===dB&&fB?null:e;default:return null}}function jae(e,t){if(u1)return e==="compositionend"||!US&&WR(e,t)?(e=VR(),c5=HS=cd=null,u1=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return GR&&t.locale!=="ko"?null:t.data;default:return null}}var Uae={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 pB(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Uae[e.type]:t==="textarea"}function YR(e,t,r,n){l1?x1?x1.push(n):x1=[n]:l1=n,t=K5(t,"onChange"),0<t.length&&(r=new Q5("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var f4=null,_4=null;function Kae(e){KO(e,0)}function t6(e){var t=l4(e);if(qR(t))return e}function hB(e,t){if(e==="change")return t}var JR=!1;$c&&($c?(Jb="oninput"in document,Jb||(mk=document.createElement("div"),mk.setAttribute("oninput","return;"),Jb=typeof mk.oninput=="function"),Yb=Jb):Yb=!1,JR=Yb&&(!document.documentMode||9<document.documentMode));var Yb,Jb,mk;function mB(){f4&&(f4.detachEvent("onpropertychange",ZR),_4=f4=null)}function ZR(e){if(e.propertyName==="value"&&t6(_4)){var t=[];YR(t,_4,e,$S(e)),KR(Kae,t)}}function Vae(e,t,r){e==="focusin"?(mB(),f4=t,_4=r,f4.attachEvent("onpropertychange",ZR)):e==="focusout"&&mB()}function Gae(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return t6(_4)}function Wae(e,t){if(e==="click")return t6(t)}function Xae(e,t){if(e==="input"||e==="change")return t6(t)}function Yae(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ds=typeof Object.is=="function"?Object.is:Yae;function A4(e,t){if(Ds(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var a=r[n];if(!Vk.call(t,a)||!Ds(e[a],t[a]))return!1}return!0}function gB(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yB(e,t){var r=gB(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=gB(r)}}function QR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?QR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function eN(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=A5(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch(n){r=!1}if(r)e=t.contentWindow;else break;t=A5(e.document)}return t}function KS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Jae=$c&&"documentMode"in document&&11>=document.documentMode,c1=null,Qk=null,p4=null,eS=!1;function bB(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;eS||c1==null||c1!==A5(n)||(n=c1,"selectionStart"in n&&KS(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),p4&&A4(p4,n)||(p4=n,n=K5(Qk,"onSelect"),0<n.length&&(t=new Q5("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=c1)))}function Hf(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var d1={animationend:Hf("Animation","AnimationEnd"),animationiteration:Hf("Animation","AnimationIteration"),animationstart:Hf("Animation","AnimationStart"),transitionrun:Hf("Transition","TransitionRun"),transitionstart:Hf("Transition","TransitionStart"),transitioncancel:Hf("Transition","TransitionCancel"),transitionend:Hf("Transition","TransitionEnd")},gk={},tN={};$c&&(tN=document.createElement("div").style,"AnimationEvent"in window||(delete d1.animationend.animation,delete d1.animationiteration.animation,delete d1.animationstart.animation),"TransitionEvent"in window||delete d1.transitionend.transition);function ip(e){if(gk[e])return gk[e];if(!d1[e])return e;var t=d1[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in tN)return gk[e]=t[r];return e}var rN=ip("animationend"),nN=ip("animationiteration"),aN=ip("animationstart"),Zae=ip("transitionrun"),Qae=ip("transitionstart"),eie=ip("transitioncancel"),iN=ip("transitionend"),oN=new Map,tS="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");tS.push("scrollEnd");function Zl(e,t){oN.set(e,t),np(t,[e])}var L5=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},nl=[],f1=0,VS=0;function r6(){for(var e=f1,t=VS=f1=0;t<e;){var r=nl[t];nl[t++]=null;var n=nl[t];nl[t++]=null;var a=nl[t];nl[t++]=null;var i=nl[t];if(nl[t++]=null,n!==null&&a!==null){var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}i!==0&&sN(r,a,i)}}function n6(e,t,r,n){nl[f1++]=e,nl[f1++]=t,nl[f1++]=r,nl[f1++]=n,VS|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function GS(e,t,r,n){return n6(e,t,r,n),T5(e)}function op(e,t){return n6(e,null,null,t),T5(e)}function sN(e,t,r){e.lanes|=r;var n=e.alternate;n!==null&&(n.lanes|=r);for(var a=!1,i=e.return;i!==null;)i.childLanes|=r,n=i.alternate,n!==null&&(n.childLanes|=r),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-Ts(r),e=i.hiddenUpdates,n=e[a],n===null?e[a]=[t]:n.push(t),t.lane=r|536870912),i):null}function T5(e){if(50<k4)throw k4=0,kS=null,Error(Ve(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var p1={};function tie(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ms(e,t,r,n){return new tie(e,t,r,n)}function WS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pc(e,t){var r=e.alternate;return r===null?(r=Ms(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function lN(e,t){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function f5(e,t,r,n,a,i){var o=0;if(n=e,typeof e=="function")WS(e)&&(o=1);else if(typeof e=="string")o=aoe(e,r,Eu.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Hk:return e=Ms(31,r,t,a),e.elementType=Hk,e.lanes=i,e;case i1:return Wf(r.children,a,i,t);case AR:o=8,a|=24;break;case Fk:return e=Ms(12,r,t,a|2),e.elementType=Fk,e.lanes=i,e;case qk:return e=Ms(13,r,t,a),e.elementType=qk,e.lanes=i,e;case $k:return e=Ms(19,r,t,a),e.elementType=$k,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Rc:o=10;break e;case LR:o=9;break e;case BS:o=11;break e;case RS:o=14;break e;case nd:o=16,n=null;break e}o=29,r=Error(Ve(130,e===null?"null":typeof e,"")),n=null}return t=Ms(o,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function Wf(e,t,r,n){return e=Ms(7,e,n,t),e.lanes=r,e}function yk(e,t,r){return e=Ms(6,e,null,t),e.lanes=r,e}function uN(e){var t=Ms(18,null,null,0);return t.stateNode=e,t}function bk(e,t,r){return t=Ms(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xB=new WeakMap;function ll(e,t){if(typeof e=="object"&&e!==null){var r=xB.get(e);return r!==void 0?r:(t={value:e,source:t,stack:eB(t)},xB.set(e,t),t)}return{value:e,source:t,stack:eB(t)}}var h1=[],m1=0,E5=null,L4=0,il=[],ol=0,Sd=null,Au=1,Lu="";function zc(e,t){h1[m1++]=L4,h1[m1++]=E5,E5=e,L4=t}function cN(e,t,r){il[ol++]=Au,il[ol++]=Lu,il[ol++]=Sd,Sd=e;var n=Au;e=Lu;var a=32-Ts(n)-1;n&=~(1<<a),r+=1;var i=32-Ts(t)+a;if(30<i){var o=a-a%5;i=(n&(1<<o)-1).toString(32),n>>=o,a-=o,Au=1<<32-Ts(t)+a|r<<a|n,Lu=i+e}else Au=1<<i|r<<a|n,Lu=e}function XS(e){e.return!==null&&(zc(e,1),cN(e,1,0))}function YS(e){for(;e===E5;)E5=h1[--m1],h1[m1]=null,L4=h1[--m1],h1[m1]=null;for(;e===Sd;)Sd=il[--ol],il[ol]=null,Lu=il[--ol],il[ol]=null,Au=il[--ol],il[ol]=null}function dN(e,t){il[ol++]=Au,il[ol++]=Lu,il[ol++]=Sd,Au=t.id,Lu=t.overflow,Sd=e}var $i=null,la=null,Xr=!1,md=null,ul=!1,rS=Error(Ve(519));function Cd(e){var t=Error(Ve(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw T4(ll(t,e)),rS}function vB(e){var t=e.stateNode,r=e.type,n=e.memoizedProps;switch(t[qi]=e,t[es]=n,r){case"dialog":Or("cancel",t),Or("close",t);break;case"iframe":case"object":case"embed":Or("load",t);break;case"video":case"audio":for(r=0;r<z4.length;r++)Or(z4[r],t);break;case"source":Or("error",t);break;case"img":case"image":case"link":Or("error",t),Or("load",t);break;case"details":Or("toggle",t);break;case"input":Or("invalid",t),$R(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Or("invalid",t);break;case"textarea":Or("invalid",t),jR(t,n.value,n.defaultValue,n.children)}r=n.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||n.suppressHydrationWarning===!0||GO(t.textContent,r)?(n.popover!=null&&(Or("beforetoggle",t),Or("toggle",t)),n.onScroll!=null&&Or("scroll",t),n.onScrollEnd!=null&&Or("scrollend",t),n.onClick!=null&&(t.onclick=Nc),t=!0):t=!1,t||Cd(e,!0)}function wB(e){for($i=e.return;$i;)switch($i.tag){case 5:case 31:case 13:ul=!1;return;case 27:case 3:ul=!0;return;default:$i=$i.return}}function t1(e){if(e!==$i)return!1;if(!Xr)return wB(e),Xr=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||AS(e.type,e.memoizedProps)),r=!r),r&&la&&Cd(e),wB(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ve(317));la=uR(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ve(317));la=uR(e)}else t===27?(t=la,Ld(e.type)?(e=DS,DS=null,la=e):la=t):la=$i?dl(e.stateNode.nextSibling):null;return!0}function Zf(){la=$i=null,Xr=!1}function xk(){var e=md;return e!==null&&(Zo===null?Zo=e:Zo.push.apply(Zo,e),md=null),e}function T4(e){md===null?md=[e]:md.push(e)}var nS=Du(null),sp=null,Oc=null;function id(e,t,r){Xn(nS,t._currentValue),t._currentValue=r}function Fc(e){e._currentValue=nS.current,Ai(nS)}function aS(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function iS(e,t,r,n){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var o=a.child;i=i.firstContext;e:for(;i!==null;){var s=i;i=a;for(var l=0;l<t.length;l++)if(s.context===t[l]){i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),aS(i.return,r,e),n||(o=null);break e}i=s.next}}else if(a.tag===18){if(o=a.return,o===null)throw Error(Ve(341));o.lanes|=r,i=o.alternate,i!==null&&(i.lanes|=r),aS(o,r,e),o=null}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}}function O1(e,t,r,n){e=null;for(var a=t,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var o=a.alternate;if(o===null)throw Error(Ve(387));if(o=o.memoizedProps,o!==null){var s=a.type;Ds(a.pendingProps.value,o.value)||(e!==null?e.push(s):e=[s])}}else if(a===S5.current){if(o=a.alternate,o===null)throw Error(Ve(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(R4):e=[R4])}a=a.return}e!==null&&iS(t,e,r,n),t.flags|=262144}function D5(e){for(e=e.firstContext;e!==null;){if(!Ds(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qf(e){sp=e,Oc=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Hi(e){return fN(sp,e)}function Zb(e,t){return sp===null&&Qf(e),fN(e,t)}function fN(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},Oc===null){if(e===null)throw Error(Ve(308));Oc=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Oc=Oc.next=t;return r}var rie=typeof AbortController!="undefined"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},nie=gi.unstable_scheduleCallback,aie=gi.unstable_NormalPriority,ti={$$typeof:Rc,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function JS(){return{controller:new rie,data:new Map,refCount:0}}function U4(e){e.refCount--,e.refCount===0&&nie(aie,function(){e.controller.abort()})}var h4=null,oS=0,A1=0,v1=null;function iie(e,t){if(h4===null){var r=h4=[];oS=0,A1=kC(),v1={status:"pending",value:void 0,then:function(n){r.push(n)}}}return oS++,t.then(kB,kB),t}function kB(){if(--oS===0&&h4!==null){v1!==null&&(v1.status="fulfilled");var e=h4;h4=null,A1=0,v1=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function oie(e,t){var r=[],n={status:"pending",value:null,reason:null,then:function(a){r.push(a)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var a=0;a<r.length;a++)(0,r[a])(t)},function(a){for(n.status="rejected",n.reason=a,a=0;a<r.length;a++)(0,r[a])(void 0)}),n}var SB=ur.S;ur.S=function(e,t){_O=As(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&iie(e,t),SB!==null&&SB(e,t)};var Xf=Du(null);function ZS(){var e=Xf.current;return e!==null?e:Fn.pooledCache}function p5(e,t){t===null?Xn(Xf,Xf.current):Xn(Xf,t.pool)}function pN(){var e=ZS();return e===null?null:{parent:ti._currentValue,pool:e}}var P1=Error(Ve(460)),QS=Error(Ve(474)),a6=Error(Ve(542)),I5={then:function(){}};function CB(e){return e=e.status,e==="fulfilled"||e==="rejected"}function hN(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Nc,Nc),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,_B(e),e;default:if(typeof t.status=="string")t.then(Nc,Nc);else{if(e=Fn,e!==null&&100<e.shellSuspendCounter)throw Error(Ve(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=n}},function(n){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,_B(e),e}throw Yf=t,P1}}function Kf(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Yf=r,P1):r}}var Yf=null;function MB(){if(Yf===null)throw Error(Ve(459));var e=Yf;return Yf=null,e}function _B(e){if(e===P1||e===a6)throw Error(Ve(483))}var w1=null,E4=0;function Qb(e){var t=E4;return E4+=1,w1===null&&(w1=[]),hN(w1,e,t)}function t4(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function e5(e,t){throw t.$$typeof===Vne?Error(Ve(525)):(e=Object.prototype.toString.call(t),Error(Ve(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function mN(e){function t(w,S){if(e){var T=w.deletions;T===null?(w.deletions=[S],w.flags|=16):T.push(S)}}function r(w,S){if(!e)return null;for(;S!==null;)t(w,S),S=S.sibling;return null}function n(w){for(var S=new Map;w!==null;)w.key!==null?S.set(w.key,w):S.set(w.index,w),w=w.sibling;return S}function a(w,S){return w=Pc(w,S),w.index=0,w.sibling=null,w}function i(w,S,T){return w.index=T,e?(T=w.alternate,T!==null?(T=T.index,T<S?(w.flags|=67108866,S):T):(w.flags|=67108866,S)):(w.flags|=1048576,S)}function o(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function s(w,S,T,E){return S===null||S.tag!==6?(S=yk(T,w.mode,E),S.return=w,S):(S=a(S,T),S.return=w,S)}function l(w,S,T,E){var z=T.type;return z===i1?c(w,S,T.props.children,E,T.key):S!==null&&(S.elementType===z||typeof z=="object"&&z!==null&&z.$$typeof===nd&&Kf(z)===S.type)?(S=a(S,T.props),t4(S,T),S.return=w,S):(S=f5(T.type,T.key,T.props,null,w.mode,E),t4(S,T),S.return=w,S)}function u(w,S,T,E){return S===null||S.tag!==4||S.stateNode.containerInfo!==T.containerInfo||S.stateNode.implementation!==T.implementation?(S=bk(T,w.mode,E),S.return=w,S):(S=a(S,T.children||[]),S.return=w,S)}function c(w,S,T,E,z){return S===null||S.tag!==7?(S=Wf(T,w.mode,E,z),S.return=w,S):(S=a(S,T),S.return=w,S)}function f(w,S,T){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=yk(""+S,w.mode,T),S.return=w,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ub:return T=f5(S.type,S.key,S.props,null,w.mode,T),t4(T,S),T.return=w,T;case o4:return S=bk(S,w.mode,T),S.return=w,S;case nd:return S=Kf(S),f(w,S,T)}if(s4(S)||Qg(S))return S=Wf(S,w.mode,T,null),S.return=w,S;if(typeof S.then=="function")return f(w,Qb(S),T);if(S.$$typeof===Rc)return f(w,Zb(w,S),T);e5(w,S)}return null}function d(w,S,T,E){var z=S!==null?S.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return z!==null?null:s(w,S,""+T,E);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Ub:return T.key===z?l(w,S,T,E):null;case o4:return T.key===z?u(w,S,T,E):null;case nd:return T=Kf(T),d(w,S,T,E)}if(s4(T)||Qg(T))return z!==null?null:c(w,S,T,E,null);if(typeof T.then=="function")return d(w,S,Qb(T),E);if(T.$$typeof===Rc)return d(w,S,Zb(w,T),E);e5(w,T)}return null}function p(w,S,T,E,z){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return w=w.get(T)||null,s(S,w,""+E,z);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Ub:return w=w.get(E.key===null?T:E.key)||null,l(S,w,E,z);case o4:return w=w.get(E.key===null?T:E.key)||null,u(S,w,E,z);case nd:return E=Kf(E),p(w,S,T,E,z)}if(s4(E)||Qg(E))return w=w.get(T)||null,c(S,w,E,z,null);if(typeof E.then=="function")return p(w,S,T,Qb(E),z);if(E.$$typeof===Rc)return p(w,S,T,Zb(S,E),z);e5(S,E)}return null}function y(w,S,T,E){for(var z=null,N=null,O=S,H=S=0,U=null;O!==null&&H<T.length;H++){O.index>H?(U=O,O=null):U=O.sibling;var J=d(w,O,T[H],E);if(J===null){O===null&&(O=U);break}e&&O&&J.alternate===null&&t(w,O),S=i(J,S,H),N===null?z=J:N.sibling=J,N=J,O=U}if(H===T.length)return r(w,O),Xr&&zc(w,H),z;if(O===null){for(;H<T.length;H++)O=f(w,T[H],E),O!==null&&(S=i(O,S,H),N===null?z=O:N.sibling=O,N=O);return Xr&&zc(w,H),z}for(O=n(O);H<T.length;H++)U=p(O,w,H,T[H],E),U!==null&&(e&&U.alternate!==null&&O.delete(U.key===null?H:U.key),S=i(U,S,H),N===null?z=U:N.sibling=U,N=U);return e&&O.forEach(function(K){return t(w,K)}),Xr&&zc(w,H),z}function x(w,S,T,E){if(T==null)throw Error(Ve(151));for(var z=null,N=null,O=S,H=S=0,U=null,J=T.next();O!==null&&!J.done;H++,J=T.next()){O.index>H?(U=O,O=null):U=O.sibling;var K=d(w,O,J.value,E);if(K===null){O===null&&(O=U);break}e&&O&&K.alternate===null&&t(w,O),S=i(K,S,H),N===null?z=K:N.sibling=K,N=K,O=U}if(J.done)return r(w,O),Xr&&zc(w,H),z;if(O===null){for(;!J.done;H++,J=T.next())J=f(w,J.value,E),J!==null&&(S=i(J,S,H),N===null?z=J:N.sibling=J,N=J);return Xr&&zc(w,H),z}for(O=n(O);!J.done;H++,J=T.next())J=p(O,w,H,J.value,E),J!==null&&(e&&J.alternate!==null&&O.delete(J.key===null?H:J.key),S=i(J,S,H),N===null?z=J:N.sibling=J,N=J);return e&&O.forEach(function(Y){return t(w,Y)}),Xr&&zc(w,H),z}function k(w,S,T,E){if(typeof T=="object"&&T!==null&&T.type===i1&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case Ub:e:{for(var z=T.key;S!==null;){if(S.key===z){if(z=T.type,z===i1){if(S.tag===7){r(w,S.sibling),E=a(S,T.props.children),E.return=w,w=E;break e}}else if(S.elementType===z||typeof z=="object"&&z!==null&&z.$$typeof===nd&&Kf(z)===S.type){r(w,S.sibling),E=a(S,T.props),t4(E,T),E.return=w,w=E;break e}r(w,S);break}else t(w,S);S=S.sibling}T.type===i1?(E=Wf(T.props.children,w.mode,E,T.key),E.return=w,w=E):(E=f5(T.type,T.key,T.props,null,w.mode,E),t4(E,T),E.return=w,w=E)}return o(w);case o4:e:{for(z=T.key;S!==null;){if(S.key===z)if(S.tag===4&&S.stateNode.containerInfo===T.containerInfo&&S.stateNode.implementation===T.implementation){r(w,S.sibling),E=a(S,T.children||[]),E.return=w,w=E;break e}else{r(w,S);break}else t(w,S);S=S.sibling}E=bk(T,w.mode,E),E.return=w,w=E}return o(w);case nd:return T=Kf(T),k(w,S,T,E)}if(s4(T))return y(w,S,T,E);if(Qg(T)){if(z=Qg(T),typeof z!="function")throw Error(Ve(150));return T=z.call(T),x(w,S,T,E)}if(typeof T.then=="function")return k(w,S,Qb(T),E);if(T.$$typeof===Rc)return k(w,S,Zb(w,T),E);e5(w,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,S!==null&&S.tag===6?(r(w,S.sibling),E=a(S,T),E.return=w,w=E):(r(w,S),E=yk(T,w.mode,E),E.return=w,w=E),o(w)):r(w,S)}return function(w,S,T,E){try{E4=0;var z=k(w,S,T,E);return w1=null,z}catch(O){if(O===P1||O===a6)throw O;var N=Ms(29,O,null,w.mode);return N.lanes=E,N.return=w,N}}}var ep=mN(!0),gN=mN(!1),ad=!1;function eC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function gd(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yd(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(pn&2)!==0){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,t=T5(e),sN(e,null,r),t}return n6(e,n,t,r),T5(e)}function m4(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,BR(e,r)}}function vk(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};i===null?a=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?a=i=t:i=i.next=t}else a=i=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var lS=!1;function g4(){if(lS){var e=v1;if(e!==null)throw e}}function y4(e,t,r,n){lS=!1;var a=e.updateQueue;ad=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,s=a.shared.pending;if(s!==null){a.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(i!==null){var f=a.baseState;o=0,c=u=l=null,s=i;do{var d=s.lane&-536870913,p=d!==s.lane;if(p?(Kr&d)===d:(n&d)===d){d!==0&&d===A1&&(lS=!0),c!==null&&(c=c.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var y=e,x=s;d=t;var k=r;switch(x.tag){case 1:if(y=x.payload,typeof y=="function"){f=y.call(k,f,d);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,d=typeof y=="function"?y.call(k,f,d):y,d==null)break e;f=ua({},f,d);break e;case 2:ad=!0}}d=s.callback,d!==null&&(e.flags|=64,p&&(e.flags|=8192),p=a.callbacks,p===null?a.callbacks=[d]:p.push(d))}else p={lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=f):c=c.next=p,o|=d;if(s=s.next,s===null){if(s=a.shared.pending,s===null)break;p=s,s=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);c===null&&(l=f),a.baseState=l,a.firstBaseUpdate=u,a.lastBaseUpdate=c,i===null&&(a.shared.lanes=0),_d|=o,e.lanes=o,e.memoizedState=f}}function yN(e,t){if(typeof e!="function")throw Error(Ve(191,e));e.call(t)}function bN(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)yN(r[e],t)}var L1=Du(null),z5=Du(0);function AB(e,t){e=Kc,Xn(z5,e),Xn(L1,t),Kc=e|t.baseLanes}function uS(){Xn(z5,Kc),Xn(L1,L1.current)}function tC(){Kc=z5.current,Ai(L1),Ai(z5)}var Is=Du(null),cl=null;function od(e){var t=e.alternate;Xn(Ka,Ka.current&1),Xn(Is,e),cl===null&&(t===null||L1.current!==null||t.memoizedState!==null)&&(cl=e)}function cS(e){Xn(Ka,Ka.current),Xn(Is,e),cl===null&&(cl=e)}function xN(e){e.tag===22?(Xn(Ka,Ka.current),Xn(Is,e),cl===null&&(cl=e)):sd(e)}function sd(){Xn(Ka,Ka.current),Xn(Is,Is.current)}function Cs(e){Ai(Is),cl===e&&(cl=null),Ai(Ka)}var Ka=Du(0);function B5(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||TS(r)||ES(r)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hc=0,kr=null,zn=null,Qa=null,R5=!1,k1=!1,tp=!1,N5=0,D4=0,S1=null,sie=0;function za(){throw Error(Ve(321))}function rC(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ds(e[r],t[r]))return!1;return!0}function nC(e,t,r,n,a,i){return Hc=i,kr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ur.H=e===null||e.memoizedState===null?YN:hC,tp=!1,i=r(n,a),tp=!1,k1&&(i=wN(t,r,n,a)),vN(e),i}function vN(e){ur.H=I4;var t=zn!==null&&zn.next!==null;if(Hc=0,Qa=zn=kr=null,R5=!1,D4=0,S1=null,t)throw Error(Ve(300));e===null||ri||(e=e.dependencies,e!==null&&D5(e)&&(ri=!0))}function wN(e,t,r,n){kr=e;var a=0;do{if(k1&&(S1=null),D4=0,k1=!1,25<=a)throw Error(Ve(301));if(a+=1,Qa=zn=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}ur.H=JN,i=t(r,n)}while(k1);return i}function lie(){var e=ur.H,t=e.useState()[0];return t=typeof t.then=="function"?K4(t):t,e=e.useState()[0],(zn!==null?zn.memoizedState:null)!==e&&(kr.flags|=1024),t}function aC(){var e=N5!==0;return N5=0,e}function iC(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function oC(e){if(R5){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}R5=!1}Hc=0,Qa=zn=kr=null,k1=!1,D4=N5=0,S1=null}function _o(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qa===null?kr.memoizedState=Qa=e:Qa=Qa.next=e,Qa}function Va(){if(zn===null){var e=kr.alternate;e=e!==null?e.memoizedState:null}else e=zn.next;var t=Qa===null?kr.memoizedState:Qa.next;if(t!==null)Qa=t,zn=e;else{if(e===null)throw kr.alternate===null?Error(Ve(467)):Error(Ve(310));zn=e,e={memoizedState:zn.memoizedState,baseState:zn.baseState,baseQueue:zn.baseQueue,queue:zn.queue,next:null},Qa===null?kr.memoizedState=Qa=e:Qa=Qa.next=e}return Qa}function i6(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function K4(e){var t=D4;return D4+=1,S1===null&&(S1=[]),e=hN(S1,e,t),t=kr,(Qa===null?t.memoizedState:Qa.next)===null&&(t=t.alternate,ur.H=t===null||t.memoizedState===null?YN:hC),e}function o6(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return K4(e);if(e.$$typeof===Rc)return Hi(e)}throw Error(Ve(438,String(e)))}function sC(e){var t=null,r=kr.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var n=kr.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=i6(),kr.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),n=0;n<e;n++)r[n]=Gne;return t.index++,r}function jc(e,t){return typeof t=="function"?t(e):t}function h5(e){var t=Va();return lC(t,zn,e)}function lC(e,t,r){var n=e.queue;if(n===null)throw Error(Ve(311));n.lastRenderedReducer=r;var a=e.baseQueue,i=n.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}t.baseQueue=a=i,n.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var s=o=null,l=null,u=t,c=!1;do{var f=u.lane&-536870913;if(f!==u.lane?(Kr&f)===f:(Hc&f)===f){var d=u.revertLane;if(d===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===A1&&(c=!0);else if((Hc&d)===d){u=u.next,d===A1&&(c=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(s=l=f,o=i):l=l.next=f,kr.lanes|=d,_d|=d;f=u.action,tp&&r(i,f),i=u.hasEagerState?u.eagerState:r(i,f)}else d={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(s=l=d,o=i):l=l.next=d,kr.lanes|=f,_d|=f;u=u.next}while(u!==null&&u!==t);if(l===null?o=i:l.next=s,!Ds(i,e.memoizedState)&&(ri=!0,c&&(r=v1,r!==null)))throw r;e.memoizedState=i,e.baseState=o,e.baseQueue=l,n.lastRenderedState=i}return a===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function wk(e){var t=Va(),r=t.queue;if(r===null)throw Error(Ve(311));r.lastRenderedReducer=e;var n=r.dispatch,a=r.pending,i=t.memoizedState;if(a!==null){r.pending=null;var o=a=a.next;do i=e(i,o.action),o=o.next;while(o!==a);Ds(i,t.memoizedState)||(ri=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function kN(e,t,r){var n=kr,a=Va(),i=Xr;if(i){if(r===void 0)throw Error(Ve(407));r=r()}else r=t();var o=!Ds((zn||a).memoizedState,r);if(o&&(a.memoizedState=r,ri=!0),a=a.queue,uC(MN.bind(null,n,a,e),[e]),a.getSnapshot!==t||o||Qa!==null&&Qa.memoizedState.tag&1){if(n.flags|=2048,T1(9,{destroy:void 0},CN.bind(null,n,a,r,t),null),Fn===null)throw Error(Ve(349));i||(Hc&127)!==0||SN(n,t,r)}return r}function SN(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=kr.updateQueue,t===null?(t=i6(),kr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function CN(e,t,r,n){t.value=r,t.getSnapshot=n,_N(t)&&AN(e)}function MN(e,t,r){return r(function(){_N(t)&&AN(e)})}function _N(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ds(e,r)}catch(n){return!0}}function AN(e){var t=op(e,2);t!==null&&Qo(t,e,2)}function dS(e){var t=_o();if(typeof e=="function"){var r=e;if(e=r(),tp){ud(!0);try{r()}finally{ud(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jc,lastRenderedState:e},t}function LN(e,t,r,n){return e.baseState=r,lC(e,zn,typeof n=="function"?n:jc)}function uie(e,t,r,n,a){if(l6(e))throw Error(Ve(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};ur.T!==null?r(!0):i.isTransition=!1,n(i),r=t.pending,r===null?(i.next=t.pending=i,TN(t,i)):(i.next=r.next,t.pending=r.next=i)}}function TN(e,t){var r=t.action,n=t.payload,a=e.state;if(t.isTransition){var i=ur.T,o={};ur.T=o;try{var s=r(a,n),l=ur.S;l!==null&&l(o,s),LB(e,t,s)}catch(u){fS(e,t,u)}finally{i!==null&&o.types!==null&&(i.types=o.types),ur.T=i}}else try{i=r(a,n),LB(e,t,i)}catch(u){fS(e,t,u)}}function LB(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(n){TB(e,t,n)},function(n){return fS(e,t,n)}):TB(e,t,r)}function TB(e,t,r){t.status="fulfilled",t.value=r,EN(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,TN(e,r)))}function fS(e,t,r){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=r,EN(t),t=t.next;while(t!==n)}e.action=null}function EN(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function DN(e,t){return t}function EB(e,t){if(Xr){var r=Fn.formState;if(r!==null){e:{var n=kr;if(Xr){if(la){t:{for(var a=la,i=ul;a.nodeType!==8;){if(!i){a=null;break t}if(a=dl(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){la=dl(a.nextSibling),n=a.data==="F!";break e}}Cd(n)}n=!1}n&&(t=r[0])}}return r=_o(),r.memoizedState=r.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:DN,lastRenderedState:t},r.queue=n,r=GN.bind(null,kr,n),n.dispatch=r,n=dS(!1),i=pC.bind(null,kr,!1,n.queue),n=_o(),a={state:t,dispatch:null,action:e,pending:null},n.queue=a,r=uie.bind(null,kr,a,i,r),a.dispatch=r,n.memoizedState=e,[t,r,!1]}function DB(e){var t=Va();return IN(t,zn,e)}function IN(e,t,r){if(t=lC(e,t,DN)[0],e=h5(jc)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=K4(t)}catch(o){throw o===P1?a6:o}else n=t;t=Va();var a=t.queue,i=a.dispatch;return r!==t.memoizedState&&(kr.flags|=2048,T1(9,{destroy:void 0},cie.bind(null,a,r),null)),[n,i,e]}function cie(e,t){e.action=t}function IB(e){var t=Va(),r=zn;if(r!==null)return IN(t,r,e);Va(),t=t.memoizedState,r=Va();var n=r.queue.dispatch;return r.memoizedState=e,[t,n,!1]}function T1(e,t,r,n){return e={tag:e,create:r,deps:n,inst:t,next:null},t=kr.updateQueue,t===null&&(t=i6(),kr.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e),e}function zN(){return Va().memoizedState}function m5(e,t,r,n){var a=_o();kr.flags|=e,a.memoizedState=T1(1|t,{destroy:void 0},r,n===void 0?null:n)}function s6(e,t,r,n){var a=Va();n=n===void 0?null:n;var i=a.memoizedState.inst;zn!==null&&n!==null&&rC(n,zn.memoizedState.deps)?a.memoizedState=T1(t,i,r,n):(kr.flags|=e,a.memoizedState=T1(1|t,i,r,n))}function zB(e,t){m5(8390656,8,e,t)}function uC(e,t){s6(2048,8,e,t)}function die(e){kr.flags|=4;var t=kr.updateQueue;if(t===null)t=i6(),kr.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function BN(e){var t=Va().memoizedState;return die({ref:t,nextImpl:e}),function(){if((pn&2)!==0)throw Error(Ve(440));return t.impl.apply(void 0,arguments)}}function RN(e,t){return s6(4,2,e,t)}function NN(e,t){return s6(4,4,e,t)}function ON(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function PN(e,t,r){r=r!=null?r.concat([e]):null,s6(4,4,ON.bind(null,t,e),r)}function cC(){}function FN(e,t){var r=Va();t=t===void 0?null:t;var n=r.memoizedState;return t!==null&&rC(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function qN(e,t){var r=Va();t=t===void 0?null:t;var n=r.memoizedState;if(t!==null&&rC(t,n[1]))return n[0];if(n=e(),tp){ud(!0);try{e()}finally{ud(!1)}}return r.memoizedState=[n,t],n}function dC(e,t,r){return r===void 0||(Hc&1073741824)!==0&&(Kr&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=LO(),kr.lanes|=e,_d|=e,r)}function $N(e,t,r,n){return Ds(r,t)?r:L1.current!==null?(e=dC(e,r,n),Ds(e,t)||(ri=!0),e):(Hc&42)===0||(Hc&1073741824)!==0&&(Kr&261930)===0?(ri=!0,e.memoizedState=r):(e=LO(),kr.lanes|=e,_d|=e,t)}function HN(e,t,r,n,a){var i=hn.p;hn.p=i!==0&&8>i?i:8;var o=ur.T,s={};ur.T=s,pC(e,!1,t,r);try{var l=a(),u=ur.S;if(u!==null&&u(s,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=oie(l,n);b4(e,t,c,Es(e))}else b4(e,t,n,Es(e))}catch(f){b4(e,t,{then:function(){},status:"rejected",reason:f},Es())}finally{hn.p=i,o!==null&&s.types!==null&&(o.types=s.types),ur.T=o}}function fie(){}function pS(e,t,r,n){if(e.tag!==5)throw Error(Ve(476));var a=jN(e).queue;HN(e,a,t,Gf,r===null?fie:function(){return UN(e),r(n)})}function jN(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Gf,baseState:Gf,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jc,lastRenderedState:Gf},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jc,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function UN(e){var t=jN(e);t.next===null&&(t=e.alternate.memoizedState),b4(e,t.next.queue,{},Es())}function fC(){return Hi(R4)}function KN(){return Va().memoizedState}function VN(){return Va().memoizedState}function pie(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=Es();e=gd(r);var n=yd(t,e,r);n!==null&&(Qo(n,t,r),m4(n,t,r)),t={cache:JS()},e.payload=t;return}t=t.return}}function hie(e,t,r){var n=Es();r={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},l6(e)?WN(t,r):(r=GS(e,t,r,n),r!==null&&(Qo(r,e,n),XN(r,t,n)))}function GN(e,t,r){var n=Es();b4(e,t,r,n)}function b4(e,t,r,n){var a={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(l6(e))WN(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,r);if(a.hasEagerState=!0,a.eagerState=s,Ds(s,o))return n6(e,t,a,0),Fn===null&&r6(),!1}catch(l){}if(r=GS(e,t,a,n),r!==null)return Qo(r,e,n),XN(r,t,n),!0}return!1}function pC(e,t,r,n){if(n={lane:2,revertLane:kC(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},l6(e)){if(t)throw Error(Ve(479))}else t=GS(e,r,n,2),t!==null&&Qo(t,e,2)}function l6(e){var t=e.alternate;return e===kr||t!==null&&t===kr}function WN(e,t){k1=R5=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function XN(e,t,r){if((r&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,BR(e,r)}}var I4={readContext:Hi,use:o6,useCallback:za,useContext:za,useEffect:za,useImperativeHandle:za,useLayoutEffect:za,useInsertionEffect:za,useMemo:za,useReducer:za,useRef:za,useState:za,useDebugValue:za,useDeferredValue:za,useTransition:za,useSyncExternalStore:za,useId:za,useHostTransitionStatus:za,useFormState:za,useActionState:za,useOptimistic:za,useMemoCache:za,useCacheRefresh:za};I4.useEffectEvent=za;var YN={readContext:Hi,use:o6,useCallback:function(e,t){return _o().memoizedState=[e,t===void 0?null:t],e},useContext:Hi,useEffect:zB,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,m5(4194308,4,ON.bind(null,t,e),r)},useLayoutEffect:function(e,t){return m5(4194308,4,e,t)},useInsertionEffect:function(e,t){m5(4,2,e,t)},useMemo:function(e,t){var r=_o();t=t===void 0?null:t;var n=e();if(tp){ud(!0);try{e()}finally{ud(!1)}}return r.memoizedState=[n,t],n},useReducer:function(e,t,r){var n=_o();if(r!==void 0){var a=r(t);if(tp){ud(!0);try{r(t)}finally{ud(!1)}}}else a=t;return n.memoizedState=n.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},n.queue=e,e=e.dispatch=hie.bind(null,kr,e),[n.memoizedState,e]},useRef:function(e){var t=_o();return e={current:e},t.memoizedState=e},useState:function(e){e=dS(e);var t=e.queue,r=GN.bind(null,kr,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:cC,useDeferredValue:function(e,t){var r=_o();return dC(r,e,t)},useTransition:function(){var e=dS(!1);return e=HN.bind(null,kr,e.queue,!0,!1),_o().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var n=kr,a=_o();if(Xr){if(r===void 0)throw Error(Ve(407));r=r()}else{if(r=t(),Fn===null)throw Error(Ve(349));(Kr&127)!==0||SN(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,zB(MN.bind(null,n,i,e),[e]),n.flags|=2048,T1(9,{destroy:void 0},CN.bind(null,n,i,r,t),null),r},useId:function(){var e=_o(),t=Fn.identifierPrefix;if(Xr){var r=Lu,n=Au;r=(n&~(1<<32-Ts(n)-1)).toString(32)+r,t="_"+t+"R_"+r,r=N5++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=sie++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:fC,useFormState:EB,useActionState:EB,useOptimistic:function(e){var t=_o();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=pC.bind(null,kr,!0,r),r.dispatch=t,[e,t]},useMemoCache:sC,useCacheRefresh:function(){return _o().memoizedState=pie.bind(null,kr)},useEffectEvent:function(e){var t=_o(),r={impl:e};return t.memoizedState=r,function(){if((pn&2)!==0)throw Error(Ve(440));return r.impl.apply(void 0,arguments)}}},hC={readContext:Hi,use:o6,useCallback:FN,useContext:Hi,useEffect:uC,useImperativeHandle:PN,useInsertionEffect:RN,useLayoutEffect:NN,useMemo:qN,useReducer:h5,useRef:zN,useState:function(){return h5(jc)},useDebugValue:cC,useDeferredValue:function(e,t){var r=Va();return $N(r,zn.memoizedState,e,t)},useTransition:function(){var e=h5(jc)[0],t=Va().memoizedState;return[typeof e=="boolean"?e:K4(e),t]},useSyncExternalStore:kN,useId:KN,useHostTransitionStatus:fC,useFormState:DB,useActionState:DB,useOptimistic:function(e,t){var r=Va();return LN(r,zn,e,t)},useMemoCache:sC,useCacheRefresh:VN};hC.useEffectEvent=BN;var JN={readContext:Hi,use:o6,useCallback:FN,useContext:Hi,useEffect:uC,useImperativeHandle:PN,useInsertionEffect:RN,useLayoutEffect:NN,useMemo:qN,useReducer:wk,useRef:zN,useState:function(){return wk(jc)},useDebugValue:cC,useDeferredValue:function(e,t){var r=Va();return zn===null?dC(r,e,t):$N(r,zn.memoizedState,e,t)},useTransition:function(){var e=wk(jc)[0],t=Va().memoizedState;return[typeof e=="boolean"?e:K4(e),t]},useSyncExternalStore:kN,useId:KN,useHostTransitionStatus:fC,useFormState:IB,useActionState:IB,useOptimistic:function(e,t){var r=Va();return zn!==null?LN(r,zn,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:sC,useCacheRefresh:VN};JN.useEffectEvent=BN;function kk(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ua({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var hS={enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Es(),a=gd(n);a.payload=t,r!=null&&(a.callback=r),t=yd(e,a,n),t!==null&&(Qo(t,e,n),m4(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Es(),a=gd(n);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=yd(e,a,n),t!==null&&(Qo(t,e,n),m4(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Es(),n=gd(r);n.tag=2,t!=null&&(n.callback=t),t=yd(e,n,r),t!==null&&(Qo(t,e,r),m4(t,e,r))}};function BB(e,t,r,n,a,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!A4(r,n)||!A4(a,i):!0}function RB(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&hS.enqueueReplaceState(t,t.state,null)}function rp(e,t){var r=t;if("ref"in t){r={};for(var n in t)n!=="ref"&&(r[n]=t[n])}if(e=e.defaultProps){r===t&&(r=ua({},r));for(var a in e)r[a]===void 0&&(r[a]=e[a])}return r}function ZN(e){L5(e)}function QN(e){console.error(e)}function eO(e){L5(e)}function O5(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function NB(e,t,r){try{var n=e.onCaughtError;n(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function mS(e,t,r){return r=gd(r),r.tag=3,r.payload={element:null},r.callback=function(){O5(e,t)},r}function tO(e){return e=gd(e),e.tag=3,e}function rO(e,t,r,n){var a=r.type.getDerivedStateFromError;if(typeof a=="function"){var i=n.value;e.payload=function(){return a(i)},e.callback=function(){NB(t,r,n)}}var o=r.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){NB(t,r,n),typeof a!="function"&&(bd===null?bd=new Set([this]):bd.add(this));var s=n.stack;this.componentDidCatch(n.value,{componentStack:s!==null?s:""})})}function mie(e,t,r,n,a){if(r.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=r.alternate,t!==null&&O1(t,r,a,!0),r=Is.current,r!==null){switch(r.tag){case 31:case 13:return cl===null?H5():r.alternate===null&&Ba===0&&(Ba=3),r.flags&=-257,r.flags|=65536,r.lanes=a,n===I5?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([n]):t.add(n),zk(e,n,a)),!1;case 22:return r.flags|=65536,n===I5?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([n]):r.add(n)),zk(e,n,a)),!1}throw Error(Ve(435,r.tag))}return zk(e,n,a),H5(),!1}if(Xr)return t=Is.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,n!==rS&&(e=Error(Ve(422),{cause:n}),T4(ll(e,r)))):(n!==rS&&(t=Error(Ve(423),{cause:n}),T4(ll(t,r))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,n=ll(n,r),a=mS(e.stateNode,n,a),vk(e,a),Ba!==4&&(Ba=2)),!1;var i=Error(Ve(520),{cause:n});if(i=ll(i,r),w4===null?w4=[i]:w4.push(i),Ba!==4&&(Ba=2),t===null)return!0;n=ll(n,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=a&-a,r.lanes|=e,e=mS(r.stateNode,n,e),vk(r,e),!1;case 1:if(t=r.type,i=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(bd===null||!bd.has(i))))return r.flags|=65536,a&=-a,r.lanes|=a,a=tO(a),rO(a,e,r,n),vk(r,a),!1}r=r.return}while(r!==null);return!1}var mC=Error(Ve(461)),ri=!1;function Fi(e,t,r,n){t.child=e===null?gN(t,null,r,n):ep(t,e.child,r,n)}function OB(e,t,r,n,a){r=r.render;var i=t.ref;if("ref"in n){var o={};for(var s in n)s!=="ref"&&(o[s]=n[s])}else o=n;return Qf(t),n=nC(e,t,r,o,i,a),s=aC(),e!==null&&!ri?(iC(e,t,a),Uc(e,t,a)):(Xr&&s&&XS(t),t.flags|=1,Fi(e,t,n,a),t.child)}function PB(e,t,r,n,a){if(e===null){var i=r.type;return typeof i=="function"&&!WS(i)&&i.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=i,nO(e,t,i,n,a)):(e=f5(r.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!gC(e,a)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:A4,r(o,n)&&e.ref===t.ref)return Uc(e,t,a)}return t.flags|=1,e=Pc(i,n),e.ref=t.ref,e.return=t,t.child=e}function nO(e,t,r,n,a){if(e!==null){var i=e.memoizedProps;if(A4(i,n)&&e.ref===t.ref)if(ri=!1,t.pendingProps=n=i,gC(e,a))(e.flags&131072)!==0&&(ri=!0);else return t.lanes=e.lanes,Uc(e,t,a)}return gS(e,t,r,n,a)}function aO(e,t,r,n){var a=n.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|r:r,e!==null){for(n=t.child=e.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~i}else n=0,t.child=null;return FB(e,t,i,r,n)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&p5(t,i!==null?i.cachePool:null),i!==null?AB(t,i):uS(),xN(t);else return n=t.lanes=536870912,FB(e,t,i!==null?i.baseLanes|r:r,r,n)}else i!==null?(p5(t,i.cachePool),AB(t,i),sd(t),t.memoizedState=null):(e!==null&&p5(t,null),uS(),sd(t));return Fi(e,t,a,r),t.child}function u4(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function FB(e,t,r,n,a){var i=ZS();return i=i===null?null:{parent:ti._currentValue,pool:i},t.memoizedState={baseLanes:r,cachePool:i},e!==null&&p5(t,null),uS(),xN(t),e!==null&&O1(e,t,n,!0),t.childLanes=a,null}function g5(e,t){return t=P5({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function qB(e,t,r){return ep(t,e.child,null,r),e=g5(t,t.pendingProps),e.flags|=2,Cs(t),t.memoizedState=null,e}function gie(e,t,r){var n=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Xr){if(n.mode==="hidden")return e=g5(t,n),t.lanes=536870912,u4(null,e);if(cS(t),(e=la)?(e=YO(e,ul),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Sd!==null?{id:Au,overflow:Lu}:null,retryLane:536870912,hydrationErrors:null},r=uN(e),r.return=t,t.child=r,$i=t,la=null)):e=null,e===null)throw Cd(t);return t.lanes=536870912,null}return g5(t,n)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(cS(t),a)if(t.flags&256)t.flags&=-257,t=qB(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(Ve(558));else if(ri||O1(e,t,r,!1),a=(r&e.childLanes)!==0,ri||a){if(n=Fn,n!==null&&(o=RR(n,r),o!==0&&o!==i.retryLane))throw i.retryLane=o,op(e,o),Qo(n,e,o),mC;H5(),t=qB(e,t,r)}else e=i.treeContext,la=dl(o.nextSibling),$i=t,Xr=!0,md=null,ul=!1,e!==null&&dN(t,e),t=g5(t,n),t.flags|=4096;return t}return e=Pc(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function y5(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(Ve(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function gS(e,t,r,n,a){return Qf(t),r=nC(e,t,r,n,void 0,a),n=aC(),e!==null&&!ri?(iC(e,t,a),Uc(e,t,a)):(Xr&&n&&XS(t),t.flags|=1,Fi(e,t,r,a),t.child)}function $B(e,t,r,n,a,i){return Qf(t),t.updateQueue=null,r=wN(t,n,r,a),vN(e),n=aC(),e!==null&&!ri?(iC(e,t,i),Uc(e,t,i)):(Xr&&n&&XS(t),t.flags|=1,Fi(e,t,r,i),t.child)}function HB(e,t,r,n,a){if(Qf(t),t.stateNode===null){var i=p1,o=r.contextType;typeof o=="object"&&o!==null&&(i=Hi(o)),i=new r(n,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=hS,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=n,i.state=t.memoizedState,i.refs={},eC(t),o=r.contextType,i.context=typeof o=="object"&&o!==null?Hi(o):p1,i.state=t.memoizedState,o=r.getDerivedStateFromProps,typeof o=="function"&&(kk(t,r,o,n),i.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&hS.enqueueReplaceState(i,i.state,null),y4(t,n,i,a),g4(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){i=t.stateNode;var s=t.memoizedProps,l=rp(r,s);i.props=l;var u=i.context,c=r.contextType;o=p1,typeof c=="object"&&c!==null&&(o=Hi(c));var f=r.getDerivedStateFromProps;c=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,c||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s||u!==o)&&RB(t,i,n,o),ad=!1;var d=t.memoizedState;i.state=d,y4(t,n,i,a),g4(),u=t.memoizedState,s||d!==u||ad?(typeof f=="function"&&(kk(t,r,f,n),u=t.memoizedState),(l=ad||BB(t,r,l,n,d,u,o))?(c||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),i.props=n,i.state=u,i.context=o,n=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,sS(e,t),o=t.memoizedProps,c=rp(r,o),i.props=c,f=t.pendingProps,d=i.context,u=r.contextType,l=p1,typeof u=="object"&&u!==null&&(l=Hi(u)),s=r.getDerivedStateFromProps,(u=typeof s=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==f||d!==l)&&RB(t,i,n,l),ad=!1,d=t.memoizedState,i.state=d,y4(t,n,i,a),g4();var p=t.memoizedState;o!==f||d!==p||ad||e!==null&&e.dependencies!==null&&D5(e.dependencies)?(typeof s=="function"&&(kk(t,r,s,n),p=t.memoizedState),(c=ad||BB(t,r,c,n,d,p,l)||e!==null&&e.dependencies!==null&&D5(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,p,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,p,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),i.props=n,i.state=p,i.context=l,n=c):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return i=n,y5(e,t),n=(t.flags&128)!==0,i||n?(i=t.stateNode,r=n&&typeof r.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&n?(t.child=ep(t,e.child,null,a),t.child=ep(t,null,r,a)):Fi(e,t,r,a),t.memoizedState=i.state,e=t.child):e=Uc(e,t,a),e}function jB(e,t,r,n){return Zf(),t.flags|=256,Fi(e,t,r,n),t.child}var Sk={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ck(e){return{baseLanes:e,cachePool:pN()}}function Mk(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=_s),e}function iO(e,t,r){var n=t.pendingProps,a=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(Ka.current&2)!==0),o&&(a=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Xr){if(a?od(t):sd(t),(e=la)?(e=YO(e,ul),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Sd!==null?{id:Au,overflow:Lu}:null,retryLane:536870912,hydrationErrors:null},r=uN(e),r.return=t,t.child=r,$i=t,la=null)):e=null,e===null)throw Cd(t);return ES(e)?t.lanes=32:t.lanes=536870912,null}var s=n.children;return n=n.fallback,a?(sd(t),a=t.mode,s=P5({mode:"hidden",children:s},a),n=Wf(n,a,r,null),s.return=t,n.return=t,s.sibling=n,t.child=s,n=t.child,n.memoizedState=Ck(r),n.childLanes=Mk(e,o,r),t.memoizedState=Sk,u4(null,n)):(od(t),yS(t,s))}var l=e.memoizedState;if(l!==null&&(s=l.dehydrated,s!==null)){if(i)t.flags&256?(od(t),t.flags&=-257,t=_k(e,t,r)):t.memoizedState!==null?(sd(t),t.child=e.child,t.flags|=128,t=null):(sd(t),s=n.fallback,a=t.mode,n=P5({mode:"visible",children:n.children},a),s=Wf(s,a,r,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,ep(t,e.child,null,r),n=t.child,n.memoizedState=Ck(r),n.childLanes=Mk(e,o,r),t.memoizedState=Sk,t=u4(null,n));else if(od(t),ES(s)){if(o=s.nextSibling&&s.nextSibling.dataset,o)var u=o.dgst;o=u,n=Error(Ve(419)),n.stack="",n.digest=o,T4({value:n,source:null,stack:null}),t=_k(e,t,r)}else if(ri||O1(e,t,r,!1),o=(r&e.childLanes)!==0,ri||o){if(o=Fn,o!==null&&(n=RR(o,r),n!==0&&n!==l.retryLane))throw l.retryLane=n,op(e,n),Qo(o,e,n),mC;TS(s)||H5(),t=_k(e,t,r)}else TS(s)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,la=dl(s.nextSibling),$i=t,Xr=!0,md=null,ul=!1,e!==null&&dN(t,e),t=yS(t,n.children),t.flags|=4096);return t}return a?(sd(t),s=n.fallback,a=t.mode,l=e.child,u=l.sibling,n=Pc(l,{mode:"hidden",children:n.children}),n.subtreeFlags=l.subtreeFlags&65011712,u!==null?s=Pc(u,s):(s=Wf(s,a,r,null),s.flags|=2),s.return=t,n.return=t,n.sibling=s,t.child=n,u4(null,n),n=t.child,s=e.child.memoizedState,s===null?s=Ck(r):(a=s.cachePool,a!==null?(l=ti._currentValue,a=a.parent!==l?{parent:l,pool:l}:a):a=pN(),s={baseLanes:s.baseLanes|r,cachePool:a}),n.memoizedState=s,n.childLanes=Mk(e,o,r),t.memoizedState=Sk,u4(e.child,n)):(od(t),r=e.child,e=r.sibling,r=Pc(r,{mode:"visible",children:n.children}),r.return=t,r.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=r,t.memoizedState=null,r)}function yS(e,t){return t=P5({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function P5(e,t){return e=Ms(22,e,null,t),e.lanes=0,e}function _k(e,t,r){return ep(t,e.child,null,r),e=yS(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function UB(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),aS(e.return,t,r)}function Ak(e,t,r,n,a,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:a,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=a,o.treeForkCount=i)}function oO(e,t,r){var n=t.pendingProps,a=n.revealOrder,i=n.tail;n=n.children;var o=Ka.current,s=(o&2)!==0;if(s?(o=o&1|2,t.flags|=128):o&=1,Xn(Ka,o),Fi(e,t,n,r),n=Xr?L4:0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&UB(e,r,t);else if(e.tag===19)UB(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&B5(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),Ak(t,!1,a,r,i,n);break;case"backwards":case"unstable_legacy-backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&B5(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}Ak(t,!0,r,null,i,n);break;case"together":Ak(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Uc(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),_d|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(O1(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(Ve(153));if(t.child!==null){for(e=t.child,r=Pc(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Pc(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function gC(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&D5(e)))}function yie(e,t,r){switch(t.tag){case 3:C5(t,t.stateNode.containerInfo),id(t,ti,e.memoizedState.cache),Zf();break;case 27:case 5:Kk(t);break;case 4:C5(t,t.stateNode.containerInfo);break;case 10:id(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,cS(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(od(t),t.flags|=128,null):(r&t.child.childLanes)!==0?iO(e,t,r):(od(t),e=Uc(e,t,r),e!==null?e.sibling:null);od(t);break;case 19:var a=(e.flags&128)!==0;if(n=(r&t.childLanes)!==0,n||(O1(e,t,r,!1),n=(r&t.childLanes)!==0),a){if(n)return oO(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Xn(Ka,Ka.current),n)break;return null;case 22:return t.lanes=0,aO(e,t,r,t.pendingProps);case 24:id(t,ti,e.memoizedState.cache)}return Uc(e,t,r)}function sO(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)ri=!0;else{if(!gC(e,r)&&(t.flags&128)===0)return ri=!1,yie(e,t,r);ri=(e.flags&131072)!==0}else ri=!1,Xr&&(t.flags&1048576)!==0&&cN(t,L4,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Kf(t.elementType),t.type=e,typeof e=="function")WS(e)?(n=rp(e,n),t.tag=1,t=HB(null,t,e,n,r)):(t.tag=0,t=gS(null,t,e,n,r));else{if(e!=null){var a=e.$$typeof;if(a===BS){t.tag=11,t=OB(null,t,e,n,r);break e}else if(a===RS){t.tag=14,t=PB(null,t,e,n,r);break e}}throw t=jk(e)||e,Error(Ve(306,t,""))}}return t;case 0:return gS(e,t,t.type,t.pendingProps,r);case 1:return n=t.type,a=rp(n,t.pendingProps),HB(e,t,n,a,r);case 3:e:{if(C5(t,t.stateNode.containerInfo),e===null)throw Error(Ve(387));n=t.pendingProps;var i=t.memoizedState;a=i.element,sS(e,t),y4(t,n,null,r);var o=t.memoizedState;if(n=o.cache,id(t,ti,n),n!==i.cache&&iS(t,[ti],r,!0),g4(),n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=jB(e,t,n,r);break e}else if(n!==a){a=ll(Error(Ve(424)),t),T4(a),t=jB(e,t,n,r);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,la=dl(e.firstChild),$i=t,Xr=!0,md=null,ul=!0,r=gN(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Zf(),n===a){t=Uc(e,t,r);break e}Fi(e,t,n,r)}t=t.child}return t;case 26:return y5(e,t),e===null?(r=fR(t.type,null,t.pendingProps,null))?t.memoizedState=r:Xr||(r=t.type,e=t.pendingProps,n=V5(hd.current).createElement(r),n[qi]=t,n[es]=e,ji(n,r,e),_i(n),t.stateNode=n):t.memoizedState=fR(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kk(t),e===null&&Xr&&(n=t.stateNode=JO(t.type,t.pendingProps,hd.current),$i=t,ul=!0,a=la,Ld(t.type)?(DS=a,la=dl(n.firstChild)):la=a),Fi(e,t,t.pendingProps.children,r),y5(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Xr&&((a=n=la)&&(n=Kie(n,t.type,t.pendingProps,ul),n!==null?(t.stateNode=n,$i=t,la=dl(n.firstChild),ul=!1,a=!0):a=!1),a||Cd(t)),Kk(t),a=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,n=i.children,AS(a,i)?n=null:o!==null&&AS(a,o)&&(t.flags|=32),t.memoizedState!==null&&(a=nC(e,t,lie,null,null,r),R4._currentValue=a),y5(e,t),Fi(e,t,n,r),t.child;case 6:return e===null&&Xr&&((e=r=la)&&(r=Vie(r,t.pendingProps,ul),r!==null?(t.stateNode=r,$i=t,la=null,e=!0):e=!1),e||Cd(t)),null;case 13:return iO(e,t,r);case 4:return C5(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ep(t,null,n,r):Fi(e,t,n,r),t.child;case 11:return OB(e,t,t.type,t.pendingProps,r);case 7:return Fi(e,t,t.pendingProps,r),t.child;case 8:return Fi(e,t,t.pendingProps.children,r),t.child;case 12:return Fi(e,t,t.pendingProps.children,r),t.child;case 10:return n=t.pendingProps,id(t,t.type,n.value),Fi(e,t,n.children,r),t.child;case 9:return a=t.type._context,n=t.pendingProps.children,Qf(t),a=Hi(a),n=n(a),t.flags|=1,Fi(e,t,n,r),t.child;case 14:return PB(e,t,t.type,t.pendingProps,r);case 15:return nO(e,t,t.type,t.pendingProps,r);case 19:return oO(e,t,r);case 31:return gie(e,t,r);case 22:return aO(e,t,r,t.pendingProps);case 24:return Qf(t),n=Hi(ti),e===null?(a=ZS(),a===null&&(a=Fn,i=JS(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=r),a=i),t.memoizedState={parent:n,cache:a},eC(t),id(t,ti,a)):((e.lanes&r)!==0&&(sS(e,t),y4(t,null,null,r),g4()),a=e.memoizedState,i=t.memoizedState,a.parent!==n?(a={parent:n,cache:n},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),id(t,ti,n)):(n=i.cache,id(t,ti,n),n!==a.cache&&iS(t,[ti],r,!0))),Fi(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(Ve(156,t.tag))}function Tc(e){e.flags|=4}function Lk(e,t,r,n,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(DO())e.flags|=8192;else throw Yf=I5,QS}else e.flags&=-16777217}function KB(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!eP(t))if(DO())e.flags|=8192;else throw Yf=I5,QS}function t5(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?IR():536870912,e.lanes|=t,E1|=t)}function r4(e,t){if(!Xr)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function sa(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags&65011712,n|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function bie(e,t,r){var n=t.pendingProps;switch(YS(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return sa(t),null;case 1:return sa(t),null;case 3:return r=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Fc(ti),C1(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(t1(t)?Tc(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xk())),sa(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(Tc(t),i!==null?(sa(t),KB(t,i)):(sa(t),Lk(t,a,null,n,r))):i?i!==e.memoizedState?(Tc(t),sa(t),KB(t,i)):(sa(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Tc(t),sa(t),Lk(t,a,e,n,r)),null;case 27:if(M5(t),r=hd.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Tc(t);else{if(!n){if(t.stateNode===null)throw Error(Ve(166));return sa(t),null}e=Eu.current,t1(t)?vB(t,e):(e=JO(a,n,r),t.stateNode=e,Tc(t))}return sa(t),null;case 5:if(M5(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Tc(t);else{if(!n){if(t.stateNode===null)throw Error(Ve(166));return sa(t),null}if(i=Eu.current,t1(t))vB(t,i);else{var o=V5(hd.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?o.createElement("select",{is:n.is}):o.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?o.createElement(a,{is:n.is}):o.createElement(a)}}i[qi]=t,i[es]=n;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(ji(i,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Tc(t)}}return sa(t),Lk(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Tc(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Ve(166));if(e=hd.current,t1(t)){if(e=t.stateNode,r=t.memoizedProps,n=null,a=$i,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}e[qi]=t,e=!!(e.nodeValue===r||n!==null&&n.suppressHydrationWarning===!0||GO(e.nodeValue,r)),e||Cd(t,!0)}else e=V5(e).createTextNode(n),e[qi]=t,t.stateNode=e}return sa(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(n=t1(t),r!==null){if(e===null){if(!n)throw Error(Ve(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ve(557));e[qi]=t}else Zf(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;sa(t),e=!1}else r=xk(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(Cs(t),t):(Cs(t),null);if((t.flags&128)!==0)throw Error(Ve(558))}return sa(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=t1(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(Ve(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Ve(317));a[qi]=t}else Zf(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;sa(t),a=!1}else a=xk(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Cs(t),t):(Cs(t),null)}return Cs(t),(t.flags&128)!==0?(t.lanes=r,t):(r=n!==null,e=e!==null&&e.memoizedState!==null,r&&(n=t.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==a&&(n.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),t5(t,t.updateQueue),sa(t),null);case 4:return C1(),e===null&&SC(t.stateNode.containerInfo),sa(t),null;case 10:return Fc(t.type),sa(t),null;case 19:if(Ai(Ka),n=t.memoizedState,n===null)return sa(t),null;if(a=(t.flags&128)!==0,i=n.rendering,i===null)if(a)r4(n,!1);else{if(Ba!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=B5(e),i!==null){for(t.flags|=128,r4(n,!1),e=i.updateQueue,t.updateQueue=e,t5(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)lN(r,e),r=r.sibling;return Xn(Ka,Ka.current&1|2),Xr&&zc(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&As()>q5&&(t.flags|=128,a=!0,r4(n,!1),t.lanes=4194304)}else{if(!a)if(e=B5(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,t5(t,e),r4(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!Xr)return sa(t),null}else 2*As()-n.renderingStartTime>q5&&r!==536870912&&(t.flags|=128,a=!0,r4(n,!1),t.lanes=4194304);n.isBackwards?(i.sibling=t.child,t.child=i):(e=n.last,e!==null?e.sibling=i:t.child=i,n.last=i)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=As(),e.sibling=null,r=Ka.current,Xn(Ka,a?r&1|2:r&1),Xr&&zc(t,n.treeForkCount),e):(sa(t),null);case 22:case 23:return Cs(t),tC(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(r&536870912)!==0&&(t.flags&128)===0&&(sa(t),t.subtreeFlags&6&&(t.flags|=8192)):sa(t),r=t.updateQueue,r!==null&&t5(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==r&&(t.flags|=2048),e!==null&&Ai(Xf),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Fc(ti),sa(t),null;case 25:return null;case 30:return null}throw Error(Ve(156,t.tag))}function xie(e,t){switch(YS(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fc(ti),C1(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return M5(t),null;case 31:if(t.memoizedState!==null){if(Cs(t),t.alternate===null)throw Error(Ve(340));Zf()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Cs(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ve(340));Zf()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ai(Ka),null;case 4:return C1(),null;case 10:return Fc(t.type),null;case 22:case 23:return Cs(t),tC(),e!==null&&Ai(Xf),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Fc(ti),null;case 25:return null;default:return null}}function lO(e,t){switch(YS(t),t.tag){case 3:Fc(ti),C1();break;case 26:case 27:case 5:M5(t);break;case 4:C1();break;case 31:t.memoizedState!==null&&Cs(t);break;case 13:Cs(t);break;case 19:Ai(Ka);break;case 10:Fc(t.type);break;case 22:case 23:Cs(t),tC(),e!==null&&Ai(Xf);break;case 24:Fc(ti)}}function V4(e,t){try{var r=t.updateQueue,n=r!==null?r.lastEffect:null;if(n!==null){var a=n.next;r=a;do{if((r.tag&e)===e){n=void 0;var i=r.create,o=r.inst;n=i(),o.destroy=n}r=r.next}while(r!==a)}}catch(s){Cn(t,t.return,s)}}function Md(e,t,r){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){var o=n.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,a=t;var l=r,u=s;try{u()}catch(c){Cn(a,l,c)}}}n=n.next}while(n!==i)}}catch(c){Cn(t,t.return,c)}}function uO(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{bN(t,r)}catch(n){Cn(e,e.return,n)}}}function cO(e,t,r){r.props=rp(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(n){Cn(e,t,n)}}function x4(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof r=="function"?e.refCleanup=r(n):r.current=n}}catch(a){Cn(e,t,a)}}function Tu(e,t){var r=e.ref,n=e.refCleanup;if(r!==null)if(typeof n=="function")try{n()}catch(a){Cn(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(a){Cn(e,t,a)}else r.current=null}function dO(e){var t=e.type,r=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&n.focus();break e;case"img":r.src?n.src=r.src:r.srcSet&&(n.srcset=r.srcSet)}}catch(a){Cn(e,e.return,a)}}function Tk(e,t,r){try{var n=e.stateNode;Fie(n,e.type,r,t),n[es]=t}catch(a){Cn(e,e.return,a)}}function fO(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ld(e.type)||e.tag===4}function Ek(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fO(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ld(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bS(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Nc));else if(n!==4&&(n===27&&Ld(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(bS(e,t,r),e=e.sibling;e!==null;)bS(e,t,r),e=e.sibling}function F5(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(n===27&&Ld(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(F5(e,t,r),e=e.sibling;e!==null;)F5(e,t,r),e=e.sibling}function pO(e){var t=e.stateNode,r=e.memoizedProps;try{for(var n=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);ji(t,n,r),t[qi]=e,t[es]=r}catch(i){Cn(e,e.return,i)}}var Bc=!1,ei=!1,Dk=!1,VB=typeof WeakSet=="function"?WeakSet:Set,Mi=null;function vie(e,t){if(e=e.containerInfo,MS=Y5,e=eN(e),KS(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch(x){r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==r||a!==0&&f.nodeType!==3||(s=o+a),f!==i||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===r&&++u===a&&(s=o),d===i&&++c===n&&(l=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(_S={focusedElem:e,selectionRange:r},Y5=!1,Mi=t;Mi!==null;)if(t=Mi,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Mi=e;else for(;Mi!==null;){switch(t=Mi,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)a=e[r],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,r=t,a=i.memoizedProps,i=i.memoizedState,n=r.stateNode;try{var y=rp(r.type,a);e=n.getSnapshotBeforeUpdate(y,i),n.__reactInternalSnapshotBeforeUpdate=e}catch(x){Cn(r,r.return,x)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)LS(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":LS(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(Ve(163))}if(e=t.sibling,e!==null){e.return=t.return,Mi=e;break}Mi=t.return}}function hO(e,t,r){var n=r.flags;switch(r.tag){case 0:case 11:case 15:Dc(e,r),n&4&&V4(5,r);break;case 1:if(Dc(e,r),n&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(o){Cn(r,r.return,o)}else{var a=rp(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Cn(r,r.return,o)}}n&64&&uO(r),n&512&&x4(r,r.return);break;case 3:if(Dc(e,r),n&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{bN(e,t)}catch(o){Cn(r,r.return,o)}}break;case 27:t===null&&n&4&&pO(r);case 26:case 5:Dc(e,r),t===null&&n&4&&dO(r),n&512&&x4(r,r.return);break;case 12:Dc(e,r);break;case 31:Dc(e,r),n&4&&yO(e,r);break;case 13:Dc(e,r),n&4&&bO(e,r),n&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=Tie.bind(null,r),Gie(e,r))));break;case 22:if(n=r.memoizedState!==null||Bc,!n){t=t!==null&&t.memoizedState!==null||ei,a=Bc;var i=ei;Bc=n,(ei=t)&&!i?Ic(e,r,(r.subtreeFlags&8772)!==0):Dc(e,r),Bc=a,ei=i}break;case 30:break;default:Dc(e,r)}}function mO(e){var t=e.alternate;t!==null&&(e.alternate=null,mO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&FS(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var va=null,Jo=!1;function Ec(e,t,r){for(r=r.child;r!==null;)gO(e,t,r),r=r.sibling}function gO(e,t,r){if(Ls&&typeof Ls.onCommitFiberUnmount=="function")try{Ls.onCommitFiberUnmount(F4,r)}catch(i){}switch(r.tag){case 26:ei||Tu(r,t),Ec(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:ei||Tu(r,t);var n=va,a=Jo;Ld(r.type)&&(va=r.stateNode,Jo=!1),Ec(e,t,r),S4(r.stateNode),va=n,Jo=a;break;case 5:ei||Tu(r,t);case 6:if(n=va,a=Jo,va=null,Ec(e,t,r),va=n,Jo=a,va!==null)if(Jo)try{(va.nodeType===9?va.body:va.nodeName==="HTML"?va.ownerDocument.body:va).removeChild(r.stateNode)}catch(i){Cn(r,t,i)}else try{va.removeChild(r.stateNode)}catch(i){Cn(r,t,i)}break;case 18:va!==null&&(Jo?(e=va,sR(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),B1(e)):sR(va,r.stateNode));break;case 4:n=va,a=Jo,va=r.stateNode.containerInfo,Jo=!0,Ec(e,t,r),va=n,Jo=a;break;case 0:case 11:case 14:case 15:Md(2,r,t),ei||Md(4,r,t),Ec(e,t,r);break;case 1:ei||(Tu(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"&&cO(r,t,n)),Ec(e,t,r);break;case 21:Ec(e,t,r);break;case 22:ei=(n=ei)||r.memoizedState!==null,Ec(e,t,r),ei=n;break;default:Ec(e,t,r)}}function yO(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{B1(e)}catch(r){Cn(t,t.return,r)}}}function bO(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{B1(e)}catch(r){Cn(t,t.return,r)}}function wie(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new VB),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new VB),t;default:throw Error(Ve(435,e.tag))}}function r5(e,t){var r=wie(e);t.forEach(function(n){if(!r.has(n)){r.add(n);var a=Eie.bind(null,e,n);n.then(a,a)}})}function Xo(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var a=r[n],i=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 27:if(Ld(s.type)){va=s.stateNode,Jo=!1;break e}break;case 5:va=s.stateNode,Jo=!1;break e;case 3:case 4:va=s.stateNode.containerInfo,Jo=!0;break e}s=s.return}if(va===null)throw Error(Ve(160));gO(i,o,a),va=null,Jo=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xO(t,e),t=t.sibling}var Jl=null;function xO(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Xo(t,e),Yo(e),n&4&&(Md(3,e,e.return),V4(3,e),Md(5,e,e.return));break;case 1:Xo(t,e),Yo(e),n&512&&(ei||r===null||Tu(r,r.return)),n&64&&Bc&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?n:r.concat(n))));break;case 26:var a=Jl;if(Xo(t,e),Yo(e),n&512&&(ei||r===null||Tu(r,r.return)),n&4){var i=r!==null?r.memoizedState:null;if(n=e.memoizedState,r===null)if(n===null)if(e.stateNode===null){e:{n=e.type,r=e.memoizedProps,a=a.ownerDocument||a;t:switch(n){case"title":i=a.getElementsByTagName("title")[0],(!i||i[H4]||i[qi]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(n),a.head.insertBefore(i,a.querySelector("head > title"))),ji(i,n,r),i[qi]=e,_i(i),n=i;break e;case"link":var o=hR("link","href",a).get(n+(r.href||""));if(o){for(var s=0;s<o.length;s++)if(i=o[s],i.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&i.getAttribute("rel")===(r.rel==null?null:r.rel)&&i.getAttribute("title")===(r.title==null?null:r.title)&&i.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){o.splice(s,1);break t}}i=a.createElement(n),ji(i,n,r),a.head.appendChild(i);break;case"meta":if(o=hR("meta","content",a).get(n+(r.content||""))){for(s=0;s<o.length;s++)if(i=o[s],i.getAttribute("content")===(r.content==null?null:""+r.content)&&i.getAttribute("name")===(r.name==null?null:r.name)&&i.getAttribute("property")===(r.property==null?null:r.property)&&i.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&i.getAttribute("charset")===(r.charSet==null?null:r.charSet)){o.splice(s,1);break t}}i=a.createElement(n),ji(i,n,r),a.head.appendChild(i);break;default:throw Error(Ve(468,n))}i[qi]=e,_i(i),n=i}e.stateNode=n}else mR(a,e.type,e.stateNode);else e.stateNode=pR(a,n,e.memoizedProps);else i!==n?(i===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):i.count--,n===null?mR(a,e.type,e.stateNode):pR(a,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Tk(e,e.memoizedProps,r.memoizedProps)}break;case 27:Xo(t,e),Yo(e),n&512&&(ei||r===null||Tu(r,r.return)),r!==null&&n&4&&Tk(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Xo(t,e),Yo(e),n&512&&(ei||r===null||Tu(r,r.return)),e.flags&32){a=e.stateNode;try{_1(a,"")}catch(y){Cn(e,e.return,y)}}n&4&&e.stateNode!=null&&(a=e.memoizedProps,Tk(e,a,r!==null?r.memoizedProps:a)),n&1024&&(Dk=!0);break;case 6:if(Xo(t,e),Yo(e),n&4){if(e.stateNode===null)throw Error(Ve(162));n=e.memoizedProps,r=e.stateNode;try{r.nodeValue=n}catch(y){Cn(e,e.return,y)}}break;case 3:if(v5=null,a=Jl,Jl=G5(t.containerInfo),Xo(t,e),Jl=a,Yo(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{B1(t.containerInfo)}catch(y){Cn(e,e.return,y)}Dk&&(Dk=!1,vO(e));break;case 4:n=Jl,Jl=G5(e.stateNode.containerInfo),Xo(t,e),Yo(e),Jl=n;break;case 12:Xo(t,e),Yo(e);break;case 31:Xo(t,e),Yo(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,r5(e,n)));break;case 13:Xo(t,e),Yo(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(u6=As()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,r5(e,n)));break;case 22:a=e.memoizedState!==null;var l=r!==null&&r.memoizedState!==null,u=Bc,c=ei;if(Bc=u||a,ei=c||l,Xo(t,e),ei=c,Bc=u,Yo(e),n&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(r===null||l||Bc||ei||Vf(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){l=r=t;try{if(i=l.stateNode,a)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{s=l.stateNode;var f=l.memoizedProps.style,d=f!=null&&f.hasOwnProperty("display")?f.display:null;s.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(y){Cn(l,l.return,y)}}}else if(t.tag===6){if(r===null){l=t;try{l.stateNode.nodeValue=a?"":l.memoizedProps}catch(y){Cn(l,l.return,y)}}}else if(t.tag===18){if(r===null){l=t;try{var p=l.stateNode;a?lR(p,!0):lR(l.stateNode,!1)}catch(y){Cn(l,l.return,y)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(r=n.retryQueue,r!==null&&(n.retryQueue=null,r5(e,r))));break;case 19:Xo(t,e),Yo(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,r5(e,n)));break;case 30:break;case 21:break;default:Xo(t,e),Yo(e)}}function Yo(e){var t=e.flags;if(t&2){try{for(var r,n=e.return;n!==null;){if(fO(n)){r=n;break}n=n.return}if(r==null)throw Error(Ve(160));switch(r.tag){case 27:var a=r.stateNode,i=Ek(e);F5(e,i,a);break;case 5:var o=r.stateNode;r.flags&32&&(_1(o,""),r.flags&=-33);var s=Ek(e);F5(e,s,o);break;case 3:case 4:var l=r.stateNode.containerInfo,u=Ek(e);bS(e,u,l);break;default:throw Error(Ve(161))}}catch(c){Cn(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vO(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;vO(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dc(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hO(e,t.alternate,t),t=t.sibling}function Vf(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Md(4,t,t.return),Vf(t);break;case 1:Tu(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&cO(t,t.return,r),Vf(t);break;case 27:S4(t.stateNode);case 26:case 5:Tu(t,t.return),Vf(t);break;case 22:t.memoizedState===null&&Vf(t);break;case 30:Vf(t);break;default:Vf(t)}e=e.sibling}}function Ic(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,a=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:Ic(a,i,r),V4(4,i);break;case 1:if(Ic(a,i,r),n=i,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(u){Cn(n,n.return,u)}if(n=i,a=n.updateQueue,a!==null){var s=n.stateNode;try{var l=a.shared.hiddenCallbacks;if(l!==null)for(a.shared.hiddenCallbacks=null,a=0;a<l.length;a++)yN(l[a],s)}catch(u){Cn(n,n.return,u)}}r&&o&64&&uO(i),x4(i,i.return);break;case 27:pO(i);case 26:case 5:Ic(a,i,r),r&&n===null&&o&4&&dO(i),x4(i,i.return);break;case 12:Ic(a,i,r);break;case 31:Ic(a,i,r),r&&o&4&&yO(a,i);break;case 13:Ic(a,i,r),r&&o&4&&bO(a,i);break;case 22:i.memoizedState===null&&Ic(a,i,r),x4(i,i.return);break;case 30:break;default:Ic(a,i,r)}t=t.sibling}}function yC(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&U4(r))}function bC(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&U4(e))}function Yl(e,t,r,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wO(e,t,r,n),t=t.sibling}function wO(e,t,r,n){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Yl(e,t,r,n),a&2048&&V4(9,t);break;case 1:Yl(e,t,r,n);break;case 3:Yl(e,t,r,n),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&U4(e)));break;case 12:if(a&2048){Yl(e,t,r,n),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,s=i.onPostCommit;typeof s=="function"&&s(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(l){Cn(t,t.return,l)}}else Yl(e,t,r,n);break;case 31:Yl(e,t,r,n);break;case 13:Yl(e,t,r,n);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?Yl(e,t,r,n):v4(e,t):i._visibility&2?Yl(e,t,r,n):(i._visibility|=2,n1(e,t,r,n,(t.subtreeFlags&10256)!==0||!1)),a&2048&&yC(o,t);break;case 24:Yl(e,t,r,n),a&2048&&bC(t.alternate,t);break;default:Yl(e,t,r,n)}}function n1(e,t,r,n,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,s=r,l=n,u=o.flags;switch(o.tag){case 0:case 11:case 15:n1(i,o,s,l,a),V4(8,o);break;case 23:break;case 22:var c=o.stateNode;o.memoizedState!==null?c._visibility&2?n1(i,o,s,l,a):v4(i,o):(c._visibility|=2,n1(i,o,s,l,a)),a&&u&2048&&yC(o.alternate,o);break;case 24:n1(i,o,s,l,a),a&&u&2048&&bC(o.alternate,o);break;default:n1(i,o,s,l,a)}t=t.sibling}}function v4(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,n=t,a=n.flags;switch(n.tag){case 22:v4(r,n),a&2048&&yC(n.alternate,n);break;case 24:v4(r,n),a&2048&&bC(n.alternate,n);break;default:v4(r,n)}t=t.sibling}}var c4=8192;function r1(e,t,r){if(e.subtreeFlags&c4)for(e=e.child;e!==null;)kO(e,t,r),e=e.sibling}function kO(e,t,r){switch(e.tag){case 26:r1(e,t,r),e.flags&c4&&e.memoizedState!==null&&ioe(r,Jl,e.memoizedState,e.memoizedProps);break;case 5:r1(e,t,r);break;case 3:case 4:var n=Jl;Jl=G5(e.stateNode.containerInfo),r1(e,t,r),Jl=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=c4,c4=16777216,r1(e,t,r),c4=n):r1(e,t,r));break;default:r1(e,t,r)}}function SO(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function n4(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var n=t[r];Mi=n,MO(n,e)}SO(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)CO(e),e=e.sibling}function CO(e){switch(e.tag){case 0:case 11:case 15:n4(e),e.flags&2048&&Md(9,e,e.return);break;case 3:n4(e);break;case 12:n4(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,b5(e)):n4(e);break;default:n4(e)}}function b5(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var n=t[r];Mi=n,MO(n,e)}SO(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Md(8,t,t.return),b5(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,b5(t));break;default:b5(t)}e=e.sibling}}function MO(e,t){for(;Mi!==null;){var r=Mi;switch(r.tag){case 0:case 11:case 15:Md(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var n=r.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:U4(r.memoizedState.cache)}if(n=r.child,n!==null)n.return=r,Mi=n;else e:for(r=e;Mi!==null;){n=Mi;var a=n.sibling,i=n.return;if(mO(n),n===r){Mi=null;break e}if(a!==null){a.return=i,Mi=a;break e}Mi=i}}}var kie={getCacheForType:function(e){var t=Hi(ti),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return Hi(ti).controller.signal}},Sie=typeof WeakMap=="function"?WeakMap:Map,pn=0,Fn=null,Pr=null,Kr=0,Sn=0,Ss=null,dd=!1,F1=!1,xC=!1,Kc=0,Ba=0,_d=0,Jf=0,vC=0,_s=0,E1=0,w4=null,Zo=null,xS=!1,u6=0,_O=0,q5=1/0,$5=null,bd=null,mi=0,xd=null,D1=null,qc=0,vS=0,wS=null,AO=null,k4=0,kS=null;function Es(){return(pn&2)!==0&&Kr!==0?Kr&-Kr:ur.T!==null?kC():NR()}function LO(){if(_s===0)if((Kr&536870912)===0||Xr){var e=Vb;Vb<<=1,(Vb&3932160)===0&&(Vb=262144),_s=e}else _s=536870912;return e=Is.current,e!==null&&(e.flags|=32),_s}function Qo(e,t,r){(e===Fn&&(Sn===2||Sn===9)||e.cancelPendingCommit!==null)&&(I1(e,0),fd(e,Kr,_s,!1)),$4(e,r),((pn&2)===0||e!==Fn)&&(e===Fn&&((pn&2)===0&&(Jf|=r),Ba===4&&fd(e,Kr,_s,!1)),Iu(e))}function TO(e,t,r){if((pn&6)!==0)throw Error(Ve(327));var n=!r&&(t&127)===0&&(t&e.expiredLanes)===0||q4(e,t),a=n?_ie(e,t):Ik(e,t,!0),i=n;do{if(a===0){F1&&!n&&fd(e,t,0,!1);break}else{if(r=e.current.alternate,i&&!Cie(r)){a=Ik(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var s=e;a=w4;var l=s.current.memoizedState.isDehydrated;if(l&&(I1(s,o).flags|=256),o=Ik(s,o,!1),o!==2){if(xC&&!l){s.errorRecoveryDisabledLanes|=i,Jf|=i,a=4;break e}i=Zo,Zo=a,i!==null&&(Zo===null?Zo=i:Zo.push.apply(Zo,i))}a=o}if(i=!1,a!==2)continue}}if(a===1){I1(e,0),fd(e,t,0,!0);break}e:{switch(n=e,i=a,i){case 0:case 1:throw Error(Ve(345));case 4:if((t&4194048)!==t)break;case 6:fd(n,t,_s,!dd);break e;case 2:Zo=null;break;case 3:case 5:break;default:throw Error(Ve(329))}if((t&62914560)===t&&(a=u6+300-As(),10<a)){if(fd(n,t,_s,!dd),Z5(n,0,!0)!==0)break e;qc=t,n.timeoutHandle=XO(GB.bind(null,n,r,Zo,$5,xS,t,_s,Jf,E1,dd,i,"Throttled",-0,0),a);break e}GB(n,r,Zo,$5,xS,t,_s,Jf,E1,dd,i,null,-0,0)}}break}while(!0);Iu(e)}function GB(e,t,r,n,a,i,o,s,l,u,c,f,d,p){if(e.timeoutHandle=-1,f=t.subtreeFlags,f&8192||(f&16785408)===16785408){f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Nc},kO(t,i,f);var y=(i&62914560)===i?u6-As():(i&4194048)===i?_O-As():0;if(y=ooe(f,y),y!==null){qc=i,e.cancelPendingCommit=y(XB.bind(null,e,t,i,r,n,a,o,s,l,c,f,null,d,p)),fd(e,i,o,!u);return}}XB(e,t,i,r,n,a,o,s,l)}function Cie(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var n=0;n<r.length;n++){var a=r[n],i=a.getSnapshot;a=a.value;try{if(!Ds(i(),a))return!1}catch(o){return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function fd(e,t,r,n){t&=~vC,t&=~Jf,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var a=t;0<a;){var i=31-Ts(a),o=1<<i;n[i]=-1,a&=~o}r!==0&&zR(e,r,t)}function c6(){return(pn&6)===0?(G4(0,!1),!1):!0}function wC(){if(Pr!==null){if(Sn===0)var e=Pr.return;else e=Pr,Oc=sp=null,oC(e),w1=null,E4=0,e=Pr;for(;e!==null;)lO(e.alternate,e),e=e.return;Pr=null}}function I1(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,Hie(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),qc=0,wC(),Fn=e,Pr=r=Pc(e.current,null),Kr=t,Sn=0,Ss=null,dd=!1,F1=q4(e,t),xC=!1,E1=_s=vC=Jf=_d=Ba=0,Zo=w4=null,xS=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var a=31-Ts(n),i=1<<a;t|=e[a],n&=~i}return Kc=t,r6(),r}function EO(e,t){kr=null,ur.H=I4,t===P1||t===a6?(t=MB(),Sn=3):t===QS?(t=MB(),Sn=4):Sn=t===mC?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ss=t,Pr===null&&(Ba=1,O5(e,ll(t,e.current)))}function DO(){var e=Is.current;return e===null?!0:(Kr&4194048)===Kr?cl===null:(Kr&62914560)===Kr||(Kr&536870912)!==0?e===cl:!1}function IO(){var e=ur.H;return ur.H=I4,e===null?I4:e}function zO(){var e=ur.A;return ur.A=kie,e}function H5(){Ba=4,dd||(Kr&4194048)!==Kr&&Is.current!==null||(F1=!0),(_d&134217727)===0&&(Jf&134217727)===0||Fn===null||fd(Fn,Kr,_s,!1)}function Ik(e,t,r){var n=pn;pn|=2;var a=IO(),i=zO();(Fn!==e||Kr!==t)&&($5=null,I1(e,t)),t=!1;var o=Ba;e:do try{if(Sn!==0&&Pr!==null){var s=Pr,l=Ss;switch(Sn){case 8:wC(),o=6;break e;case 3:case 2:case 9:case 6:Is.current===null&&(t=!0);var u=Sn;if(Sn=0,Ss=null,g1(e,s,l,u),r&&F1){o=0;break e}break;default:u=Sn,Sn=0,Ss=null,g1(e,s,l,u)}}Mie(),o=Ba;break}catch(c){EO(e,c)}while(!0);return t&&e.shellSuspendCounter++,Oc=sp=null,pn=n,ur.H=a,ur.A=i,Pr===null&&(Fn=null,Kr=0,r6()),o}function Mie(){for(;Pr!==null;)BO(Pr)}function _ie(e,t){var r=pn;pn|=2;var n=IO(),a=zO();Fn!==e||Kr!==t?($5=null,q5=As()+500,I1(e,t)):F1=q4(e,t);e:do try{if(Sn!==0&&Pr!==null){t=Pr;var i=Ss;t:switch(Sn){case 1:Sn=0,Ss=null,g1(e,t,i,1);break;case 2:case 9:if(CB(i)){Sn=0,Ss=null,WB(t);break}t=function(){Sn!==2&&Sn!==9||Fn!==e||(Sn=7),Iu(e)},i.then(t,t);break e;case 3:Sn=7;break e;case 4:Sn=5;break e;case 7:CB(i)?(Sn=0,Ss=null,WB(t)):(Sn=0,Ss=null,g1(e,t,i,7));break;case 5:var o=null;switch(Pr.tag){case 26:o=Pr.memoizedState;case 5:case 27:var s=Pr;if(o?eP(o):s.stateNode.complete){Sn=0,Ss=null;var l=s.sibling;if(l!==null)Pr=l;else{var u=s.return;u!==null?(Pr=u,d6(u)):Pr=null}break t}}Sn=0,Ss=null,g1(e,t,i,5);break;case 6:Sn=0,Ss=null,g1(e,t,i,6);break;case 8:wC(),Ba=6;break e;default:throw Error(Ve(462))}}Aie();break}catch(c){EO(e,c)}while(!0);return Oc=sp=null,ur.H=n,ur.A=a,pn=r,Pr!==null?0:(Fn=null,Kr=0,r6(),Ba)}function Aie(){for(;Pr!==null&&!Yne();)BO(Pr)}function BO(e){var t=sO(e.alternate,e,Kc);e.memoizedProps=e.pendingProps,t===null?d6(e):Pr=t}function WB(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=$B(r,t,t.pendingProps,t.type,void 0,Kr);break;case 11:t=$B(r,t,t.pendingProps,t.type.render,t.ref,Kr);break;case 5:oC(t);default:lO(r,t),t=Pr=lN(t,Kc),t=sO(r,t,Kc)}e.memoizedProps=e.pendingProps,t===null?d6(e):Pr=t}function g1(e,t,r,n){Oc=sp=null,oC(t),w1=null,E4=0;var a=t.return;try{if(mie(e,a,t,r,Kr)){Ba=1,O5(e,ll(r,e.current)),Pr=null;return}}catch(i){if(a!==null)throw Pr=a,i;Ba=1,O5(e,ll(r,e.current)),Pr=null;return}t.flags&32768?(Xr||n===1?e=!0:F1||(Kr&536870912)!==0?e=!1:(dd=e=!0,(n===2||n===9||n===3||n===6)&&(n=Is.current,n!==null&&n.tag===13&&(n.flags|=16384))),RO(t,e)):d6(t)}function d6(e){var t=e;do{if((t.flags&32768)!==0){RO(t,dd);return}e=t.return;var r=bie(t.alternate,t,Kc);if(r!==null){Pr=r;return}if(t=t.sibling,t!==null){Pr=t;return}Pr=t=e}while(t!==null);Ba===0&&(Ba=5)}function RO(e,t){do{var r=xie(e.alternate,e);if(r!==null){r.flags&=32767,Pr=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Pr=e;return}Pr=e=r}while(e!==null);Ba=6,Pr=null}function XB(e,t,r,n,a,i,o,s,l){e.cancelPendingCommit=null;do f6();while(mi!==0);if((pn&6)!==0)throw Error(Ve(327));if(t!==null){if(t===e.current)throw Error(Ve(177));if(i=t.lanes|t.childLanes,i|=VS,oae(e,r,i,o,s,l),e===Fn&&(Pr=Fn=null,Kr=0),D1=t,xd=e,qc=r,vS=i,wS=a,AO=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Die(_5,function(){return qO(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=ur.T,ur.T=null,a=hn.p,hn.p=2,o=pn,pn|=4;try{vie(e,t,r)}finally{pn=o,hn.p=a,ur.T=n}}mi=1,NO(),OO(),PO()}}function NO(){if(mi===1){mi=0;var e=xd,t=D1,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=ur.T,ur.T=null;var n=hn.p;hn.p=2;var a=pn;pn|=4;try{xO(t,e);var i=_S,o=eN(e.containerInfo),s=i.focusedElem,l=i.selectionRange;if(o!==s&&s&&s.ownerDocument&&QR(s.ownerDocument.documentElement,s)){if(l!==null&&KS(s)){var u=l.start,c=l.end;if(c===void 0&&(c=u),"selectionStart"in s)s.selectionStart=u,s.selectionEnd=Math.min(c,s.value.length);else{var f=s.ownerDocument||document,d=f&&f.defaultView||window;if(d.getSelection){var p=d.getSelection(),y=s.textContent.length,x=Math.min(l.start,y),k=l.end===void 0?x:Math.min(l.end,y);!p.extend&&x>k&&(o=k,k=x,x=o);var w=yB(s,x),S=yB(s,k);if(w&&S&&(p.rangeCount!==1||p.anchorNode!==w.node||p.anchorOffset!==w.offset||p.focusNode!==S.node||p.focusOffset!==S.offset)){var T=f.createRange();T.setStart(w.node,w.offset),p.removeAllRanges(),x>k?(p.addRange(T),p.extend(S.node,S.offset)):(T.setEnd(S.node,S.offset),p.addRange(T))}}}}for(f=[],p=s;p=p.parentNode;)p.nodeType===1&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<f.length;s++){var E=f[s];E.element.scrollLeft=E.left,E.element.scrollTop=E.top}}Y5=!!MS,_S=MS=null}finally{pn=a,hn.p=n,ur.T=r}}e.current=t,mi=2}}function OO(){if(mi===2){mi=0;var e=xd,t=D1,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=ur.T,ur.T=null;var n=hn.p;hn.p=2;var a=pn;pn|=4;try{hO(e,t.alternate,t)}finally{pn=a,hn.p=n,ur.T=r}}mi=3}}function PO(){if(mi===4||mi===3){mi=0,Jne();var e=xd,t=D1,r=qc,n=AO;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?mi=5:(mi=0,D1=xd=null,FO(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(bd=null),PS(r),t=t.stateNode,Ls&&typeof Ls.onCommitFiberRoot=="function")try{Ls.onCommitFiberRoot(F4,t,void 0,(t.current.flags&128)===128)}catch(l){}if(n!==null){t=ur.T,a=hn.p,hn.p=2,ur.T=null;try{for(var i=e.onRecoverableError,o=0;o<n.length;o++){var s=n[o];i(s.value,{componentStack:s.stack})}}finally{ur.T=t,hn.p=a}}(qc&3)!==0&&f6(),Iu(e),a=e.pendingLanes,(r&261930)!==0&&(a&42)!==0?e===kS?k4++:(k4=0,kS=e):k4=0,G4(0,!1)}}function FO(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,U4(t)))}function f6(){return NO(),OO(),PO(),qO()}function qO(){if(mi!==5)return!1;var e=xd,t=vS;vS=0;var r=PS(qc),n=ur.T,a=hn.p;try{hn.p=32>r?32:r,ur.T=null,r=wS,wS=null;var i=xd,o=qc;if(mi=0,D1=xd=null,qc=0,(pn&6)!==0)throw Error(Ve(331));var s=pn;if(pn|=4,CO(i.current),wO(i,i.current,o,r),pn=s,G4(0,!1),Ls&&typeof Ls.onPostCommitFiberRoot=="function")try{Ls.onPostCommitFiberRoot(F4,i)}catch(l){}return!0}finally{hn.p=a,ur.T=n,FO(e,t)}}function YB(e,t,r){t=ll(r,t),t=mS(e.stateNode,t,2),e=yd(e,t,2),e!==null&&($4(e,2),Iu(e))}function Cn(e,t,r){if(e.tag===3)YB(e,e,r);else for(;t!==null;){if(t.tag===3){YB(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(bd===null||!bd.has(n))){e=ll(r,e),r=tO(2),n=yd(t,r,2),n!==null&&(rO(r,n,t,e),$4(n,2),Iu(n));break}}t=t.return}}function zk(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Sie;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(r)||(xC=!0,a.add(r),e=Lie.bind(null,e,t,r),t.then(e,e))}function Lie(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,Fn===e&&(Kr&r)===r&&(Ba===4||Ba===3&&(Kr&62914560)===Kr&&300>As()-u6?(pn&2)===0&&I1(e,0):vC|=r,E1===Kr&&(E1=0)),Iu(e)}function $O(e,t){t===0&&(t=IR()),e=op(e,t),e!==null&&($4(e,t),Iu(e))}function Tie(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),$O(e,r)}function Eie(e,t){var r=0;switch(e.tag){case 31:case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(Ve(314))}n!==null&&n.delete(t),$O(e,r)}function Die(e,t){return NS(e,t)}var j5=null,a1=null,SS=!1,U5=!1,Bk=!1,pd=0;function Iu(e){e!==a1&&e.next===null&&(a1===null?j5=a1=e:a1=a1.next=e),U5=!0,SS||(SS=!0,zie())}function G4(e,t){if(!Bk&&U5){Bk=!0;do for(var r=!1,n=j5;n!==null;){if(!t)if(e!==0){var a=n.pendingLanes;if(a===0)var i=0;else{var o=n.suspendedLanes,s=n.pingedLanes;i=(1<<31-Ts(42|e)+1)-1,i&=a&~(o&~s),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(r=!0,JB(n,i))}else i=Kr,i=Z5(n,n===Fn?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||q4(n,i)||(r=!0,JB(n,i));n=n.next}while(r);Bk=!1}}function Iie(){HO()}function HO(){U5=SS=!1;var e=0;pd!==0&&$ie()&&(e=pd);for(var t=As(),r=null,n=j5;n!==null;){var a=n.next,i=jO(n,t);i===0?(n.next=null,r===null?j5=a:r.next=a,a===null&&(a1=r)):(r=n,(e!==0||(i&3)!==0)&&(U5=!0)),n=a}mi!==0&&mi!==5||G4(e,!1),pd!==0&&(pd=0)}function jO(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-Ts(i),s=1<<o,l=a[o];l===-1?((s&r)===0||(s&n)!==0)&&(a[o]=iae(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}if(t=Fn,r=Kr,r=Z5(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,r===0||e===t&&(Sn===2||Sn===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&uk(n),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||q4(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(n!==null&&uk(n),PS(r)){case 2:case 8:r=ER;break;case 32:r=_5;break;case 268435456:r=DR;break;default:r=_5}return n=UO.bind(null,e),r=NS(r,n),e.callbackPriority=t,e.callbackNode=r,t}return n!==null&&n!==null&&uk(n),e.callbackPriority=2,e.callbackNode=null,2}function UO(e,t){if(mi!==0&&mi!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(f6()&&e.callbackNode!==r)return null;var n=Kr;return n=Z5(e,e===Fn?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(TO(e,n,t),jO(e,As()),e.callbackNode!=null&&e.callbackNode===r?UO.bind(null,e):null)}function JB(e,t){if(f6())return null;TO(e,t,!0)}function zie(){jie(function(){(pn&6)!==0?NS(TR,Iie):HO()})}function kC(){if(pd===0){var e=A1;e===0&&(e=Kb,Kb<<=1,(Kb&261888)===0&&(Kb=256)),pd=e}return pd}function ZB(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:u5(""+e)}function QB(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function Bie(e,t,r,n,a){if(t==="submit"&&r&&r.stateNode===a){var i=ZB((a[es]||null).action),o=n.submitter;o&&(t=(t=o[es]||null)?ZB(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var s=new Q5("action","action",null,n,a);e.push({event:s,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(pd!==0){var l=o?QB(a,o):new FormData(a);pS(r,{pending:!0,data:l,method:a.method,action:i},null,l)}}else typeof i=="function"&&(s.preventDefault(),l=o?QB(a,o):new FormData(a),pS(r,{pending:!0,data:l,method:a.method,action:i},i,l))},currentTarget:a}]})}}for(n5=0;n5<tS.length;n5++)a5=tS[n5],eR=a5.toLowerCase(),tR=a5[0].toUpperCase()+a5.slice(1),Zl(eR,"on"+tR);var a5,eR,tR,n5;Zl(rN,"onAnimationEnd");Zl(nN,"onAnimationIteration");Zl(aN,"onAnimationStart");Zl("dblclick","onDoubleClick");Zl("focusin","onFocus");Zl("focusout","onBlur");Zl(Zae,"onTransitionRun");Zl(Qae,"onTransitionStart");Zl(eie,"onTransitionCancel");Zl(iN,"onTransitionEnd");M1("onMouseEnter",["mouseout","mouseover"]);M1("onMouseLeave",["mouseout","mouseover"]);M1("onPointerEnter",["pointerout","pointerover"]);M1("onPointerLeave",["pointerout","pointerover"]);np("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));np("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));np("onBeforeInput",["compositionend","keypress","textInput","paste"]);np("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));np("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));np("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var z4="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Rie=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(z4));function KO(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],a=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var s=n[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==i&&a.isPropagationStopped())break e;i=s,a.currentTarget=u;try{i(a)}catch(c){L5(c)}a.currentTarget=null,i=l}else for(o=0;o<n.length;o++){if(s=n[o],l=s.instance,u=s.currentTarget,s=s.listener,l!==i&&a.isPropagationStopped())break e;i=s,a.currentTarget=u;try{i(a)}catch(c){L5(c)}a.currentTarget=null,i=l}}}}function Or(e,t){var r=t[Gk];r===void 0&&(r=t[Gk]=new Set);var n=e+"__bubble";r.has(n)||(VO(t,e,2,!1),r.add(n))}function Rk(e,t,r){var n=0;t&&(n|=4),VO(r,e,n,t)}var i5="_reactListening"+Math.random().toString(36).slice(2);function SC(e){if(!e[i5]){e[i5]=!0,OR.forEach(function(r){r!=="selectionchange"&&(Rie.has(r)||Rk(r,!1,e),Rk(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[i5]||(t[i5]=!0,Rk("selectionchange",!1,t))}}function VO(e,t,r,n){switch(iP(t)){case 2:var a=uoe;break;case 8:a=coe;break;default:a=AC}r=a.bind(null,t,r,e),a=void 0,!Zk||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function Nk(e,t,r,n,a){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var s=n.stateNode.containerInfo;if(s===a)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;s!==null;){if(o=s1(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){n=i=o;continue e}s=s.parentNode}}n=n.return}KR(function(){var u=i,c=$S(r),f=[];e:{var d=oN.get(e);if(d!==void 0){var p=Q5,y=e;switch(e){case"keypress":if(d5(r)===0)break e;case"keydown":case"keyup":p=Eae;break;case"focusin":y="focus",p=hk;break;case"focusout":y="blur",p=hk;break;case"beforeblur":case"afterblur":p=hk;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=lB;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=bae;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=zae;break;case rN:case nN:case aN:p=wae;break;case iN:p=Rae;break;case"scroll":case"scrollend":p=gae;break;case"wheel":p=Oae;break;case"copy":case"cut":case"paste":p=Sae;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=cB;break;case"toggle":case"beforetoggle":p=Fae}var x=(t&4)!==0,k=!x&&(e==="scroll"||e==="scrollend"),w=x?d!==null?d+"Capture":null:d;x=[];for(var S=u,T;S!==null;){var E=S;if(T=E.stateNode,E=E.tag,E!==5&&E!==26&&E!==27||T===null||w===null||(E=M4(S,w),E!=null&&x.push(B4(S,E,T))),k)break;S=S.return}0<x.length&&(d=new p(d,y,null,r,c),f.push({event:d,listeners:x}))}}if((t&7)===0){e:{if(d=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",d&&r!==Jk&&(y=r.relatedTarget||r.fromElement)&&(s1(y)||y[R1]))break e;if((p||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,p?(y=r.relatedTarget||r.toElement,p=u,y=y?s1(y):null,y!==null&&(k=P4(y),x=y.tag,y!==k||x!==5&&x!==27&&x!==6)&&(y=null)):(p=null,y=u),p!==y)){if(x=lB,E="onMouseLeave",w="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(x=cB,E="onPointerLeave",w="onPointerEnter",S="pointer"),k=p==null?d:l4(p),T=y==null?d:l4(y),d=new x(E,S+"leave",p,r,c),d.target=k,d.relatedTarget=T,E=null,s1(c)===u&&(x=new x(w,S+"enter",y,r,c),x.target=T,x.relatedTarget=k,E=x),k=E,p&&y)t:{for(x=Nie,w=p,S=y,T=0,E=w;E;E=x(E))T++;E=0;for(var z=S;z;z=x(z))E++;for(;0<T-E;)w=x(w),T--;for(;0<E-T;)S=x(S),E--;for(;T--;){if(w===S||S!==null&&w===S.alternate){x=w;break t}w=x(w),S=x(S)}x=null}else x=null;p!==null&&rR(f,d,p,x,!1),y!==null&&k!==null&&rR(f,k,y,x,!0)}}e:{if(d=u?l4(u):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var N=hB;else if(pB(d))if(JR)N=Xae;else{N=Gae;var O=Vae}else p=d.nodeName,!p||p.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?u&&qS(u.elementType)&&(N=hB):N=Wae;if(N&&(N=N(e,u))){YR(f,N,r,c);break e}O&&O(e,d,u),e==="focusout"&&u&&d.type==="number"&&u.memoizedProps.value!=null&&Yk(d,"number",d.value)}switch(O=u?l4(u):window,e){case"focusin":(pB(O)||O.contentEditable==="true")&&(c1=O,Qk=u,p4=null);break;case"focusout":p4=Qk=c1=null;break;case"mousedown":eS=!0;break;case"contextmenu":case"mouseup":case"dragend":eS=!1,bB(f,r,c);break;case"selectionchange":if(Jae)break;case"keydown":case"keyup":bB(f,r,c)}var H;if(US)e:{switch(e){case"compositionstart":var U="onCompositionStart";break e;case"compositionend":U="onCompositionEnd";break e;case"compositionupdate":U="onCompositionUpdate";break e}U=void 0}else u1?WR(e,r)&&(U="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(U="onCompositionStart");U&&(GR&&r.locale!=="ko"&&(u1||U!=="onCompositionStart"?U==="onCompositionEnd"&&u1&&(H=VR()):(cd=c,HS="value"in cd?cd.value:cd.textContent,u1=!0)),O=K5(u,U),0<O.length&&(U=new uB(U,e,null,r,c),f.push({event:U,listeners:O}),H?U.data=H:(H=XR(r),H!==null&&(U.data=H)))),(H=$ae?Hae(e,r):jae(e,r))&&(U=K5(u,"onBeforeInput"),0<U.length&&(O=new uB("onBeforeInput","beforeinput",null,r,c),f.push({event:O,listeners:U}),O.data=H)),Bie(f,e,u,r,c)}KO(f,t)})}function B4(e,t,r){return{instance:e,listener:t,currentTarget:r}}function K5(e,t){for(var r=t+"Capture",n=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=M4(e,r),a!=null&&n.unshift(B4(e,a,i)),a=M4(e,t),a!=null&&n.push(B4(e,a,i))),e.tag===3)return n;e=e.return}return[]}function Nie(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rR(e,t,r,n,a){for(var i=t._reactName,o=[];r!==null&&r!==n;){var s=r,l=s.alternate,u=s.stateNode;if(s=s.tag,l!==null&&l===n)break;s!==5&&s!==26&&s!==27||u===null||(l=u,a?(u=M4(r,i),u!=null&&o.unshift(B4(r,u,l))):a||(u=M4(r,i),u!=null&&o.push(B4(r,u,l)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var Oie=/\r\n?/g,Pie=/\u0000|\uFFFD/g;function nR(e){return(typeof e=="string"?e:""+e).replace(Oie,`
9
- `).replace(Pie,"")}function GO(e,t){return t=nR(t),nR(e)===t}function In(e,t,r,n,a,i){switch(r){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||_1(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&_1(e,""+n);break;case"className":Wb(e,"class",n);break;case"tabIndex":Wb(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Wb(e,r,n);break;case"style":UR(e,n,i);break;case"data":if(t!=="object"){Wb(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=u5(""+n),e.setAttribute(r,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(r==="formAction"?(t!=="input"&&In(e,t,"name",a.name,a,null),In(e,t,"formEncType",a.formEncType,a,null),In(e,t,"formMethod",a.formMethod,a,null),In(e,t,"formTarget",a.formTarget,a,null)):(In(e,t,"encType",a.encType,a,null),In(e,t,"method",a.method,a,null),In(e,t,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=u5(""+n),e.setAttribute(r,n);break;case"onClick":n!=null&&(e.onclick=Nc);break;case"onScroll":n!=null&&Or("scroll",e);break;case"onScrollEnd":n!=null&&Or("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(Ve(61));if(r=n.__html,r!=null){if(a.children!=null)throw Error(Ve(60));e.innerHTML=r}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}r=u5(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""+n):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":n===!0?e.setAttribute(r,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,n):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(r,n):e.removeAttribute(r);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(r):e.setAttribute(r,n);break;case"popover":Or("beforetoggle",e),Or("toggle",e),l5(e,"popover",n);break;case"xlinkActuate":Lc(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Lc(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Lc(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Lc(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Lc(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Lc(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Lc(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Lc(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Lc(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":l5(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=hae.get(r)||r,l5(e,r,n))}}function CS(e,t,r,n,a,i){switch(r){case"style":UR(e,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(Ve(61));if(r=n.__html,r!=null){if(a.children!=null)throw Error(Ve(60));e.innerHTML=r}}break;case"children":typeof n=="string"?_1(e,n):(typeof n=="number"||typeof n=="bigint")&&_1(e,""+n);break;case"onScroll":n!=null&&Or("scroll",e);break;case"onScrollEnd":n!=null&&Or("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Nc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!PR.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(a=r.endsWith("Capture"),t=r.slice(2,a?r.length-7:void 0),i=e[es]||null,i=i!=null?i[r]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof n=="function")){typeof i!="function"&&i!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,n,a);break e}r in e?e[r]=n:n===!0?e.setAttribute(r,""):l5(e,r,n)}}}function ji(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Or("error",e),Or("load",e);var n=!1,a=!1,i;for(i in r)if(r.hasOwnProperty(i)){var o=r[i];if(o!=null)switch(i){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(Ve(137,t));default:In(e,t,i,o,r,null)}}a&&In(e,t,"srcSet",r.srcSet,r,null),n&&In(e,t,"src",r.src,r,null);return;case"input":Or("invalid",e);var s=i=o=a=null,l=null,u=null;for(n in r)if(r.hasOwnProperty(n)){var c=r[n];if(c!=null)switch(n){case"name":a=c;break;case"type":o=c;break;case"checked":l=c;break;case"defaultChecked":u=c;break;case"value":i=c;break;case"defaultValue":s=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(Ve(137,t));break;default:In(e,t,n,c,r,null)}}$R(e,i,s,l,u,o,a,!1);return;case"select":Or("invalid",e),n=o=i=null;for(a in r)if(r.hasOwnProperty(a)&&(s=r[a],s!=null))switch(a){case"value":i=s;break;case"defaultValue":o=s;break;case"multiple":n=s;default:In(e,t,a,s,r,null)}t=i,r=o,e.multiple=!!n,t!=null?b1(e,!!n,t,!1):r!=null&&b1(e,!!n,r,!0);return;case"textarea":Or("invalid",e),i=a=n=null;for(o in r)if(r.hasOwnProperty(o)&&(s=r[o],s!=null))switch(o){case"value":n=s;break;case"defaultValue":a=s;break;case"children":i=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(Ve(91));break;default:In(e,t,o,s,r,null)}jR(e,n,a,i);return;case"option":for(l in r)r.hasOwnProperty(l)&&(n=r[l],n!=null)&&(l==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":In(e,t,l,n,r,null));return;case"dialog":Or("beforetoggle",e),Or("toggle",e),Or("cancel",e),Or("close",e);break;case"iframe":case"object":Or("load",e);break;case"video":case"audio":for(n=0;n<z4.length;n++)Or(z4[n],e);break;case"image":Or("error",e),Or("load",e);break;case"details":Or("toggle",e);break;case"embed":case"source":case"link":Or("error",e),Or("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in r)if(r.hasOwnProperty(u)&&(n=r[u],n!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(Ve(137,t));default:In(e,t,u,n,r,null)}return;default:if(qS(t)){for(c in r)r.hasOwnProperty(c)&&(n=r[c],n!==void 0&&CS(e,t,c,n,r,void 0));return}}for(s in r)r.hasOwnProperty(s)&&(n=r[s],n!=null&&In(e,t,s,n,r,null))}function Fie(e,t,r,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,o=null,s=null,l=null,u=null,c=null;for(p in r){var f=r[p];if(r.hasOwnProperty(p)&&f!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":l=f;default:n.hasOwnProperty(p)||In(e,t,p,null,n,f)}}for(var d in n){var p=n[d];if(f=r[d],n.hasOwnProperty(d)&&(p!=null||f!=null))switch(d){case"type":i=p;break;case"name":a=p;break;case"checked":u=p;break;case"defaultChecked":c=p;break;case"value":o=p;break;case"defaultValue":s=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(Ve(137,t));break;default:p!==f&&In(e,t,d,p,n,f)}}Xk(e,o,s,l,u,c,i,a);return;case"select":p=o=s=d=null;for(i in r)if(l=r[i],r.hasOwnProperty(i)&&l!=null)switch(i){case"value":break;case"multiple":p=l;default:n.hasOwnProperty(i)||In(e,t,i,null,n,l)}for(a in n)if(i=n[a],l=r[a],n.hasOwnProperty(a)&&(i!=null||l!=null))switch(a){case"value":d=i;break;case"defaultValue":s=i;break;case"multiple":o=i;default:i!==l&&In(e,t,a,i,n,l)}t=s,r=o,n=p,d!=null?b1(e,!!r,d,!1):!!n!=!!r&&(t!=null?b1(e,!!r,t,!0):b1(e,!!r,r?[]:"",!1));return;case"textarea":p=d=null;for(s in r)if(a=r[s],r.hasOwnProperty(s)&&a!=null&&!n.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:In(e,t,s,null,n,a)}for(o in n)if(a=n[o],i=r[o],n.hasOwnProperty(o)&&(a!=null||i!=null))switch(o){case"value":d=a;break;case"defaultValue":p=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(Ve(91));break;default:a!==i&&In(e,t,o,a,n,i)}HR(e,d,p);return;case"option":for(var y in r)d=r[y],r.hasOwnProperty(y)&&d!=null&&!n.hasOwnProperty(y)&&(y==="selected"?e.selected=!1:In(e,t,y,null,n,d));for(l in n)d=n[l],p=r[l],n.hasOwnProperty(l)&&d!==p&&(d!=null||p!=null)&&(l==="selected"?e.selected=d&&typeof d!="function"&&typeof d!="symbol":In(e,t,l,d,n,p));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in r)d=r[x],r.hasOwnProperty(x)&&d!=null&&!n.hasOwnProperty(x)&&In(e,t,x,null,n,d);for(u in n)if(d=n[u],p=r[u],n.hasOwnProperty(u)&&d!==p&&(d!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(Ve(137,t));break;default:In(e,t,u,d,n,p)}return;default:if(qS(t)){for(var k in r)d=r[k],r.hasOwnProperty(k)&&d!==void 0&&!n.hasOwnProperty(k)&&CS(e,t,k,void 0,n,d);for(c in n)d=n[c],p=r[c],!n.hasOwnProperty(c)||d===p||d===void 0&&p===void 0||CS(e,t,c,d,n,p);return}}for(var w in r)d=r[w],r.hasOwnProperty(w)&&d!=null&&!n.hasOwnProperty(w)&&In(e,t,w,null,n,d);for(f in n)d=n[f],p=r[f],!n.hasOwnProperty(f)||d===p||d==null&&p==null||In(e,t,f,d,n,p)}function aR(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function qie(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),n=0;n<r.length;n++){var a=r[n],i=a.transferSize,o=a.initiatorType,s=a.duration;if(i&&s&&aR(o)){for(o=0,s=a.responseEnd,n+=1;n<r.length;n++){var l=r[n],u=l.startTime;if(u>s)break;var c=l.transferSize,f=l.initiatorType;c&&aR(f)&&(l=l.responseEnd,o+=c*(l<s?1:(s-u)/(l-u)))}if(--n,t+=8*(i+o)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var MS=null,_S=null;function V5(e){return e.nodeType===9?e:e.ownerDocument}function iR(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function WO(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function AS(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ok=null;function $ie(){var e=window.event;return e&&e.type==="popstate"?e===Ok?!1:(Ok=e,!0):(Ok=null,!1)}var XO=typeof setTimeout=="function"?setTimeout:void 0,Hie=typeof clearTimeout=="function"?clearTimeout:void 0,oR=typeof Promise=="function"?Promise:void 0,jie=typeof queueMicrotask=="function"?queueMicrotask:typeof oR!="undefined"?function(e){return oR.resolve(null).then(e).catch(Uie)}:XO;function Uie(e){setTimeout(function(){throw e})}function Ld(e){return e==="head"}function sR(e,t){var r=t,n=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"||r==="/&"){if(n===0){e.removeChild(a),B1(t);return}n--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")n++;else if(r==="html")S4(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,S4(r);for(var i=r.firstChild;i;){var o=i.nextSibling,s=i.nodeName;i[H4]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&i.rel.toLowerCase()==="stylesheet"||r.removeChild(i),i=o}}else r==="body"&&S4(e.ownerDocument.body);r=a}while(r);B1(t)}function lR(e,t){var r=e;e=0;do{var n=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=n}while(r)}function LS(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":LS(r),FS(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function Kie(e,t,r,n){for(;e.nodeType===1;){var a=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[H4])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=dl(e.nextSibling),e===null)break}return null}function Vie(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=dl(e.nextSibling),e===null))return null;return e}function YO(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=dl(e.nextSibling),e===null))return null;return e}function TS(e){return e.data==="$?"||e.data==="$~"}function ES(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Gie(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var n=function(){t(),r.removeEventListener("DOMContentLoaded",n)};r.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function dl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var DS=null;function uR(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return dl(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function cR(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function JO(e,t,r){switch(t=V5(r),e){case"html":if(e=t.documentElement,!e)throw Error(Ve(452));return e;case"head":if(e=t.head,!e)throw Error(Ve(453));return e;case"body":if(e=t.body,!e)throw Error(Ve(454));return e;default:throw Error(Ve(451))}}function S4(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);FS(e)}var fl=new Map,dR=new Set;function G5(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Vc=hn.d;hn.d={f:Wie,r:Xie,D:Yie,C:Jie,L:Zie,m:Qie,X:toe,S:eoe,M:roe};function Wie(){var e=Vc.f(),t=c6();return e||t}function Xie(e){var t=N1(e);t!==null&&t.tag===5&&t.type==="form"?UN(t):Vc.r(e)}var q1=typeof document=="undefined"?null:document;function ZO(e,t,r){var n=q1;if(n&&typeof t=="string"&&t){var a=sl(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof r=="string"&&(a+='[crossorigin="'+r+'"]'),dR.has(a)||(dR.add(a),e={rel:e,crossOrigin:r,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),ji(t,"link",e),_i(t),n.head.appendChild(t)))}}function Yie(e){Vc.D(e),ZO("dns-prefetch",e,null)}function Jie(e,t){Vc.C(e,t),ZO("preconnect",e,t)}function Zie(e,t,r){Vc.L(e,t,r);var n=q1;if(n&&e&&t){var a='link[rel="preload"][as="'+sl(t)+'"]';t==="image"&&r&&r.imageSrcSet?(a+='[imagesrcset="'+sl(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(a+='[imagesizes="'+sl(r.imageSizes)+'"]')):a+='[href="'+sl(e)+'"]';var i=a;switch(t){case"style":i=z1(e);break;case"script":i=$1(e)}fl.has(i)||(e=ua({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),fl.set(i,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(W4(i))||t==="script"&&n.querySelector(X4(i))||(t=n.createElement("link"),ji(t,"link",e),_i(t),n.head.appendChild(t)))}}function Qie(e,t){Vc.m(e,t);var r=q1;if(r&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+sl(n)+'"][href="'+sl(e)+'"]',i=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=$1(e)}if(!fl.has(i)&&(e=ua({rel:"modulepreload",href:e},t),fl.set(i,e),r.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(X4(i)))return}n=r.createElement("link"),ji(n,"link",e),_i(n),r.head.appendChild(n)}}}function eoe(e,t,r){Vc.S(e,t,r);var n=q1;if(n&&e){var a=y1(n).hoistableStyles,i=z1(e);t=t||"default";var o=a.get(i);if(!o){var s={loading:0,preload:null};if(o=n.querySelector(W4(i)))s.loading=5;else{e=ua({rel:"stylesheet",href:e,"data-precedence":t},r),(r=fl.get(i))&&CC(e,r);var l=o=n.createElement("link");_i(l),ji(l,"link",e),l._p=new Promise(function(u,c){l.onload=u,l.onerror=c}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,x5(o,t,n)}o={type:"stylesheet",instance:o,count:1,state:s},a.set(i,o)}}}function toe(e,t){Vc.X(e,t);var r=q1;if(r&&e){var n=y1(r).hoistableScripts,a=$1(e),i=n.get(a);i||(i=r.querySelector(X4(a)),i||(e=ua({src:e,async:!0},t),(t=fl.get(a))&&MC(e,t),i=r.createElement("script"),_i(i),ji(i,"link",e),r.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function roe(e,t){Vc.M(e,t);var r=q1;if(r&&e){var n=y1(r).hoistableScripts,a=$1(e),i=n.get(a);i||(i=r.querySelector(X4(a)),i||(e=ua({src:e,async:!0,type:"module"},t),(t=fl.get(a))&&MC(e,t),i=r.createElement("script"),_i(i),ji(i,"link",e),r.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function fR(e,t,r,n){var a=(a=hd.current)?G5(a):null;if(!a)throw Error(Ve(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=z1(r.href),r=y1(a).hoistableStyles,n=r.get(t),n||(n={type:"style",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=z1(r.href);var i=y1(a).hoistableStyles,o=i.get(e);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=a.querySelector(W4(e)))&&!i._p&&(o.instance=i,o.state.loading=5),fl.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},fl.set(e,r),i||noe(a,e,r,o.state))),t&&n===null)throw Error(Ve(528,""));return o}if(t&&n!==null)throw Error(Ve(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=$1(r),r=y1(a).hoistableScripts,n=r.get(t),n||(n={type:"script",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(Ve(444,e))}}function z1(e){return'href="'+sl(e)+'"'}function W4(e){return'link[rel="stylesheet"]['+e+"]"}function QO(e){return ua({},e,{"data-precedence":e.precedence,precedence:null})}function noe(e,t,r,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),ji(t,"link",r),_i(t),e.head.appendChild(t))}function $1(e){return'[src="'+sl(e)+'"]'}function X4(e){return"script[async]"+e}function pR(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+sl(r.href)+'"]');if(n)return t.instance=n,_i(n),n;var a=ua({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),_i(n),ji(n,"style",a),x5(n,r.precedence,e),t.instance=n;case"stylesheet":a=z1(r.href);var i=e.querySelector(W4(a));if(i)return t.state.loading|=4,t.instance=i,_i(i),i;n=QO(r),(a=fl.get(a))&&CC(n,a),i=(e.ownerDocument||e).createElement("link"),_i(i);var o=i;return o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),ji(i,"link",n),t.state.loading|=4,x5(i,r.precedence,e),t.instance=i;case"script":return i=$1(r.src),(a=e.querySelector(X4(i)))?(t.instance=a,_i(a),a):(n=r,(a=fl.get(i))&&(n=ua({},r),MC(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),_i(a),ji(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(Ve(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,x5(n,r.precedence,e));return t.instance}function x5(e,t,r){for(var n=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,i=a,o=0;o<n.length;o++){var s=n[o];if(s.dataset.precedence===t)i=s;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function CC(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function MC(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var v5=null;function hR(e,t,r){if(v5===null){var n=new Map,a=v5=new Map;a.set(r,n)}else a=v5,n=a.get(r),n||(n=new Map,a.set(r,n));if(n.has(e))return n;for(n.set(e,null),r=r.getElementsByTagName(e),a=0;a<r.length;a++){var i=r[a];if(!(i[H4]||i[qi]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var s=n.get(o);s?s.push(i):n.set(o,[i])}}return n}function mR(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function aoe(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function eP(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ioe(e,t,r,n){if(r.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var a=z1(n.href),i=t.querySelector(W4(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=W5.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=i,_i(i);return}i=t.ownerDocument||t,n=QO(n),(a=fl.get(a))&&CC(n,a),i=i.createElement("link"),_i(i);var o=i;o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),ji(i,"link",n),r.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=W5.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Pk=0;function ooe(e,t){return e.stylesheets&&e.count===0&&w5(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var n=setTimeout(function(){if(e.stylesheets&&w5(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Pk===0&&(Pk=62500*qie());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&w5(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Pk?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function W5(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)w5(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var X5=null;function w5(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,X5=new Map,t.forEach(soe,e),X5=null,W5.call(e))}function soe(e,t){if(!(t.state.loading&4)){var r=X5.get(e);if(r)var n=r.get(null);else{r=new Map,X5.set(e,r);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var o=a[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(r.set(o.dataset.precedence,o),n=o)}n&&r.set(null,n)}a=t.instance,o=a.getAttribute("data-precedence"),i=r.get(o)||n,i===n&&r.set(null,a),r.set(o,a),this.count++,n=W5.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var R4={$$typeof:Rc,Provider:null,Consumer:null,_currentValue:Gf,_currentValue2:Gf,_threadCount:0};function loe(e,t,r,n,a,i,o,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ck(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ck(0),this.hiddenUpdates=ck(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function tP(e,t,r,n,a,i,o,s,l,u,c,f){return e=new loe(e,t,r,o,l,u,c,f,s),t=1,i===!0&&(t|=24),i=Ms(3,null,null,t),e.current=i,i.stateNode=e,t=JS(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:n,isDehydrated:r,cache:t},eC(i),e}function rP(e){return e?(e=p1,e):p1}function nP(e,t,r,n,a,i){a=rP(a),n.context===null?n.context=a:n.pendingContext=a,n=gd(t),n.payload={element:r},i=i===void 0?null:i,i!==null&&(n.callback=i),r=yd(e,n,t),r!==null&&(Qo(r,e,t),m4(r,e,t))}function gR(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function _C(e,t){gR(e,t),(e=e.alternate)&&gR(e,t)}function aP(e){if(e.tag===13||e.tag===31){var t=op(e,67108864);t!==null&&Qo(t,e,67108864),_C(e,67108864)}}function yR(e){if(e.tag===13||e.tag===31){var t=Es();t=OS(t);var r=op(e,t);r!==null&&Qo(r,e,t),_C(e,t)}}var Y5=!0;function uoe(e,t,r,n){var a=ur.T;ur.T=null;var i=hn.p;try{hn.p=2,AC(e,t,r,n)}finally{hn.p=i,ur.T=a}}function coe(e,t,r,n){var a=ur.T;ur.T=null;var i=hn.p;try{hn.p=8,AC(e,t,r,n)}finally{hn.p=i,ur.T=a}}function AC(e,t,r,n){if(Y5){var a=IS(n);if(a===null)Nk(e,t,n,J5,r),bR(e,n);else if(foe(a,e,t,r,n))n.stopPropagation();else if(bR(e,n),t&4&&-1<doe.indexOf(e)){for(;a!==null;){var i=N1(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Uf(i.pendingLanes);if(o!==0){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var l=1<<31-Ts(o);s.entanglements[1]|=l,o&=~l}Iu(i),(pn&6)===0&&(q5=As()+500,G4(0,!1))}}break;case 31:case 13:s=op(i,2),s!==null&&Qo(s,i,2),c6(),_C(i,2)}if(i=IS(n),i===null&&Nk(e,t,n,J5,r),i===a)break;a=i}a!==null&&n.stopPropagation()}else Nk(e,t,n,null,r)}}function IS(e){return e=$S(e),LC(e)}var J5=null;function LC(e){if(J5=null,e=s1(e),e!==null){var t=P4(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=CR(t),e!==null)return e;e=null}else if(r===31){if(e=MR(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return J5=e,null}function iP(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Zne()){case TR:return 2;case ER:return 8;case _5:case Qne:return 32;case DR:return 268435456;default:return 32}default:return 32}}var zS=!1,vd=null,wd=null,kd=null,N4=new Map,O4=new Map,ld=[],doe="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".split(" ");function bR(e,t){switch(e){case"focusin":case"focusout":vd=null;break;case"dragenter":case"dragleave":wd=null;break;case"mouseover":case"mouseout":kd=null;break;case"pointerover":case"pointerout":N4.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":O4.delete(t.pointerId)}}function a4(e,t,r,n,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},t!==null&&(t=N1(t),t!==null&&aP(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function foe(e,t,r,n,a){switch(t){case"focusin":return vd=a4(vd,e,t,r,n,a),!0;case"dragenter":return wd=a4(wd,e,t,r,n,a),!0;case"mouseover":return kd=a4(kd,e,t,r,n,a),!0;case"pointerover":var i=a.pointerId;return N4.set(i,a4(N4.get(i)||null,e,t,r,n,a)),!0;case"gotpointercapture":return i=a.pointerId,O4.set(i,a4(O4.get(i)||null,e,t,r,n,a)),!0}return!1}function oP(e){var t=s1(e.target);if(t!==null){var r=P4(t);if(r!==null){if(t=r.tag,t===13){if(t=CR(r),t!==null){e.blockedOn=t,tB(e.priority,function(){yR(r)});return}}else if(t===31){if(t=MR(r),t!==null){e.blockedOn=t,tB(e.priority,function(){yR(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function k5(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=IS(e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Jk=n,r.target.dispatchEvent(n),Jk=null}else return t=N1(r),t!==null&&aP(t),e.blockedOn=r,!1;t.shift()}return!0}function xR(e,t,r){k5(e)&&r.delete(t)}function poe(){zS=!1,vd!==null&&k5(vd)&&(vd=null),wd!==null&&k5(wd)&&(wd=null),kd!==null&&k5(kd)&&(kd=null),N4.forEach(xR),O4.forEach(xR)}function o5(e,t){e.blockedOn===t&&(e.blockedOn=null,zS||(zS=!0,gi.unstable_scheduleCallback(gi.unstable_NormalPriority,poe)))}var s5=null;function vR(e){s5!==e&&(s5=e,gi.unstable_scheduleCallback(gi.unstable_NormalPriority,function(){s5===e&&(s5=null);for(var t=0;t<e.length;t+=3){var r=e[t],n=e[t+1],a=e[t+2];if(typeof n!="function"){if(LC(n||r)===null)continue;break}var i=N1(r);i!==null&&(e.splice(t,3),t-=3,pS(i,{pending:!0,data:a,method:r.method,action:n},n,a))}}))}function B1(e){function t(l){return o5(l,e)}vd!==null&&o5(vd,e),wd!==null&&o5(wd,e),kd!==null&&o5(kd,e),N4.forEach(t),O4.forEach(t);for(var r=0;r<ld.length;r++){var n=ld[r];n.blockedOn===e&&(n.blockedOn=null)}for(;0<ld.length&&(r=ld[0],r.blockedOn===null);)oP(r),r.blockedOn===null&&ld.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(n=0;n<r.length;n+=3){var a=r[n],i=r[n+1],o=a[es]||null;if(typeof i=="function")o||vR(r);else if(o){var s=null;if(i&&i.hasAttribute("formAction")){if(a=i,o=i[es]||null)s=o.formAction;else if(LC(a)!==null)continue}else s=o.action;typeof s=="function"?r[n+1]=s:(r.splice(n,3),n-=3),vR(r)}}}function sP(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return a=o})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),n||setTimeout(r,20)}function r(){if(!n&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function TC(e){this._internalRoot=e}p6.prototype.render=TC.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ve(409));var r=t.current,n=Es();nP(r,n,e,t,null,null)};p6.prototype.unmount=TC.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;nP(e.current,2,null,e,null,null),c6(),t[R1]=null}};function p6(e){this._internalRoot=e}p6.prototype.unstable_scheduleHydration=function(e){if(e){var t=NR();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ld.length&&t!==0&&t<ld[r].priority;r++);ld.splice(r,0,e),r===0&&oP(e)}};var wR=kR.version;if(wR!=="19.2.3")throw Error(Ve(527,wR,"19.2.3"));hn.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ve(188)):(e=Object.keys(e).join(","),Error(Ve(268,e)));return e=Kne(t),e=e!==null?_R(e):null,e=e===null?null:e.stateNode,e};var hoe={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:ur,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(i4=__REACT_DEVTOOLS_GLOBAL_HOOK__,!i4.isDisabled&&i4.supportsFiber))try{F4=i4.inject(hoe),Ls=i4}catch(e){}var i4;h6.createRoot=function(e,t){if(!SR(e))throw Error(Ve(299));var r=!1,n="",a=ZN,i=QN,o=eO;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=tP(e,1,!1,null,null,r,n,null,a,i,o,sP),e[R1]=t.current,SC(e),new TC(t)};h6.hydrateRoot=function(e,t,r){if(!SR(e))throw Error(Ve(299));var n=!1,a="",i=ZN,o=QN,s=eO,l=null;return r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onUncaughtError!==void 0&&(i=r.onUncaughtError),r.onCaughtError!==void 0&&(o=r.onCaughtError),r.onRecoverableError!==void 0&&(s=r.onRecoverableError),r.formState!==void 0&&(l=r.formState)),t=tP(e,1,!0,t,r!=null?r:null,n,a,l,i,o,s,sP),t.context=rP(null),r=t.current,n=Es(),n=OS(n),a=gd(n),a.callback=null,yd(r,a,n),r=n,t.current.lanes=r,$4(t,r),Iu(t),e[R1]=t.current,SC(e),new p6(t)};h6.version="19.2.3"});var EC=Ci((p8e,cP)=>{"use strict";function uP(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uP)}catch(e){console.error(e)}}uP(),cP.exports=lP()});var fP=Ci(m6=>{"use strict";var moe=Symbol.for("react.transitional.element"),goe=Symbol.for("react.fragment");function dP(e,t,r){var n=null;if(r!==void 0&&(n=""+r),t.key!==void 0&&(n=""+t.key),"key"in t){r={};for(var a in t)a!=="key"&&(r[a]=t[a])}else r=t;return t=r.ref,{$$typeof:moe,type:e,key:n,ref:t!==void 0?t:null,props:r}}m6.Fragment=goe;m6.jsx=dP;m6.jsxs=dP});var $t=Ci((m8e,pP)=>{"use strict";pP.exports=fP()});var _M=Ci((w2,MM)=>{"use strict";(function(t,r){typeof w2=="object"&&typeof MM=="object"?MM.exports=r():typeof define=="function"&&define.amd?define([],r):typeof w2=="object"?w2.katex=r():t.katex=r()})(typeof self!="undefined"?self:w2,function(){return(function(){"use strict";var e={};(function(){e.d=function(g,h){for(var b in h)e.o(h,b)&&!e.o(g,b)&&Object.defineProperty(g,b,{enumerable:!0,get:h[b]})}})(),(function(){e.o=function(g,h){return Object.prototype.hasOwnProperty.call(g,h)}})();var t={};e.d(t,{default:function(){return hne}});class r{constructor(h,b){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let v="KaTeX parse error: "+h,M,B,P=b&&b.loc;if(P&&P.start<=P.end){let Z=P.lexer.input;M=P.start,B=P.end,M===Z.length?v+=" at end of input: ":v+=" at position "+(M+1)+": ";let oe=Z.slice(M,B).replace(/[^]/g,"$&\u0332"),ge;M>15?ge="\u2026"+Z.slice(M-15,M):ge=Z.slice(0,M);let xe;B+15<Z.length?xe=Z.slice(B,B+15)+"\u2026":xe=Z.slice(B),v+=ge+oe+xe}let V=new Error(v);return V.name="ParseError",V.__proto__=r.prototype,V.position=M,M!=null&&B!=null&&(V.length=B-M),V.rawMessage=h,V}}r.prototype.__proto__=Error.prototype;var n=r;let a=function(g,h){return g===void 0?h:g},i=/([A-Z])/g,o=function(g){return g.replace(i,"-$1").toLowerCase()},s={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},l=/[&><"']/g;function u(g){return String(g).replace(l,h=>s[h])}let c=function(g){return g.type==="ordgroup"||g.type==="color"?g.body.length===1?c(g.body[0]):g:g.type==="font"?c(g.body):g},f=function(g){let h=c(g);return h.type==="mathord"||h.type==="textord"||h.type==="atom"},d=function(g){if(!g)throw new Error("Expected non-null, but got "+String(g));return g};var y={deflt:a,escape:u,hyphenate:o,getBaseElem:c,isCharacterBox:f,protocolFromUrl:function(g){let h=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(g);return h?h[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(h[1])?null:h[1].toLowerCase():"_relative"}};let x={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:g=>"#"+g},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(g,h)=>(h.push(g),h)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:g=>Math.max(0,g),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:g=>Math.max(0,g),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:g=>Math.max(0,g),cli:"-e, --max-expand <n>",cliProcessor:g=>g==="Infinity"?1/0:parseInt(g)},globalGroup:{type:"boolean",cli:!1}};function k(g){if(g.default)return g.default;let h=g.type,b=Array.isArray(h)?h[0]:h;if(typeof b!="string")return b.enum[0];switch(b){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class w{constructor(h){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,h=h||{};for(let b in x)if(x.hasOwnProperty(b)){let v=x[b];this[b]=h[b]!==void 0?v.processor?v.processor(h[b]):h[b]:k(v)}}reportNonstrict(h,b,v){let M=this.strict;if(typeof M=="function"&&(M=M(h,b,v)),!(!M||M==="ignore")){if(M===!0||M==="error")throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+(b+" ["+h+"]"),v);M==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(b+" ["+h+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+M+"': "+b+" ["+h+"]"))}}useStrictBehavior(h,b,v){let M=this.strict;if(typeof M=="function")try{M=M(h,b,v)}catch(B){M="error"}return!M||M==="ignore"?!1:M===!0||M==="error"?!0:M==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(b+" ["+h+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+M+"': "+b+" ["+h+"]")),!1)}isTrusted(h){if(h.url&&!h.protocol){let v=y.protocolFromUrl(h.url);if(v==null)return!1;h.protocol=v}return!!(typeof this.trust=="function"?this.trust(h):this.trust)}}class S{constructor(h,b,v){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=h,this.size=b,this.cramped=v}sup(){return K[Y[this.id]]}sub(){return K[ye[this.id]]}fracNum(){return K[se[this.id]]}fracDen(){return K[ue[this.id]]}cramp(){return K[Se[this.id]]}text(){return K[Me[this.id]]}isTight(){return this.size>=2}}let T=0,E=1,z=2,N=3,O=4,H=5,U=6,J=7,K=[new S(T,0,!1),new S(E,0,!0),new S(z,1,!1),new S(N,1,!0),new S(O,2,!1),new S(H,2,!0),new S(U,3,!1),new S(J,3,!0)],Y=[O,H,O,H,U,J,U,J],ye=[H,H,H,H,J,J,J,J],se=[z,N,O,H,U,J,U,J],ue=[N,N,H,H,J,J,J,J],Se=[E,E,N,N,H,H,J,J],Me=[T,E,z,N,z,N,z,N];var de={DISPLAY:K[T],TEXT:K[z],SCRIPT:K[O],SCRIPTSCRIPT:K[U]};let Re=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function it(g){for(let h=0;h<Re.length;h++){let b=Re[h];for(let v=0;v<b.blocks.length;v++){let M=b.blocks[v];if(g>=M[0]&&g<=M[1])return b.name}}return null}let Ie=[];Re.forEach(g=>g.blocks.forEach(h=>Ie.push(...h)));function Oe(g){for(let h=0;h<Ie.length;h+=2)if(g>=Ie[h]&&g<=Ie[h+1])return!0;return!1}let me=80,be=function(g,h){return"M95,"+(622+g+h)+`
9
+ `).replace(Pie,"")}function GO(e,t){return t=nR(t),nR(e)===t}function In(e,t,r,n,a,i){switch(r){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||_1(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&_1(e,""+n);break;case"className":Wb(e,"class",n);break;case"tabIndex":Wb(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Wb(e,r,n);break;case"style":UR(e,n,i);break;case"data":if(t!=="object"){Wb(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=u5(""+n),e.setAttribute(r,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(r==="formAction"?(t!=="input"&&In(e,t,"name",a.name,a,null),In(e,t,"formEncType",a.formEncType,a,null),In(e,t,"formMethod",a.formMethod,a,null),In(e,t,"formTarget",a.formTarget,a,null)):(In(e,t,"encType",a.encType,a,null),In(e,t,"method",a.method,a,null),In(e,t,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=u5(""+n),e.setAttribute(r,n);break;case"onClick":n!=null&&(e.onclick=Nc);break;case"onScroll":n!=null&&Or("scroll",e);break;case"onScrollEnd":n!=null&&Or("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(Ve(61));if(r=n.__html,r!=null){if(a.children!=null)throw Error(Ve(60));e.innerHTML=r}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}r=u5(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""+n):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":n===!0?e.setAttribute(r,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,n):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(r,n):e.removeAttribute(r);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(r):e.setAttribute(r,n);break;case"popover":Or("beforetoggle",e),Or("toggle",e),l5(e,"popover",n);break;case"xlinkActuate":Lc(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Lc(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Lc(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Lc(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Lc(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Lc(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Lc(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Lc(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Lc(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":l5(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=hae.get(r)||r,l5(e,r,n))}}function CS(e,t,r,n,a,i){switch(r){case"style":UR(e,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(Ve(61));if(r=n.__html,r!=null){if(a.children!=null)throw Error(Ve(60));e.innerHTML=r}}break;case"children":typeof n=="string"?_1(e,n):(typeof n=="number"||typeof n=="bigint")&&_1(e,""+n);break;case"onScroll":n!=null&&Or("scroll",e);break;case"onScrollEnd":n!=null&&Or("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Nc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!PR.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(a=r.endsWith("Capture"),t=r.slice(2,a?r.length-7:void 0),i=e[es]||null,i=i!=null?i[r]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof n=="function")){typeof i!="function"&&i!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,n,a);break e}r in e?e[r]=n:n===!0?e.setAttribute(r,""):l5(e,r,n)}}}function ji(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Or("error",e),Or("load",e);var n=!1,a=!1,i;for(i in r)if(r.hasOwnProperty(i)){var o=r[i];if(o!=null)switch(i){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(Ve(137,t));default:In(e,t,i,o,r,null)}}a&&In(e,t,"srcSet",r.srcSet,r,null),n&&In(e,t,"src",r.src,r,null);return;case"input":Or("invalid",e);var s=i=o=a=null,l=null,u=null;for(n in r)if(r.hasOwnProperty(n)){var c=r[n];if(c!=null)switch(n){case"name":a=c;break;case"type":o=c;break;case"checked":l=c;break;case"defaultChecked":u=c;break;case"value":i=c;break;case"defaultValue":s=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(Ve(137,t));break;default:In(e,t,n,c,r,null)}}$R(e,i,s,l,u,o,a,!1);return;case"select":Or("invalid",e),n=o=i=null;for(a in r)if(r.hasOwnProperty(a)&&(s=r[a],s!=null))switch(a){case"value":i=s;break;case"defaultValue":o=s;break;case"multiple":n=s;default:In(e,t,a,s,r,null)}t=i,r=o,e.multiple=!!n,t!=null?b1(e,!!n,t,!1):r!=null&&b1(e,!!n,r,!0);return;case"textarea":Or("invalid",e),i=a=n=null;for(o in r)if(r.hasOwnProperty(o)&&(s=r[o],s!=null))switch(o){case"value":n=s;break;case"defaultValue":a=s;break;case"children":i=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(Ve(91));break;default:In(e,t,o,s,r,null)}jR(e,n,a,i);return;case"option":for(l in r)r.hasOwnProperty(l)&&(n=r[l],n!=null)&&(l==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":In(e,t,l,n,r,null));return;case"dialog":Or("beforetoggle",e),Or("toggle",e),Or("cancel",e),Or("close",e);break;case"iframe":case"object":Or("load",e);break;case"video":case"audio":for(n=0;n<z4.length;n++)Or(z4[n],e);break;case"image":Or("error",e),Or("load",e);break;case"details":Or("toggle",e);break;case"embed":case"source":case"link":Or("error",e),Or("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in r)if(r.hasOwnProperty(u)&&(n=r[u],n!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(Ve(137,t));default:In(e,t,u,n,r,null)}return;default:if(qS(t)){for(c in r)r.hasOwnProperty(c)&&(n=r[c],n!==void 0&&CS(e,t,c,n,r,void 0));return}}for(s in r)r.hasOwnProperty(s)&&(n=r[s],n!=null&&In(e,t,s,n,r,null))}function Fie(e,t,r,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,o=null,s=null,l=null,u=null,c=null;for(p in r){var f=r[p];if(r.hasOwnProperty(p)&&f!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":l=f;default:n.hasOwnProperty(p)||In(e,t,p,null,n,f)}}for(var d in n){var p=n[d];if(f=r[d],n.hasOwnProperty(d)&&(p!=null||f!=null))switch(d){case"type":i=p;break;case"name":a=p;break;case"checked":u=p;break;case"defaultChecked":c=p;break;case"value":o=p;break;case"defaultValue":s=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(Ve(137,t));break;default:p!==f&&In(e,t,d,p,n,f)}}Xk(e,o,s,l,u,c,i,a);return;case"select":p=o=s=d=null;for(i in r)if(l=r[i],r.hasOwnProperty(i)&&l!=null)switch(i){case"value":break;case"multiple":p=l;default:n.hasOwnProperty(i)||In(e,t,i,null,n,l)}for(a in n)if(i=n[a],l=r[a],n.hasOwnProperty(a)&&(i!=null||l!=null))switch(a){case"value":d=i;break;case"defaultValue":s=i;break;case"multiple":o=i;default:i!==l&&In(e,t,a,i,n,l)}t=s,r=o,n=p,d!=null?b1(e,!!r,d,!1):!!n!=!!r&&(t!=null?b1(e,!!r,t,!0):b1(e,!!r,r?[]:"",!1));return;case"textarea":p=d=null;for(s in r)if(a=r[s],r.hasOwnProperty(s)&&a!=null&&!n.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:In(e,t,s,null,n,a)}for(o in n)if(a=n[o],i=r[o],n.hasOwnProperty(o)&&(a!=null||i!=null))switch(o){case"value":d=a;break;case"defaultValue":p=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(Ve(91));break;default:a!==i&&In(e,t,o,a,n,i)}HR(e,d,p);return;case"option":for(var y in r)d=r[y],r.hasOwnProperty(y)&&d!=null&&!n.hasOwnProperty(y)&&(y==="selected"?e.selected=!1:In(e,t,y,null,n,d));for(l in n)d=n[l],p=r[l],n.hasOwnProperty(l)&&d!==p&&(d!=null||p!=null)&&(l==="selected"?e.selected=d&&typeof d!="function"&&typeof d!="symbol":In(e,t,l,d,n,p));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in r)d=r[x],r.hasOwnProperty(x)&&d!=null&&!n.hasOwnProperty(x)&&In(e,t,x,null,n,d);for(u in n)if(d=n[u],p=r[u],n.hasOwnProperty(u)&&d!==p&&(d!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(Ve(137,t));break;default:In(e,t,u,d,n,p)}return;default:if(qS(t)){for(var k in r)d=r[k],r.hasOwnProperty(k)&&d!==void 0&&!n.hasOwnProperty(k)&&CS(e,t,k,void 0,n,d);for(c in n)d=n[c],p=r[c],!n.hasOwnProperty(c)||d===p||d===void 0&&p===void 0||CS(e,t,c,d,n,p);return}}for(var w in r)d=r[w],r.hasOwnProperty(w)&&d!=null&&!n.hasOwnProperty(w)&&In(e,t,w,null,n,d);for(f in n)d=n[f],p=r[f],!n.hasOwnProperty(f)||d===p||d==null&&p==null||In(e,t,f,d,n,p)}function aR(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function qie(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),n=0;n<r.length;n++){var a=r[n],i=a.transferSize,o=a.initiatorType,s=a.duration;if(i&&s&&aR(o)){for(o=0,s=a.responseEnd,n+=1;n<r.length;n++){var l=r[n],u=l.startTime;if(u>s)break;var c=l.transferSize,f=l.initiatorType;c&&aR(f)&&(l=l.responseEnd,o+=c*(l<s?1:(s-u)/(l-u)))}if(--n,t+=8*(i+o)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var MS=null,_S=null;function V5(e){return e.nodeType===9?e:e.ownerDocument}function iR(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function WO(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function AS(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ok=null;function $ie(){var e=window.event;return e&&e.type==="popstate"?e===Ok?!1:(Ok=e,!0):(Ok=null,!1)}var XO=typeof setTimeout=="function"?setTimeout:void 0,Hie=typeof clearTimeout=="function"?clearTimeout:void 0,oR=typeof Promise=="function"?Promise:void 0,jie=typeof queueMicrotask=="function"?queueMicrotask:typeof oR!="undefined"?function(e){return oR.resolve(null).then(e).catch(Uie)}:XO;function Uie(e){setTimeout(function(){throw e})}function Ld(e){return e==="head"}function sR(e,t){var r=t,n=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"||r==="/&"){if(n===0){e.removeChild(a),B1(t);return}n--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")n++;else if(r==="html")S4(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,S4(r);for(var i=r.firstChild;i;){var o=i.nextSibling,s=i.nodeName;i[H4]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&i.rel.toLowerCase()==="stylesheet"||r.removeChild(i),i=o}}else r==="body"&&S4(e.ownerDocument.body);r=a}while(r);B1(t)}function lR(e,t){var r=e;e=0;do{var n=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=n}while(r)}function LS(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":LS(r),FS(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function Kie(e,t,r,n){for(;e.nodeType===1;){var a=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[H4])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=dl(e.nextSibling),e===null)break}return null}function Vie(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=dl(e.nextSibling),e===null))return null;return e}function YO(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=dl(e.nextSibling),e===null))return null;return e}function TS(e){return e.data==="$?"||e.data==="$~"}function ES(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Gie(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var n=function(){t(),r.removeEventListener("DOMContentLoaded",n)};r.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function dl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var DS=null;function uR(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return dl(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function cR(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function JO(e,t,r){switch(t=V5(r),e){case"html":if(e=t.documentElement,!e)throw Error(Ve(452));return e;case"head":if(e=t.head,!e)throw Error(Ve(453));return e;case"body":if(e=t.body,!e)throw Error(Ve(454));return e;default:throw Error(Ve(451))}}function S4(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);FS(e)}var fl=new Map,dR=new Set;function G5(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Vc=hn.d;hn.d={f:Wie,r:Xie,D:Yie,C:Jie,L:Zie,m:Qie,X:toe,S:eoe,M:roe};function Wie(){var e=Vc.f(),t=c6();return e||t}function Xie(e){var t=N1(e);t!==null&&t.tag===5&&t.type==="form"?UN(t):Vc.r(e)}var q1=typeof document=="undefined"?null:document;function ZO(e,t,r){var n=q1;if(n&&typeof t=="string"&&t){var a=sl(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof r=="string"&&(a+='[crossorigin="'+r+'"]'),dR.has(a)||(dR.add(a),e={rel:e,crossOrigin:r,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),ji(t,"link",e),_i(t),n.head.appendChild(t)))}}function Yie(e){Vc.D(e),ZO("dns-prefetch",e,null)}function Jie(e,t){Vc.C(e,t),ZO("preconnect",e,t)}function Zie(e,t,r){Vc.L(e,t,r);var n=q1;if(n&&e&&t){var a='link[rel="preload"][as="'+sl(t)+'"]';t==="image"&&r&&r.imageSrcSet?(a+='[imagesrcset="'+sl(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(a+='[imagesizes="'+sl(r.imageSizes)+'"]')):a+='[href="'+sl(e)+'"]';var i=a;switch(t){case"style":i=z1(e);break;case"script":i=$1(e)}fl.has(i)||(e=ua({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),fl.set(i,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(W4(i))||t==="script"&&n.querySelector(X4(i))||(t=n.createElement("link"),ji(t,"link",e),_i(t),n.head.appendChild(t)))}}function Qie(e,t){Vc.m(e,t);var r=q1;if(r&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+sl(n)+'"][href="'+sl(e)+'"]',i=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=$1(e)}if(!fl.has(i)&&(e=ua({rel:"modulepreload",href:e},t),fl.set(i,e),r.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(X4(i)))return}n=r.createElement("link"),ji(n,"link",e),_i(n),r.head.appendChild(n)}}}function eoe(e,t,r){Vc.S(e,t,r);var n=q1;if(n&&e){var a=y1(n).hoistableStyles,i=z1(e);t=t||"default";var o=a.get(i);if(!o){var s={loading:0,preload:null};if(o=n.querySelector(W4(i)))s.loading=5;else{e=ua({rel:"stylesheet",href:e,"data-precedence":t},r),(r=fl.get(i))&&CC(e,r);var l=o=n.createElement("link");_i(l),ji(l,"link",e),l._p=new Promise(function(u,c){l.onload=u,l.onerror=c}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,x5(o,t,n)}o={type:"stylesheet",instance:o,count:1,state:s},a.set(i,o)}}}function toe(e,t){Vc.X(e,t);var r=q1;if(r&&e){var n=y1(r).hoistableScripts,a=$1(e),i=n.get(a);i||(i=r.querySelector(X4(a)),i||(e=ua({src:e,async:!0},t),(t=fl.get(a))&&MC(e,t),i=r.createElement("script"),_i(i),ji(i,"link",e),r.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function roe(e,t){Vc.M(e,t);var r=q1;if(r&&e){var n=y1(r).hoistableScripts,a=$1(e),i=n.get(a);i||(i=r.querySelector(X4(a)),i||(e=ua({src:e,async:!0,type:"module"},t),(t=fl.get(a))&&MC(e,t),i=r.createElement("script"),_i(i),ji(i,"link",e),r.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function fR(e,t,r,n){var a=(a=hd.current)?G5(a):null;if(!a)throw Error(Ve(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=z1(r.href),r=y1(a).hoistableStyles,n=r.get(t),n||(n={type:"style",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=z1(r.href);var i=y1(a).hoistableStyles,o=i.get(e);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=a.querySelector(W4(e)))&&!i._p&&(o.instance=i,o.state.loading=5),fl.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},fl.set(e,r),i||noe(a,e,r,o.state))),t&&n===null)throw Error(Ve(528,""));return o}if(t&&n!==null)throw Error(Ve(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=$1(r),r=y1(a).hoistableScripts,n=r.get(t),n||(n={type:"script",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(Ve(444,e))}}function z1(e){return'href="'+sl(e)+'"'}function W4(e){return'link[rel="stylesheet"]['+e+"]"}function QO(e){return ua({},e,{"data-precedence":e.precedence,precedence:null})}function noe(e,t,r,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),ji(t,"link",r),_i(t),e.head.appendChild(t))}function $1(e){return'[src="'+sl(e)+'"]'}function X4(e){return"script[async]"+e}function pR(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+sl(r.href)+'"]');if(n)return t.instance=n,_i(n),n;var a=ua({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),_i(n),ji(n,"style",a),x5(n,r.precedence,e),t.instance=n;case"stylesheet":a=z1(r.href);var i=e.querySelector(W4(a));if(i)return t.state.loading|=4,t.instance=i,_i(i),i;n=QO(r),(a=fl.get(a))&&CC(n,a),i=(e.ownerDocument||e).createElement("link"),_i(i);var o=i;return o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),ji(i,"link",n),t.state.loading|=4,x5(i,r.precedence,e),t.instance=i;case"script":return i=$1(r.src),(a=e.querySelector(X4(i)))?(t.instance=a,_i(a),a):(n=r,(a=fl.get(i))&&(n=ua({},r),MC(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),_i(a),ji(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(Ve(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,x5(n,r.precedence,e));return t.instance}function x5(e,t,r){for(var n=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,i=a,o=0;o<n.length;o++){var s=n[o];if(s.dataset.precedence===t)i=s;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function CC(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function MC(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var v5=null;function hR(e,t,r){if(v5===null){var n=new Map,a=v5=new Map;a.set(r,n)}else a=v5,n=a.get(r),n||(n=new Map,a.set(r,n));if(n.has(e))return n;for(n.set(e,null),r=r.getElementsByTagName(e),a=0;a<r.length;a++){var i=r[a];if(!(i[H4]||i[qi]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var s=n.get(o);s?s.push(i):n.set(o,[i])}}return n}function mR(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function aoe(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function eP(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ioe(e,t,r,n){if(r.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var a=z1(n.href),i=t.querySelector(W4(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=W5.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=i,_i(i);return}i=t.ownerDocument||t,n=QO(n),(a=fl.get(a))&&CC(n,a),i=i.createElement("link"),_i(i);var o=i;o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),ji(i,"link",n),r.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=W5.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Pk=0;function ooe(e,t){return e.stylesheets&&e.count===0&&w5(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var n=setTimeout(function(){if(e.stylesheets&&w5(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Pk===0&&(Pk=62500*qie());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&w5(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Pk?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function W5(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)w5(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var X5=null;function w5(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,X5=new Map,t.forEach(soe,e),X5=null,W5.call(e))}function soe(e,t){if(!(t.state.loading&4)){var r=X5.get(e);if(r)var n=r.get(null);else{r=new Map,X5.set(e,r);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var o=a[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(r.set(o.dataset.precedence,o),n=o)}n&&r.set(null,n)}a=t.instance,o=a.getAttribute("data-precedence"),i=r.get(o)||n,i===n&&r.set(null,a),r.set(o,a),this.count++,n=W5.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var R4={$$typeof:Rc,Provider:null,Consumer:null,_currentValue:Gf,_currentValue2:Gf,_threadCount:0};function loe(e,t,r,n,a,i,o,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ck(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ck(0),this.hiddenUpdates=ck(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function tP(e,t,r,n,a,i,o,s,l,u,c,f){return e=new loe(e,t,r,o,l,u,c,f,s),t=1,i===!0&&(t|=24),i=Ms(3,null,null,t),e.current=i,i.stateNode=e,t=JS(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:n,isDehydrated:r,cache:t},eC(i),e}function rP(e){return e?(e=p1,e):p1}function nP(e,t,r,n,a,i){a=rP(a),n.context===null?n.context=a:n.pendingContext=a,n=gd(t),n.payload={element:r},i=i===void 0?null:i,i!==null&&(n.callback=i),r=yd(e,n,t),r!==null&&(Qo(r,e,t),m4(r,e,t))}function gR(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function _C(e,t){gR(e,t),(e=e.alternate)&&gR(e,t)}function aP(e){if(e.tag===13||e.tag===31){var t=op(e,67108864);t!==null&&Qo(t,e,67108864),_C(e,67108864)}}function yR(e){if(e.tag===13||e.tag===31){var t=Es();t=OS(t);var r=op(e,t);r!==null&&Qo(r,e,t),_C(e,t)}}var Y5=!0;function uoe(e,t,r,n){var a=ur.T;ur.T=null;var i=hn.p;try{hn.p=2,AC(e,t,r,n)}finally{hn.p=i,ur.T=a}}function coe(e,t,r,n){var a=ur.T;ur.T=null;var i=hn.p;try{hn.p=8,AC(e,t,r,n)}finally{hn.p=i,ur.T=a}}function AC(e,t,r,n){if(Y5){var a=IS(n);if(a===null)Nk(e,t,n,J5,r),bR(e,n);else if(foe(a,e,t,r,n))n.stopPropagation();else if(bR(e,n),t&4&&-1<doe.indexOf(e)){for(;a!==null;){var i=N1(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Uf(i.pendingLanes);if(o!==0){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var l=1<<31-Ts(o);s.entanglements[1]|=l,o&=~l}Iu(i),(pn&6)===0&&(q5=As()+500,G4(0,!1))}}break;case 31:case 13:s=op(i,2),s!==null&&Qo(s,i,2),c6(),_C(i,2)}if(i=IS(n),i===null&&Nk(e,t,n,J5,r),i===a)break;a=i}a!==null&&n.stopPropagation()}else Nk(e,t,n,null,r)}}function IS(e){return e=$S(e),LC(e)}var J5=null;function LC(e){if(J5=null,e=s1(e),e!==null){var t=P4(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=CR(t),e!==null)return e;e=null}else if(r===31){if(e=MR(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return J5=e,null}function iP(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Zne()){case TR:return 2;case ER:return 8;case _5:case Qne:return 32;case DR:return 268435456;default:return 32}default:return 32}}var zS=!1,vd=null,wd=null,kd=null,N4=new Map,O4=new Map,ld=[],doe="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".split(" ");function bR(e,t){switch(e){case"focusin":case"focusout":vd=null;break;case"dragenter":case"dragleave":wd=null;break;case"mouseover":case"mouseout":kd=null;break;case"pointerover":case"pointerout":N4.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":O4.delete(t.pointerId)}}function a4(e,t,r,n,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},t!==null&&(t=N1(t),t!==null&&aP(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function foe(e,t,r,n,a){switch(t){case"focusin":return vd=a4(vd,e,t,r,n,a),!0;case"dragenter":return wd=a4(wd,e,t,r,n,a),!0;case"mouseover":return kd=a4(kd,e,t,r,n,a),!0;case"pointerover":var i=a.pointerId;return N4.set(i,a4(N4.get(i)||null,e,t,r,n,a)),!0;case"gotpointercapture":return i=a.pointerId,O4.set(i,a4(O4.get(i)||null,e,t,r,n,a)),!0}return!1}function oP(e){var t=s1(e.target);if(t!==null){var r=P4(t);if(r!==null){if(t=r.tag,t===13){if(t=CR(r),t!==null){e.blockedOn=t,tB(e.priority,function(){yR(r)});return}}else if(t===31){if(t=MR(r),t!==null){e.blockedOn=t,tB(e.priority,function(){yR(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function k5(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=IS(e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Jk=n,r.target.dispatchEvent(n),Jk=null}else return t=N1(r),t!==null&&aP(t),e.blockedOn=r,!1;t.shift()}return!0}function xR(e,t,r){k5(e)&&r.delete(t)}function poe(){zS=!1,vd!==null&&k5(vd)&&(vd=null),wd!==null&&k5(wd)&&(wd=null),kd!==null&&k5(kd)&&(kd=null),N4.forEach(xR),O4.forEach(xR)}function o5(e,t){e.blockedOn===t&&(e.blockedOn=null,zS||(zS=!0,gi.unstable_scheduleCallback(gi.unstable_NormalPriority,poe)))}var s5=null;function vR(e){s5!==e&&(s5=e,gi.unstable_scheduleCallback(gi.unstable_NormalPriority,function(){s5===e&&(s5=null);for(var t=0;t<e.length;t+=3){var r=e[t],n=e[t+1],a=e[t+2];if(typeof n!="function"){if(LC(n||r)===null)continue;break}var i=N1(r);i!==null&&(e.splice(t,3),t-=3,pS(i,{pending:!0,data:a,method:r.method,action:n},n,a))}}))}function B1(e){function t(l){return o5(l,e)}vd!==null&&o5(vd,e),wd!==null&&o5(wd,e),kd!==null&&o5(kd,e),N4.forEach(t),O4.forEach(t);for(var r=0;r<ld.length;r++){var n=ld[r];n.blockedOn===e&&(n.blockedOn=null)}for(;0<ld.length&&(r=ld[0],r.blockedOn===null);)oP(r),r.blockedOn===null&&ld.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(n=0;n<r.length;n+=3){var a=r[n],i=r[n+1],o=a[es]||null;if(typeof i=="function")o||vR(r);else if(o){var s=null;if(i&&i.hasAttribute("formAction")){if(a=i,o=i[es]||null)s=o.formAction;else if(LC(a)!==null)continue}else s=o.action;typeof s=="function"?r[n+1]=s:(r.splice(n,3),n-=3),vR(r)}}}function sP(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return a=o})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),n||setTimeout(r,20)}function r(){if(!n&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function TC(e){this._internalRoot=e}p6.prototype.render=TC.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ve(409));var r=t.current,n=Es();nP(r,n,e,t,null,null)};p6.prototype.unmount=TC.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;nP(e.current,2,null,e,null,null),c6(),t[R1]=null}};function p6(e){this._internalRoot=e}p6.prototype.unstable_scheduleHydration=function(e){if(e){var t=NR();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ld.length&&t!==0&&t<ld[r].priority;r++);ld.splice(r,0,e),r===0&&oP(e)}};var wR=kR.version;if(wR!=="19.2.3")throw Error(Ve(527,wR,"19.2.3"));hn.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ve(188)):(e=Object.keys(e).join(","),Error(Ve(268,e)));return e=Kne(t),e=e!==null?_R(e):null,e=e===null?null:e.stateNode,e};var hoe={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:ur,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(i4=__REACT_DEVTOOLS_GLOBAL_HOOK__,!i4.isDisabled&&i4.supportsFiber))try{F4=i4.inject(hoe),Ls=i4}catch(e){}var i4;h6.createRoot=function(e,t){if(!SR(e))throw Error(Ve(299));var r=!1,n="",a=ZN,i=QN,o=eO;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=tP(e,1,!1,null,null,r,n,null,a,i,o,sP),e[R1]=t.current,SC(e),new TC(t)};h6.hydrateRoot=function(e,t,r){if(!SR(e))throw Error(Ve(299));var n=!1,a="",i=ZN,o=QN,s=eO,l=null;return r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onUncaughtError!==void 0&&(i=r.onUncaughtError),r.onCaughtError!==void 0&&(o=r.onCaughtError),r.onRecoverableError!==void 0&&(s=r.onRecoverableError),r.formState!==void 0&&(l=r.formState)),t=tP(e,1,!0,t,r!=null?r:null,n,a,l,i,o,s,sP),t.context=rP(null),r=t.current,n=Es(),n=OS(n),a=gd(n),a.callback=null,yd(r,a,n),r=n,t.current.lanes=r,$4(t,r),Iu(t),e[R1]=t.current,SC(e),new p6(t)};h6.version="19.2.3"});var EC=Ci((h8e,cP)=>{"use strict";function uP(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uP)}catch(e){console.error(e)}}uP(),cP.exports=lP()});var fP=Ci(m6=>{"use strict";var moe=Symbol.for("react.transitional.element"),goe=Symbol.for("react.fragment");function dP(e,t,r){var n=null;if(r!==void 0&&(n=""+r),t.key!==void 0&&(n=""+t.key),"key"in t){r={};for(var a in t)a!=="key"&&(r[a]=t[a])}else r=t;return t=r.ref,{$$typeof:moe,type:e,key:n,ref:t!==void 0?t:null,props:r}}m6.Fragment=goe;m6.jsx=dP;m6.jsxs=dP});var $t=Ci((g8e,pP)=>{"use strict";pP.exports=fP()});var _M=Ci((w2,MM)=>{"use strict";(function(t,r){typeof w2=="object"&&typeof MM=="object"?MM.exports=r():typeof define=="function"&&define.amd?define([],r):typeof w2=="object"?w2.katex=r():t.katex=r()})(typeof self!="undefined"?self:w2,function(){return(function(){"use strict";var e={};(function(){e.d=function(g,h){for(var b in h)e.o(h,b)&&!e.o(g,b)&&Object.defineProperty(g,b,{enumerable:!0,get:h[b]})}})(),(function(){e.o=function(g,h){return Object.prototype.hasOwnProperty.call(g,h)}})();var t={};e.d(t,{default:function(){return hne}});class r{constructor(h,b){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let v="KaTeX parse error: "+h,M,B,P=b&&b.loc;if(P&&P.start<=P.end){let Z=P.lexer.input;M=P.start,B=P.end,M===Z.length?v+=" at end of input: ":v+=" at position "+(M+1)+": ";let oe=Z.slice(M,B).replace(/[^]/g,"$&\u0332"),ge;M>15?ge="\u2026"+Z.slice(M-15,M):ge=Z.slice(0,M);let xe;B+15<Z.length?xe=Z.slice(B,B+15)+"\u2026":xe=Z.slice(B),v+=ge+oe+xe}let V=new Error(v);return V.name="ParseError",V.__proto__=r.prototype,V.position=M,M!=null&&B!=null&&(V.length=B-M),V.rawMessage=h,V}}r.prototype.__proto__=Error.prototype;var n=r;let a=function(g,h){return g===void 0?h:g},i=/([A-Z])/g,o=function(g){return g.replace(i,"-$1").toLowerCase()},s={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},l=/[&><"']/g;function u(g){return String(g).replace(l,h=>s[h])}let c=function(g){return g.type==="ordgroup"||g.type==="color"?g.body.length===1?c(g.body[0]):g:g.type==="font"?c(g.body):g},f=function(g){let h=c(g);return h.type==="mathord"||h.type==="textord"||h.type==="atom"},d=function(g){if(!g)throw new Error("Expected non-null, but got "+String(g));return g};var y={deflt:a,escape:u,hyphenate:o,getBaseElem:c,isCharacterBox:f,protocolFromUrl:function(g){let h=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(g);return h?h[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(h[1])?null:h[1].toLowerCase():"_relative"}};let x={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:g=>"#"+g},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(g,h)=>(h.push(g),h)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:g=>Math.max(0,g),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:g=>Math.max(0,g),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:g=>Math.max(0,g),cli:"-e, --max-expand <n>",cliProcessor:g=>g==="Infinity"?1/0:parseInt(g)},globalGroup:{type:"boolean",cli:!1}};function k(g){if(g.default)return g.default;let h=g.type,b=Array.isArray(h)?h[0]:h;if(typeof b!="string")return b.enum[0];switch(b){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class w{constructor(h){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,h=h||{};for(let b in x)if(x.hasOwnProperty(b)){let v=x[b];this[b]=h[b]!==void 0?v.processor?v.processor(h[b]):h[b]:k(v)}}reportNonstrict(h,b,v){let M=this.strict;if(typeof M=="function"&&(M=M(h,b,v)),!(!M||M==="ignore")){if(M===!0||M==="error")throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+(b+" ["+h+"]"),v);M==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(b+" ["+h+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+M+"': "+b+" ["+h+"]"))}}useStrictBehavior(h,b,v){let M=this.strict;if(typeof M=="function")try{M=M(h,b,v)}catch(B){M="error"}return!M||M==="ignore"?!1:M===!0||M==="error"?!0:M==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(b+" ["+h+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+M+"': "+b+" ["+h+"]")),!1)}isTrusted(h){if(h.url&&!h.protocol){let v=y.protocolFromUrl(h.url);if(v==null)return!1;h.protocol=v}return!!(typeof this.trust=="function"?this.trust(h):this.trust)}}class S{constructor(h,b,v){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=h,this.size=b,this.cramped=v}sup(){return K[Y[this.id]]}sub(){return K[ye[this.id]]}fracNum(){return K[se[this.id]]}fracDen(){return K[ue[this.id]]}cramp(){return K[Se[this.id]]}text(){return K[Me[this.id]]}isTight(){return this.size>=2}}let T=0,E=1,z=2,N=3,O=4,H=5,U=6,J=7,K=[new S(T,0,!1),new S(E,0,!0),new S(z,1,!1),new S(N,1,!0),new S(O,2,!1),new S(H,2,!0),new S(U,3,!1),new S(J,3,!0)],Y=[O,H,O,H,U,J,U,J],ye=[H,H,H,H,J,J,J,J],se=[z,N,O,H,U,J,U,J],ue=[N,N,H,H,J,J,J,J],Se=[E,E,N,N,H,H,J,J],Me=[T,E,z,N,z,N,z,N];var de={DISPLAY:K[T],TEXT:K[z],SCRIPT:K[O],SCRIPTSCRIPT:K[U]};let Re=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function it(g){for(let h=0;h<Re.length;h++){let b=Re[h];for(let v=0;v<b.blocks.length;v++){let M=b.blocks[v];if(g>=M[0]&&g<=M[1])return b.name}}return null}let Ie=[];Re.forEach(g=>g.blocks.forEach(h=>Ie.push(...h)));function Oe(g){for(let h=0;h<Ie.length;h+=2)if(g>=Ie[h]&&g<=Ie[h+1])return!0;return!1}let me=80,be=function(g,h){return"M95,"+(622+g+h)+`
10
10
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
11
11
  c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
12
12
  c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
@@ -3643,7 +3643,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3643
3643
  monaco.config({ paths: { vs: '...' } })
3644
3644
 
3645
3645
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
3646
- `},_te=kte(Zxe)(Ate),Lte={config:Yxe}});var Ete,Dte=wt(()=>{"use strict";Ete=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(a){return r.reduceRight(function(i,o){return o(i)},a)}}});function eI(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],eI(e[r],t[r]))}),ZD(ZD({},e),t)}var Ite=wt(()=>{"use strict";QD()});function J9(e){var t=!1,r=new Promise(function(n,a){e.then(function(i){return t?a(Qxe):n(i)}),e.catch(a)});return r.cancel=function(){return t=!0},r}var Qxe,zte=wt(()=>{"use strict";Qxe={type:"cancelation",msg:"operation is manually canceled"}});function rve(e){var t=Lte.config(e),r=t.monaco,n=hte(t,eve);Z9(function(a){return{config:eI(a.config,n),monaco:r}})}function nve(){var e=yb(function(t){var r=t.monaco,n=t.isInitialized,a=t.resolve;return{monaco:r,isInitialized:n,resolve:a}});if(!e.isInitialized){if(Z9({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),J9(tI);if(window.monaco&&window.monaco.editor)return Rte(window.monaco),e.resolve(window.monaco),J9(tI);Ete(ave,ove)(sve)}return J9(tI)}function ave(e){return document.body.appendChild(e)}function ive(e){var t=document.createElement("script");return e&&(t.src=e),t}function ove(e){var t=yb(function(n){var a=n.config,i=n.reject;return{config:a,reject:i}}),r=ive("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function sve(){var e=yb(function(r){var n=r.config,a=r.resolve,i=r.reject;return{config:n,resolve:a,reject:i}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var n=r.m||r;Rte(n),e.resolve(n)},function(r){e.reject(r)})}function Rte(e){yb().monaco||Z9({monaco:e})}function lve(){return yb(function(e){var t=e.monaco;return t})}var eve,tve,Bte,yb,Z9,tI,vc,Nte=wt(()=>{"use strict";QD();xte();wte();Tte();Dte();Ite();zte();eve=["monaco"],tve=bte.create({config:vte,isInitialized:!1,resolve:null,reject:null,monaco:null}),Bte=mte(tve,2),yb=Bte[0],Z9=Bte[1];tI=new Promise(function(e,t){return Z9({resolve:e,reject:t})}),vc={config:rve,init:nve,__getMonacoInstance:lve}});var bb=wt(()=>{"use strict";Nte()});var Vte={};Pb(Vte,{DiffEditor:()=>Sve,Editor:()=>Kte,default:()=>Eve,loader:()=>vc,useMonaco:()=>Mve});function fve({children:e}){return Fte.default.createElement("div",{style:dve.container},e)}function mve({width:e,height:t,isEditorReady:r,loading:n,_ref:a,className:i,wrapperProps:o}){return ew.default.createElement("section",te({style:Ue(te({},rI.wrapper),{width:e,height:t})},o),!r&&ew.default.createElement(hve,null,n),ew.default.createElement("div",{ref:a,style:te(te({},rI.fullWidth),!r&&rI.hide),className:i}))}function yve(e){(0,$te.useEffect)(e,[])}function bve(e,t,r=!0){let n=(0,tw.useRef)(!0);(0,tw.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)}function xb(){}function Ag(e,t,r,n){return xve(e,n)||vve(e,t,r,n)}function xve(e,t){return e.editor.getModel(Hte(e,t))}function vve(e,t,r,n){return e.editor.createModel(t,r,n?Hte(e,n):void 0)}function Hte(e,t){return e.Uri.parse(t)}function wve({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:a,originalModelPath:i,modifiedModelPath:o,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:u="light",loading:c="Loading...",options:f={},height:d="100%",width:p="100%",className:y,wrapperProps:x={},beforeMount:k=xb,onMount:w=xb}){let[S,T]=(0,Ni.useState)(!1),[E,z]=(0,Ni.useState)(!0),N=(0,Ni.useRef)(null),O=(0,Ni.useRef)(null),H=(0,Ni.useRef)(null),U=(0,Ni.useRef)(w),J=(0,Ni.useRef)(k),K=(0,Ni.useRef)(!1);nI(()=>{let ue=vc.init();return ue.then(Se=>(O.current=Se)&&z(!1)).catch(Se=>(Se==null?void 0:Se.type)!=="cancelation"&&console.error("Monaco initialization: error:",Se)),()=>N.current?se():ue.cancel()}),Js(()=>{if(N.current&&O.current){let ue=N.current.getOriginalEditor(),Se=Ag(O.current,e||"",n||r||"text",i||"");Se!==ue.getModel()&&ue.setModel(Se)}},[i],S),Js(()=>{if(N.current&&O.current){let ue=N.current.getModifiedEditor(),Se=Ag(O.current,t||"",a||r||"text",o||"");Se!==ue.getModel()&&ue.setModel(Se)}},[o],S),Js(()=>{let ue=N.current.getModifiedEditor();ue.getOption(O.current.editor.EditorOption.readOnly)?ue.setValue(t||""):t!==ue.getValue()&&(ue.executeEdits("",[{range:ue.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),ue.pushUndoStop())},[t],S),Js(()=>{var ue,Se;(Se=(ue=N.current)==null?void 0:ue.getModel())==null||Se.original.setValue(e||"")},[e],S),Js(()=>{let{original:ue,modified:Se}=N.current.getModel();O.current.editor.setModelLanguage(ue,n||r||"text"),O.current.editor.setModelLanguage(Se,a||r||"text")},[r,n,a],S),Js(()=>{var ue;(ue=O.current)==null||ue.editor.setTheme(u)},[u],S),Js(()=>{var ue;(ue=N.current)==null||ue.updateOptions(f)},[f],S);let Y=(0,Ni.useCallback)(()=>{var Me;if(!O.current)return;J.current(O.current);let ue=Ag(O.current,e||"",n||r||"text",i||""),Se=Ag(O.current,t||"",a||r||"text",o||"");(Me=N.current)==null||Me.setModel({original:ue,modified:Se})},[r,t,a,e,n,i,o]),ye=(0,Ni.useCallback)(()=>{var ue;!K.current&&H.current&&(N.current=O.current.editor.createDiffEditor(H.current,te({automaticLayout:!0},f)),Y(),(ue=O.current)==null||ue.editor.setTheme(u),T(!0),K.current=!0)},[f,u,Y]);(0,Ni.useEffect)(()=>{S&&U.current(N.current,O.current)},[S]),(0,Ni.useEffect)(()=>{!E&&!S&&ye()},[E,S,ye]);function se(){var Se,Me,de,Re;let ue=(Se=N.current)==null?void 0:Se.getModel();s||((Me=ue==null?void 0:ue.original)==null||Me.dispose()),l||((de=ue==null?void 0:ue.modified)==null||de.dispose()),(Re=N.current)==null||Re.dispose()}return Ni.default.createElement(qte,{width:p,height:d,isEditorReady:S,loading:c,_ref:H,className:y,wrapperProps:x})}function Cve(){let[e,t]=(0,jte.useState)(vc.__getMonacoInstance());return nI(()=>{let r;return e||(r=vc.init(),r.then(n=>{t(n)})),()=>r==null?void 0:r.cancel()}),e}function _ve(e){let t=(0,rw.useRef)();return(0,rw.useEffect)(()=>{t.current=e},[e]),t.current}function Lve({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:a,path:i,theme:o="light",line:s,loading:l="Loading...",options:u={},overrideServices:c={},saveViewState:f=!0,keepCurrentModel:d=!1,width:p="100%",height:y="100%",className:x,wrapperProps:k={},beforeMount:w=xb,onMount:S=xb,onChange:T,onValidate:E=xb}){let[z,N]=(0,Ha.useState)(!1),[O,H]=(0,Ha.useState)(!0),U=(0,Ha.useRef)(null),J=(0,Ha.useRef)(null),K=(0,Ha.useRef)(null),Y=(0,Ha.useRef)(S),ye=(0,Ha.useRef)(w),se=(0,Ha.useRef)(),ue=(0,Ha.useRef)(n),Se=Ave(i),Me=(0,Ha.useRef)(!1),de=(0,Ha.useRef)(!1);nI(()=>{let Ie=vc.init();return Ie.then(Oe=>(U.current=Oe)&&H(!1)).catch(Oe=>(Oe==null?void 0:Oe.type)!=="cancelation"&&console.error("Monaco initialization: error:",Oe)),()=>J.current?it():Ie.cancel()}),Js(()=>{var Oe,me,be,qe;let Ie=Ag(U.current,e||n||"",t||a||"",i||r||"");Ie!==((Oe=J.current)==null?void 0:Oe.getModel())&&(f&&Q9.set(Se,(me=J.current)==null?void 0:me.saveViewState()),(be=J.current)==null||be.setModel(Ie),f&&((qe=J.current)==null||qe.restoreViewState(Q9.get(i))))},[i],z),Js(()=>{var Ie;(Ie=J.current)==null||Ie.updateOptions(u)},[u],z),Js(()=>{!J.current||n===void 0||(J.current.getOption(U.current.editor.EditorOption.readOnly)?J.current.setValue(n):n!==J.current.getValue()&&(de.current=!0,J.current.executeEdits("",[{range:J.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),J.current.pushUndoStop(),de.current=!1))},[n],z),Js(()=>{var Oe,me;let Ie=(Oe=J.current)==null?void 0:Oe.getModel();Ie&&a&&((me=U.current)==null||me.editor.setModelLanguage(Ie,a))},[a],z),Js(()=>{var Ie;s!==void 0&&((Ie=J.current)==null||Ie.revealLine(s))},[s],z),Js(()=>{var Ie;(Ie=U.current)==null||Ie.editor.setTheme(o)},[o],z);let Re=(0,Ha.useCallback)(()=>{var Ie;if(!(!K.current||!U.current)&&!Me.current){ye.current(U.current);let Oe=i||r,me=Ag(U.current,n||e||"",t||a||"",Oe||"");J.current=(Ie=U.current)==null?void 0:Ie.editor.create(K.current,te({model:me,automaticLayout:!0},u),c),f&&J.current.restoreViewState(Q9.get(Oe)),U.current.editor.setTheme(o),s!==void 0&&J.current.revealLine(s),N(!0),Me.current=!0}},[e,t,r,n,a,i,u,c,f,o,s]);(0,Ha.useEffect)(()=>{z&&Y.current(J.current,U.current)},[z]),(0,Ha.useEffect)(()=>{!O&&!z&&Re()},[O,z,Re]),ue.current=n,(0,Ha.useEffect)(()=>{var Ie,Oe;z&&T&&((Ie=se.current)==null||Ie.dispose(),se.current=(Oe=J.current)==null?void 0:Oe.onDidChangeModelContent(me=>{de.current||T(J.current.getValue(),me)}))},[z,T]),(0,Ha.useEffect)(()=>{if(z){let Ie=U.current.editor.onDidChangeMarkers(Oe=>{var be;let me=(be=J.current.getModel())==null?void 0:be.uri;if(me&&Oe.find(qe=>qe.path===me.path)){let qe=U.current.editor.getModelMarkers({resource:me});E==null||E(qe)}});return()=>{Ie==null||Ie.dispose()}}return()=>{}},[z,E]);function it(){var Ie,Oe;(Ie=se.current)==null||Ie.dispose(),d?f&&Q9.set(i,J.current.saveViewState()):(Oe=J.current.getModel())==null||Oe.dispose(),J.current.dispose()}return Ha.default.createElement(qte,{width:p,height:y,isEditorReady:z,loading:l,_ref:K,className:x,wrapperProps:k})}var Ote,Ni,Pte,ew,Fte,$te,tw,jte,Ute,Ha,rw,uve,rI,cve,dve,pve,hve,gve,qte,nI,Js,kve,Sve,Mve,Ave,Q9,Tve,Kte,Eve,Gte=wt(()=>{"use strict";bb();Ote=Ee(_t(),1),Ni=Ee(_t(),1);bb();Pte=Ee(_t(),1),ew=Ee(_t(),1),Fte=Ee(_t(),1),$te=Ee(_t(),1),tw=Ee(_t(),1),jte=Ee(_t(),1);bb();Ute=Ee(_t(),1),Ha=Ee(_t(),1);bb();rw=Ee(_t(),1),uve={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},rI=uve,cve={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},dve=cve;pve=fve,hve=pve;gve=mve,qte=(0,Pte.memo)(gve);nI=yve;Js=bve;kve=wve,Sve=(0,Ote.memo)(kve);Mve=Cve;Ave=_ve,Q9=new Map;Tve=Lve,Kte=(0,Ute.memo)(Tve),Eve=Kte});var G7e={};Pb(G7e,{EdpireAssessment:()=>V7e,buildSubmitPayload:()=>Pre,flattenAssessment:()=>Nre,flattenReview:()=>Ore,renderQuestion:()=>Rre});var vI=Ee(_t()),wI=Ee(EC());var Fh=Ee(_t());var Ft=Ee(_t());var Nh=Ee($t(),1),Bf=Ee(_t(),1);function hP(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(a){a(r)}),(n=e.get("*"))&&n.slice().map(function(a){a(t,r)})}}}var Gc=class{constructor(){this.emitter=hP(),this.answers=new Map}emit(t){if(t.type==="answer:changed")this.answers.set(t.answer.nodeId,t.answer);else if(t.type==="answers:reset")this.answers.clear();else if(t.type==="answers:prefill")for(let r of t.answers)this.answers.set(r.nodeId,r);this.emitter.emit(t.type,t)}on(t,r){this.emitter.on(t,r)}off(t,r){this.emitter.off(t,r)}getAllAnswers(){return Array.from(this.answers.values())}clearAnswers(){this.answers.clear(),this.emit({type:"answers:reset"})}prefillAnswers(t){this.emit({type:"answers:prefill",answers:t})}submitAnswers(){this.emit({type:"answer:submitted",answers:this.getAllAnswers(),timestamp:Date.now()})}},mP="__edpireGlobalAnswerBus",gP=globalThis,yP,g6=(yP=gP[mP])!=null?yP:gP[mP]=new Gc;var wP=Ee($t(),1),y6=Ee(_t(),1);var bP="__edpireAnswerBusContext",xP=globalThis,vP,kP=(vP=xP[bP])!=null?vP:xP[bP]=(0,y6.createContext)(g6);function Li(){return(0,y6.useContext)(kP)}function b6({children:e,bus:t=new Gc}){return(0,wP.jsx)(kP.Provider,{value:t,children:e})}var Qn=Ee($t(),1),ru=Ee(_t(),1);function SP(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=SP(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function DC(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=SP(e))&&(n&&(n+=" "),n+=t);return n}var hr=DC;var rr=Ee($t(),1);var Ti=Ee($t(),1),mn=Ee(_t(),1);var v6=Ee(_t());var CP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),x6=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();var Y4=Ee(_t());var MP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var _P=(0,Y4.forwardRef)((u,l)=>{var c=u,{color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:o}=c,s=Pn(c,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);return(0,Y4.createElement)("svg",te(Ue(te({ref:l},MP),{width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:x6("lucide",a)}),s),[...o.map(([f,d])=>(0,Y4.createElement)(f,d)),...Array.isArray(i)?i:[i]])});var Yt=(e,t)=>{let r=(0,v6.forwardRef)((o,i)=>{var s=o,{className:n}=s,a=Pn(s,["className"]);return(0,v6.createElement)(_P,te({ref:i,iconNode:t,className:x6(`lucide-${CP(e)}`,n)},a))});return r.displayName=`${e}`,r};var Wc=Yt("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);var zu=Yt("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);var zs=Yt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Bu=Yt("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);var Xc=Yt("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var Td=Yt("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var pl=Yt("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);var J4=Yt("CloudOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5.782 5.782A7 7 0 0 0 9 19h8.5a4.5 4.5 0 0 0 1.307-.193",key:"yfwify"}],["path",{d:"M21.532 16.5A4.5 4.5 0 0 0 17.5 10h-1.79A7.008 7.008 0 0 0 10 5.07",key:"jlfiyv"}]]);var H1=Yt("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);var Z4=Yt("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);var Q4=Yt("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var e2=Yt("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);var t2=Yt("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var Ru=Yt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var r2=Yt("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var n2=Yt("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);var a2=Yt("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var i2=Yt("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);var o2=Yt("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);var lp=Yt("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);var s2=Yt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);var up=Yt("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);var j1=Yt("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var Ed=Yt("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var U1=Yt("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);var no=Yt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var AP=Ee($t(),1),l2=Ee(_t(),1);var K1={submitButton:"Submit",showHint:"Show hint",clickToRemove:"Click to remove",blankAnswerAria:"Your answer",aiEvaluationInProgress:"AI evaluation in progress\u2026",aiEvaluationInProgressAria:"AI evaluation in progress",shortAnswerPlaceholder:"Short answer\u2026",longAnswerPlaceholder:"Write your answer here\u2026",minWordsLabel:e=>`Min: ${e}`,wordBank:"Word Bank",chooseN:e=>`(choose ${e})`,annexDefaultLabel:"Documents",annexOpen:e=>`Open ${e}`,annexClose:"Close",referenceInPanel:e=>`This exercise's text is in ${e}.`,readReference:"Read it",referenceForExercise:e=>`Exercise ${e}`,choiceLetters:"ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),tableScrollLeft:"Show the columns on the left",tableScrollRight:"Show the columns on the right",mathChecking:"Checking your answer\u2026",mathCorrect:"Correct",mathIncorrect:"Incorrect",openResponseTextPlaceholder:"Write your answer here\u2026",openResponseWords:"words",openResponseChars:"chars",openResponseDropZoneLabel:"Drag & drop files here, or",openResponseDropZoneBrowse:"browse",openResponseUploading:"Uploading\u2026",openResponseNoSubmission:"No submission",openResponseFile:"File",openResponseAttachFile:"Attach a file",openResponseAttachFiles:"Attach files",openResponseAttachedFiles:"Attached files",openResponseTypeImage:"Image",openResponseTypePdf:"PDF",openResponseTypeAudio:"Audio",openResponseTypeVideo:"Video",openResponseTypeVideoLink:"Video link",openResponseVideoLinkPlaceholder:"Paste YouTube or Vimeo URL\u2026",openResponseAddVideoLink:"Add",openResponseTapToRecord:"Tap to start recording",openResponseTapToRecordScreen:"Click to start screen recording",openResponseRequestingPermission:"Requesting permission\u2026",openResponsePermissionDenied:"Microphone/camera access denied. Please allow access in your browser settings.",openResponseMediaHandlerRequired:"A media handler is required to save recordings.",openResponseStopRecording:"Stop",openResponseReRecord:"Re-record",openResponseConfirmRecording:"Use this recording",openResponseRecordingSubmitted:"Recording submitted",openResponseAwaitingReview:"Submitted, awaiting teacher review",openResponseTeacherFeedbackLabel:"Teacher feedback",openResponseGradeThisResponse:"Grade this response",openResponseGradeScoreLabel:e=>`Score (max ${e})`,openResponseGradeFeedbackLabel:"Feedback (optional)",openResponseGradeFeedbackPlaceholder:"Add feedback for the student\u2026",openResponseSubmitGrade:"Submit Grade",openResponseGradeSubmitted:(e,t)=>`Grade submitted: ${e} / ${t}`,openResponseRubricTitle:"Rubric",openResponseRubricCriterionPoints:(e,t)=>`${e} / ${t} pts`,openResponseAiSuggestionTitle:"AI Pre-grading Suggestion",openResponseAiSuggestedScore:(e,t)=>`Suggested score: ${e} / ${t}`,openResponseAiEvidence:"Evidence:",openResponseAiApplySuggestion:"Apply suggestion",openResponseStudentAnswerTitle:"Student answer",audioPlay:"Play",audioPause:"Pause",audioReplay:"Play again",audioSpeed:e=>`Speed ${e}`,audioRate:e=>`${e}\xD7`,audioPosition:"Position in the audio",audioTimeOf:(e,t)=>`${e} of ${t}`,audioPlaysLeft:e=>e===1?"1 play left":`${e} plays left`,audioNoPlaysLeft:"No plays left",audioUnavailable:"This audio can't be played.",recorderUpTo:e=>`Up to ${e}`,recorderRecord:"Record",recorderRecordingAria:"Recording",recorderSaving:e=>`Saving ${e}%`,recorderSaved:"Saved",recorderRecordAgain:"Record again",recorderCancel:"Cancel",recorderFailed:"Your recording wasn't saved. Check your connection.",recorderRetry:"Try again",recorderUnsupported:"This browser can't record. Try an up-to-date Chrome, Safari or Firefox.",recorderUnavailableHere:"Recording isn't available here.",recorderNone:"No recording"};var w6={submitButton:"Valider",showHint:"Voir l'indice",clickToRemove:"Cliquer pour retirer",blankAnswerAria:"Votre r\xE9ponse",aiEvaluationInProgress:"\xC9valuation IA en cours\u2026",aiEvaluationInProgressAria:"\xC9valuation IA en cours",shortAnswerPlaceholder:"R\xE9ponse courte\u2026",longAnswerPlaceholder:"\xC9crivez votre r\xE9ponse ici\u2026",minWordsLabel:e=>`Min. : ${e}`,wordBank:"Banque de mots",chooseN:e=>`(choisir ${e})`,annexDefaultLabel:"Documents",annexOpen:e=>`Ouvrir ${e}`,annexClose:"Fermer",referenceInPanel:e=>`Le texte de cet exercice est dans \xAB ${e} \xBB.`,readReference:"Le lire",referenceForExercise:e=>`Exercice ${e}`,choiceLetters:"ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),tableScrollLeft:"Voir les colonnes de gauche",tableScrollRight:"Voir les colonnes de droite",mathChecking:"V\xE9rification de votre r\xE9ponse\u2026",mathCorrect:"Juste",mathIncorrect:"Faux",openResponseTextPlaceholder:"\xC9crivez votre r\xE9ponse ici\u2026",openResponseWords:"mots",openResponseChars:"car.",openResponseDropZoneLabel:"Glissez-d\xE9posez des fichiers ici, ou",openResponseDropZoneBrowse:"parcourir",openResponseUploading:"Envoi en cours\u2026",openResponseNoSubmission:"Aucun fichier d\xE9pos\xE9",openResponseFile:"Fichier",openResponseAttachFile:"Joindre un fichier",openResponseAttachFiles:"Joindre des fichiers",openResponseAttachedFiles:"Fichiers joints",openResponseTypeImage:"Image",openResponseTypePdf:"PDF",openResponseTypeAudio:"Audio",openResponseTypeVideo:"Vid\xE9o",openResponseTypeVideoLink:"Lien vid\xE9o",openResponseVideoLinkPlaceholder:"Coller un lien YouTube ou Vimeo\u2026",openResponseAddVideoLink:"Ajouter",openResponseTapToRecord:"Appuyer pour d\xE9marrer l'enregistrement",openResponseTapToRecordScreen:"Cliquer pour d\xE9marrer l'enregistrement d'\xE9cran",openResponseRequestingPermission:"Demande d'autorisation\u2026",openResponsePermissionDenied:"Acc\xE8s au micro ou \xE0 la cam\xE9ra refus\xE9. Autorisez-le dans les r\xE9glages du navigateur.",openResponseMediaHandlerRequired:"Un gestionnaire de m\xE9dias est requis pour sauvegarder les enregistrements.",openResponseStopRecording:"Arr\xEAter",openResponseReRecord:"R\xE9enregistrer",openResponseConfirmRecording:"Utiliser cet enregistrement",openResponseRecordingSubmitted:"Enregistrement soumis",openResponseAwaitingReview:"Soumis, en attente de correction par l'enseignant",openResponseTeacherFeedbackLabel:"Commentaire de l'enseignant",openResponseGradeThisResponse:"Corriger cette r\xE9ponse",openResponseGradeScoreLabel:e=>`Note (max ${e})`,openResponseGradeFeedbackLabel:"Commentaire (facultatif)",openResponseGradeFeedbackPlaceholder:"Ajouter un commentaire pour l'\xE9l\xE8ve\u2026",openResponseSubmitGrade:"Valider la note",openResponseGradeSubmitted:(e,t)=>`Note envoy\xE9e : ${e} / ${t}`,openResponseRubricTitle:"Grille d'\xE9valuation",openResponseRubricCriterionPoints:(e,t)=>`${e} / ${t} pts`,openResponseAiSuggestionTitle:"Suggestion de correction par IA",openResponseAiSuggestedScore:(e,t)=>`Score sugg\xE9r\xE9 : ${e} / ${t}`,openResponseAiEvidence:"Extrait :",openResponseAiApplySuggestion:"Appliquer la suggestion",openResponseStudentAnswerTitle:"R\xE9ponse de l'\xE9l\xE8ve",audioPlay:"\xC9couter",audioPause:"Pause",audioReplay:"R\xE9\xE9couter",audioSpeed:e=>`Vitesse ${e}`,audioRate:e=>`${String(e).replace(".",",")}\xD7`,audioPosition:"Position dans l'audio",audioTimeOf:(e,t)=>`${e} sur ${t}`,audioPlaysLeft:e=>e===1?"1 \xE9coute restante":`${e} \xE9coutes restantes`,audioNoPlaysLeft:"Plus d'\xE9coute restante",audioUnavailable:"Impossible de lire cet audio.",recorderUpTo:e=>`Jusqu'\xE0 ${e}`,recorderRecord:"Enregistrer",recorderRecordingAria:"Enregistrement en cours",recorderSaving:e=>`Envoi ${e}\u202F%`,recorderSaved:"Enregistr\xE9",recorderRecordAgain:"Recommencer",recorderCancel:"Annuler",recorderFailed:"Votre enregistrement n'a pas \xE9t\xE9 envoy\xE9. V\xE9rifiez votre connexion.",recorderRetry:"R\xE9essayer",recorderUnsupported:"Ce navigateur ne peut pas enregistrer. Essayez Chrome, Safari ou Firefox \xE0 jour.",recorderUnavailableHere:"L'enregistrement n'est pas disponible ici.",recorderNone:"Aucun enregistrement"};var k6={submitButton:"\u0625\u0631\u0633\u0627\u0644",showHint:"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u062A\u0644\u0645\u064A\u062D",clickToRemove:"\u0627\u0646\u0642\u0631 \u0644\u0644\u0625\u0632\u0627\u0644\u0629",blankAnswerAria:"\u0625\u062C\u0627\u0628\u062A\u0643",aiEvaluationInProgress:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0642\u064A\u064A\u0645 \u0628\u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064A\u2026",aiEvaluationInProgressAria:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0642\u064A\u064A\u0645 \u0628\u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064A",shortAnswerPlaceholder:"\u0625\u062C\u0627\u0628\u0629 \u0642\u0635\u064A\u0631\u0629\u2026",longAnswerPlaceholder:"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0647\u0646\u0627\u2026",minWordsLabel:e=>`\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649: ${e}`,wordBank:"\u0628\u0646\u0643 \u0627\u0644\u0643\u0644\u0645\u0627\u062A",chooseN:e=>`(\u0627\u062E\u062A\u0631 ${e})`,annexDefaultLabel:"\u0627\u0644\u0645\u0633\u062A\u0646\u062F\u0627\u062A",annexOpen:e=>`\u0641\u062A\u062D ${e}`,annexClose:"\u0625\u063A\u0644\u0627\u0642",referenceInPanel:e=>`\u0646\u0635 \u0647\u0630\u0627 \u0627\u0644\u062A\u0645\u0631\u064A\u0646 \u0641\u064A \xAB${e}\xBB.`,readReference:"\u0627\u0642\u0631\u0623\u0647",referenceForExercise:e=>`\u0627\u0644\u062A\u0645\u0631\u064A\u0646 ${e}`,choiceLetters:["\u0623","\u0628","\u062C","\u062F","\u0647\u0640","\u0648","\u0632","\u062D","\u0637","\u064A","\u0643","\u0644","\u0645","\u0646","\u0633","\u0639","\u0641","\u0635","\u0642","\u0631","\u0634","\u062A","\u062B","\u062E","\u0630","\u0636","\u0638","\u063A"],tableScrollLeft:"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u0623\u0639\u0645\u062F\u0629 \u0639\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",tableScrollRight:"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u0623\u0639\u0645\u062F\u0629 \u0639\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",mathChecking:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0642\u0642 \u0645\u0646 \u0625\u062C\u0627\u0628\u062A\u0643\u2026",mathCorrect:"\u0635\u062D\u064A\u062D",mathIncorrect:"\u062E\u0637\u0623",openResponseTextPlaceholder:"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0647\u0646\u0627\u2026",openResponseWords:"\u0643\u0644\u0645\u0629",openResponseChars:"\u062D\u0631\u0641",openResponseDropZoneLabel:"\u0627\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0648\u0623\u0641\u0644\u062A\u0647\u0627 \u0647\u0646\u0627\u060C \u0623\u0648",openResponseDropZoneBrowse:"\u062A\u0635\u0641\u0651\u062D",openResponseUploading:"\u062C\u0627\u0631\u064D \u0627\u0644\u0631\u0641\u0639\u2026",openResponseNoSubmission:"\u0644\u0627 \u064A\u0648\u062C\u062F \u062A\u0633\u0644\u064A\u0645",openResponseFile:"\u0645\u0644\u0641",openResponseAttachFile:"\u0625\u0631\u0641\u0627\u0642 \u0645\u0644\u0641",openResponseAttachFiles:"\u0625\u0631\u0641\u0627\u0642 \u0645\u0644\u0641\u0627\u062A",openResponseAttachedFiles:"\u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0627\u0644\u0645\u0631\u0641\u0642\u0629",openResponseTypeImage:"\u0635\u0648\u0631\u0629",openResponseTypePdf:"PDF",openResponseTypeAudio:"\u0635\u0648\u062A",openResponseTypeVideo:"\u0641\u064A\u062F\u064A\u0648",openResponseTypeVideoLink:"\u0631\u0627\u0628\u0637 \u0641\u064A\u062F\u064A\u0648",openResponseVideoLinkPlaceholder:"\u0627\u0644\u0635\u0642 \u0631\u0627\u0628\u0637 \u064A\u0648\u062A\u064A\u0648\u0628 \u0623\u0648 Vimeo\u2026",openResponseAddVideoLink:"\u0625\u0636\u0627\u0641\u0629",openResponseTapToRecord:"\u0627\u0646\u0642\u0631 \u0644\u0628\u062F\u0621 \u0627\u0644\u062A\u0633\u062C\u064A\u0644",openResponseTapToRecordScreen:"\u0627\u0646\u0642\u0631 \u0644\u0628\u062F\u0621 \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u0634\u0627\u0634\u0629",openResponseRequestingPermission:"\u062C\u0627\u0631\u064D \u0637\u0644\u0628 \u0627\u0644\u0625\u0630\u0646\u2026",openResponsePermissionDenied:"\u062A\u0645 \u0631\u0641\u0636 \u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u0627\u0644\u0645\u064A\u0643\u0631\u0648\u0641\u0648\u0646/\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627. \u064A\u064F\u0631\u062C\u0649 \u0627\u0644\u0633\u0645\u0627\u062D \u0628\u0627\u0644\u0648\u0635\u0648\u0644 \u0645\u0646 \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0645\u062A\u0635\u0641\u062D.",openResponseMediaHandlerRequired:"\u064A\u0644\u0632\u0645 \u0645\u0639\u0627\u0644\u062C \u0648\u0633\u0627\u0626\u0637 \u0644\u062D\u0641\u0638 \u0627\u0644\u062A\u0633\u062C\u064A\u0644\u0627\u062A.",openResponseStopRecording:"\u0625\u064A\u0642\u0627\u0641",openResponseReRecord:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u062A\u0633\u062C\u064A\u0644",openResponseConfirmRecording:"\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0647\u0630\u0627 \u0627\u0644\u062A\u0633\u062C\u064A\u0644",openResponseRecordingSubmitted:"\u062A\u0645 \u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u062A\u0633\u062C\u064A\u0644",openResponseAwaitingReview:"\u062A\u0645 \u0627\u0644\u0625\u0631\u0633\u0627\u0644\u060C \u0641\u064A \u0627\u0646\u062A\u0638\u0627\u0631 \u0645\u0631\u0627\u062C\u0639\u0629 \u0627\u0644\u0645\u0639\u0644\u0645",openResponseTeacherFeedbackLabel:"\u0645\u0644\u0627\u062D\u0638\u0627\u062A \u0627\u0644\u0645\u0639\u0644\u0645",openResponseGradeThisResponse:"\u062A\u0635\u062D\u064A\u062D \u0647\u0630\u0647 \u0627\u0644\u0625\u062C\u0627\u0628\u0629",openResponseGradeScoreLabel:e=>`\u0627\u0644\u062F\u0631\u062C\u0629 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 ${e})`,openResponseGradeFeedbackLabel:"\u0645\u0644\u0627\u062D\u0638\u0627\u062A (\u0627\u062E\u062A\u064A\u0627\u0631\u064A)",openResponseGradeFeedbackPlaceholder:"\u0623\u0636\u0641 \u0645\u0644\u0627\u062D\u0638\u0627\u062A \u0644\u0644\u0637\u0627\u0644\u0628\u2026",openResponseSubmitGrade:"\u0627\u0639\u062A\u0645\u0627\u062F \u0627\u0644\u062F\u0631\u062C\u0629",openResponseGradeSubmitted:(e,t)=>`\u062A\u0645 \u0627\u0639\u062A\u0645\u0627\u062F \u0627\u0644\u062F\u0631\u062C\u0629: ${e} / ${t}`,openResponseRubricTitle:"\u0633\u0644\u0651\u0645 \u0627\u0644\u062A\u0635\u062D\u064A\u062D",openResponseRubricCriterionPoints:(e,t)=>`${e} / ${t} \u0646\u0642\u0637\u0629`,openResponseAiSuggestionTitle:"\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u062A\u0635\u062D\u064A\u062D \u0627\u0644\u0645\u0633\u0628\u0642 \u0628\u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064A",openResponseAiSuggestedScore:(e,t)=>`\u0627\u0644\u062F\u0631\u062C\u0629 \u0627\u0644\u0645\u0642\u062A\u0631\u062D\u0629: ${e} / ${t}`,openResponseAiEvidence:"\u0627\u0644\u0623\u062F\u0644\u0629:",openResponseAiApplySuggestion:"\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D",openResponseStudentAnswerTitle:"\u0625\u062C\u0627\u0628\u0629 \u0627\u0644\u0637\u0627\u0644\u0628",audioPlay:"\u062A\u0634\u063A\u064A\u0644",audioPause:"\u0625\u064A\u0642\u0627\u0641 \u0645\u0624\u0642\u062A",audioReplay:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0627\u0633\u062A\u0645\u0627\u0639",audioSpeed:e=>`\u0627\u0644\u0633\u0631\u0639\u0629 ${e}`,audioRate:e=>`${e}\xD7`,audioPosition:"\u0627\u0644\u0645\u0648\u0636\u0639 \u0641\u064A \u0627\u0644\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",audioTimeOf:(e,t)=>`${e} \u0645\u0646 ${t}`,audioPlaysLeft:e=>e===1?"\u0628\u0642\u064A \u0627\u0633\u062A\u0645\u0627\u0639 \u0648\u0627\u062D\u062F":e===2?"\u0628\u0642\u064A \u0627\u0633\u062A\u0645\u0627\u0639\u0627\u0646":`\u0628\u0642\u064A\u062A ${e} \u0627\u0633\u062A\u0645\u0627\u0639\u0627\u062A`,audioNoPlaysLeft:"\u0644\u0645 \u064A\u0628\u0642 \u0623\u064A \u0627\u0633\u062A\u0645\u0627\u0639",audioUnavailable:"\u062A\u0639\u0630\u0631 \u062A\u0634\u063A\u064A\u0644 \u0647\u0630\u0627 \u0627\u0644\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u0635\u0648\u062A\u064A.",recorderUpTo:e=>`\u062D\u062A\u0649 ${e}`,recorderRecord:"\u062A\u0633\u062C\u064A\u0644",recorderRecordingAria:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0633\u062C\u064A\u0644",recorderSaving:e=>`\u062C\u0627\u0631\u064D \u0627\u0644\u0625\u0631\u0633\u0627\u0644 ${e}\u066A`,recorderSaved:"\u062A\u0645 \u0627\u0644\u062D\u0641\u0638",recorderRecordAgain:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u062A\u0633\u062C\u064A\u0644",recorderCancel:"\u0625\u0644\u063A\u0627\u0621",recorderFailed:"\u0644\u0645 \u064A\u062A\u0645 \u0625\u0631\u0633\u0627\u0644 \u062A\u0633\u062C\u064A\u0644\u0643. \u062A\u062D\u0642\u0642 \u0645\u0646 \u0627\u062A\u0635\u0627\u0644\u0643.",recorderRetry:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",recorderUnsupported:"\u0644\u0627 \u064A\u0645\u0643\u0646 \u0644\u0647\u0630\u0627 \u0627\u0644\u0645\u062A\u0635\u0641\u062D \u0627\u0644\u062A\u0633\u062C\u064A\u0644. \u062C\u0631\u0651\u0628 \u0625\u0635\u062F\u0627\u0631\u064B\u0627 \u062D\u062F\u064A\u062B\u064B\u0627 \u0645\u0646 Chrome \u0623\u0648 Safari \u0623\u0648 Firefox.",recorderUnavailableHere:"\u0627\u0644\u062A\u0633\u062C\u064A\u0644 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D \u0647\u0646\u0627.",recorderNone:"\u0644\u0627 \u064A\u0648\u062C\u062F \u062A\u0633\u062C\u064A\u0644"};var yoe={en:K1,fr:w6,ar:k6},IC=(0,l2.createContext)(null);function Yn(){var e;return(e=(0,l2.useContext)(IC))!=null?e:K1}function u2(e){let t=(0,l2.useContext)(IC);return e&&yoe[e]||t||K1}function c2({locale:e,children:t}){let r=u2(e);return(0,AP.jsx)(IC.Provider,{value:r,children:t})}var LP=(0,mn.createContext)(null);function S6({initial:e,onChange:t,children:r}){let n=(0,mn.useRef)(te({},e!=null?e:{})),a=(0,mn.useRef)(t);a.current=t;let i=(0,mn.useMemo)(()=>({get:o=>{var s;return(s=n.current[o])!=null?s:0},set:(o,s)=>{var l;n.current=Ue(te({},n.current),{[o]:s}),(l=a.current)==null||l.call(a,n.current)}}),[]);return(0,Ti.jsx)(LP.Provider,{value:i,children:r})}var zC=[.75,1,1.25,1.5],BC=.5;function V1(e){if(!Number.isFinite(e)||e<0)return"0:00";let t=Math.round(e);return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}var RC="edpire:audio-play";function Nu({src:e,maxPlays:t,learnerSpeed:r,speed:n,allowSeek:a,durationHint:i,playsKey:o,playsUsed:s,onPlaysUsedChange:l,disabled:u=!1,label:c,className:f}){let d=Yn(),p=(0,mn.useContext)(LP),y=o!=null?o:e,x=t&&t>0?Math.floor(t):0,k=a!==!1,w=r!==!1,S=n&&n>=.25&&n<=4?n:1,T=(0,mn.useRef)(null),E=(0,mn.useRef)(null),[z,N]=(0,mn.useState)(!1),[O,H]=(0,mn.useState)(0),[U,J]=(0,mn.useState)(i&&i>0?i:0),[K,Y]=(0,mn.useState)(!1),[ye,se]=(0,mn.useState)(!1),[ue,Se]=(0,mn.useState)(S),[Me,de]=(0,mn.useState)(()=>{var De;return(De=s!=null?s:p==null?void 0:p.get(y))!=null?De:0}),Re=(0,mn.useRef)(!1),it=(0,mn.useRef)(!1);(0,mn.useEffect)(()=>{s!==void 0&&de(s)},[s]),(0,mn.useEffect)(()=>Se(S),[S]),(0,mn.useEffect)(()=>{T.current&&(T.current.playbackRate=ue)},[ue]),(0,mn.useEffect)(()=>{se(!1),Y(!1),H(0),N(!1),Re.current=!1,i&&i>0||J(0);let De=T.current;De&&De.readyState>=1&&Number.isFinite(De.duration)&&De.duration>0&&J(De.duration)},[e]),(0,mn.useEffect)(()=>{let De=ot=>{let Lt=T.current;Lt&&ot.detail!==Lt&&!Lt.paused&&Lt.pause()};return window.addEventListener(RC,De),()=>window.removeEventListener(RC,De)},[]);let Ie=x>0&&Me>=x&&!Re.current,Oe=x>0?Math.max(0,x-Me):null,me=u||ye||Ie,be=(0,mn.useCallback)(()=>{if(x===0)return!0;if(Me>=x)return!1;let De=Me+1;return de(De),Re.current=!0,s===void 0&&(p==null||p.set(y,De)),l==null||l(De),!0},[x,Me,s,p,y,l]),qe=(0,mn.useCallback)(()=>{let De=T.current;if(!De||u||ye)return;if(!De.paused){De.pause();return}(K||De.currentTime<BC)&&!Re.current&&!be()||((K||De.currentTime>=(De.duration||1/0))&&(De.currentTime=0),Y(!1),De.playbackRate=ue,window.dispatchEvent(new CustomEvent(RC,{detail:De})),De.play().catch(()=>N(!1)))},[u,ye,K,be,ue]),Ke=U>0?U:0,je=Ke>0?Math.min(1,O/Ke):0,Ye=(0,mn.useCallback)(De=>{let ot=T.current;if(!ot||!k||me||Ke===0)return;let Lt=Math.max(0,Math.min(Ke,De));if(x>0&&Lt<BC&&O>=BC&&Re.current&&(Re.current=!1,!ot.paused&&!be())){ot.pause();return}ot.currentTime=Lt,H(Lt),Y(!1)},[k,me,Ke,x,O,be]),mt=De=>{let ot=E.current;if(!ot)return 0;let Lt=ot.getBoundingClientRect(),tt=getComputedStyle(ot).direction==="rtl"?(Lt.right-De)/Lt.width:(De-Lt.left)/Lt.width;return Math.max(0,Math.min(1,tt))},At=De=>{!k||me||Ke===0||(De.preventDefault(),it.current=!0,De.currentTarget.setPointerCapture(De.pointerId),Ye(mt(De.clientX)*Ke))},zt=De=>{it.current&&Ye(mt(De.clientX)*Ke)},Ht=()=>{it.current=!1},Yr=De=>{if(!k||me||Ke===0)return;let ot=E.current?getComputedStyle(E.current).direction==="rtl":!1,Lt=5,ft=null;De.key==="ArrowRight"?ft=O+(ot?-Lt:Lt):De.key==="ArrowLeft"?ft=O+(ot?Lt:-Lt):De.key==="ArrowUp"?ft=O+Lt:De.key==="ArrowDown"?ft=O-Lt:De.key==="Home"?ft=0:De.key==="End"&&(ft=Ke),ft!==null&&(De.preventDefault(),Ye(ft))},Hr=()=>{var ot;let De=zC.indexOf(ue);Se((ot=zC[(De+1)%zC.length])!=null?ot:1)},xt=(z||O>0)&&!K&&Ke>0,Ut=V1(xt?Ke-O:Ke),wr=z?(0,Ti.jsx)(o2,{size:18,fill:"currentColor",strokeWidth:0,"aria-hidden":!0}):K&&!Ie?(0,Ti.jsx)(up,{size:18,"aria-hidden":!0}):(0,Ti.jsx)(lp,{size:18,fill:"currentColor",strokeWidth:0,"aria-hidden":!0,style:{marginInlineStart:2}}),et=z?d.audioPause:K?d.audioReplay:d.audioPlay;return(0,Ti.jsxs)("span",{role:"group","aria-label":c,className:`edp-audio${me?" edp-audio--off":""}${f?` ${f}`:""}`,"data-audio-player":"",children:[(0,Ti.jsxs)("span",{className:"edp-audio-bar",children:[(0,Ti.jsx)("button",{type:"button",className:"edp-audio-play",onClick:qe,disabled:me,"aria-label":et,children:wr}),(0,Ti.jsxs)("span",{ref:E,className:`edp-audio-track${k&&!me?" edp-audio-track--seek":""}`,role:"slider",tabIndex:k&&!me?0:-1,"aria-label":d.audioPosition,"aria-valuemin":0,"aria-valuemax":Math.round(Ke),"aria-valuenow":Math.round(O),"aria-valuetext":d.audioTimeOf(V1(O),V1(Ke)),"aria-disabled":!k||me,onPointerDown:At,onPointerMove:zt,onPointerUp:Ht,onPointerCancel:Ht,onKeyDown:Yr,children:[(0,Ti.jsx)("span",{className:"edp-audio-rail",children:(0,Ti.jsx)("span",{className:"edp-audio-fill",style:{width:`${je*100}%`}})}),k&&!me&&Ke>0&&(0,Ti.jsx)("span",{className:"edp-audio-thumb",style:{insetInlineStart:`${je*100}%`}})]}),(0,Ti.jsx)("span",{className:"edp-audio-time",dir:"ltr",children:Ut}),w&&!ye&&(0,Ti.jsx)("button",{type:"button",className:"edp-audio-speed",dir:"ltr",onClick:Hr,disabled:u,"aria-label":d.audioSpeed(d.audioRate(ue)),children:d.audioRate(ue)})]}),(ye||Oe!==null)&&(0,Ti.jsx)("span",{className:"edp-audio-note","aria-live":"polite",children:(0,Ti.jsx)("bdi",{children:ye?d.audioUnavailable:Oe===0&&!Re.current?d.audioNoPlaysLeft:d.audioPlaysLeft(Oe!=null?Oe:0)})}),(0,Ti.jsx)("audio",{ref:T,src:e||void 0,preload:"metadata",onLoadedMetadata:De=>{let ot=De.currentTarget;ot.playbackRate=ue,Number.isFinite(ot.duration)&&ot.duration>0?J(ot.duration):boe(ot,Lt=>J(ft=>ft>0?ft:Lt))},onDurationChange:De=>{let ot=De.currentTarget.duration;Number.isFinite(ot)&&ot>0&&J(ot)},onTimeUpdate:De=>{it.current||H(De.currentTarget.currentTime)},onPlay:()=>N(!0),onPause:()=>N(!1),onEnded:()=>{N(!1),Y(!0),Re.current=!1,H(Ke)},onError:()=>{e&&se(!0)}})]})}function boe(e,t){let r=()=>{e.removeEventListener("timeupdate",r),Number.isFinite(e.duration)&&e.duration>0&&t(e.duration),e.currentTime=0};e.addEventListener("timeupdate",r);try{e.currentTime=1e101}catch(n){e.removeEventListener("timeupdate",r)}}var ns=class e{constructor(t,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new e(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}},Bs=class e{constructor(t,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=r}range(t,r){return new e(r,ns.range(this,t))}},ct=class e{constructor(t,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+t,a,i,o=r&&r.loc;if(o&&o.start<=o.end){var s=o.lexer.input;a=o.start,i=o.end,a===s.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var l=s.slice(a,i).replace(/[^]/g,"$&\u0332"),u;a>15?u="\u2026"+s.slice(a-15,a):u=s.slice(0,a);var c;i+15<s.length?c=s.slice(i,i+15)+"\u2026":c=s.slice(i),n+=u+l+c}var f=new Error(n);return f.name="ParseError",f.__proto__=e.prototype,f.position=a,a!=null&&i!=null&&(f.length=i-a),f.rawMessage=t,f}};ct.prototype.__proto__=Error.prototype;var xoe=function(t,r){return t===void 0?r:t},voe=/([A-Z])/g,woe=function(t){return t.replace(voe,"-$1").toLowerCase()},koe={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Soe=/[&><"']/g;function Coe(e){return String(e).replace(Soe,t=>koe[t])}var oF=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},Moe=function(t){var r=oF(t);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},_oe=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},Aoe=function(t){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},nn={deflt:xoe,escape:Coe,hyphenate:woe,getBaseElem:oF,isCharacterBox:Moe,protocolFromUrl:Aoe},R6={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Loe(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var m2=class{constructor(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var r in R6)if(R6.hasOwnProperty(r)){var n=R6[r];this[r]=t[r]!==void 0?n.processor?n.processor(t[r]):t[r]:Loe(n)}}reportNonstrict(t,r,n){var a=this.strict;if(typeof a=="function"&&(a=a(t,r,n)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new ct("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);a==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var a=this.strict;if(typeof a=="function")try{a=a(t,r,n)}catch(i){a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if(t.url&&!t.protocol){var r=nn.protocolFromUrl(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}},Ou=class{constructor(t,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=n}sup(){return Pu[Toe[this.id]]}sub(){return Pu[Eoe[this.id]]}fracNum(){return Pu[Doe[this.id]]}fracDen(){return Pu[Ioe[this.id]]}cramp(){return Pu[zoe[this.id]]}text(){return Pu[Boe[this.id]]}isTight(){return this.size>=2}},sM=0,O6=1,W1=2,Zc=3,g2=4,hl=5,X1=6,Lo=7,Pu=[new Ou(sM,0,!1),new Ou(O6,0,!0),new Ou(W1,1,!1),new Ou(Zc,1,!0),new Ou(g2,2,!1),new Ou(hl,2,!0),new Ou(X1,3,!1),new Ou(Lo,3,!0)],Toe=[g2,hl,g2,hl,X1,Lo,X1,Lo],Eoe=[hl,hl,hl,hl,Lo,Lo,Lo,Lo],Doe=[W1,Zc,g2,hl,X1,Lo,X1,Lo],Ioe=[Zc,Zc,hl,hl,Lo,Lo,Lo,Lo],zoe=[O6,O6,Zc,Zc,hl,hl,Lo,Lo],Boe=[sM,O6,W1,Zc,W1,Zc,W1,Zc],Zt={DISPLAY:Pu[sM],TEXT:Pu[W1],SCRIPT:Pu[g2],SCRIPTSCRIPT:Pu[X1]},XC=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Roe(e){for(var t=0;t<XC.length;t++)for(var r=XC[t],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(e>=a[0]&&e<=a[1])return r.name}return null}var N6=[];XC.forEach(e=>e.blocks.forEach(t=>N6.push(...t)));function sF(e){for(var t=0;t<N6.length;t+=2)if(e>=N6[t]&&e<=N6[t+1])return!0;return!1}var G1=80,Noe=function(t,r){return"M95,"+(622+t+r)+`
3646
+ `},_te=kte(Zxe)(Ate),Lte={config:Yxe}});var Ete,Dte=wt(()=>{"use strict";Ete=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(a){return r.reduceRight(function(i,o){return o(i)},a)}}});function eI(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],eI(e[r],t[r]))}),ZD(ZD({},e),t)}var Ite=wt(()=>{"use strict";QD()});function J9(e){var t=!1,r=new Promise(function(n,a){e.then(function(i){return t?a(Qxe):n(i)}),e.catch(a)});return r.cancel=function(){return t=!0},r}var Qxe,zte=wt(()=>{"use strict";Qxe={type:"cancelation",msg:"operation is manually canceled"}});function rve(e){var t=Lte.config(e),r=t.monaco,n=hte(t,eve);Z9(function(a){return{config:eI(a.config,n),monaco:r}})}function nve(){var e=yb(function(t){var r=t.monaco,n=t.isInitialized,a=t.resolve;return{monaco:r,isInitialized:n,resolve:a}});if(!e.isInitialized){if(Z9({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),J9(tI);if(window.monaco&&window.monaco.editor)return Rte(window.monaco),e.resolve(window.monaco),J9(tI);Ete(ave,ove)(sve)}return J9(tI)}function ave(e){return document.body.appendChild(e)}function ive(e){var t=document.createElement("script");return e&&(t.src=e),t}function ove(e){var t=yb(function(n){var a=n.config,i=n.reject;return{config:a,reject:i}}),r=ive("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function sve(){var e=yb(function(r){var n=r.config,a=r.resolve,i=r.reject;return{config:n,resolve:a,reject:i}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var n=r.m||r;Rte(n),e.resolve(n)},function(r){e.reject(r)})}function Rte(e){yb().monaco||Z9({monaco:e})}function lve(){return yb(function(e){var t=e.monaco;return t})}var eve,tve,Bte,yb,Z9,tI,vc,Nte=wt(()=>{"use strict";QD();xte();wte();Tte();Dte();Ite();zte();eve=["monaco"],tve=bte.create({config:vte,isInitialized:!1,resolve:null,reject:null,monaco:null}),Bte=mte(tve,2),yb=Bte[0],Z9=Bte[1];tI=new Promise(function(e,t){return Z9({resolve:e,reject:t})}),vc={config:rve,init:nve,__getMonacoInstance:lve}});var bb=wt(()=>{"use strict";Nte()});var Vte={};Pb(Vte,{DiffEditor:()=>Sve,Editor:()=>Kte,default:()=>Eve,loader:()=>vc,useMonaco:()=>Mve});function fve({children:e}){return Fte.default.createElement("div",{style:dve.container},e)}function mve({width:e,height:t,isEditorReady:r,loading:n,_ref:a,className:i,wrapperProps:o}){return ew.default.createElement("section",te({style:Ue(te({},rI.wrapper),{width:e,height:t})},o),!r&&ew.default.createElement(hve,null,n),ew.default.createElement("div",{ref:a,style:te(te({},rI.fullWidth),!r&&rI.hide),className:i}))}function yve(e){(0,$te.useEffect)(e,[])}function bve(e,t,r=!0){let n=(0,tw.useRef)(!0);(0,tw.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)}function xb(){}function Ag(e,t,r,n){return xve(e,n)||vve(e,t,r,n)}function xve(e,t){return e.editor.getModel(Hte(e,t))}function vve(e,t,r,n){return e.editor.createModel(t,r,n?Hte(e,n):void 0)}function Hte(e,t){return e.Uri.parse(t)}function wve({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:a,originalModelPath:i,modifiedModelPath:o,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:u="light",loading:c="Loading...",options:f={},height:d="100%",width:p="100%",className:y,wrapperProps:x={},beforeMount:k=xb,onMount:w=xb}){let[S,T]=(0,Ni.useState)(!1),[E,z]=(0,Ni.useState)(!0),N=(0,Ni.useRef)(null),O=(0,Ni.useRef)(null),H=(0,Ni.useRef)(null),U=(0,Ni.useRef)(w),J=(0,Ni.useRef)(k),K=(0,Ni.useRef)(!1);nI(()=>{let ue=vc.init();return ue.then(Se=>(O.current=Se)&&z(!1)).catch(Se=>(Se==null?void 0:Se.type)!=="cancelation"&&console.error("Monaco initialization: error:",Se)),()=>N.current?se():ue.cancel()}),Js(()=>{if(N.current&&O.current){let ue=N.current.getOriginalEditor(),Se=Ag(O.current,e||"",n||r||"text",i||"");Se!==ue.getModel()&&ue.setModel(Se)}},[i],S),Js(()=>{if(N.current&&O.current){let ue=N.current.getModifiedEditor(),Se=Ag(O.current,t||"",a||r||"text",o||"");Se!==ue.getModel()&&ue.setModel(Se)}},[o],S),Js(()=>{let ue=N.current.getModifiedEditor();ue.getOption(O.current.editor.EditorOption.readOnly)?ue.setValue(t||""):t!==ue.getValue()&&(ue.executeEdits("",[{range:ue.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),ue.pushUndoStop())},[t],S),Js(()=>{var ue,Se;(Se=(ue=N.current)==null?void 0:ue.getModel())==null||Se.original.setValue(e||"")},[e],S),Js(()=>{let{original:ue,modified:Se}=N.current.getModel();O.current.editor.setModelLanguage(ue,n||r||"text"),O.current.editor.setModelLanguage(Se,a||r||"text")},[r,n,a],S),Js(()=>{var ue;(ue=O.current)==null||ue.editor.setTheme(u)},[u],S),Js(()=>{var ue;(ue=N.current)==null||ue.updateOptions(f)},[f],S);let Y=(0,Ni.useCallback)(()=>{var Me;if(!O.current)return;J.current(O.current);let ue=Ag(O.current,e||"",n||r||"text",i||""),Se=Ag(O.current,t||"",a||r||"text",o||"");(Me=N.current)==null||Me.setModel({original:ue,modified:Se})},[r,t,a,e,n,i,o]),ye=(0,Ni.useCallback)(()=>{var ue;!K.current&&H.current&&(N.current=O.current.editor.createDiffEditor(H.current,te({automaticLayout:!0},f)),Y(),(ue=O.current)==null||ue.editor.setTheme(u),T(!0),K.current=!0)},[f,u,Y]);(0,Ni.useEffect)(()=>{S&&U.current(N.current,O.current)},[S]),(0,Ni.useEffect)(()=>{!E&&!S&&ye()},[E,S,ye]);function se(){var Se,Me,de,Re;let ue=(Se=N.current)==null?void 0:Se.getModel();s||((Me=ue==null?void 0:ue.original)==null||Me.dispose()),l||((de=ue==null?void 0:ue.modified)==null||de.dispose()),(Re=N.current)==null||Re.dispose()}return Ni.default.createElement(qte,{width:p,height:d,isEditorReady:S,loading:c,_ref:H,className:y,wrapperProps:x})}function Cve(){let[e,t]=(0,jte.useState)(vc.__getMonacoInstance());return nI(()=>{let r;return e||(r=vc.init(),r.then(n=>{t(n)})),()=>r==null?void 0:r.cancel()}),e}function _ve(e){let t=(0,rw.useRef)();return(0,rw.useEffect)(()=>{t.current=e},[e]),t.current}function Lve({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:a,path:i,theme:o="light",line:s,loading:l="Loading...",options:u={},overrideServices:c={},saveViewState:f=!0,keepCurrentModel:d=!1,width:p="100%",height:y="100%",className:x,wrapperProps:k={},beforeMount:w=xb,onMount:S=xb,onChange:T,onValidate:E=xb}){let[z,N]=(0,Ha.useState)(!1),[O,H]=(0,Ha.useState)(!0),U=(0,Ha.useRef)(null),J=(0,Ha.useRef)(null),K=(0,Ha.useRef)(null),Y=(0,Ha.useRef)(S),ye=(0,Ha.useRef)(w),se=(0,Ha.useRef)(),ue=(0,Ha.useRef)(n),Se=Ave(i),Me=(0,Ha.useRef)(!1),de=(0,Ha.useRef)(!1);nI(()=>{let Ie=vc.init();return Ie.then(Oe=>(U.current=Oe)&&H(!1)).catch(Oe=>(Oe==null?void 0:Oe.type)!=="cancelation"&&console.error("Monaco initialization: error:",Oe)),()=>J.current?it():Ie.cancel()}),Js(()=>{var Oe,me,be,qe;let Ie=Ag(U.current,e||n||"",t||a||"",i||r||"");Ie!==((Oe=J.current)==null?void 0:Oe.getModel())&&(f&&Q9.set(Se,(me=J.current)==null?void 0:me.saveViewState()),(be=J.current)==null||be.setModel(Ie),f&&((qe=J.current)==null||qe.restoreViewState(Q9.get(i))))},[i],z),Js(()=>{var Ie;(Ie=J.current)==null||Ie.updateOptions(u)},[u],z),Js(()=>{!J.current||n===void 0||(J.current.getOption(U.current.editor.EditorOption.readOnly)?J.current.setValue(n):n!==J.current.getValue()&&(de.current=!0,J.current.executeEdits("",[{range:J.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),J.current.pushUndoStop(),de.current=!1))},[n],z),Js(()=>{var Oe,me;let Ie=(Oe=J.current)==null?void 0:Oe.getModel();Ie&&a&&((me=U.current)==null||me.editor.setModelLanguage(Ie,a))},[a],z),Js(()=>{var Ie;s!==void 0&&((Ie=J.current)==null||Ie.revealLine(s))},[s],z),Js(()=>{var Ie;(Ie=U.current)==null||Ie.editor.setTheme(o)},[o],z);let Re=(0,Ha.useCallback)(()=>{var Ie;if(!(!K.current||!U.current)&&!Me.current){ye.current(U.current);let Oe=i||r,me=Ag(U.current,n||e||"",t||a||"",Oe||"");J.current=(Ie=U.current)==null?void 0:Ie.editor.create(K.current,te({model:me,automaticLayout:!0},u),c),f&&J.current.restoreViewState(Q9.get(Oe)),U.current.editor.setTheme(o),s!==void 0&&J.current.revealLine(s),N(!0),Me.current=!0}},[e,t,r,n,a,i,u,c,f,o,s]);(0,Ha.useEffect)(()=>{z&&Y.current(J.current,U.current)},[z]),(0,Ha.useEffect)(()=>{!O&&!z&&Re()},[O,z,Re]),ue.current=n,(0,Ha.useEffect)(()=>{var Ie,Oe;z&&T&&((Ie=se.current)==null||Ie.dispose(),se.current=(Oe=J.current)==null?void 0:Oe.onDidChangeModelContent(me=>{de.current||T(J.current.getValue(),me)}))},[z,T]),(0,Ha.useEffect)(()=>{if(z){let Ie=U.current.editor.onDidChangeMarkers(Oe=>{var be;let me=(be=J.current.getModel())==null?void 0:be.uri;if(me&&Oe.find(qe=>qe.path===me.path)){let qe=U.current.editor.getModelMarkers({resource:me});E==null||E(qe)}});return()=>{Ie==null||Ie.dispose()}}return()=>{}},[z,E]);function it(){var Ie,Oe;(Ie=se.current)==null||Ie.dispose(),d?f&&Q9.set(i,J.current.saveViewState()):(Oe=J.current.getModel())==null||Oe.dispose(),J.current.dispose()}return Ha.default.createElement(qte,{width:p,height:y,isEditorReady:z,loading:l,_ref:K,className:x,wrapperProps:k})}var Ote,Ni,Pte,ew,Fte,$te,tw,jte,Ute,Ha,rw,uve,rI,cve,dve,pve,hve,gve,qte,nI,Js,kve,Sve,Mve,Ave,Q9,Tve,Kte,Eve,Gte=wt(()=>{"use strict";bb();Ote=Ee(_t(),1),Ni=Ee(_t(),1);bb();Pte=Ee(_t(),1),ew=Ee(_t(),1),Fte=Ee(_t(),1),$te=Ee(_t(),1),tw=Ee(_t(),1),jte=Ee(_t(),1);bb();Ute=Ee(_t(),1),Ha=Ee(_t(),1);bb();rw=Ee(_t(),1),uve={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},rI=uve,cve={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},dve=cve;pve=fve,hve=pve;gve=mve,qte=(0,Pte.memo)(gve);nI=yve;Js=bve;kve=wve,Sve=(0,Ote.memo)(kve);Mve=Cve;Ave=_ve,Q9=new Map;Tve=Lve,Kte=(0,Ute.memo)(Tve),Eve=Kte});var W7e={};Pb(W7e,{EdpireAssessment:()=>G7e,buildSubmitPayload:()=>Pre,flattenAssessment:()=>Nre,flattenReview:()=>Ore,renderQuestion:()=>Rre});var vI=Ee(_t()),wI=Ee(EC());var Fh=Ee(_t());var Ft=Ee(_t());var Nh=Ee($t(),1),Bf=Ee(_t(),1);function hP(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(a){a(r)}),(n=e.get("*"))&&n.slice().map(function(a){a(t,r)})}}}var Gc=class{constructor(){this.emitter=hP(),this.answers=new Map}emit(t){if(t.type==="answer:changed")this.answers.set(t.answer.nodeId,t.answer);else if(t.type==="answers:reset")this.answers.clear();else if(t.type==="answers:prefill")for(let r of t.answers)this.answers.set(r.nodeId,r);this.emitter.emit(t.type,t)}on(t,r){this.emitter.on(t,r)}off(t,r){this.emitter.off(t,r)}getAllAnswers(){return Array.from(this.answers.values())}clearAnswers(){this.answers.clear(),this.emit({type:"answers:reset"})}prefillAnswers(t){this.emit({type:"answers:prefill",answers:t})}submitAnswers(){this.emit({type:"answer:submitted",answers:this.getAllAnswers(),timestamp:Date.now()})}},mP="__edpireGlobalAnswerBus",gP=globalThis,yP,g6=(yP=gP[mP])!=null?yP:gP[mP]=new Gc;var wP=Ee($t(),1),y6=Ee(_t(),1);var bP="__edpireAnswerBusContext",xP=globalThis,vP,kP=(vP=xP[bP])!=null?vP:xP[bP]=(0,y6.createContext)(g6);function Li(){return(0,y6.useContext)(kP)}function b6({children:e,bus:t=new Gc}){return(0,wP.jsx)(kP.Provider,{value:t,children:e})}var Qn=Ee($t(),1),ru=Ee(_t(),1);function SP(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=SP(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function DC(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=SP(e))&&(n&&(n+=" "),n+=t);return n}var hr=DC;var rr=Ee($t(),1);var Ti=Ee($t(),1),mn=Ee(_t(),1);var v6=Ee(_t());var CP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),x6=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();var Y4=Ee(_t());var MP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var _P=(0,Y4.forwardRef)((u,l)=>{var c=u,{color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:o}=c,s=Pn(c,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);return(0,Y4.createElement)("svg",te(Ue(te({ref:l},MP),{width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:x6("lucide",a)}),s),[...o.map(([f,d])=>(0,Y4.createElement)(f,d)),...Array.isArray(i)?i:[i]])});var Yt=(e,t)=>{let r=(0,v6.forwardRef)((o,i)=>{var s=o,{className:n}=s,a=Pn(s,["className"]);return(0,v6.createElement)(_P,te({ref:i,iconNode:t,className:x6(`lucide-${CP(e)}`,n)},a))});return r.displayName=`${e}`,r};var Wc=Yt("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);var zu=Yt("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);var zs=Yt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Bu=Yt("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);var Xc=Yt("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var Td=Yt("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var pl=Yt("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);var J4=Yt("CloudOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5.782 5.782A7 7 0 0 0 9 19h8.5a4.5 4.5 0 0 0 1.307-.193",key:"yfwify"}],["path",{d:"M21.532 16.5A4.5 4.5 0 0 0 17.5 10h-1.79A7.008 7.008 0 0 0 10 5.07",key:"jlfiyv"}]]);var H1=Yt("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);var Z4=Yt("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);var Q4=Yt("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var e2=Yt("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);var t2=Yt("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var Ru=Yt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var r2=Yt("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var n2=Yt("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);var a2=Yt("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var i2=Yt("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);var o2=Yt("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);var lp=Yt("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);var s2=Yt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);var up=Yt("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);var j1=Yt("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var Ed=Yt("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var U1=Yt("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);var no=Yt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var AP=Ee($t(),1),l2=Ee(_t(),1);var K1={submitButton:"Submit",showHint:"Show hint",clickToRemove:"Click to remove",blankAnswerAria:"Your answer",aiEvaluationInProgress:"AI evaluation in progress\u2026",aiEvaluationInProgressAria:"AI evaluation in progress",shortAnswerPlaceholder:"Short answer\u2026",longAnswerPlaceholder:"Write your answer here\u2026",minWordsLabel:e=>`Min: ${e}`,wordBank:"Word Bank",chooseN:e=>`(choose ${e})`,annexDefaultLabel:"Documents",annexOpen:e=>`Open ${e}`,annexClose:"Close",referenceInPanel:e=>`This exercise's text is in ${e}.`,readReference:"Read it",referenceForExercise:e=>`Exercise ${e}`,choiceLetters:"ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),tableScrollLeft:"Show the columns on the left",tableScrollRight:"Show the columns on the right",mathChecking:"Checking your answer\u2026",mathCorrect:"Correct",mathIncorrect:"Incorrect",openResponseTextPlaceholder:"Write your answer here\u2026",openResponseWords:"words",openResponseChars:"chars",openResponseDropZoneLabel:"Drag & drop files here, or",openResponseDropZoneBrowse:"browse",openResponseUploading:"Uploading\u2026",openResponseNoSubmission:"No submission",openResponseFile:"File",openResponseAttachFile:"Attach a file",openResponseAttachFiles:"Attach files",openResponseAttachedFiles:"Attached files",openResponseTypeImage:"Image",openResponseTypePdf:"PDF",openResponseTypeAudio:"Audio",openResponseTypeVideo:"Video",openResponseTypeVideoLink:"Video link",openResponseVideoLinkPlaceholder:"Paste YouTube or Vimeo URL\u2026",openResponseAddVideoLink:"Add",openResponseTapToRecord:"Tap to start recording",openResponseTapToRecordScreen:"Click to start screen recording",openResponseRequestingPermission:"Requesting permission\u2026",openResponsePermissionDenied:"Microphone/camera access denied. Please allow access in your browser settings.",openResponseMediaHandlerRequired:"A media handler is required to save recordings.",openResponseStopRecording:"Stop",openResponseReRecord:"Re-record",openResponseConfirmRecording:"Use this recording",openResponseRecordingSubmitted:"Recording submitted",openResponseAwaitingReview:"Submitted, awaiting teacher review",openResponseTeacherFeedbackLabel:"Teacher feedback",openResponseGradeThisResponse:"Grade this response",openResponseGradeScoreLabel:e=>`Score (max ${e})`,openResponseGradeFeedbackLabel:"Feedback (optional)",openResponseGradeFeedbackPlaceholder:"Add feedback for the student\u2026",openResponseSubmitGrade:"Submit Grade",openResponseGradeSubmitted:(e,t)=>`Grade submitted: ${e} / ${t}`,openResponseRubricTitle:"Rubric",openResponseRubricCriterionPoints:(e,t)=>`${e} / ${t} pts`,openResponseAiSuggestionTitle:"AI Pre-grading Suggestion",openResponseAiSuggestedScore:(e,t)=>`Suggested score: ${e} / ${t}`,openResponseAiEvidence:"Evidence:",openResponseAiApplySuggestion:"Apply suggestion",openResponseStudentAnswerTitle:"Student answer",audioPlay:"Play",audioPause:"Pause",audioReplay:"Play again",audioSpeed:e=>`Speed ${e}`,audioRate:e=>`${e}\xD7`,audioPosition:"Position in the audio",audioTimeOf:(e,t)=>`${e} of ${t}`,audioPlaysLeft:e=>e===1?"1 play left":`${e} plays left`,audioNoPlaysLeft:"No plays left",audioUnavailable:"This audio can't be played.",recorderUpTo:e=>`Up to ${e}`,recorderRecord:"Record",recorderRecordingAria:"Recording",recorderSaving:e=>`Saving ${e}%`,recorderSaved:"Saved",recorderRecordAgain:"Record again",recorderCancel:"Cancel",recorderFailed:"Your recording wasn't saved. Check your connection.",recorderRetry:"Try again",recorderUnsupported:"This browser can't record. Try an up-to-date Chrome, Safari or Firefox.",recorderUnavailableHere:"Recording isn't available here.",recorderNone:"No recording"};var w6={submitButton:"Valider",showHint:"Voir l'indice",clickToRemove:"Cliquer pour retirer",blankAnswerAria:"Votre r\xE9ponse",aiEvaluationInProgress:"\xC9valuation IA en cours\u2026",aiEvaluationInProgressAria:"\xC9valuation IA en cours",shortAnswerPlaceholder:"R\xE9ponse courte\u2026",longAnswerPlaceholder:"\xC9crivez votre r\xE9ponse ici\u2026",minWordsLabel:e=>`Min. : ${e}`,wordBank:"Banque de mots",chooseN:e=>`(choisir ${e})`,annexDefaultLabel:"Documents",annexOpen:e=>`Ouvrir ${e}`,annexClose:"Fermer",referenceInPanel:e=>`Le texte de cet exercice est dans \xAB ${e} \xBB.`,readReference:"Le lire",referenceForExercise:e=>`Exercice ${e}`,choiceLetters:"ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),tableScrollLeft:"Voir les colonnes de gauche",tableScrollRight:"Voir les colonnes de droite",mathChecking:"V\xE9rification de votre r\xE9ponse\u2026",mathCorrect:"Juste",mathIncorrect:"Faux",openResponseTextPlaceholder:"\xC9crivez votre r\xE9ponse ici\u2026",openResponseWords:"mots",openResponseChars:"car.",openResponseDropZoneLabel:"Glissez-d\xE9posez des fichiers ici, ou",openResponseDropZoneBrowse:"parcourir",openResponseUploading:"Envoi en cours\u2026",openResponseNoSubmission:"Aucun fichier d\xE9pos\xE9",openResponseFile:"Fichier",openResponseAttachFile:"Joindre un fichier",openResponseAttachFiles:"Joindre des fichiers",openResponseAttachedFiles:"Fichiers joints",openResponseTypeImage:"Image",openResponseTypePdf:"PDF",openResponseTypeAudio:"Audio",openResponseTypeVideo:"Vid\xE9o",openResponseTypeVideoLink:"Lien vid\xE9o",openResponseVideoLinkPlaceholder:"Coller un lien YouTube ou Vimeo\u2026",openResponseAddVideoLink:"Ajouter",openResponseTapToRecord:"Appuyer pour d\xE9marrer l'enregistrement",openResponseTapToRecordScreen:"Cliquer pour d\xE9marrer l'enregistrement d'\xE9cran",openResponseRequestingPermission:"Demande d'autorisation\u2026",openResponsePermissionDenied:"Acc\xE8s au micro ou \xE0 la cam\xE9ra refus\xE9. Autorisez-le dans les r\xE9glages du navigateur.",openResponseMediaHandlerRequired:"Un gestionnaire de m\xE9dias est requis pour sauvegarder les enregistrements.",openResponseStopRecording:"Arr\xEAter",openResponseReRecord:"R\xE9enregistrer",openResponseConfirmRecording:"Utiliser cet enregistrement",openResponseRecordingSubmitted:"Enregistrement soumis",openResponseAwaitingReview:"Soumis, en attente de correction par l'enseignant",openResponseTeacherFeedbackLabel:"Commentaire de l'enseignant",openResponseGradeThisResponse:"Corriger cette r\xE9ponse",openResponseGradeScoreLabel:e=>`Note (max ${e})`,openResponseGradeFeedbackLabel:"Commentaire (facultatif)",openResponseGradeFeedbackPlaceholder:"Ajouter un commentaire pour l'\xE9l\xE8ve\u2026",openResponseSubmitGrade:"Valider la note",openResponseGradeSubmitted:(e,t)=>`Note envoy\xE9e : ${e} / ${t}`,openResponseRubricTitle:"Grille d'\xE9valuation",openResponseRubricCriterionPoints:(e,t)=>`${e} / ${t} pts`,openResponseAiSuggestionTitle:"Suggestion de correction par IA",openResponseAiSuggestedScore:(e,t)=>`Score sugg\xE9r\xE9 : ${e} / ${t}`,openResponseAiEvidence:"Extrait :",openResponseAiApplySuggestion:"Appliquer la suggestion",openResponseStudentAnswerTitle:"R\xE9ponse de l'\xE9l\xE8ve",audioPlay:"\xC9couter",audioPause:"Pause",audioReplay:"R\xE9\xE9couter",audioSpeed:e=>`Vitesse ${e}`,audioRate:e=>`${String(e).replace(".",",")}\xD7`,audioPosition:"Position dans l'audio",audioTimeOf:(e,t)=>`${e} sur ${t}`,audioPlaysLeft:e=>e===1?"1 \xE9coute restante":`${e} \xE9coutes restantes`,audioNoPlaysLeft:"Plus d'\xE9coute restante",audioUnavailable:"Impossible de lire cet audio.",recorderUpTo:e=>`Jusqu'\xE0 ${e}`,recorderRecord:"Enregistrer",recorderRecordingAria:"Enregistrement en cours",recorderSaving:e=>`Envoi ${e}\u202F%`,recorderSaved:"Enregistr\xE9",recorderRecordAgain:"Recommencer",recorderCancel:"Annuler",recorderFailed:"Votre enregistrement n'a pas \xE9t\xE9 envoy\xE9. V\xE9rifiez votre connexion.",recorderRetry:"R\xE9essayer",recorderUnsupported:"Ce navigateur ne peut pas enregistrer. Essayez Chrome, Safari ou Firefox \xE0 jour.",recorderUnavailableHere:"L'enregistrement n'est pas disponible ici.",recorderNone:"Aucun enregistrement"};var k6={submitButton:"\u0625\u0631\u0633\u0627\u0644",showHint:"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u062A\u0644\u0645\u064A\u062D",clickToRemove:"\u0627\u0646\u0642\u0631 \u0644\u0644\u0625\u0632\u0627\u0644\u0629",blankAnswerAria:"\u0625\u062C\u0627\u0628\u062A\u0643",aiEvaluationInProgress:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0642\u064A\u064A\u0645 \u0628\u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064A\u2026",aiEvaluationInProgressAria:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0642\u064A\u064A\u0645 \u0628\u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064A",shortAnswerPlaceholder:"\u0625\u062C\u0627\u0628\u0629 \u0642\u0635\u064A\u0631\u0629\u2026",longAnswerPlaceholder:"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0647\u0646\u0627\u2026",minWordsLabel:e=>`\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649: ${e}`,wordBank:"\u0628\u0646\u0643 \u0627\u0644\u0643\u0644\u0645\u0627\u062A",chooseN:e=>`(\u0627\u062E\u062A\u0631 ${e})`,annexDefaultLabel:"\u0627\u0644\u0645\u0633\u062A\u0646\u062F\u0627\u062A",annexOpen:e=>`\u0641\u062A\u062D ${e}`,annexClose:"\u0625\u063A\u0644\u0627\u0642",referenceInPanel:e=>`\u0646\u0635 \u0647\u0630\u0627 \u0627\u0644\u062A\u0645\u0631\u064A\u0646 \u0641\u064A \xAB${e}\xBB.`,readReference:"\u0627\u0642\u0631\u0623\u0647",referenceForExercise:e=>`\u0627\u0644\u062A\u0645\u0631\u064A\u0646 ${e}`,choiceLetters:["\u0623","\u0628","\u062C","\u062F","\u0647\u0640","\u0648","\u0632","\u062D","\u0637","\u064A","\u0643","\u0644","\u0645","\u0646","\u0633","\u0639","\u0641","\u0635","\u0642","\u0631","\u0634","\u062A","\u062B","\u062E","\u0630","\u0636","\u0638","\u063A"],tableScrollLeft:"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u0623\u0639\u0645\u062F\u0629 \u0639\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",tableScrollRight:"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u0623\u0639\u0645\u062F\u0629 \u0639\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",mathChecking:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0642\u0642 \u0645\u0646 \u0625\u062C\u0627\u0628\u062A\u0643\u2026",mathCorrect:"\u0635\u062D\u064A\u062D",mathIncorrect:"\u062E\u0637\u0623",openResponseTextPlaceholder:"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0647\u0646\u0627\u2026",openResponseWords:"\u0643\u0644\u0645\u0629",openResponseChars:"\u062D\u0631\u0641",openResponseDropZoneLabel:"\u0627\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0648\u0623\u0641\u0644\u062A\u0647\u0627 \u0647\u0646\u0627\u060C \u0623\u0648",openResponseDropZoneBrowse:"\u062A\u0635\u0641\u0651\u062D",openResponseUploading:"\u062C\u0627\u0631\u064D \u0627\u0644\u0631\u0641\u0639\u2026",openResponseNoSubmission:"\u0644\u0627 \u064A\u0648\u062C\u062F \u062A\u0633\u0644\u064A\u0645",openResponseFile:"\u0645\u0644\u0641",openResponseAttachFile:"\u0625\u0631\u0641\u0627\u0642 \u0645\u0644\u0641",openResponseAttachFiles:"\u0625\u0631\u0641\u0627\u0642 \u0645\u0644\u0641\u0627\u062A",openResponseAttachedFiles:"\u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0627\u0644\u0645\u0631\u0641\u0642\u0629",openResponseTypeImage:"\u0635\u0648\u0631\u0629",openResponseTypePdf:"PDF",openResponseTypeAudio:"\u0635\u0648\u062A",openResponseTypeVideo:"\u0641\u064A\u062F\u064A\u0648",openResponseTypeVideoLink:"\u0631\u0627\u0628\u0637 \u0641\u064A\u062F\u064A\u0648",openResponseVideoLinkPlaceholder:"\u0627\u0644\u0635\u0642 \u0631\u0627\u0628\u0637 \u064A\u0648\u062A\u064A\u0648\u0628 \u0623\u0648 Vimeo\u2026",openResponseAddVideoLink:"\u0625\u0636\u0627\u0641\u0629",openResponseTapToRecord:"\u0627\u0646\u0642\u0631 \u0644\u0628\u062F\u0621 \u0627\u0644\u062A\u0633\u062C\u064A\u0644",openResponseTapToRecordScreen:"\u0627\u0646\u0642\u0631 \u0644\u0628\u062F\u0621 \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u0634\u0627\u0634\u0629",openResponseRequestingPermission:"\u062C\u0627\u0631\u064D \u0637\u0644\u0628 \u0627\u0644\u0625\u0630\u0646\u2026",openResponsePermissionDenied:"\u062A\u0645 \u0631\u0641\u0636 \u0627\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u0627\u0644\u0645\u064A\u0643\u0631\u0648\u0641\u0648\u0646/\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627. \u064A\u064F\u0631\u062C\u0649 \u0627\u0644\u0633\u0645\u0627\u062D \u0628\u0627\u0644\u0648\u0635\u0648\u0644 \u0645\u0646 \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0645\u062A\u0635\u0641\u062D.",openResponseMediaHandlerRequired:"\u064A\u0644\u0632\u0645 \u0645\u0639\u0627\u0644\u062C \u0648\u0633\u0627\u0626\u0637 \u0644\u062D\u0641\u0638 \u0627\u0644\u062A\u0633\u062C\u064A\u0644\u0627\u062A.",openResponseStopRecording:"\u0625\u064A\u0642\u0627\u0641",openResponseReRecord:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u062A\u0633\u062C\u064A\u0644",openResponseConfirmRecording:"\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0647\u0630\u0627 \u0627\u0644\u062A\u0633\u062C\u064A\u0644",openResponseRecordingSubmitted:"\u062A\u0645 \u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u062A\u0633\u062C\u064A\u0644",openResponseAwaitingReview:"\u062A\u0645 \u0627\u0644\u0625\u0631\u0633\u0627\u0644\u060C \u0641\u064A \u0627\u0646\u062A\u0638\u0627\u0631 \u0645\u0631\u0627\u062C\u0639\u0629 \u0627\u0644\u0645\u0639\u0644\u0645",openResponseTeacherFeedbackLabel:"\u0645\u0644\u0627\u062D\u0638\u0627\u062A \u0627\u0644\u0645\u0639\u0644\u0645",openResponseGradeThisResponse:"\u062A\u0635\u062D\u064A\u062D \u0647\u0630\u0647 \u0627\u0644\u0625\u062C\u0627\u0628\u0629",openResponseGradeScoreLabel:e=>`\u0627\u0644\u062F\u0631\u062C\u0629 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 ${e})`,openResponseGradeFeedbackLabel:"\u0645\u0644\u0627\u062D\u0638\u0627\u062A (\u0627\u062E\u062A\u064A\u0627\u0631\u064A)",openResponseGradeFeedbackPlaceholder:"\u0623\u0636\u0641 \u0645\u0644\u0627\u062D\u0638\u0627\u062A \u0644\u0644\u0637\u0627\u0644\u0628\u2026",openResponseSubmitGrade:"\u0627\u0639\u062A\u0645\u0627\u062F \u0627\u0644\u062F\u0631\u062C\u0629",openResponseGradeSubmitted:(e,t)=>`\u062A\u0645 \u0627\u0639\u062A\u0645\u0627\u062F \u0627\u0644\u062F\u0631\u062C\u0629: ${e} / ${t}`,openResponseRubricTitle:"\u0633\u0644\u0651\u0645 \u0627\u0644\u062A\u0635\u062D\u064A\u062D",openResponseRubricCriterionPoints:(e,t)=>`${e} / ${t} \u0646\u0642\u0637\u0629`,openResponseAiSuggestionTitle:"\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u062A\u0635\u062D\u064A\u062D \u0627\u0644\u0645\u0633\u0628\u0642 \u0628\u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064A",openResponseAiSuggestedScore:(e,t)=>`\u0627\u0644\u062F\u0631\u062C\u0629 \u0627\u0644\u0645\u0642\u062A\u0631\u062D\u0629: ${e} / ${t}`,openResponseAiEvidence:"\u0627\u0644\u0623\u062F\u0644\u0629:",openResponseAiApplySuggestion:"\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D",openResponseStudentAnswerTitle:"\u0625\u062C\u0627\u0628\u0629 \u0627\u0644\u0637\u0627\u0644\u0628",audioPlay:"\u062A\u0634\u063A\u064A\u0644",audioPause:"\u0625\u064A\u0642\u0627\u0641 \u0645\u0624\u0642\u062A",audioReplay:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0627\u0633\u062A\u0645\u0627\u0639",audioSpeed:e=>`\u0627\u0644\u0633\u0631\u0639\u0629 ${e}`,audioRate:e=>`${e}\xD7`,audioPosition:"\u0627\u0644\u0645\u0648\u0636\u0639 \u0641\u064A \u0627\u0644\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",audioTimeOf:(e,t)=>`${e} \u0645\u0646 ${t}`,audioPlaysLeft:e=>e===1?"\u0628\u0642\u064A \u0627\u0633\u062A\u0645\u0627\u0639 \u0648\u0627\u062D\u062F":e===2?"\u0628\u0642\u064A \u0627\u0633\u062A\u0645\u0627\u0639\u0627\u0646":`\u0628\u0642\u064A\u062A ${e} \u0627\u0633\u062A\u0645\u0627\u0639\u0627\u062A`,audioNoPlaysLeft:"\u0644\u0645 \u064A\u0628\u0642 \u0623\u064A \u0627\u0633\u062A\u0645\u0627\u0639",audioUnavailable:"\u062A\u0639\u0630\u0631 \u062A\u0634\u063A\u064A\u0644 \u0647\u0630\u0627 \u0627\u0644\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u0635\u0648\u062A\u064A.",recorderUpTo:e=>`\u062D\u062A\u0649 ${e}`,recorderRecord:"\u062A\u0633\u062C\u064A\u0644",recorderRecordingAria:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0633\u062C\u064A\u0644",recorderSaving:e=>`\u062C\u0627\u0631\u064D \u0627\u0644\u0625\u0631\u0633\u0627\u0644 ${e}\u066A`,recorderSaved:"\u062A\u0645 \u0627\u0644\u062D\u0641\u0638",recorderRecordAgain:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u062A\u0633\u062C\u064A\u0644",recorderCancel:"\u0625\u0644\u063A\u0627\u0621",recorderFailed:"\u0644\u0645 \u064A\u062A\u0645 \u0625\u0631\u0633\u0627\u0644 \u062A\u0633\u062C\u064A\u0644\u0643. \u062A\u062D\u0642\u0642 \u0645\u0646 \u0627\u062A\u0635\u0627\u0644\u0643.",recorderRetry:"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629",recorderUnsupported:"\u0644\u0627 \u064A\u0645\u0643\u0646 \u0644\u0647\u0630\u0627 \u0627\u0644\u0645\u062A\u0635\u0641\u062D \u0627\u0644\u062A\u0633\u062C\u064A\u0644. \u062C\u0631\u0651\u0628 \u0625\u0635\u062F\u0627\u0631\u064B\u0627 \u062D\u062F\u064A\u062B\u064B\u0627 \u0645\u0646 Chrome \u0623\u0648 Safari \u0623\u0648 Firefox.",recorderUnavailableHere:"\u0627\u0644\u062A\u0633\u062C\u064A\u0644 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D \u0647\u0646\u0627.",recorderNone:"\u0644\u0627 \u064A\u0648\u062C\u062F \u062A\u0633\u062C\u064A\u0644"};var yoe={en:K1,fr:w6,ar:k6},IC=(0,l2.createContext)(null);function Yn(){var e;return(e=(0,l2.useContext)(IC))!=null?e:K1}function u2(e){let t=(0,l2.useContext)(IC);return e&&yoe[e]||t||K1}function c2({locale:e,children:t}){let r=u2(e);return(0,AP.jsx)(IC.Provider,{value:r,children:t})}var LP=(0,mn.createContext)(null);function S6({initial:e,onChange:t,children:r}){let n=(0,mn.useRef)(te({},e!=null?e:{})),a=(0,mn.useRef)(t);a.current=t;let i=(0,mn.useMemo)(()=>({get:o=>{var s;return(s=n.current[o])!=null?s:0},set:(o,s)=>{var l;n.current=Ue(te({},n.current),{[o]:s}),(l=a.current)==null||l.call(a,n.current)}}),[]);return(0,Ti.jsx)(LP.Provider,{value:i,children:r})}var zC=[.75,1,1.25,1.5],BC=.5;function V1(e){if(!Number.isFinite(e)||e<0)return"0:00";let t=Math.round(e);return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}var RC="edpire:audio-play";function Nu({src:e,maxPlays:t,learnerSpeed:r,speed:n,allowSeek:a,durationHint:i,playsKey:o,playsUsed:s,onPlaysUsedChange:l,disabled:u=!1,label:c,className:f}){let d=Yn(),p=(0,mn.useContext)(LP),y=o!=null?o:e,x=t&&t>0?Math.floor(t):0,k=a!==!1,w=r!==!1,S=n&&n>=.25&&n<=4?n:1,T=(0,mn.useRef)(null),E=(0,mn.useRef)(null),[z,N]=(0,mn.useState)(!1),[O,H]=(0,mn.useState)(0),[U,J]=(0,mn.useState)(i&&i>0?i:0),[K,Y]=(0,mn.useState)(!1),[ye,se]=(0,mn.useState)(!1),[ue,Se]=(0,mn.useState)(S),[Me,de]=(0,mn.useState)(()=>{var De;return(De=s!=null?s:p==null?void 0:p.get(y))!=null?De:0}),Re=(0,mn.useRef)(!1),it=(0,mn.useRef)(!1);(0,mn.useEffect)(()=>{s!==void 0&&de(s)},[s]),(0,mn.useEffect)(()=>Se(S),[S]),(0,mn.useEffect)(()=>{T.current&&(T.current.playbackRate=ue)},[ue]),(0,mn.useEffect)(()=>{se(!1),Y(!1),H(0),N(!1),Re.current=!1,i&&i>0||J(0);let De=T.current;De&&De.readyState>=1&&Number.isFinite(De.duration)&&De.duration>0&&J(De.duration)},[e]),(0,mn.useEffect)(()=>{let De=ot=>{let Lt=T.current;Lt&&ot.detail!==Lt&&!Lt.paused&&Lt.pause()};return window.addEventListener(RC,De),()=>window.removeEventListener(RC,De)},[]);let Ie=x>0&&Me>=x&&!Re.current,Oe=x>0?Math.max(0,x-Me):null,me=u||ye||Ie,be=(0,mn.useCallback)(()=>{if(x===0)return!0;if(Me>=x)return!1;let De=Me+1;return de(De),Re.current=!0,s===void 0&&(p==null||p.set(y,De)),l==null||l(De),!0},[x,Me,s,p,y,l]),qe=(0,mn.useCallback)(()=>{let De=T.current;if(!De||u||ye)return;if(!De.paused){De.pause();return}(K||De.currentTime<BC)&&!Re.current&&!be()||((K||De.currentTime>=(De.duration||1/0))&&(De.currentTime=0),Y(!1),De.playbackRate=ue,window.dispatchEvent(new CustomEvent(RC,{detail:De})),De.play().catch(()=>N(!1)))},[u,ye,K,be,ue]),Ke=U>0?U:0,je=Ke>0?Math.min(1,O/Ke):0,Ye=(0,mn.useCallback)(De=>{let ot=T.current;if(!ot||!k||me||Ke===0)return;let Lt=Math.max(0,Math.min(Ke,De));if(x>0&&Lt<BC&&O>=BC&&Re.current&&(Re.current=!1,!ot.paused&&!be())){ot.pause();return}ot.currentTime=Lt,H(Lt),Y(!1)},[k,me,Ke,x,O,be]),mt=De=>{let ot=E.current;if(!ot)return 0;let Lt=ot.getBoundingClientRect(),tt=getComputedStyle(ot).direction==="rtl"?(Lt.right-De)/Lt.width:(De-Lt.left)/Lt.width;return Math.max(0,Math.min(1,tt))},At=De=>{!k||me||Ke===0||(De.preventDefault(),it.current=!0,De.currentTarget.setPointerCapture(De.pointerId),Ye(mt(De.clientX)*Ke))},zt=De=>{it.current&&Ye(mt(De.clientX)*Ke)},Ht=()=>{it.current=!1},Yr=De=>{if(!k||me||Ke===0)return;let ot=E.current?getComputedStyle(E.current).direction==="rtl":!1,Lt=5,ft=null;De.key==="ArrowRight"?ft=O+(ot?-Lt:Lt):De.key==="ArrowLeft"?ft=O+(ot?Lt:-Lt):De.key==="ArrowUp"?ft=O+Lt:De.key==="ArrowDown"?ft=O-Lt:De.key==="Home"?ft=0:De.key==="End"&&(ft=Ke),ft!==null&&(De.preventDefault(),Ye(ft))},Hr=()=>{var ot;let De=zC.indexOf(ue);Se((ot=zC[(De+1)%zC.length])!=null?ot:1)},xt=(z||O>0)&&!K&&Ke>0,Ut=V1(xt?Ke-O:Ke),wr=z?(0,Ti.jsx)(o2,{size:18,fill:"currentColor",strokeWidth:0,"aria-hidden":!0}):K&&!Ie?(0,Ti.jsx)(up,{size:18,"aria-hidden":!0}):(0,Ti.jsx)(lp,{size:18,fill:"currentColor",strokeWidth:0,"aria-hidden":!0,style:{marginInlineStart:2}}),et=z?d.audioPause:K?d.audioReplay:d.audioPlay;return(0,Ti.jsxs)("span",{role:"group","aria-label":c,className:`edp-audio${me?" edp-audio--off":""}${f?` ${f}`:""}`,"data-audio-player":"",children:[(0,Ti.jsxs)("span",{className:"edp-audio-bar",children:[(0,Ti.jsx)("button",{type:"button",className:"edp-audio-play",onClick:qe,disabled:me,"aria-label":et,children:wr}),(0,Ti.jsxs)("span",{ref:E,className:`edp-audio-track${k&&!me?" edp-audio-track--seek":""}`,role:"slider",tabIndex:k&&!me?0:-1,"aria-label":d.audioPosition,"aria-valuemin":0,"aria-valuemax":Math.round(Ke),"aria-valuenow":Math.round(O),"aria-valuetext":d.audioTimeOf(V1(O),V1(Ke)),"aria-disabled":!k||me,onPointerDown:At,onPointerMove:zt,onPointerUp:Ht,onPointerCancel:Ht,onKeyDown:Yr,children:[(0,Ti.jsx)("span",{className:"edp-audio-rail",children:(0,Ti.jsx)("span",{className:"edp-audio-fill",style:{width:`${je*100}%`}})}),k&&!me&&Ke>0&&(0,Ti.jsx)("span",{className:"edp-audio-thumb",style:{insetInlineStart:`${je*100}%`}})]}),(0,Ti.jsx)("span",{className:"edp-audio-time",dir:"ltr",children:Ut}),w&&!ye&&(0,Ti.jsx)("button",{type:"button",className:"edp-audio-speed",dir:"ltr",onClick:Hr,disabled:u,"aria-label":d.audioSpeed(d.audioRate(ue)),children:d.audioRate(ue)})]}),(ye||Oe!==null)&&(0,Ti.jsx)("span",{className:"edp-audio-note","aria-live":"polite",children:(0,Ti.jsx)("bdi",{children:ye?d.audioUnavailable:Oe===0&&!Re.current?d.audioNoPlaysLeft:d.audioPlaysLeft(Oe!=null?Oe:0)})}),(0,Ti.jsx)("audio",{ref:T,src:e||void 0,preload:"metadata",onLoadedMetadata:De=>{let ot=De.currentTarget;ot.playbackRate=ue,Number.isFinite(ot.duration)&&ot.duration>0?J(ot.duration):boe(ot,Lt=>J(ft=>ft>0?ft:Lt))},onDurationChange:De=>{let ot=De.currentTarget.duration;Number.isFinite(ot)&&ot>0&&J(ot)},onTimeUpdate:De=>{it.current||H(De.currentTarget.currentTime)},onPlay:()=>N(!0),onPause:()=>N(!1),onEnded:()=>{N(!1),Y(!0),Re.current=!1,H(Ke)},onError:()=>{e&&se(!0)}})]})}function boe(e,t){let r=()=>{e.removeEventListener("timeupdate",r),Number.isFinite(e.duration)&&e.duration>0&&t(e.duration),e.currentTime=0};e.addEventListener("timeupdate",r);try{e.currentTime=1e101}catch(n){e.removeEventListener("timeupdate",r)}}var ns=class e{constructor(t,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new e(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}},Bs=class e{constructor(t,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=r}range(t,r){return new e(r,ns.range(this,t))}},ct=class e{constructor(t,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+t,a,i,o=r&&r.loc;if(o&&o.start<=o.end){var s=o.lexer.input;a=o.start,i=o.end,a===s.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var l=s.slice(a,i).replace(/[^]/g,"$&\u0332"),u;a>15?u="\u2026"+s.slice(a-15,a):u=s.slice(0,a);var c;i+15<s.length?c=s.slice(i,i+15)+"\u2026":c=s.slice(i),n+=u+l+c}var f=new Error(n);return f.name="ParseError",f.__proto__=e.prototype,f.position=a,a!=null&&i!=null&&(f.length=i-a),f.rawMessage=t,f}};ct.prototype.__proto__=Error.prototype;var xoe=function(t,r){return t===void 0?r:t},voe=/([A-Z])/g,woe=function(t){return t.replace(voe,"-$1").toLowerCase()},koe={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Soe=/[&><"']/g;function Coe(e){return String(e).replace(Soe,t=>koe[t])}var oF=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},Moe=function(t){var r=oF(t);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},_oe=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},Aoe=function(t){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},nn={deflt:xoe,escape:Coe,hyphenate:woe,getBaseElem:oF,isCharacterBox:Moe,protocolFromUrl:Aoe},R6={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Loe(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var m2=class{constructor(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var r in R6)if(R6.hasOwnProperty(r)){var n=R6[r];this[r]=t[r]!==void 0?n.processor?n.processor(t[r]):t[r]:Loe(n)}}reportNonstrict(t,r,n){var a=this.strict;if(typeof a=="function"&&(a=a(t,r,n)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new ct("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);a==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var a=this.strict;if(typeof a=="function")try{a=a(t,r,n)}catch(i){a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if(t.url&&!t.protocol){var r=nn.protocolFromUrl(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}},Ou=class{constructor(t,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=n}sup(){return Pu[Toe[this.id]]}sub(){return Pu[Eoe[this.id]]}fracNum(){return Pu[Doe[this.id]]}fracDen(){return Pu[Ioe[this.id]]}cramp(){return Pu[zoe[this.id]]}text(){return Pu[Boe[this.id]]}isTight(){return this.size>=2}},sM=0,O6=1,W1=2,Zc=3,g2=4,hl=5,X1=6,Lo=7,Pu=[new Ou(sM,0,!1),new Ou(O6,0,!0),new Ou(W1,1,!1),new Ou(Zc,1,!0),new Ou(g2,2,!1),new Ou(hl,2,!0),new Ou(X1,3,!1),new Ou(Lo,3,!0)],Toe=[g2,hl,g2,hl,X1,Lo,X1,Lo],Eoe=[hl,hl,hl,hl,Lo,Lo,Lo,Lo],Doe=[W1,Zc,g2,hl,X1,Lo,X1,Lo],Ioe=[Zc,Zc,hl,hl,Lo,Lo,Lo,Lo],zoe=[O6,O6,Zc,Zc,hl,hl,Lo,Lo],Boe=[sM,O6,W1,Zc,W1,Zc,W1,Zc],Zt={DISPLAY:Pu[sM],TEXT:Pu[W1],SCRIPT:Pu[g2],SCRIPTSCRIPT:Pu[X1]},XC=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Roe(e){for(var t=0;t<XC.length;t++)for(var r=XC[t],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(e>=a[0]&&e<=a[1])return r.name}return null}var N6=[];XC.forEach(e=>e.blocks.forEach(t=>N6.push(...t)));function sF(e){for(var t=0;t<N6.length;t+=2)if(e>=N6[t]&&e<=N6[t+1])return!0;return!1}var G1=80,Noe=function(t,r){return"M95,"+(622+t+r)+`
3647
3647
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
3648
3648
  c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
3649
3649
  c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
@@ -3903,7 +3903,7 @@ l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
3903
3903
  |[ \r ]+
3904
3904
  ?)[ \r ]*`,aM="[\u0300-\u036F]",ole=new RegExp(aM+"+$"),sle="("+XF+"+)|"+(ile+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(aM+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(aM+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+ale)+("|"+nle+")"),j6=class{constructor(t,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=r,this.tokenRegex=new RegExp(sle,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new Bs("EOF",new ns(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new ct("Unexpected character: '"+t[r]+"'",new Bs(t[r],new ns(this,r,r+1)));var a=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[a]===14){var i=t.indexOf(`
3905
3905
  `,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new Bs(a,new ns(this,r,this.tokenRegex.lastIndex))}},iM=class{constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new ct("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,r,n){if(n===void 0&&(n=!1),n){for(var a=0;a<this.undefStack.length;a++)delete this.undefStack[a][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(t)&&(i[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}},lle=PF;W("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});W("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});W("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});W("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});W("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});W("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");W("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var rF={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};W("\\char",function(e){var t=e.popToken(),r,n="";if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")n=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new ct("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=rF[t.text],n==null||n>=r)throw new ct("Invalid base-"+r+" digit "+t.text);for(var a;(a=rF[e.future().text])!=null&&a<r;)n*=r,n+=a,e.popToken()}return"\\@char{"+n+"}"});var wM=(e,t,r,n)=>{var a=e.consumeArg().tokens;if(a.length!==1)throw new ct("\\newcommand's first argument must be a macro name");var i=a[0].text,o=e.isDefined(i);if(o&&!t)throw new ct("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!o&&!r)throw new ct("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(a=e.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var l="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new ct("Invalid number of arguments: "+l);s=parseInt(l),a=e.consumeArg().tokens}return o&&n||e.macros.set(i,{tokens:a,numArgs:s}),""};W("\\newcommand",e=>wM(e,!1,!0,!1));W("\\renewcommand",e=>wM(e,!0,!1,!1));W("\\providecommand",e=>wM(e,!0,!0,!0));W("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""});W("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""});W("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Id[r],Jn.math[r],Jn.text[r]),""});W("\\bgroup","{");W("\\egroup","}");W("~","\\nobreakspace");W("\\lq","`");W("\\rq","'");W("\\aa","\\r a");W("\\AA","\\r A");W("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");W("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");W("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");W("\u212C","\\mathscr{B}");W("\u2130","\\mathscr{E}");W("\u2131","\\mathscr{F}");W("\u210B","\\mathscr{H}");W("\u2110","\\mathscr{I}");W("\u2112","\\mathscr{L}");W("\u2133","\\mathscr{M}");W("\u211B","\\mathscr{R}");W("\u212D","\\mathfrak{C}");W("\u210C","\\mathfrak{H}");W("\u2128","\\mathfrak{Z}");W("\\Bbbk","\\Bbb{k}");W("\xB7","\\cdotp");W("\\llap","\\mathllap{\\textrm{#1}}");W("\\rlap","\\mathrlap{\\textrm{#1}}");W("\\clap","\\mathclap{\\textrm{#1}}");W("\\mathstrut","\\vphantom{(}");W("\\underbar","\\underline{\\text{#1}}");W("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');W("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");W("\\ne","\\neq");W("\u2260","\\neq");W("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");W("\u2209","\\notin");W("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");W("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");W("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");W("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");W("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");W("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");W("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");W("\u27C2","\\perp");W("\u203C","\\mathclose{!\\mkern-0.8mu!}");W("\u220C","\\notni");W("\u231C","\\ulcorner");W("\u231D","\\urcorner");W("\u231E","\\llcorner");W("\u231F","\\lrcorner");W("\xA9","\\copyright");W("\xAE","\\textregistered");W("\uFE0F","\\textregistered");W("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');W("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');W("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');W("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');W("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");W("\u22EE","\\vdots");W("\\varGamma","\\mathit{\\Gamma}");W("\\varDelta","\\mathit{\\Delta}");W("\\varTheta","\\mathit{\\Theta}");W("\\varLambda","\\mathit{\\Lambda}");W("\\varXi","\\mathit{\\Xi}");W("\\varPi","\\mathit{\\Pi}");W("\\varSigma","\\mathit{\\Sigma}");W("\\varUpsilon","\\mathit{\\Upsilon}");W("\\varPhi","\\mathit{\\Phi}");W("\\varPsi","\\mathit{\\Psi}");W("\\varOmega","\\mathit{\\Omega}");W("\\substack","\\begin{subarray}{c}#1\\end{subarray}");W("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");W("\\boxed","\\fbox{$\\displaystyle{#1}$}");W("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");W("\\implies","\\DOTSB\\;\\Longrightarrow\\;");W("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");W("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");W("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var nF={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};W("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in nF?t=nF[r]:(r.slice(0,4)==="\\not"||r in Jn.math&&["bin","rel"].includes(Jn.math[r].group))&&(t="\\dotsb"),t});var kM={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};W("\\dotso",function(e){var t=e.future().text;return t in kM?"\\ldots\\,":"\\ldots"});W("\\dotsc",function(e){var t=e.future().text;return t in kM&&t!==","?"\\ldots\\,":"\\ldots"});W("\\cdots",function(e){var t=e.future().text;return t in kM?"\\@cdots\\,":"\\@cdots"});W("\\dotsb","\\cdots");W("\\dotsm","\\cdots");W("\\dotsi","\\!\\cdots");W("\\dotsx","\\ldots\\,");W("\\DOTSI","\\relax");W("\\DOTSB","\\relax");W("\\DOTSX","\\relax");W("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");W("\\,","\\tmspace+{3mu}{.1667em}");W("\\thinspace","\\,");W("\\>","\\mskip{4mu}");W("\\:","\\tmspace+{4mu}{.2222em}");W("\\medspace","\\:");W("\\;","\\tmspace+{5mu}{.2777em}");W("\\thickspace","\\;");W("\\!","\\tmspace-{3mu}{.1667em}");W("\\negthinspace","\\!");W("\\negmedspace","\\tmspace-{4mu}{.2222em}");W("\\negthickspace","\\tmspace-{5mu}{.277em}");W("\\enspace","\\kern.5em ");W("\\enskip","\\hskip.5em\\relax");W("\\quad","\\hskip1em\\relax");W("\\qquad","\\hskip2em\\relax");W("\\tag","\\@ifstar\\tag@literal\\tag@paren");W("\\tag@paren","\\tag@literal{({#1})}");W("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new ct("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});W("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");W("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");W("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");W("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");W("\\newline","\\\\\\relax");W("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var YF=pt(Fu["Main-Regular"][84][1]-.7*Fu["Main-Regular"][65][1]);W("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+YF+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");W("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+YF+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");W("\\hspace","\\@ifstar\\@hspacer\\@hspace");W("\\@hspace","\\hskip #1\\relax");W("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");W("\\ordinarycolon",":");W("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");W("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');W("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');W("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');W("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');W("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');W("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');W("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');W("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');W("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');W("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');W("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');W("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');W("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');W("\u2237","\\dblcolon");W("\u2239","\\eqcolon");W("\u2254","\\coloneqq");W("\u2255","\\eqqcolon");W("\u2A74","\\Coloneqq");W("\\ratio","\\vcentcolon");W("\\coloncolon","\\dblcolon");W("\\colonequals","\\coloneqq");W("\\coloncolonequals","\\Coloneqq");W("\\equalscolon","\\eqqcolon");W("\\equalscoloncolon","\\Eqqcolon");W("\\colonminus","\\coloneq");W("\\coloncolonminus","\\Coloneq");W("\\minuscolon","\\eqcolon");W("\\minuscoloncolon","\\Eqcolon");W("\\coloncolonapprox","\\Colonapprox");W("\\coloncolonsim","\\Colonsim");W("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");W("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");W("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");W("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");W("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");W("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");W("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");W("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");W("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");W("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");W("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");W("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");W("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");W("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");W("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");W("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");W("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");W("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");W("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");W("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");W("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");W("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");W("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");W("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");W("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");W("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");W("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");W("\\imath","\\html@mathml{\\@imath}{\u0131}");W("\\jmath","\\html@mathml{\\@jmath}{\u0237}");W("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");W("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");W("\u27E6","\\llbracket");W("\u27E7","\\rrbracket");W("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");W("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");W("\u2983","\\lBrace");W("\u2984","\\rBrace");W("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");W("\u29B5","\\minuso");W("\\darr","\\downarrow");W("\\dArr","\\Downarrow");W("\\Darr","\\Downarrow");W("\\lang","\\langle");W("\\rang","\\rangle");W("\\uarr","\\uparrow");W("\\uArr","\\Uparrow");W("\\Uarr","\\Uparrow");W("\\N","\\mathbb{N}");W("\\R","\\mathbb{R}");W("\\Z","\\mathbb{Z}");W("\\alef","\\aleph");W("\\alefsym","\\aleph");W("\\Alpha","\\mathrm{A}");W("\\Beta","\\mathrm{B}");W("\\bull","\\bullet");W("\\Chi","\\mathrm{X}");W("\\clubs","\\clubsuit");W("\\cnums","\\mathbb{C}");W("\\Complex","\\mathbb{C}");W("\\Dagger","\\ddagger");W("\\diamonds","\\diamondsuit");W("\\empty","\\emptyset");W("\\Epsilon","\\mathrm{E}");W("\\Eta","\\mathrm{H}");W("\\exist","\\exists");W("\\harr","\\leftrightarrow");W("\\hArr","\\Leftrightarrow");W("\\Harr","\\Leftrightarrow");W("\\hearts","\\heartsuit");W("\\image","\\Im");W("\\infin","\\infty");W("\\Iota","\\mathrm{I}");W("\\isin","\\in");W("\\Kappa","\\mathrm{K}");W("\\larr","\\leftarrow");W("\\lArr","\\Leftarrow");W("\\Larr","\\Leftarrow");W("\\lrarr","\\leftrightarrow");W("\\lrArr","\\Leftrightarrow");W("\\Lrarr","\\Leftrightarrow");W("\\Mu","\\mathrm{M}");W("\\natnums","\\mathbb{N}");W("\\Nu","\\mathrm{N}");W("\\Omicron","\\mathrm{O}");W("\\plusmn","\\pm");W("\\rarr","\\rightarrow");W("\\rArr","\\Rightarrow");W("\\Rarr","\\Rightarrow");W("\\real","\\Re");W("\\reals","\\mathbb{R}");W("\\Reals","\\mathbb{R}");W("\\Rho","\\mathrm{P}");W("\\sdot","\\cdot");W("\\sect","\\S");W("\\spades","\\spadesuit");W("\\sub","\\subset");W("\\sube","\\subseteq");W("\\supe","\\supseteq");W("\\Tau","\\mathrm{T}");W("\\thetasym","\\vartheta");W("\\weierp","\\wp");W("\\Zeta","\\mathrm{Z}");W("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");W("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");W("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");W("\\bra","\\mathinner{\\langle{#1}|}");W("\\ket","\\mathinner{|{#1}\\rangle}");W("\\braket","\\mathinner{\\langle{#1}\\rangle}");W("\\Bra","\\left\\langle#1\\right|");W("\\Ket","\\left|#1\\right\\rangle");var JF=e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=f=>d=>{e&&(d.macros.set("|",o),a.length&&d.macros.set("\\|",s));var p=f;if(!f&&a.length){var y=d.future();y.text==="|"&&(d.popToken(),p=!0)}return{tokens:p?a:n,numArgs:0}};t.macros.set("|",l(!1)),a.length&&t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,c=t.expandTokens([...i,...u,...r]);return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};W("\\bra@ket",JF(!1));W("\\bra@set",JF(!0));W("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");W("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");W("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");W("\\angln","{\\angl n}");W("\\blue","\\textcolor{##6495ed}{#1}");W("\\orange","\\textcolor{##ffa500}{#1}");W("\\pink","\\textcolor{##ff00af}{#1}");W("\\red","\\textcolor{##df0030}{#1}");W("\\green","\\textcolor{##28ae7b}{#1}");W("\\gray","\\textcolor{gray}{#1}");W("\\purple","\\textcolor{##9d38bd}{#1}");W("\\blueA","\\textcolor{##ccfaff}{#1}");W("\\blueB","\\textcolor{##80f6ff}{#1}");W("\\blueC","\\textcolor{##63d9ea}{#1}");W("\\blueD","\\textcolor{##11accd}{#1}");W("\\blueE","\\textcolor{##0c7f99}{#1}");W("\\tealA","\\textcolor{##94fff5}{#1}");W("\\tealB","\\textcolor{##26edd5}{#1}");W("\\tealC","\\textcolor{##01d1c1}{#1}");W("\\tealD","\\textcolor{##01a995}{#1}");W("\\tealE","\\textcolor{##208170}{#1}");W("\\greenA","\\textcolor{##b6ffb0}{#1}");W("\\greenB","\\textcolor{##8af281}{#1}");W("\\greenC","\\textcolor{##74cf70}{#1}");W("\\greenD","\\textcolor{##1fab54}{#1}");W("\\greenE","\\textcolor{##0d923f}{#1}");W("\\goldA","\\textcolor{##ffd0a9}{#1}");W("\\goldB","\\textcolor{##ffbb71}{#1}");W("\\goldC","\\textcolor{##ff9c39}{#1}");W("\\goldD","\\textcolor{##e07d10}{#1}");W("\\goldE","\\textcolor{##a75a05}{#1}");W("\\redA","\\textcolor{##fca9a9}{#1}");W("\\redB","\\textcolor{##ff8482}{#1}");W("\\redC","\\textcolor{##f9685d}{#1}");W("\\redD","\\textcolor{##e84d39}{#1}");W("\\redE","\\textcolor{##bc2612}{#1}");W("\\maroonA","\\textcolor{##ffbde0}{#1}");W("\\maroonB","\\textcolor{##ff92c6}{#1}");W("\\maroonC","\\textcolor{##ed5fa6}{#1}");W("\\maroonD","\\textcolor{##ca337c}{#1}");W("\\maroonE","\\textcolor{##9e034e}{#1}");W("\\purpleA","\\textcolor{##ddd7ff}{#1}");W("\\purpleB","\\textcolor{##c6b9fc}{#1}");W("\\purpleC","\\textcolor{##aa87ff}{#1}");W("\\purpleD","\\textcolor{##7854ab}{#1}");W("\\purpleE","\\textcolor{##543b78}{#1}");W("\\mintA","\\textcolor{##f5f9e8}{#1}");W("\\mintB","\\textcolor{##edf2df}{#1}");W("\\mintC","\\textcolor{##e0e5cc}{#1}");W("\\grayA","\\textcolor{##f6f7f7}{#1}");W("\\grayB","\\textcolor{##f0f1f2}{#1}");W("\\grayC","\\textcolor{##e3e5e6}{#1}");W("\\grayD","\\textcolor{##d6d8da}{#1}");W("\\grayE","\\textcolor{##babec2}{#1}");W("\\grayF","\\textcolor{##888d93}{#1}");W("\\grayG","\\textcolor{##626569}{#1}");W("\\grayH","\\textcolor{##3b3e40}{#1}");W("\\grayI","\\textcolor{##21242c}{#1}");W("\\kaBlue","\\textcolor{##314453}{#1}");W("\\kaGreen","\\textcolor{##71B307}{#1}");var ZF={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},oM=class{constructor(t,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(t),this.macros=new iM(lle,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new j6(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var r,n,a;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:a,end:n}=this.consumeArg(["]"])}else({tokens:a,start:r,end:n}=this.consumeArg());return this.pushToken(new Bs("EOF",n.loc)),this.pushTokens(a),new Bs("",ns.range(r,n))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],n=t&&t.length>0;n||this.consumeSpaces();var a=this.future(),i,o=0,s=0;do{if(i=this.popToken(),r.push(i),i.text==="{")++o;else if(i.text==="}"){if(--o,o===-1)throw new ct("Extra }",i)}else if(i.text==="EOF")throw new ct("Unexpected end of input in a macro argument, expected '"+(t&&n?t[s]:"}")+"'",i);if(t&&n)if((o===0||o===1&&t[s]==="{")&&i.text===t[s]){if(++s,s===t.length){r.splice(-s,s);break}}else s=0}while(o!==0||n);return a.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:a,end:i}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new ct("The length of delimiters doesn't match the number of args!");for(var n=r[0],a=0;a<n.length;a++){var i=this.popToken();if(n[a]!==i.text)throw new ct("Use of the macro doesn't match its definition",i)}}for(var o=[],s=0;s<t;s++)o.push(this.consumeArg(r&&r[s+1]).tokens);return o}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new ct("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),n=r.text,a=r.noexpand?null:this._getExpansion(n);if(a==null||t&&a.unexpandable){if(t&&a==null&&n[0]==="\\"&&!this.isDefined(n))throw new ct("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var i=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs){i=i.slice();for(var s=i.length-1;s>=0;--s){var l=i[s];if(l.text==="#"){if(s===0)throw new ct("Incomplete placeholder at end of macro body",l);if(l=i[--s],l.text==="#")i.splice(s+1,1);else if(/^[1-9]$/.test(l.text))i.splice(s,2,...o[+l.text-1]);else throw new ct("Not a valid argument number",l)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new Bs(t)]):void 0}expandTokens(t){var r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(this.expandOnce(!0)===!1){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),r.push(a)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(n=>n.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var n=this.lexer.catcodes[t];if(n!=null&&n!==13)return}var a=typeof r=="function"?r(this):r;if(typeof a=="string"){var i=0;if(a.indexOf("#")!==-1)for(var o=a.replace(/##/g,"");o.indexOf("#"+(i+1))!==-1;)++i;for(var s=new j6(a,this.settings),l=[],u=s.lex();u.text!=="EOF";)l.push(u),u=s.lex();l.reverse();var c={tokens:l,numArgs:i};return c}return a}isDefined(t){return this.macros.has(t)||Id.hasOwnProperty(t)||Jn.math.hasOwnProperty(t)||Jn.text.hasOwnProperty(t)||ZF.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Id.hasOwnProperty(t)&&!Id[t].primitive}},aF=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,B6=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),WC={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},iF={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},U6=class e{constructor(t,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new oM(t,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new ct("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var r=this.nextToken;this.consume(),this.gullet.pushToken(new Bs("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(t,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var a=this.fetch();if(e.endOfExpression.indexOf(a.text)!==-1||r&&a.text===r||t&&Id[a.text]&&Id[a.text].infix)break;var i=this.parseAtom(r);if(i){if(i.type==="internal")continue}else break;n.push(i)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var r=-1,n,a=0;a<t.length;a++)if(t[a].type==="infix"){if(r!==-1)throw new ct("only one infix operator per group",t[a].token);r=a,n=t[a].replaceWith}if(r!==-1&&n){var i,o,s=t.slice(0,r),l=t.slice(r+1);s.length===1&&s[0].type==="ordgroup"?i=s[0]:i={type:"ordgroup",mode:this.mode,body:s},l.length===1&&l[0].type==="ordgroup"?o=l[0]:o={type:"ordgroup",mode:this.mode,body:l};var u;return n==="\\\\abovefrac"?u=this.callFunction(n,[i,t[r],o],[]):u=this.callFunction(n,[i,o],[]),[u]}else return t}handleSupSubscript(t){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var a;do{var i;a=this.parseGroup(t)}while(((i=a)==null?void 0:i.type)==="internal");if(!a)throw new ct("Expected group after '"+n+"'",r);return a}formatUnsupportedCmd(t){for(var r=[],n=0;n<t.length;n++)r.push({type:"textord",mode:"text",text:t[n]});var a={type:"text",mode:this.mode,body:r},i={type:"color",mode:this.mode,color:this.settings.errorColor,body:[a]};return i}parseAtom(t){var r=this.parseGroup("atom",t);if((r==null?void 0:r.type)==="internal"||this.mode==="text")return r;for(var n,a;;){this.consumeSpaces();var i=this.fetch();if(i.text==="\\limits"||i.text==="\\nolimits"){if(r&&r.type==="op"){var o=i.text==="\\limits";r.limits=o,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=i.text==="\\limits");else throw new ct("Limit controls must follow a math operator",i);this.consume()}else if(i.text==="^"){if(n)throw new ct("Double superscript",i);n=this.handleSupSubscript("superscript")}else if(i.text==="_"){if(a)throw new ct("Double subscript",i);a=this.handleSupSubscript("subscript")}else if(i.text==="'"){if(n)throw new ct("Double superscript",i);var s={type:"textord",mode:this.mode,text:"\\prime"},l=[s];for(this.consume();this.fetch().text==="'";)l.push(s),this.consume();this.fetch().text==="^"&&l.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:l}}else if(B6[i.text]){var u=aF.test(i.text),c=[];for(c.push(new Bs(B6[i.text])),this.consume();;){var f=this.fetch().text;if(!B6[f]||aF.test(f)!==u)break;c.unshift(new Bs(B6[f])),this.consume()}var d=this.subparse(c);u?a={type:"ordgroup",mode:"math",body:d}:n={type:"ordgroup",mode:"math",body:d}}else break}return n||a?{type:"supsub",mode:this.mode,base:r,sup:n,sub:a}:r}parseFunction(t,r){var n=this.fetch(),a=n.text,i=Id[a];if(!i)return null;if(this.consume(),r&&r!=="atom"&&!i.allowedInArgument)throw new ct("Got function '"+a+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!i.allowedInText)throw new ct("Can't use function '"+a+"' in text mode",n);if(this.mode==="math"&&i.allowedInMath===!1)throw new ct("Can't use function '"+a+"' in math mode",n);var{args:o,optArgs:s}=this.parseArguments(a,i);return this.callFunction(a,o,s,n,t)}callFunction(t,r,n,a,i){var o={funcName:t,parser:this,token:a,breakOnTokenText:i},s=Id[t];if(s&&s.handler)return s.handler(o,r,n);throw new ct("No function handler for "+t)}parseArguments(t,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var a=[],i=[],o=0;o<n;o++){var s=r.argTypes&&r.argTypes[o],l=o<r.numOptionalArgs;(r.primitive&&s==null||r.type==="sqrt"&&o===1&&i[0]==null)&&(s="primitive");var u=this.parseGroupOfType("argument to '"+t+"'",s,l);if(l)i.push(u);else if(u!=null)a.push(u);else throw new ct("Null argument, please report this as a bug")}return{args:a,optArgs:i}}parseGroupOfType(t,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var a=this.parseArgumentGroup(n,"text");return a!=null?{type:"styling",mode:a.mode,body:[a],style:"text"}:null}case"raw":{var i=this.parseStringGroup("raw",n);return i!=null?{type:"raw",mode:"text",string:i.text}:null}case"primitive":{if(n)throw new ct("A primitive argument cannot be optional");var o=this.parseGroup(t);if(o==null)throw new ct("Expected group as "+t,this.fetch());return o}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new ct("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var a="",i;(i=this.fetch()).text!=="EOF";)a+=i.text,this.consume();return this.consume(),n.text=a,n}parseRegexGroup(t,r){for(var n=this.fetch(),a=n,i="",o;(o=this.fetch()).text!=="EOF"&&t.test(i+o.text);)a=o,i+=a.text,this.consume();if(i==="")throw new ct("Invalid "+r+": '"+n.text+"'",n);return n.range(a,i)}parseColorGroup(t){var r=this.parseStringGroup("color",t);if(r==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new ct("Invalid color: '"+r.text+"'",r);var a=n[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}}parseSizeGroup(t){var r,n=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",t),!r)return null;!t&&r.text.length===0&&(r.text="0pt",n=!0);var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);if(!a)throw new ct("Invalid size: '"+r.text+"'",r);var i={number:+(a[1]+a[2]),unit:a[3]};if(!lF(i))throw new ct("Invalid unit: '"+i.unit+"'",r);return{type:"size",mode:this.mode,value:i,isBlank:n}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(t,r){var n=this.gullet.scanArgument(t);if(n==null)return null;var a=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:i};return r&&this.switchMode(a),o}parseGroup(t,r){var n=this.fetch(),a=n.text,i;if(a==="{"||a==="\\begingroup"){this.consume();var o=a==="{"?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,o),l=this.fetch();this.expect(o),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:ns.range(n,l),body:s,semisimple:a==="\\begingroup"||void 0}}else if(i=this.parseFunction(r,t)||this.parseSymbol(),i==null&&a[0]==="\\"&&!ZF.hasOwnProperty(a)){if(this.settings.throwOnError)throw new ct("Undefined control sequence: "+a,n);i=this.formatUnsupportedCmd(a),this.consume()}return i}formLigatures(t){for(var r=t.length-1,n=0;n<r;++n){var a=t[n],i=a.text;i==="-"&&t[n+1].text==="-"&&(n+1<r&&t[n+2].text==="-"?(t.splice(n,3,{type:"textord",mode:"text",loc:ns.range(a,t[n+2]),text:"---"}),r-=2):(t.splice(n,2,{type:"textord",mode:"text",loc:ns.range(a,t[n+1]),text:"--"}),r-=1)),(i==="'"||i==="`")&&t[n+1].text===i&&(t.splice(n,2,{type:"textord",mode:"text",loc:ns.range(a,t[n+1]),text:i+i}),r-=1)}}parseSymbol(){var t=this.fetch(),r=t.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),a=n.charAt(0)==="*";if(a&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new ct(`\\verb assertion failed --
3906
- please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:a}}iF.hasOwnProperty(r[0])&&!Jn[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',t),r=iF[r[0]]+r.slice(1));var i=ole.exec(r);i&&(r=r.substring(0,i.index),r==="i"?r="\u0131":r==="j"&&(r="\u0237"));var o;if(Jn[this.mode][r]){this.settings.strict&&this.mode==="math"&&ZC.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var s=Jn[this.mode][r].group,l=ns.range(t),u;if(Qoe.hasOwnProperty(s)){var c=s;u={type:"atom",mode:this.mode,family:c,loc:l,text:r}}else u={type:s,mode:this.mode,loc:l,text:r};o=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(sF(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),o={type:"textord",mode:"text",loc:ns.range(t),text:r};else return null;if(this.consume(),i)for(var f=0;f<i[0].length;f++){var d=i[0][f];if(!WC[d])throw new ct("Unknown accent ' "+d+"'",t);var p=WC[d][this.mode]||WC[d].text;if(!p)throw new ct("Accent "+d+" unsupported in "+this.mode+" mode",t);o={type:"accent",mode:this.mode,loc:ns.range(t),label:p,isStretchy:!1,isShifty:!0,base:o}}return o}};U6.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var SM=function(t,r){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new U6(t,r);delete n.gullet.macros.current["\\df@tag"];var a=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new ct("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:n.subparse([new Bs("\\df@tag")])}]}return a},QF=function(t,r,n){r.textContent="";var a=CM(t,n).toNode();r.appendChild(a)};typeof document!="undefined"&&document.compatMode!=="CSS1Compat"&&(typeof console!="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),QF=function(){throw new ct("KaTeX doesn't work in quirks mode.")});var ule=function(t,r){var n=CM(t,r).toMarkup();return n},cle=function(t,r){var n=new m2(r);return SM(t,n)},eq=function(t,r,n){if(n.throwOnError||!(t instanceof ct))throw t;var a=Ce.makeSpan(["katex-error"],[new as(r)]);return a.setAttribute("title",t.toString()),a.setAttribute("style","color:"+n.errorColor),a},CM=function(t,r){var n=new m2(r);try{var a=SM(t,n);return wse(a,t,n)}catch(i){return eq(i,t,n)}},dle=function(t,r){var n=new m2(r);try{var a=SM(t,n);return kse(a,t,n)}catch(i){return eq(i,t,n)}},fle="0.16.28",ple={Span:fp,Anchor:y2,SymbolNode:as,SvgNode:eu,PathNode:qu,LineNode:b2},tq={version:fle,render:QF,renderToString:ule,ParseError:ct,SETTINGS_SCHEMA:R6,__parse:cle,__renderToDomTree:CM,__renderToHTMLTree:dle,__setFontMetrics:Voe,__defineSymbol:L,__defineFunction:kt,__defineMacro:W,__domTree:ple};var Cwe=Ee(rq(),1),hle={"\\d":"\\mathrm{d}","\\R":"\\mathbb{R}","\\N":"\\mathbb{N}","\\Z":"\\mathbb{Z}","\\Q":"\\mathbb{Q}","\\C":"\\mathbb{C}"};function hp(e,t,r=!0){try{return tq.renderToString(e,{displayMode:t,output:r?"htmlAndMathml":"html",throwOnError:!1,errorColor:"#cc0000",macros:hle,strict:!1})}catch(n){return`<span class="katex-error" style="color:#cc0000" title="${String(n)}">${e}</span>`}}function St(e){return`calc(${typeof e=="number"?`${e}px`:e} * var(--edp-scale, 1))`}function ai(e){return{width:St(e),height:St(e)}}function tu(e){if(e==null||e==="")return;if(typeof e=="number")return St(e);let t=String(e).trim();return/^\d+(\.\d+)?px$/.test(t)?St(t):t}var nq=Ee(_t(),1);var k2=(0,nq.createContext)(!1),J6="1px solid #d1d5db",mle="#f3f4f6",gle="#e3e1dc",yle="var(--card, #fff)",mp="edp-table-first",aq={overflowX:"auto",margin:`${St("1.25rem")} 0`},iq={left:!1,right:!1,held:0,rtl:!1};function oq(e,t,r,n=0){return{left:t.left<e.left-1,right:t.right>e.right+1,held:n,rtl:r}}function sq(e,t){return Math.max(80,Math.round((e-t)*.8))}var LM={borderCollapse:"separate",borderSpacing:0,width:"100%",tableLayout:"auto",fontSize:St("0.875rem"),lineHeight:1.3,borderBlockStart:J6,borderInlineStart:J6};function S2(e){let t=e.gray?gle:e.header?mle:e.sticky?yle:void 0;return te(te(te({borderBlockEnd:J6,borderInlineEnd:J6,padding:`${St("4px")} ${St("6px")}`,verticalAlign:"middle",overflowWrap:"normal",wordBreak:"normal",hyphens:"manual"},t?{background:t}:{}),e.header?{fontWeight:600}:{}),e.sticky?{position:"sticky",insetInlineStart:0,zIndex:1}:{})}function C2(e){return Object.entries(e).map(([t,r])=>`${t.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}:${r}`).join(";")}function TM(e){let t=[],r=new Set,n=[];(e!=null?e:[]).forEach((o,s)=>{var u;let l=0;((u=o.content)!=null?u:[]).forEach(c=>{var p,y,x,k,w,S,T,E;for(;(p=n[s])!=null&&p[l];)l++;let f=Math.max(1,(x=(y=c.attrs)==null?void 0:y.colspan)!=null?x:1),d=Math.max(1,(w=(k=c.attrs)==null?void 0:k.rowspan)!=null?w:1);for(let z=s;z<s+d;z++){let N=(S=n[z])!=null?S:n[z]=[];for(let O=l;O<l+f;O++)N[O]=!0}for(let z=0;z<f;z++){let N=(E=(T=c.attrs)==null?void 0:T.colwidth)==null?void 0:E[z];N&&t[l+z]==null&&(t[l+z]=N)}l===0&&f===1&&r.add(c),l+=f})});let a=n.reduce((o,s)=>Math.max(o,s.length),0);return{columnWidths:t.some(o=>o!=null)?Array.from({length:a},(o,s)=>{var l;return(l=t[s])!=null?l:null}):[],stickyCells:r}}function EM(e){return e.replace(/(\d) (?=\d)/g,"$1\xA0").replace(/(\d) (?=[\p{L}%\p{Sc}]{1,3}(?![\p{L}\p{N}]))/gu,"$1\xA0")}var Eo=Ee($t(),1),Uu=Ee(_t(),1);var ble=typeof window!="undefined"?Uu.useLayoutEffect:Uu.useEffect;function lq({side:e}){return(0,Eo.jsx)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2.25",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,Eo.jsx)("path",{d:e==="left"?"M15 6l-6 6 6 6":"M9 6l6 6-6 6"})})}function uq({children:e}){let t=Yn(),r=(0,Uu.useRef)(null),[n,a]=(0,Uu.useState)(iq),i=(0,Uu.useCallback)(()=>{let f=r.current,d=f==null?void 0:f.querySelector("table");if(!f||!d)return;let p=f.querySelector(`.${mp}`),y=oq(f.getBoundingClientRect(),d.getBoundingClientRect(),getComputedStyle(f).direction==="rtl",p?p.getBoundingClientRect().width:0);a(x=>x.left===y.left&&x.right===y.right&&x.held===y.held&&x.rtl===y.rtl?x:y)},[]);ble(()=>{let f=r.current;if(!f)return;i(),f.addEventListener("scroll",i,{passive:!0});let d=typeof ResizeObserver!="undefined"?new ResizeObserver(i):null;d==null||d.observe(f);let p=f.querySelector("table");return p&&(d==null||d.observe(p)),()=>{f.removeEventListener("scroll",i),d==null||d.disconnect()}},[i]);let o=f=>{let d=r.current;d&&d.scrollBy({left:f*sq(d.clientWidth,n.held),behavior:"smooth"})},s=n.left||n.right,l=f=>s?(0,Eo.jsx)("div",{className:`edp-table-arrows edp-table-arrows--${f}`,children:(0,Eo.jsxs)("span",{dir:"ltr",className:"edp-table-arrows__pair",children:[(0,Eo.jsx)("button",{type:"button",className:"edp-table-arrow",onClick:()=>o(-1),disabled:!n.left,"aria-label":t.tableScrollLeft,children:(0,Eo.jsx)(lq,{side:"left"})}),(0,Eo.jsx)("button",{type:"button",className:"edp-table-arrow",onClick:()=>o(1),disabled:!n.right,"aria-label":t.tableScrollRight,children:(0,Eo.jsx)(lq,{side:"right"})})]})}):null,u=n.rtl?0:n.held,c=n.rtl?n.held:0;return(0,Eo.jsxs)("div",{className:"edp-table-frame",style:{margin:`${St("1.25rem")} 0`},children:[l("top"),(0,Eo.jsxs)("div",{style:{position:"relative"},children:[(0,Eo.jsx)("div",{ref:r,className:"edp-table-scroll",style:{overflowX:"auto"},children:e}),n.left&&(0,Eo.jsx)("span",{className:"edp-table-shade edp-table-shade--left",style:{left:u},"aria-hidden":"true"}),n.right&&(0,Eo.jsx)("span",{className:"edp-table-shade edp-table-shade--right",style:{right:c},"aria-hidden":"true"})]}),l("bottom")]})}var cq={1:{fontSize:"1.75em",fontWeight:700,lineHeight:1.2,margin:"0.6em 0 0.4em"},2:{fontSize:"1.4em",fontWeight:700,lineHeight:1.25,margin:"0.6em 0 0.35em"},3:{fontSize:"1.15em",fontWeight:600,lineHeight:1.3,margin:"0.5em 0 0.3em"}},dq={border:"#2563eb",background:"#e0f2fe"},fq={border:"#dc2626",background:"#fee2e2"};function xle(e){return{display:"inline-block",verticalAlign:"middle",border:`2px solid ${(e==null?void 0:e.border)||dq.border}`,background:(e==null?void 0:e.background)||dq.background,borderRadius:St("4px"),padding:"0.17em 0.37em"}}function vle(e){let t=(e==null?void 0:e.shape)==="circle"?"50%":"9999px";return{display:"inline-block",verticalAlign:"middle",border:`2px solid ${(e==null?void 0:e.border)||fq.border}`,background:(e==null?void 0:e.background)||fq.background,borderRadius:t,padding:"0.15em 0.45em"}}function wle(e,t){if(!(!e&&!t))return te(te({},e?{textAlign:e}:{}),t?{margin:0}:{})}function yl(e,t,r){return(0,rr.jsx)("div",{className:"exercise-content",children:e.content.map((n,a)=>Do(n,`node-${a}`,t,r))})}var kle=/^[\u00a0\u202f ]?[.,;:!?\u2026)\]}\u00bb\u201d\u2019%\u060c\u061b\u061f]+/,Sle=new Set(["blank","inlineChoiceSet"]);function pq(e,t,r,n){var o,s,l;let a=[],i=e!=null?e:[];for(let u=0;u<i.length;u++){let c=i[u],f=i[u+1],d=Sle.has(c.type)&&(f==null?void 0:f.type)==="text"?(s=kle.exec((o=f.text)!=null?o:""))==null?void 0:s[0]:void 0;if(!d||!f){a.push(Do(c,`${t}-${u}`,r,n));continue}let p=((l=f.text)!=null?l:"").slice(d.length);a.push((0,rr.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[(0,rr.jsx)("span",{style:{whiteSpace:"normal"},children:Do(c,`${t}-${u}-a`,r,n)}),Do(Ue(te({},f),{text:d}),`${t}-${u}-p`,r,n)]},`${t}-${u}`)),p&&a.push(Do(Ue(te({},f),{text:p}),`${t}-${u+1}`,r,n)),u++}return a}function Do(e,t,r,n){var a,i,o,s,l,u,c,f,d,p,y,x,k,w,S,T,E,z,N,O,H,U,J,K,Y,ye,se,ue,Se,Me,de,Re,it,Ie,Oe,me,be,qe,Ke,je,Ye,mt,At,zt,Ht,Yr,Hr,xt,Ut,wr;switch(e.type){case"choiceSet":case"inlineChoiceSet":return(0,rr.jsx)(Q6,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"blank":return e.attrs.mode==="typed"?(0,rr.jsx)(ex,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t):(0,rr.jsx)(tx,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"blankPool":return(0,rr.jsx)(rx,{node:e},t);case"inlinePool":return(0,rr.jsx)(nx,{node:e},t);case"matchingSet":return(0,rr.jsx)(ax,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"aiAnswerInput":return(0,rr.jsx)(ix,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"openResponseNode":return(0,rr.jsx)(ox,{node:e,validationFeedback:r==null?void 0:r.get(e.id),readOnly:n==null?void 0:n.readOnly,mediaHandler:n==null?void 0:n.mediaHandler},t);case"mathResponse":return(0,rr.jsx)(sx,{nodeId:e.id,placeholder:(a=e.attrs)==null?void 0:a.placeholder,hint:(i=e.attrs)==null?void 0:i.hint,validationFeedback:r==null?void 0:r.get(e.id),readOnly:n==null?void 0:n.readOnly},t);case"codingResponse":return(0,rr.jsx)(lx,{node:e,validationFeedback:r==null?void 0:r.get(e.id),readOnly:n==null?void 0:n.readOnly,executor:n==null?void 0:n.codeExecutor},t);case"aiEvaluationConfig":return null;case"paragraph":{let et=e.attrs,De=et==null?void 0:et.textAlign,ot=(et==null?void 0:et.dir)||void 0;return(0,rr.jsx)("p",{dir:ot,style:wle(De,n==null?void 0:n.inTable),children:pq(e.content,t,r,n)},t)}case"heading":{let et=(o=e.attrs.level)!=null?o:1,De=`h${et}`,ot=e.attrs,Lt=ot==null?void 0:ot.textAlign,ft=(ot==null?void 0:ot.dir)||void 0,tt=(s=cq[et])!=null?s:cq[3];return(0,rr.jsx)(De,{dir:ft,style:te(te({},tt),Lt?{textAlign:Lt}:{}),children:pq(e.content,t,r,n)},t)}case"blockquote":{let et=e.attrs,De=(et==null?void 0:et.dir)||void 0,ot=et==null?void 0:et.textAlign;return(0,rr.jsx)("blockquote",{dir:De,style:te({borderInlineStart:"3px solid #d6d3cc",paddingInlineStart:"1em",margin:"0.75em 0",color:"#565b66",fontStyle:"italic"},ot?{textAlign:ot}:{}),children:(l=e.content)==null?void 0:l.map((Lt,ft)=>Do(Lt,`${t}-${ft}`,r,n))},t)}case"text":{let et=e,De=n!=null&&n.inTable?EM((u=et.text)!=null?u:""):(c=et.text)!=null?c:"",ot=(f=et.marks)!=null?f:[];if(ot.length===0)return(0,rr.jsx)("span",{children:De},t);let Lt={};for(let tt of ot)tt.type==="textStyle"&&((d=tt.attrs)!=null&&d.color&&(Lt.color=tt.attrs.color),(p=tt.attrs)!=null&&p.fontSize&&(Lt.fontSize=tt.attrs.fontSize),(y=tt.attrs)!=null&&y.fontFamily&&(Lt.fontFamily=tt.attrs.fontFamily));let ft=De;for(let tt of ot)switch(tt.type){case"bold":ft=(0,rr.jsx)("strong",{children:ft});break;case"italic":ft=(0,rr.jsx)("em",{children:ft});break;case"underline":ft=(0,rr.jsx)("u",{children:ft});break;case"strike":ft=(0,rr.jsx)("s",{children:ft});break;case"code":ft=(0,rr.jsx)("code",{children:ft});break;case"subscript":ft=(0,rr.jsx)("sub",{children:ft});break;case"superscript":ft=(0,rr.jsx)("sup",{children:ft});break;case"boxedText":ft=(0,rr.jsx)("span",{style:xle(tt.attrs),children:ft});break;case"circleText":ft=(0,rr.jsx)("span",{style:vle(tt.attrs),children:ft});break}return(0,rr.jsx)("span",{style:Object.keys(Lt).length>0?Lt:void 0,children:ft},t)}case"hardBreak":return(0,rr.jsx)("br",{},t);case"resizableImage":return(0,rr.jsx)("img",{src:((x=e.attrs)==null?void 0:x.src)||void 0,alt:((k=e.attrs)==null?void 0:k.alt)||"",style:{display:"inline-block",verticalAlign:"middle",width:(S=tu(((w=e.attrs)==null?void 0:w.width)||void 0))!=null?S:"auto",height:(E=tu(((T=e.attrs)==null?void 0:T.height)||void 0))!=null?E:"auto",maxWidth:"100%"}},t);case"resizableAudio":{let et=(z=e.attrs)!=null?z:{src:""},De=(n==null?void 0:n.readOnly)===!0;return(0,rr.jsx)(Nu,{src:et.src||"",maxPlays:De?null:et.maxPlays,learnerSpeed:et.learnerSpeed,speed:et.speed,allowSeek:De?null:et.allowSeek},t)}case"resizableVideo":return(0,rr.jsx)("video",{src:((N=e.attrs)==null?void 0:N.src)||void 0,controls:!0,style:{display:"inline-block",verticalAlign:"middle",width:(H=tu(((O=e.attrs)==null?void 0:O.width)||void 0))!=null?H:"auto",height:(J=tu(((U=e.attrs)==null?void 0:U.height)||void 0))!=null?J:"auto",maxWidth:"100%"}},t);case"youtubeEmbed":return(0,rr.jsx)("iframe",{src:`https://www.youtube.com/embed/${((K=e.attrs)==null?void 0:K.videoId)||""}`,width:((Y=e.attrs)==null?void 0:Y.width)||480,height:((ye=e.attrs)==null?void 0:ye.height)||270,allowFullScreen:!0,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",style:{display:"inline-block",verticalAlign:"middle",border:0,width:tu(((se=e.attrs)==null?void 0:se.width)||480),height:tu(((ue=e.attrs)==null?void 0:ue.height)||270)}},t);case"inlineMath":return(0,rr.jsx)("span",{dir:"ltr",style:{unicodeBidi:"isolate",display:"inline-block"},className:"math-inline",dangerouslySetInnerHTML:{__html:hp((Me=(Se=e.attrs)==null?void 0:Se.latex)!=null?Me:"",!1,!0)}},t);case"blockMath":return(0,rr.jsx)("div",{dir:"ltr",style:{unicodeBidi:"isolate",textAlign:"center",margin:"1em 0"},className:"math-block",dangerouslySetInnerHTML:{__html:hp((Re=(de=e.attrs)==null?void 0:de.latex)!=null?Re:"",!0,!0)}},t);case"variable":return(0,rr.jsx)("span",{className:"variable",children:`{${(it=e.attrs)==null?void 0:it.name}}`},t);default:{let et=e;if(et.type==="bulletList")return(0,rr.jsx)("ul",{style:{listStyleType:"disc",paddingLeft:"1.5em",margin:"0.5em 0"},children:(Ie=et.content)==null?void 0:Ie.map((De,ot)=>Do(De,`${t}-${ot}`,r,n))},t);if(et.type==="orderedList")return(0,rr.jsx)("ol",{style:{listStyleType:"decimal",paddingLeft:"1.5em",margin:"0.5em 0"},children:(Oe=et.content)==null?void 0:Oe.map((De,ot)=>Do(De,`${t}-${ot}`,r,n))},t);if(et.type==="listItem")return(0,rr.jsx)("li",{children:(me=et.content)==null?void 0:me.map((De,ot)=>Do(De,`${t}-${ot}`,r,n))},t);if(et.type==="table"){let De=TM(et.content),ot=Ue(te({},n),{inTable:!0,stickyCells:De.stickyCells});return(0,rr.jsx)(uq,{children:(0,rr.jsxs)("table",{style:LM,children:[De.columnWidths.length>0&&(0,rr.jsx)("colgroup",{children:De.columnWidths.map((Lt,ft)=>(0,rr.jsx)("col",{style:Lt?{width:St(Lt)}:void 0},ft))}),(0,rr.jsx)("tbody",{children:(be=et.content)==null?void 0:be.map((Lt,ft)=>Do(Lt,`${t}-${ft}`,r,ot))})]})},t)}return et.type==="tableRow"?(0,rr.jsx)("tr",{children:(qe=et.content)==null?void 0:qe.map((De,ot)=>Do(De,`${t}-${ot}`,r,n))},t):et.type==="tableCell"?(0,rr.jsx)("td",{colSpan:(Ke=et.attrs)==null?void 0:Ke.colspan,rowSpan:(je=et.attrs)==null?void 0:je.rowspan,className:(Ye=n==null?void 0:n.stickyCells)!=null&&Ye.has(et)?mp:void 0,style:S2({header:!1,gray:!!((mt=et.attrs)!=null&&mt.gray),sticky:!!((At=n==null?void 0:n.stickyCells)!=null&&At.has(et))}),children:(0,rr.jsx)(k2.Provider,{value:!0,children:(zt=et.content)==null?void 0:zt.map((De,ot)=>Do(De,`${t}-${ot}`,r,n))})},t):et.type==="tableHeader"?(0,rr.jsx)("th",{colSpan:(Ht=et.attrs)==null?void 0:Ht.colspan,rowSpan:(Yr=et.attrs)==null?void 0:Yr.rowspan,className:(Hr=n==null?void 0:n.stickyCells)!=null&&Hr.has(et)?mp:void 0,style:S2({header:!0,gray:!!((xt=et.attrs)!=null&&xt.gray),sticky:!!((Ut=n==null?void 0:n.stickyCells)!=null&&Ut.has(et))}),children:(0,rr.jsx)(k2.Provider,{value:!0,children:(wr=et.content)==null?void 0:wr.map((De,ot)=>Do(De,`${t}-${ot}`,r,n))})},t):(console.warn(`Unknown node type during interpretation: ${e.type}`),null)}}}function Ra(e,t){return e.map(r=>{var n,a,i,o,s,l,u,c,f,d,p,y,x,k,w,S,T,E,z,N,O,H,U,J,K,Y,ye,se,ue,Se,Me,de,Re,it,Ie,Oe,me;if(r.type==="text"){let be=gp(t!=null&&t.inTable?EM((n=r.text)!=null?n:""):(a=r.text)!=null?a:""),qe=(i=r.marks)!=null?i:[],Ke=[];for(let je of qe)je.type==="textStyle"&&((o=je.attrs)!=null&&o.color&&Ke.push(`color:${je.attrs.color}`),(s=je.attrs)!=null&&s.fontSize&&Ke.push(`font-size:${je.attrs.fontSize}`),(l=je.attrs)!=null&&l.fontFamily&&Ke.push(`font-family:${je.attrs.fontFamily}`));Ke.length>0&&(be=`<span style="${Ke.join(";")}">${be}</span>`);for(let je of qe)switch(je.type){case"bold":be=`<strong>${be}</strong>`;break;case"italic":be=`<em>${be}</em>`;break;case"underline":be=`<u>${be}</u>`;break;case"strike":be=`<s>${be}</s>`;break;case"code":be=`<code>${be}</code>`;break;case"subscript":be=`<sub>${be}</sub>`;break;case"superscript":be=`<sup>${be}</sup>`;break;case"boxedText":{let Ye=((u=je.attrs)==null?void 0:u.border)||"#2563eb",mt=((c=je.attrs)==null?void 0:c.background)||"#e0f2fe";be=`<span style="display:inline-block;vertical-align:middle;border:2px solid ${Ye};background:${mt};border-radius:${St("4px")};padding:0.17em 0.37em">${be}</span>`;break}case"circleText":{let Ye=((f=je.attrs)==null?void 0:f.border)||"#dc2626",mt=((d=je.attrs)==null?void 0:d.background)||"#fee2e2",At=((p=je.attrs)==null?void 0:p.shape)==="circle"?"50%":"9999px";be=`<span style="display:inline-block;vertical-align:middle;border:2px solid ${Ye};background:${mt};border-radius:${At};padding:0.15em 0.45em">${be}</span>`;break}}return be}if(r.type==="paragraph"){let be=r.content?Ra(r.content,t):"",qe=(y=r.attrs)==null?void 0:y.dir,Ke=(x=r.attrs)==null?void 0:x.textAlign,je=qe?` dir="${qe}"`:"",Ye=[Ke?`text-align:${Ke}`:"",t!=null&&t.inTable?"margin:0":""].filter(Boolean).join(";"),mt=Ye?` style="${Ye}"`:"";return t!=null&&t.stripParagraphs?be:`<p${je}${mt}>${be}</p>`}if(r.type==="hardBreak")return"<br/>";if(r.type==="table"){let be=TM(r.content),qe=r.content?Ra(r.content,Ue(te({},t),{inTable:!0,stickyCells:be.stickyCells})):"",Ke=be.columnWidths.length?`<colgroup>${be.columnWidths.map(je=>je?`<col style="width:${St(je)}">`:"<col>").join("")}</colgroup>`:"";return`<div style="${C2(aq)}"><table style="${C2(LM)}">${Ke}<tbody>${qe}</tbody></table></div>`}if(r.type==="tableRow")return`<tr>${r.content?Ra(r.content,t):""}</tr>`;if(r.type==="tableCell"){let be=r.content?Ra(r.content,t):"",qe=(k=r.attrs)!=null&&k.colspan?` colspan="${r.attrs.colspan}"`:"",Ke=(w=r.attrs)!=null&&w.rowspan?` rowspan="${r.attrs.rowspan}"`:"",je=!!((S=t==null?void 0:t.stickyCells)!=null&&S.has(r)),Ye=je?` class="${mp}"`:"";return`<td${qe}${Ke}${Ye} style="${C2(S2({header:!1,gray:!!((T=r.attrs)!=null&&T.gray),sticky:je}))}">${be}</td>`}if(r.type==="tableHeader"){let be=r.content?Ra(r.content,t):"",qe=(E=r.attrs)!=null&&E.colspan?` colspan="${r.attrs.colspan}"`:"",Ke=(z=r.attrs)!=null&&z.rowspan?` rowspan="${r.attrs.rowspan}"`:"",je=!!((N=t==null?void 0:t.stickyCells)!=null&&N.has(r)),Ye=je?` class="${mp}"`:"";return`<th${qe}${Ke}${Ye} style="${C2(S2({header:!0,gray:!!((O=r.attrs)!=null&&O.gray),sticky:je}))}">${be}</th>`}if(r.type==="bulletList")return`<ul style="list-style-type:disc;padding-left:1.5em">${r.content?Ra(r.content,t):""}</ul>`;if(r.type==="orderedList")return`<ol style="list-style-type:decimal;padding-left:1.5em">${r.content?Ra(r.content,t):""}</ol>`;if(r.type==="listItem")return`<li>${r.content?Ra(r.content,t):""}</li>`;if(r.type==="blockquote"){let be=r.content?Ra(r.content,t):"";return`<blockquote${(H=r.attrs)!=null&&H.dir?` dir="${r.attrs.dir}"`:""} style="border-inline-start:3px solid #d6d3cc;padding-inline-start:1em;margin:0.75em 0;color:#565b66;font-style:italic">${be}</blockquote>`}if(r.type==="resizableImage"){let be=(U=r.attrs)!=null?U:{},qe=Z6(be.width),Ke=Z6(be.height);return`<img src="${gp((J=be.src)!=null?J:"")}" alt="${gp((K=be.alt)!=null?K:"")}" style="display:inline-block;vertical-align:middle;max-width:100%;${qe?`width:${qe};`:""}${Ke?`height:${Ke};`:""}"/>`}if(r.type==="resizableAudio"){let be=(Y=r.attrs)!=null?Y:{};return`<audio controls preload="metadata" src="${gp((ye=be.src)!=null?ye:"")}" style="display:inline-block;vertical-align:middle;width:${St("260px")};max-width:100%;height:${St("36px")}"></audio>`}if(r.type==="resizableVideo"){let be=(se=r.attrs)!=null?se:{},qe=Z6(be.width),Ke=Z6(be.height);return`<video src="${gp((ue=be.src)!=null?ue:"")}" controls style="display:inline-block;vertical-align:middle;max-width:100%;${qe?`width:${qe};`:""}${Ke?`height:${Ke};`:""}"></video>`}if(r.type==="youtubeEmbed"){let be=(Se=r.attrs)!=null?Se:{};return`<iframe src="https://www.youtube.com/embed/${gp((Me=be.videoId)!=null?Me:"")}" width="${be.width||480}" height="${be.height||270}" allowfullscreen frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" style="display:inline-block;vertical-align:middle;border:0;width:${tu(be.width||480)};height:${tu(be.height||270)}"></iframe>`}return r.type==="inlineMath"?`<span dir="ltr" class="math-inline" style="unicode-bidi:isolate;display:inline-block">${hp((Re=(de=r.attrs)==null?void 0:de.latex)!=null?Re:"",!1,!0)}</span>`:r.type==="blockMath"?`<div dir="ltr" class="math-block" style="unicode-bidi:isolate;text-align:center;margin:1em 0">${hp((Ie=(it=r.attrs)==null?void 0:it.latex)!=null?Ie:"",!0,!0)}</div>`:r.type==="variable"?`<span class="variable">{${gp((me=(Oe=r.attrs)==null?void 0:Oe.name)!=null?me:"")}}</span>`:""}).join("")}function Z6(e){var t;return e==null||e===""?null:(t=tu(e))!=null?t:null}function gp(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var hq=Ee($t(),1),Nd=Ee(_t(),1);var Cle={sm:.875,md:1,lg:1.25,xl:1.5},DM=(0,Nd.createContext)(null);function Mle(e,t){let r=te({},e!=null?e:{});if(t)for(let[n,a]of Object.entries(t))a!==void 0&&(r[n]=a);return r}function _le(e){var t;return typeof e=="number"?Number.isFinite(e)&&e>0?e:1:e&&(t=Cle[e])!=null?t:1}function bl(e){var r,n,a;let t=e!=null?e:{};return{scale:_le(t.size),sizeSet:t.size!==void 0,choiceLabels:(r=t.choiceLabels)!=null?r:"marks",choiceColumns:t.choiceColumns,layoutBy:(n=t.layoutBy)!=null?n:"window",motion:(a=t.motion)!=null?a:"full",shuffleSeed:t.shuffleSeed}}function Ns(e){let t=(0,Nd.useContext)(DM);return(0,Nd.useMemo)(()=>Mle(t,e),[t,e==null?void 0:e.size,e==null?void 0:e.choiceLabels,e==null?void 0:e.choiceColumns,e==null?void 0:e.layoutBy,e==null?void 0:e.motion,e==null?void 0:e.shuffleSeed])}function Os(){let e=(0,Nd.useContext)(DM);return(0,Nd.useMemo)(()=>bl(e),[e])}function Ps({display:e,children:t}){let r=Ns(e);return(0,hq.jsx)(DM.Provider,{value:r,children:t})}function xl(e){if(e.sizeSet)return{"--edp-scale":String(e.scale)}}function yp(){let{motion:e}=Os();return{hop:e==="none"?"":"animate-hop",shake:e==="full"?"animate-shake":"",wobble:e==="full"?"animate-wobble":""}}function Ale(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return t>>>0}function Lle(e){return()=>{e=e+1831565813|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}function M2(e,t){let r=[...e],n=Lle(Ale(t));for(let a=r.length-1;a>0;a--){let i=Math.floor(n()*(a+1));[r[a],r[i]]=[r[i],r[a]]}return r}var Zn=Ee($t(),1),Io=Ee(_t(),1),mq=Ee(Qh(),1);var Tle=typeof window!="undefined"?Io.useLayoutEffect:Io.useEffect;function IM({node:e}){var t,r,n;if(e.type==="text"){if(!e.marks||e.marks.length===0)return(0,Zn.jsx)(Zn.Fragment,{children:e.text});let a=e.text||"";for(let i of e.marks)i.type==="bold"?a=(0,Zn.jsx)("strong",{children:a}):i.type==="italic"?a=(0,Zn.jsx)("em",{children:a}):i.type==="underline"?a=(0,Zn.jsx)("u",{children:a}):i.type==="strike"?a=(0,Zn.jsx)("s",{children:a}):i.type==="textStyle"&&((t=i.attrs)!=null&&t.color)&&(a=(0,Zn.jsx)("span",{style:{color:i.attrs.color},children:a}));return(0,Zn.jsx)(Zn.Fragment,{children:a})}return e.type==="paragraph"?(0,Zn.jsx)("span",{className:"block",children:(n=(r=e.content)==null?void 0:r.map((a,i)=>(0,Zn.jsx)(IM,{node:a},i)))!=null?n:(0,Zn.jsx)("br",{})}):e.type==="hardBreak"?(0,Zn.jsx)("br",{}):e.content?(0,Zn.jsx)("span",{className:"block",children:e.content.map((a,i)=>(0,Zn.jsx)(IM,{node:a},i))}):null}function Ele({nodes:e}){return(0,Zn.jsx)("span",{className:"block space-y-1",style:{color:"var(--ink, #1d2025)"},children:e.map((t,r)=>(0,Zn.jsx)(IM,{node:t},r))})}function Dle(e,t,r,n=8){let a=e.top-t.height-n;a<n&&(a=e.bottom+n);let i=e.left+e.width/2-t.width/2;return i=Math.max(n,Math.min(i,r-t.width-n)),{top:a,left:i}}function Od({hint:e}){let t=Yn(),[r,n]=(0,Io.useState)(!1),[a,i]=(0,Io.useState)(!1),[o,s]=(0,Io.useState)(null),[l,u]=(0,Io.useState)({}),c=(0,Io.useRef)(null),f=(0,Io.useRef)(null);(0,Io.useEffect)(()=>{if(!a)return;let w=S=>{let T=S.target;c.current&&!c.current.contains(T)&&f.current&&!f.current.contains(T)&&(i(!1),n(!1))};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[a]);let d=(0,Io.useCallback)(()=>{let w=c.current,S=f.current;!w||!S||s(Dle(w.getBoundingClientRect(),S.getBoundingClientRect(),window.innerWidth))},[]);Tle(()=>{if(!r){s(null);return}let w=c.current;if(w){let S=getComputedStyle(w);u({direction:S.direction,fontFamily:S.fontFamily,"--edp-scale":S.getPropertyValue("--edp-scale").trim()||"1"})}return d(),window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d)}},[r,d]);let p=()=>n(!0),y=()=>{a||n(!1)},x=w=>{w.stopPropagation(),a?(i(!1),n(!1)):(i(!0),n(!0))},k=r&&typeof document!="undefined"?(0,mq.createPortal)((0,Zn.jsx)("span",{className:"edpire-scope",style:Ue(te({},l),{display:"contents"}),children:(0,Zn.jsx)("span",{ref:f,role:"tooltip",className:"player-blank-hint-pop",onClick:w=>w.stopPropagation(),onMouseEnter:p,onMouseLeave:y,style:{position:"fixed",top:o?o.top:0,left:o?o.left:0,bottom:"auto",transform:"none",margin:0,visibility:o?"visible":"hidden"},children:(0,Zn.jsx)(Ele,{nodes:e})})}),document.body):null;return(0,Zn.jsxs)("span",{ref:c,className:"relative inline-flex items-center align-middle",onMouseEnter:p,onMouseLeave:y,children:[(0,Zn.jsx)("button",{type:"button",onClick:x,className:hr("player-blank-hint-btn select-none",a&&"player-blank-hint-btn--pinned"),"aria-label":t.showHint,"aria-expanded":r,children:"?"}),k]})}function Ku({hint:e}){return!e||e.length===0?null:(0,Zn.jsx)(Od,{hint:e})}function Ile(e){return[...e].map(t=>({v:t,r:Math.random()})).sort((t,r)=>t.r-r.r).map(t=>t.v)}var zle=e=>e.replace(/ {2,}/g,t=>"&nbsp;".repeat(t.length-1)+" "),Ble=new Set(["image","resizableImage","resizableVideo","youtubeEmbed"]);function bq(e){return(e!=null?e:[]).some(t=>Ble.has(t==null?void 0:t.type)||bq(t==null?void 0:t.content))}var gq=()=>(0,Qn.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,children:(0,Qn.jsx)("path",{d:"M5 13l4 4L19 7"})}),yq=()=>(0,Qn.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,children:(0,Qn.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})});function Q6({node:e,validationFeedback:t}){var me,be,qe,Ke;let r=Li(),n=Yn(),a=Os(),i=yp(),{id:o,content:s,attrs:l}=e,u=(me=l.shuffle)!=null?me:!1,c="prompt"in l?l.prompt:void 0,f="separator"in l&&(be=l.separator)!=null?be:"/",d="pickLimit"in l&&l.pickLimit?l.pickLimit:1,p=l.hideCount===!0,y=p||d>1,x=!p&&d>1,k="layout"in l&&(qe=l.layout)!=null?qe:"row",w=e.type==="inlineChoiceSet",S=JSON.stringify(s),T=u&&a.shuffleSeed!==void 0,E=(0,ru.useMemo)(()=>T?M2(s,`${a.shuffleSeed}:${o}`):null,[T,a.shuffleSeed,o,S]),[z,N]=(0,ru.useState)(s);(0,ru.useEffect)(()=>{T||N(u?Ile(s):s)},[u,T,S]);let O=E!=null?E:z,[H,U]=(0,ru.useState)(new Set),J=(Ke=t==null?void 0:t.showFeedback)!=null?Ke:!1,K=(t==null?void 0:t.correctChoiceIds)||[];(0,ru.useEffect)(()=>{let je=Ye=>{let At=Ye.answers.find(zt=>zt.nodeId===o&&zt.type==="choiceSet");At&&"selectedIds"in At.answer&&U(new Set(At.answer.selectedIds))};return r.on("answers:prefill",je),()=>r.off("answers:prefill",je)},[o,r]),(0,ru.useEffect)(()=>{r.emit({type:"answer:changed",answer:{nodeId:o,type:"choiceSet",timestamp:Date.now(),answer:{selectedIds:Array.from(H)}}})},[H,o,r]);let Y=je=>{J||U(Ye=>{let mt=new Set(Ye);return y?mt.has(je)?mt.delete(je):(p||mt.size<d)&&mt.add(je):mt.has(je)?mt.delete(je):(mt.clear(),mt.add(je)),mt})},ye=je=>zle(Ra(je.content)),se=je=>{let Ye=H.has(je),mt=K.includes(je);return J?mt&&Ye?"correct":mt&&!Ye?"correct-unchosen":!mt&&Ye?"incorrect":"muted":Ye?"selected":"idle"},ue={idle:"",selected:"player-choice--selected",correct:hr("player-choice--correct",i.hop),"correct-unchosen":"player-choice--correct-unchosen",incorrect:hr("player-choice--incorrect",i.shake),muted:"player-choice--muted"},Se={idle:"",selected:"player-inline-choice--selected",correct:hr("player-inline-choice--correct",i.hop),"correct-unchosen":"player-inline-choice--correct-unchosen",incorrect:hr("player-inline-choice--incorrect",i.shake),muted:"player-inline-choice--muted"};if(w)return(0,Qn.jsxs)("span",{className:"inline-choice",children:[c&&(0,Qn.jsxs)("span",{className:"mr-2 font-medium",children:[c,x?(0,Qn.jsx)("span",{className:"ms-1 opacity-60",children:n.chooseN(d)}):null]}),O.map((je,Ye)=>(0,Qn.jsxs)(ru.Fragment,{children:[(0,Qn.jsx)("button",{type:"button",disabled:J,onClick:()=>Y(je.id),className:hr("player-inline-choice",Se[se(je.id)]),"aria-pressed":H.has(je.id),dangerouslySetInnerHTML:{__html:ye(je)}}),Ye<O.length-1&&(0,Qn.jsx)("span",{className:"mx-1",children:f})]},je.id)),l.hint&&l.hint.length>0&&(0,Qn.jsx)(Od,{hint:l.hint})]});let Me=a.layoutBy==="box",de=a.choiceColumns?Math.min(a.choiceColumns,O.length):0,Re=de?{gridAutoRows:"1fr",gridTemplateColumns:`repeat(${de}, minmax(0, 1fr))`}:{gridAutoRows:"1fr"},it=O.some(je=>bq(je.content)),Ie=a.choiceLabels==="letters",Oe=je=>{var Ye;return(Ye=n.choiceLetters[je])!=null?Ye:String(je+1)};return(0,Qn.jsxs)("div",{className:hr("cs-player my-4 space-y-3",Me&&"cs-player--box"),children:[c&&(0,Qn.jsxs)("p",{className:"font-medium",children:[c,x?(0,Qn.jsx)("span",{className:"ms-2 text-sm opacity-70",children:n.chooseN(d)}):null]}),l.hint&&l.hint.length>0&&(0,Qn.jsx)(Od,{hint:l.hint}),(0,Qn.jsx)("div",{className:hr("cs-player__grid",k==="row"&&"cs-player__grid--row"),style:Re,children:O.map((je,Ye)=>{let mt=se(je.id),At=mt==="incorrect"?"incorrect":mt==="correct"||mt==="correct-unchosen"?"correct":null;return(0,Qn.jsxs)("button",{type:"button",disabled:J,onClick:()=>Y(je.id),className:hr("player-choice",it&&"player-choice--tile",ue[mt]),"aria-pressed":H.has(je.id),children:[(0,Qn.jsx)("span",{className:hr("player-choice__mark",y?"player-choice__mark--box":"player-choice__mark--radio",Ie&&"player-choice__mark--letter"),children:Ie?Oe(Ye):mt==="incorrect"?(0,Qn.jsx)(yq,{}):(0,Qn.jsx)(gq,{})}),(0,Qn.jsx)("span",{className:"player-choice__text",dangerouslySetInnerHTML:{__html:ye(je)}}),Ie&&At&&(0,Qn.jsx)("span",{className:`player-choice__verdict player-choice__verdict--${At}`,"aria-hidden":"true",children:At==="incorrect"?(0,Qn.jsx)(yq,{}):(0,Qn.jsx)(gq,{})})]},je.id)})})]})}var io=Ee($t(),1),vl=Ee(_t(),1);function ex({node:e,validationFeedback:t}){var H;let r=Li(),n=Yn(),a=yp(),{id:i,attrs:o}=e,{placeholder:s="___",width:l="auto",hint:u}=o,c=(0,vl.useRef)(null),f=s.trim().split(/\s+/).filter(Boolean).length,d=(0,vl.useContext)(k2),p=!d&&l==="auto"&&f>=4,[y,x]=(0,vl.useState)(""),k=(H=t==null?void 0:t.showFeedback)!=null?H:!1,w=t==null?void 0:t.state,S=w==="validating",T=t==null?void 0:t.displayAnswer,E=t==null?void 0:t.message;(0,vl.useEffect)(()=>{let U=J=>{let Y=J.answers.find(ye=>ye.nodeId===i&&ye.type==="blank");Y&&"mode"in Y.answer&&Y.answer.mode==="typed"&&"text"in Y.answer&&x(Y.answer.text)};return r.on("answers:prefill",U),()=>r.off("answers:prefill",U)},[i,r]),(0,vl.useEffect)(()=>{r.emit({type:"answer:changed",answer:{nodeId:i,type:"blank",timestamp:Date.now(),answer:{mode:"typed",text:y}}})},[y,i,r]);let z=U=>{x(U.target.value)},N=(0,vl.useCallback)(()=>{let U=c.current;U&&(U.style.height="auto",U.style.height=`${U.scrollHeight}px`)},[]);(0,vl.useEffect)(()=>{N()},[y,N]);let O=k&&!S;return(0,io.jsxs)("span",{className:d?"player-blank-cell":hr("inline-flex flex-wrap items-center gap-x-1 gap-y-0.5 align-middle max-w-full",p&&"w-full"),children:[(0,io.jsx)("span",{className:d?"player-blank-cell__box":hr("relative inline-block shrink-0 min-w-0 max-w-full",p&&"w-full flex-1"),children:O?(0,io.jsx)("span",{className:hr("player-typed-blank-feedback",d&&"player-typed-blank-feedback--cell",p&&"w-full",w==="correct"&&hr("player-typed-blank-feedback--correct",a.hop),w==="partial"&&"player-typed-blank-feedback--partial",w==="incorrect"&&hr("player-typed-blank-feedback--incorrect",a.wobble)),children:y||(0,io.jsx)("span",{className:"opacity-40",children:s})}):(0,io.jsxs)(io.Fragment,{children:[(0,io.jsx)("textarea",{ref:c,"aria-label":n.blankAnswerAria,placeholder:s,value:y,onChange:z,disabled:k,rows:1,wrap:d?"off":void 0,className:hr("player-typed-blank",d&&"player-typed-blank--cell",p&&"w-full",S&&"player-typed-blank--pending"),style:d?void 0:l!=="auto"?{width:l}:p?{width:"100%"}:{width:`${Math.max(7,y.length+1)}ch`,maxWidth:"100%"}}),!y&&!S&&!d&&(0,io.jsx)("span",{className:"absolute right-1 top-1/2 -translate-y-1/2 pointer-events-none text-sm",style:{color:"var(--ink-faint, #8d93a0)"},children:"\u270E"}),S&&(0,io.jsx)("span",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,io.jsx)("span",{className:"player-typed-blank-spinner","aria-label":n.aiEvaluationInProgressAria})})]})}),k&&w==="incorrect"&&T&&(0,io.jsxs)("span",{className:"player-blank-reveal",children:["(",T,")"]}),k&&E&&(0,io.jsx)("span",{className:hr("player-blank-feedback",w==="correct"&&"player-blank-feedback--correct",w==="partial"&&"player-blank-feedback--partial",w==="incorrect"&&"player-blank-feedback--incorrect"),children:E}),u&&u.length>0&&(0,io.jsx)(Od,{hint:u})]})}var kl=Ee($t(),1),UM=Ee(_t(),1);var Pe=Ee(_t()),kp=Ee(Qh());var ii=Ee(_t());var _2=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function bp(e){let t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function ux(e){return"nodeType"in e}function oo(e){var t,r;return e?bp(e)?e:ux(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function cx(e){let{Document:t}=oo(e);return e instanceof t}function em(e){return bp(e)?!1:e instanceof oo(e).HTMLElement}function BM(e){return e instanceof oo(e).SVGElement}function xp(e){return e?bp(e)?e.document:ux(e)?cx(e)?e:em(e)||BM(e)?e.ownerDocument:document:document:document}var Vu=_2?ii.useLayoutEffect:ii.useEffect;function A2(e){let t=(0,ii.useRef)(e);return Vu(()=>{t.current=e}),(0,ii.useCallback)(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.current==null?void 0:t.current(...n)},[])}function vq(){let e=(0,ii.useRef)(null),t=(0,ii.useCallback)((n,a)=>{e.current=setInterval(n,a)},[]),r=(0,ii.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function tm(e,t){t===void 0&&(t=[e]);let r=(0,ii.useRef)(e);return Vu(()=>{r.current!==e&&(r.current=e)},t),r}function rm(e,t){let r=(0,ii.useRef)();return(0,ii.useMemo)(()=>{let n=e(r.current);return r.current=n,n},[...t])}function L2(e){let t=A2(e),r=(0,ii.useRef)(null),n=(0,ii.useCallback)(a=>{a!==r.current&&(t==null||t(a,r.current)),r.current=a},[]);return[r,n]}function T2(e){let t=(0,ii.useRef)();return(0,ii.useEffect)(()=>{t.current=e},[e]),t.current}var zM={};function E2(e,t){return(0,ii.useMemo)(()=>{if(t)return t;let r=zM[e]==null?0:zM[e]+1;return zM[e]=r,e+"-"+r},[e,t])}function wq(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return n.reduce((i,o)=>{let s=Object.entries(o);for(let[l,u]of s){let c=i[l];c!=null&&(i[l]=c+e*u)}return i},te({},t))}}var vp=wq(1),D2=wq(-1);function Rle(e){return"clientX"in e&&"clientY"in e}function dx(e){if(!e)return!1;let{KeyboardEvent:t}=oo(e.target);return t&&e instanceof t}function Nle(e){if(!e)return!1;let{TouchEvent:t}=oo(e.target);return t&&e instanceof t}function I2(e){if(Nle(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return Rle(e)?{x:e.clientX,y:e.clientY}:null}var Q1=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Q1.Translate.toString(e),Q1.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),xq="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function kq(e){return e.matches(xq)?e:e.querySelector(xq)}var wp=Ee(_t()),Ole={display:"none"};function Sq(e){let{id:t,value:r}=e;return wp.default.createElement("div",{id:t,style:Ole},r)}function Cq(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e,a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return wp.default.createElement("div",{id:t,style:a,role:"status","aria-live":n,"aria-atomic":!0},r)}function Mq(){let[e,t]=(0,wp.useState)("");return{announce:(0,wp.useCallback)(n=>{n!=null&&t(n)},[]),announcement:e}}var Oq=(0,Pe.createContext)(null);function $M(e){let t=(0,Pe.useContext)(Oq);(0,Pe.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Ple(){let[e]=(0,Pe.useState)(()=>new Set),t=(0,Pe.useCallback)(n=>(e.add(n),()=>e.delete(n)),[e]);return[(0,Pe.useCallback)(n=>{let{type:a,event:i}=n;e.forEach(o=>{var s;return(s=o[a])==null?void 0:s.call(o,i)})},[e]),t]}var Fle={draggable:`
3906
+ please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:a}}iF.hasOwnProperty(r[0])&&!Jn[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',t),r=iF[r[0]]+r.slice(1));var i=ole.exec(r);i&&(r=r.substring(0,i.index),r==="i"?r="\u0131":r==="j"&&(r="\u0237"));var o;if(Jn[this.mode][r]){this.settings.strict&&this.mode==="math"&&ZC.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var s=Jn[this.mode][r].group,l=ns.range(t),u;if(Qoe.hasOwnProperty(s)){var c=s;u={type:"atom",mode:this.mode,family:c,loc:l,text:r}}else u={type:s,mode:this.mode,loc:l,text:r};o=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(sF(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),o={type:"textord",mode:"text",loc:ns.range(t),text:r};else return null;if(this.consume(),i)for(var f=0;f<i[0].length;f++){var d=i[0][f];if(!WC[d])throw new ct("Unknown accent ' "+d+"'",t);var p=WC[d][this.mode]||WC[d].text;if(!p)throw new ct("Accent "+d+" unsupported in "+this.mode+" mode",t);o={type:"accent",mode:this.mode,loc:ns.range(t),label:p,isStretchy:!1,isShifty:!0,base:o}}return o}};U6.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var SM=function(t,r){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new U6(t,r);delete n.gullet.macros.current["\\df@tag"];var a=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new ct("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:n.subparse([new Bs("\\df@tag")])}]}return a},QF=function(t,r,n){r.textContent="";var a=CM(t,n).toNode();r.appendChild(a)};typeof document!="undefined"&&document.compatMode!=="CSS1Compat"&&(typeof console!="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),QF=function(){throw new ct("KaTeX doesn't work in quirks mode.")});var ule=function(t,r){var n=CM(t,r).toMarkup();return n},cle=function(t,r){var n=new m2(r);return SM(t,n)},eq=function(t,r,n){if(n.throwOnError||!(t instanceof ct))throw t;var a=Ce.makeSpan(["katex-error"],[new as(r)]);return a.setAttribute("title",t.toString()),a.setAttribute("style","color:"+n.errorColor),a},CM=function(t,r){var n=new m2(r);try{var a=SM(t,n);return wse(a,t,n)}catch(i){return eq(i,t,n)}},dle=function(t,r){var n=new m2(r);try{var a=SM(t,n);return kse(a,t,n)}catch(i){return eq(i,t,n)}},fle="0.16.28",ple={Span:fp,Anchor:y2,SymbolNode:as,SvgNode:eu,PathNode:qu,LineNode:b2},tq={version:fle,render:QF,renderToString:ule,ParseError:ct,SETTINGS_SCHEMA:R6,__parse:cle,__renderToDomTree:CM,__renderToHTMLTree:dle,__setFontMetrics:Voe,__defineSymbol:L,__defineFunction:kt,__defineMacro:W,__domTree:ple};var Mwe=Ee(rq(),1),hle={"\\d":"\\mathrm{d}","\\R":"\\mathbb{R}","\\N":"\\mathbb{N}","\\Z":"\\mathbb{Z}","\\Q":"\\mathbb{Q}","\\C":"\\mathbb{C}"};function hp(e,t,r=!0){try{return tq.renderToString(e,{displayMode:t,output:r?"htmlAndMathml":"html",throwOnError:!1,errorColor:"#cc0000",macros:hle,strict:!1})}catch(n){return`<span class="katex-error" style="color:#cc0000" title="${String(n)}">${e}</span>`}}function St(e){return`calc(${typeof e=="number"?`${e}px`:e} * var(--edp-scale, 1))`}function ai(e){return{width:St(e),height:St(e)}}function tu(e){if(e==null||e==="")return;if(typeof e=="number")return St(e);let t=String(e).trim();return/^\d+(\.\d+)?px$/.test(t)?St(t):t}var nq=Ee(_t(),1);var k2=(0,nq.createContext)(!1),J6="1px solid #d1d5db",mle="#f3f4f6",gle="#e3e1dc",yle="var(--card, #fff)",mp="edp-table-first",aq={overflowX:"auto",margin:`${St("1.25rem")} 0`},iq={left:!1,right:!1,held:0,rtl:!1};function oq(e,t,r,n=0){return{left:t.left<e.left-1,right:t.right>e.right+1,held:n,rtl:r}}function sq(e,t){return Math.max(80,Math.round((e-t)*.8))}var LM={borderCollapse:"separate",borderSpacing:0,width:"100%",tableLayout:"auto",fontSize:St("0.875rem"),lineHeight:1.3,borderBlockStart:J6,borderInlineStart:J6};function S2(e){let t=e.gray?gle:e.header?mle:e.sticky?yle:void 0;return te(te(te({borderBlockEnd:J6,borderInlineEnd:J6,padding:`${St("4px")} ${St("6px")}`,verticalAlign:"middle",overflowWrap:"normal",wordBreak:"normal",hyphens:"manual"},t?{background:t}:{}),e.header?{fontWeight:600}:{}),e.sticky?{position:"sticky",insetInlineStart:0,zIndex:1}:{})}function C2(e){return Object.entries(e).map(([t,r])=>`${t.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}:${r}`).join(";")}function TM(e){let t=[],r=new Set,n=[];(e!=null?e:[]).forEach((o,s)=>{var u;let l=0;((u=o.content)!=null?u:[]).forEach(c=>{var p,y,x,k,w,S,T,E;for(;(p=n[s])!=null&&p[l];)l++;let f=Math.max(1,(x=(y=c.attrs)==null?void 0:y.colspan)!=null?x:1),d=Math.max(1,(w=(k=c.attrs)==null?void 0:k.rowspan)!=null?w:1);for(let z=s;z<s+d;z++){let N=(S=n[z])!=null?S:n[z]=[];for(let O=l;O<l+f;O++)N[O]=!0}for(let z=0;z<f;z++){let N=(E=(T=c.attrs)==null?void 0:T.colwidth)==null?void 0:E[z];N&&t[l+z]==null&&(t[l+z]=N)}l===0&&f===1&&r.add(c),l+=f})});let a=n.reduce((o,s)=>Math.max(o,s.length),0);return{columnWidths:t.some(o=>o!=null)?Array.from({length:a},(o,s)=>{var l;return(l=t[s])!=null?l:null}):[],stickyCells:r}}function EM(e){return e.replace(/(\d) (?=\d)/g,"$1\xA0").replace(/(\d) (?=[\p{L}%\p{Sc}]{1,3}(?![\p{L}\p{N}]))/gu,"$1\xA0")}var Eo=Ee($t(),1),Uu=Ee(_t(),1);var ble=typeof window!="undefined"?Uu.useLayoutEffect:Uu.useEffect;function lq({side:e}){return(0,Eo.jsx)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2.25",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,Eo.jsx)("path",{d:e==="left"?"M15 6l-6 6 6 6":"M9 6l6 6-6 6"})})}function uq({children:e}){let t=Yn(),r=(0,Uu.useRef)(null),[n,a]=(0,Uu.useState)(iq),i=(0,Uu.useCallback)(()=>{let f=r.current,d=f==null?void 0:f.querySelector("table");if(!f||!d)return;let p=f.querySelector(`.${mp}`),y=oq(f.getBoundingClientRect(),d.getBoundingClientRect(),getComputedStyle(f).direction==="rtl",p?p.getBoundingClientRect().width:0);a(x=>x.left===y.left&&x.right===y.right&&x.held===y.held&&x.rtl===y.rtl?x:y)},[]);ble(()=>{let f=r.current;if(!f)return;i(),f.addEventListener("scroll",i,{passive:!0});let d=typeof ResizeObserver!="undefined"?new ResizeObserver(i):null;d==null||d.observe(f);let p=f.querySelector("table");return p&&(d==null||d.observe(p)),()=>{f.removeEventListener("scroll",i),d==null||d.disconnect()}},[i]);let o=f=>{let d=r.current;d&&d.scrollBy({left:f*sq(d.clientWidth,n.held),behavior:"smooth"})},s=n.left||n.right,l=f=>s?(0,Eo.jsx)("div",{className:`edp-table-arrows edp-table-arrows--${f}`,children:(0,Eo.jsxs)("span",{dir:"ltr",className:"edp-table-arrows__pair",children:[(0,Eo.jsx)("button",{type:"button",className:"edp-table-arrow",onClick:()=>o(-1),disabled:!n.left,"aria-label":t.tableScrollLeft,children:(0,Eo.jsx)(lq,{side:"left"})}),(0,Eo.jsx)("button",{type:"button",className:"edp-table-arrow",onClick:()=>o(1),disabled:!n.right,"aria-label":t.tableScrollRight,children:(0,Eo.jsx)(lq,{side:"right"})})]})}):null,u=n.rtl?0:n.held,c=n.rtl?n.held:0;return(0,Eo.jsxs)("div",{className:"edp-table-frame",style:{margin:`${St("1.25rem")} 0`},children:[l("top"),(0,Eo.jsxs)("div",{style:{position:"relative"},children:[(0,Eo.jsx)("div",{ref:r,className:"edp-table-scroll",style:{overflowX:"auto"},children:e}),n.left&&(0,Eo.jsx)("span",{className:"edp-table-shade edp-table-shade--left",style:{left:u},"aria-hidden":"true"}),n.right&&(0,Eo.jsx)("span",{className:"edp-table-shade edp-table-shade--right",style:{right:c},"aria-hidden":"true"})]}),l("bottom")]})}var cq={1:{fontSize:"1.75em",fontWeight:700,lineHeight:1.2,margin:"0.6em 0 0.4em"},2:{fontSize:"1.4em",fontWeight:700,lineHeight:1.25,margin:"0.6em 0 0.35em"},3:{fontSize:"1.15em",fontWeight:600,lineHeight:1.3,margin:"0.5em 0 0.3em"}},dq={border:"#2563eb",background:"#e0f2fe"},fq={border:"#dc2626",background:"#fee2e2"};function xle(e){return{display:"inline-block",verticalAlign:"middle",border:`2px solid ${(e==null?void 0:e.border)||dq.border}`,background:(e==null?void 0:e.background)||dq.background,borderRadius:St("4px"),padding:"0.17em 0.37em"}}function vle(e){let t=(e==null?void 0:e.shape)==="circle"?"50%":"9999px";return{display:"inline-block",verticalAlign:"middle",border:`2px solid ${(e==null?void 0:e.border)||fq.border}`,background:(e==null?void 0:e.background)||fq.background,borderRadius:t,padding:"0.15em 0.45em"}}function wle(e,t){if(!(!e&&!t))return te(te({},e?{textAlign:e}:{}),t?{margin:0}:{})}function yl(e,t,r){return(0,rr.jsx)("div",{className:"exercise-content",children:e.content.map((n,a)=>Do(n,`node-${a}`,t,r))})}var kle=/^[\u00a0\u202f ]?[.,;:!?\u2026)\]}\u00bb\u201d\u2019%\u060c\u061b\u061f]+/,Sle=new Set(["blank","inlineChoiceSet"]);function pq(e,t,r,n){var o,s,l;let a=[],i=e!=null?e:[];for(let u=0;u<i.length;u++){let c=i[u],f=i[u+1],d=Sle.has(c.type)&&(f==null?void 0:f.type)==="text"?(s=kle.exec((o=f.text)!=null?o:""))==null?void 0:s[0]:void 0;if(!d||!f){a.push(Do(c,`${t}-${u}`,r,n));continue}let p=((l=f.text)!=null?l:"").slice(d.length);a.push((0,rr.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[(0,rr.jsx)("span",{style:{whiteSpace:"normal"},children:Do(c,`${t}-${u}-a`,r,n)}),Do(Ue(te({},f),{text:d}),`${t}-${u}-p`,r,n)]},`${t}-${u}`)),p&&a.push(Do(Ue(te({},f),{text:p}),`${t}-${u+1}`,r,n)),u++}return a}function Do(e,t,r,n){var a,i,o,s,l,u,c,f,d,p,y,x,k,w,S,T,E,z,N,O,H,U,J,K,Y,ye,se,ue,Se,Me,de,Re,it,Ie,Oe,me,be,qe,Ke,je,Ye,mt,At,zt,Ht,Yr,Hr,xt,Ut,wr;switch(e.type){case"choiceSet":case"inlineChoiceSet":return(0,rr.jsx)(Q6,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"blank":return e.attrs.mode==="typed"?(0,rr.jsx)(ex,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t):(0,rr.jsx)(tx,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"blankPool":return(0,rr.jsx)(rx,{node:e},t);case"inlinePool":return(0,rr.jsx)(nx,{node:e},t);case"matchingSet":return(0,rr.jsx)(ax,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"aiAnswerInput":return(0,rr.jsx)(ix,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"openResponseNode":return(0,rr.jsx)(ox,{node:e,validationFeedback:r==null?void 0:r.get(e.id),readOnly:n==null?void 0:n.readOnly,mediaHandler:n==null?void 0:n.mediaHandler},t);case"mathResponse":return(0,rr.jsx)(sx,{nodeId:e.id,placeholder:(a=e.attrs)==null?void 0:a.placeholder,hint:(i=e.attrs)==null?void 0:i.hint,validationFeedback:r==null?void 0:r.get(e.id),readOnly:n==null?void 0:n.readOnly},t);case"codingResponse":return(0,rr.jsx)(lx,{node:e,validationFeedback:r==null?void 0:r.get(e.id),readOnly:n==null?void 0:n.readOnly,executor:n==null?void 0:n.codeExecutor},t);case"aiEvaluationConfig":return null;case"paragraph":{let et=e.attrs,De=et==null?void 0:et.textAlign,ot=(et==null?void 0:et.dir)||void 0;return(0,rr.jsx)("p",{dir:ot,style:wle(De,n==null?void 0:n.inTable),children:pq(e.content,t,r,n)},t)}case"heading":{let et=(o=e.attrs.level)!=null?o:1,De=`h${et}`,ot=e.attrs,Lt=ot==null?void 0:ot.textAlign,ft=(ot==null?void 0:ot.dir)||void 0,tt=(s=cq[et])!=null?s:cq[3];return(0,rr.jsx)(De,{dir:ft,style:te(te({},tt),Lt?{textAlign:Lt}:{}),children:pq(e.content,t,r,n)},t)}case"blockquote":{let et=e.attrs,De=(et==null?void 0:et.dir)||void 0,ot=et==null?void 0:et.textAlign;return(0,rr.jsx)("blockquote",{dir:De,style:te({borderInlineStart:"3px solid #d6d3cc",paddingInlineStart:"1em",margin:"0.75em 0",color:"#565b66",fontStyle:"italic"},ot?{textAlign:ot}:{}),children:(l=e.content)==null?void 0:l.map((Lt,ft)=>Do(Lt,`${t}-${ft}`,r,n))},t)}case"text":{let et=e,De=n!=null&&n.inTable?EM((u=et.text)!=null?u:""):(c=et.text)!=null?c:"",ot=(f=et.marks)!=null?f:[];if(ot.length===0)return(0,rr.jsx)("span",{children:De},t);let Lt={};for(let tt of ot)tt.type==="textStyle"&&((d=tt.attrs)!=null&&d.color&&(Lt.color=tt.attrs.color),(p=tt.attrs)!=null&&p.fontSize&&(Lt.fontSize=tt.attrs.fontSize),(y=tt.attrs)!=null&&y.fontFamily&&(Lt.fontFamily=tt.attrs.fontFamily));let ft=De;for(let tt of ot)switch(tt.type){case"bold":ft=(0,rr.jsx)("strong",{children:ft});break;case"italic":ft=(0,rr.jsx)("em",{children:ft});break;case"underline":ft=(0,rr.jsx)("u",{children:ft});break;case"strike":ft=(0,rr.jsx)("s",{children:ft});break;case"code":ft=(0,rr.jsx)("code",{children:ft});break;case"subscript":ft=(0,rr.jsx)("sub",{children:ft});break;case"superscript":ft=(0,rr.jsx)("sup",{children:ft});break;case"boxedText":ft=(0,rr.jsx)("span",{style:xle(tt.attrs),children:ft});break;case"circleText":ft=(0,rr.jsx)("span",{style:vle(tt.attrs),children:ft});break}return(0,rr.jsx)("span",{style:Object.keys(Lt).length>0?Lt:void 0,children:ft},t)}case"hardBreak":return(0,rr.jsx)("br",{},t);case"resizableImage":return(0,rr.jsx)("img",{src:((x=e.attrs)==null?void 0:x.src)||void 0,alt:((k=e.attrs)==null?void 0:k.alt)||"",style:{display:"inline-block",verticalAlign:"middle",width:(S=tu(((w=e.attrs)==null?void 0:w.width)||void 0))!=null?S:"auto",height:(E=tu(((T=e.attrs)==null?void 0:T.height)||void 0))!=null?E:"auto",maxWidth:"100%"}},t);case"resizableAudio":{let et=(z=e.attrs)!=null?z:{src:""},De=(n==null?void 0:n.readOnly)===!0;return(0,rr.jsx)(Nu,{src:et.src||"",maxPlays:De?null:et.maxPlays,learnerSpeed:et.learnerSpeed,speed:et.speed,allowSeek:De?null:et.allowSeek},t)}case"resizableVideo":return(0,rr.jsx)("video",{src:((N=e.attrs)==null?void 0:N.src)||void 0,controls:!0,style:{display:"inline-block",verticalAlign:"middle",width:(H=tu(((O=e.attrs)==null?void 0:O.width)||void 0))!=null?H:"auto",height:(J=tu(((U=e.attrs)==null?void 0:U.height)||void 0))!=null?J:"auto",maxWidth:"100%"}},t);case"youtubeEmbed":return(0,rr.jsx)("iframe",{src:`https://www.youtube.com/embed/${((K=e.attrs)==null?void 0:K.videoId)||""}`,width:((Y=e.attrs)==null?void 0:Y.width)||480,height:((ye=e.attrs)==null?void 0:ye.height)||270,allowFullScreen:!0,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",style:{display:"inline-block",verticalAlign:"middle",border:0,width:tu(((se=e.attrs)==null?void 0:se.width)||480),height:tu(((ue=e.attrs)==null?void 0:ue.height)||270)}},t);case"inlineMath":return(0,rr.jsx)("span",{dir:"ltr",style:{unicodeBidi:"isolate",display:"inline-block"},className:"math-inline",dangerouslySetInnerHTML:{__html:hp((Me=(Se=e.attrs)==null?void 0:Se.latex)!=null?Me:"",!1,!0)}},t);case"blockMath":return(0,rr.jsx)("div",{dir:"ltr",style:{unicodeBidi:"isolate",textAlign:"center",margin:"1em 0"},className:"math-block",dangerouslySetInnerHTML:{__html:hp((Re=(de=e.attrs)==null?void 0:de.latex)!=null?Re:"",!0,!0)}},t);case"variable":return(0,rr.jsx)("span",{className:"variable",children:`{${(it=e.attrs)==null?void 0:it.name}}`},t);default:{let et=e;if(et.type==="bulletList")return(0,rr.jsx)("ul",{style:{listStyleType:"disc",paddingLeft:"1.5em",margin:"0.5em 0"},children:(Ie=et.content)==null?void 0:Ie.map((De,ot)=>Do(De,`${t}-${ot}`,r,n))},t);if(et.type==="orderedList")return(0,rr.jsx)("ol",{style:{listStyleType:"decimal",paddingLeft:"1.5em",margin:"0.5em 0"},children:(Oe=et.content)==null?void 0:Oe.map((De,ot)=>Do(De,`${t}-${ot}`,r,n))},t);if(et.type==="listItem")return(0,rr.jsx)("li",{children:(me=et.content)==null?void 0:me.map((De,ot)=>Do(De,`${t}-${ot}`,r,n))},t);if(et.type==="table"){let De=TM(et.content),ot=Ue(te({},n),{inTable:!0,stickyCells:De.stickyCells});return(0,rr.jsx)(uq,{children:(0,rr.jsxs)("table",{style:LM,children:[De.columnWidths.length>0&&(0,rr.jsx)("colgroup",{children:De.columnWidths.map((Lt,ft)=>(0,rr.jsx)("col",{style:Lt?{width:St(Lt)}:void 0},ft))}),(0,rr.jsx)("tbody",{children:(be=et.content)==null?void 0:be.map((Lt,ft)=>Do(Lt,`${t}-${ft}`,r,ot))})]})},t)}return et.type==="tableRow"?(0,rr.jsx)("tr",{children:(qe=et.content)==null?void 0:qe.map((De,ot)=>Do(De,`${t}-${ot}`,r,n))},t):et.type==="tableCell"?(0,rr.jsx)("td",{colSpan:(Ke=et.attrs)==null?void 0:Ke.colspan,rowSpan:(je=et.attrs)==null?void 0:je.rowspan,className:(Ye=n==null?void 0:n.stickyCells)!=null&&Ye.has(et)?mp:void 0,style:S2({header:!1,gray:!!((mt=et.attrs)!=null&&mt.gray),sticky:!!((At=n==null?void 0:n.stickyCells)!=null&&At.has(et))}),children:(0,rr.jsx)(k2.Provider,{value:!0,children:(zt=et.content)==null?void 0:zt.map((De,ot)=>Do(De,`${t}-${ot}`,r,n))})},t):et.type==="tableHeader"?(0,rr.jsx)("th",{colSpan:(Ht=et.attrs)==null?void 0:Ht.colspan,rowSpan:(Yr=et.attrs)==null?void 0:Yr.rowspan,className:(Hr=n==null?void 0:n.stickyCells)!=null&&Hr.has(et)?mp:void 0,style:S2({header:!0,gray:!!((xt=et.attrs)!=null&&xt.gray),sticky:!!((Ut=n==null?void 0:n.stickyCells)!=null&&Ut.has(et))}),children:(0,rr.jsx)(k2.Provider,{value:!0,children:(wr=et.content)==null?void 0:wr.map((De,ot)=>Do(De,`${t}-${ot}`,r,n))})},t):(console.warn(`Unknown node type during interpretation: ${e.type}`),null)}}}function Ra(e,t){return e.map(r=>{var n,a,i,o,s,l,u,c,f,d,p,y,x,k,w,S,T,E,z,N,O,H,U,J,K,Y,ye,se,ue,Se,Me,de,Re,it,Ie,Oe,me;if(r.type==="text"){let be=gp(t!=null&&t.inTable?EM((n=r.text)!=null?n:""):(a=r.text)!=null?a:""),qe=(i=r.marks)!=null?i:[],Ke=[];for(let je of qe)je.type==="textStyle"&&((o=je.attrs)!=null&&o.color&&Ke.push(`color:${je.attrs.color}`),(s=je.attrs)!=null&&s.fontSize&&Ke.push(`font-size:${je.attrs.fontSize}`),(l=je.attrs)!=null&&l.fontFamily&&Ke.push(`font-family:${je.attrs.fontFamily}`));Ke.length>0&&(be=`<span style="${Ke.join(";")}">${be}</span>`);for(let je of qe)switch(je.type){case"bold":be=`<strong>${be}</strong>`;break;case"italic":be=`<em>${be}</em>`;break;case"underline":be=`<u>${be}</u>`;break;case"strike":be=`<s>${be}</s>`;break;case"code":be=`<code>${be}</code>`;break;case"subscript":be=`<sub>${be}</sub>`;break;case"superscript":be=`<sup>${be}</sup>`;break;case"boxedText":{let Ye=((u=je.attrs)==null?void 0:u.border)||"#2563eb",mt=((c=je.attrs)==null?void 0:c.background)||"#e0f2fe";be=`<span style="display:inline-block;vertical-align:middle;border:2px solid ${Ye};background:${mt};border-radius:${St("4px")};padding:0.17em 0.37em">${be}</span>`;break}case"circleText":{let Ye=((f=je.attrs)==null?void 0:f.border)||"#dc2626",mt=((d=je.attrs)==null?void 0:d.background)||"#fee2e2",At=((p=je.attrs)==null?void 0:p.shape)==="circle"?"50%":"9999px";be=`<span style="display:inline-block;vertical-align:middle;border:2px solid ${Ye};background:${mt};border-radius:${At};padding:0.15em 0.45em">${be}</span>`;break}}return be}if(r.type==="paragraph"){let be=r.content?Ra(r.content,t):"",qe=(y=r.attrs)==null?void 0:y.dir,Ke=(x=r.attrs)==null?void 0:x.textAlign,je=qe?` dir="${qe}"`:"",Ye=[Ke?`text-align:${Ke}`:"",t!=null&&t.inTable?"margin:0":""].filter(Boolean).join(";"),mt=Ye?` style="${Ye}"`:"";return t!=null&&t.stripParagraphs?be:`<p${je}${mt}>${be}</p>`}if(r.type==="hardBreak")return"<br/>";if(r.type==="table"){let be=TM(r.content),qe=r.content?Ra(r.content,Ue(te({},t),{inTable:!0,stickyCells:be.stickyCells})):"",Ke=be.columnWidths.length?`<colgroup>${be.columnWidths.map(je=>je?`<col style="width:${St(je)}">`:"<col>").join("")}</colgroup>`:"";return`<div style="${C2(aq)}"><table style="${C2(LM)}">${Ke}<tbody>${qe}</tbody></table></div>`}if(r.type==="tableRow")return`<tr>${r.content?Ra(r.content,t):""}</tr>`;if(r.type==="tableCell"){let be=r.content?Ra(r.content,t):"",qe=(k=r.attrs)!=null&&k.colspan?` colspan="${r.attrs.colspan}"`:"",Ke=(w=r.attrs)!=null&&w.rowspan?` rowspan="${r.attrs.rowspan}"`:"",je=!!((S=t==null?void 0:t.stickyCells)!=null&&S.has(r)),Ye=je?` class="${mp}"`:"";return`<td${qe}${Ke}${Ye} style="${C2(S2({header:!1,gray:!!((T=r.attrs)!=null&&T.gray),sticky:je}))}">${be}</td>`}if(r.type==="tableHeader"){let be=r.content?Ra(r.content,t):"",qe=(E=r.attrs)!=null&&E.colspan?` colspan="${r.attrs.colspan}"`:"",Ke=(z=r.attrs)!=null&&z.rowspan?` rowspan="${r.attrs.rowspan}"`:"",je=!!((N=t==null?void 0:t.stickyCells)!=null&&N.has(r)),Ye=je?` class="${mp}"`:"";return`<th${qe}${Ke}${Ye} style="${C2(S2({header:!0,gray:!!((O=r.attrs)!=null&&O.gray),sticky:je}))}">${be}</th>`}if(r.type==="bulletList")return`<ul style="list-style-type:disc;padding-left:1.5em">${r.content?Ra(r.content,t):""}</ul>`;if(r.type==="orderedList")return`<ol style="list-style-type:decimal;padding-left:1.5em">${r.content?Ra(r.content,t):""}</ol>`;if(r.type==="listItem")return`<li>${r.content?Ra(r.content,t):""}</li>`;if(r.type==="blockquote"){let be=r.content?Ra(r.content,t):"";return`<blockquote${(H=r.attrs)!=null&&H.dir?` dir="${r.attrs.dir}"`:""} style="border-inline-start:3px solid #d6d3cc;padding-inline-start:1em;margin:0.75em 0;color:#565b66;font-style:italic">${be}</blockquote>`}if(r.type==="resizableImage"){let be=(U=r.attrs)!=null?U:{},qe=Z6(be.width),Ke=Z6(be.height);return`<img src="${gp((J=be.src)!=null?J:"")}" alt="${gp((K=be.alt)!=null?K:"")}" style="display:inline-block;vertical-align:middle;max-width:100%;${qe?`width:${qe};`:""}${Ke?`height:${Ke};`:""}"/>`}if(r.type==="resizableAudio"){let be=(Y=r.attrs)!=null?Y:{};return`<audio controls preload="metadata" src="${gp((ye=be.src)!=null?ye:"")}" style="display:inline-block;vertical-align:middle;width:${St("260px")};max-width:100%;height:${St("36px")}"></audio>`}if(r.type==="resizableVideo"){let be=(se=r.attrs)!=null?se:{},qe=Z6(be.width),Ke=Z6(be.height);return`<video src="${gp((ue=be.src)!=null?ue:"")}" controls style="display:inline-block;vertical-align:middle;max-width:100%;${qe?`width:${qe};`:""}${Ke?`height:${Ke};`:""}"></video>`}if(r.type==="youtubeEmbed"){let be=(Se=r.attrs)!=null?Se:{};return`<iframe src="https://www.youtube.com/embed/${gp((Me=be.videoId)!=null?Me:"")}" width="${be.width||480}" height="${be.height||270}" allowfullscreen frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" style="display:inline-block;vertical-align:middle;border:0;width:${tu(be.width||480)};height:${tu(be.height||270)}"></iframe>`}return r.type==="inlineMath"?`<span dir="ltr" class="math-inline" style="unicode-bidi:isolate;display:inline-block">${hp((Re=(de=r.attrs)==null?void 0:de.latex)!=null?Re:"",!1,!0)}</span>`:r.type==="blockMath"?`<div dir="ltr" class="math-block" style="unicode-bidi:isolate;text-align:center;margin:1em 0">${hp((Ie=(it=r.attrs)==null?void 0:it.latex)!=null?Ie:"",!0,!0)}</div>`:r.type==="variable"?`<span class="variable">{${gp((me=(Oe=r.attrs)==null?void 0:Oe.name)!=null?me:"")}}</span>`:""}).join("")}function Z6(e){var t;return e==null||e===""?null:(t=tu(e))!=null?t:null}function gp(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var hq=Ee($t(),1),Nd=Ee(_t(),1);var Cle={sm:.875,md:1,lg:1.25,xl:1.5},DM=(0,Nd.createContext)(null);function Mle(e,t){let r=te({},e!=null?e:{});if(t)for(let[n,a]of Object.entries(t))a!==void 0&&(r[n]=a);return r}function _le(e){var t;return typeof e=="number"?Number.isFinite(e)&&e>0?e:1:e&&(t=Cle[e])!=null?t:1}function bl(e){var r,n,a;let t=e!=null?e:{};return{scale:_le(t.size),sizeSet:t.size!==void 0,choiceLabels:(r=t.choiceLabels)!=null?r:"marks",choiceColumns:t.choiceColumns,layoutBy:(n=t.layoutBy)!=null?n:"window",motion:(a=t.motion)!=null?a:"full",shuffleSeed:t.shuffleSeed}}function Ns(e){let t=(0,Nd.useContext)(DM);return(0,Nd.useMemo)(()=>Mle(t,e),[t,e==null?void 0:e.size,e==null?void 0:e.choiceLabels,e==null?void 0:e.choiceColumns,e==null?void 0:e.layoutBy,e==null?void 0:e.motion,e==null?void 0:e.shuffleSeed])}function Os(){let e=(0,Nd.useContext)(DM);return(0,Nd.useMemo)(()=>bl(e),[e])}function Ps({display:e,children:t}){let r=Ns(e);return(0,hq.jsx)(DM.Provider,{value:r,children:t})}function xl(e){if(e.sizeSet)return{"--edp-scale":String(e.scale)}}function yp(){let{motion:e}=Os();return{hop:e==="none"?"":"animate-hop",shake:e==="full"?"animate-shake":"",wobble:e==="full"?"animate-wobble":""}}function Ale(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return t>>>0}function Lle(e){return()=>{e=e+1831565813|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}function M2(e,t){let r=[...e],n=Lle(Ale(t));for(let a=r.length-1;a>0;a--){let i=Math.floor(n()*(a+1));[r[a],r[i]]=[r[i],r[a]]}return r}var Zn=Ee($t(),1),Io=Ee(_t(),1),mq=Ee(Qh(),1);var Tle=typeof window!="undefined"?Io.useLayoutEffect:Io.useEffect;function IM({node:e}){var t,r,n;if(e.type==="text"){if(!e.marks||e.marks.length===0)return(0,Zn.jsx)(Zn.Fragment,{children:e.text});let a=e.text||"";for(let i of e.marks)i.type==="bold"?a=(0,Zn.jsx)("strong",{children:a}):i.type==="italic"?a=(0,Zn.jsx)("em",{children:a}):i.type==="underline"?a=(0,Zn.jsx)("u",{children:a}):i.type==="strike"?a=(0,Zn.jsx)("s",{children:a}):i.type==="textStyle"&&((t=i.attrs)!=null&&t.color)&&(a=(0,Zn.jsx)("span",{style:{color:i.attrs.color},children:a}));return(0,Zn.jsx)(Zn.Fragment,{children:a})}return e.type==="paragraph"?(0,Zn.jsx)("span",{className:"block",children:(n=(r=e.content)==null?void 0:r.map((a,i)=>(0,Zn.jsx)(IM,{node:a},i)))!=null?n:(0,Zn.jsx)("br",{})}):e.type==="hardBreak"?(0,Zn.jsx)("br",{}):e.content?(0,Zn.jsx)("span",{className:"block",children:e.content.map((a,i)=>(0,Zn.jsx)(IM,{node:a},i))}):null}function Ele({nodes:e}){return(0,Zn.jsx)("span",{className:"block space-y-1",style:{color:"var(--ink, #1d2025)"},children:e.map((t,r)=>(0,Zn.jsx)(IM,{node:t},r))})}function Dle(e,t,r,n=8){let a=e.top-t.height-n;a<n&&(a=e.bottom+n);let i=e.left+e.width/2-t.width/2;return i=Math.max(n,Math.min(i,r-t.width-n)),{top:a,left:i}}function Od({hint:e}){let t=Yn(),[r,n]=(0,Io.useState)(!1),[a,i]=(0,Io.useState)(!1),[o,s]=(0,Io.useState)(null),[l,u]=(0,Io.useState)({}),c=(0,Io.useRef)(null),f=(0,Io.useRef)(null);(0,Io.useEffect)(()=>{if(!a)return;let w=S=>{let T=S.target;c.current&&!c.current.contains(T)&&f.current&&!f.current.contains(T)&&(i(!1),n(!1))};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[a]);let d=(0,Io.useCallback)(()=>{let w=c.current,S=f.current;!w||!S||s(Dle(w.getBoundingClientRect(),S.getBoundingClientRect(),window.innerWidth))},[]);Tle(()=>{if(!r){s(null);return}let w=c.current;if(w){let S=getComputedStyle(w);u({direction:S.direction,fontFamily:S.fontFamily,"--edp-scale":S.getPropertyValue("--edp-scale").trim()||"1"})}return d(),window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d)}},[r,d]);let p=()=>n(!0),y=()=>{a||n(!1)},x=w=>{w.stopPropagation(),a?(i(!1),n(!1)):(i(!0),n(!0))},k=r&&typeof document!="undefined"?(0,mq.createPortal)((0,Zn.jsx)("span",{className:"edpire-scope",style:Ue(te({},l),{display:"contents"}),children:(0,Zn.jsx)("span",{ref:f,role:"tooltip",className:"player-blank-hint-pop",onClick:w=>w.stopPropagation(),onMouseEnter:p,onMouseLeave:y,style:{position:"fixed",top:o?o.top:0,left:o?o.left:0,bottom:"auto",transform:"none",margin:0,visibility:o?"visible":"hidden"},children:(0,Zn.jsx)(Ele,{nodes:e})})}),document.body):null;return(0,Zn.jsxs)("span",{ref:c,className:"relative inline-flex items-center align-middle",onMouseEnter:p,onMouseLeave:y,children:[(0,Zn.jsx)("button",{type:"button",onClick:x,className:hr("player-blank-hint-btn select-none",a&&"player-blank-hint-btn--pinned"),"aria-label":t.showHint,"aria-expanded":r,children:"?"}),k]})}function Ku({hint:e}){return!e||e.length===0?null:(0,Zn.jsx)(Od,{hint:e})}function Ile(e){return[...e].map(t=>({v:t,r:Math.random()})).sort((t,r)=>t.r-r.r).map(t=>t.v)}var zle=e=>e.replace(/ {2,}/g,t=>"&nbsp;".repeat(t.length-1)+" "),Ble=new Set(["image","resizableImage","resizableVideo","youtubeEmbed"]);function bq(e){return(e!=null?e:[]).some(t=>Ble.has(t==null?void 0:t.type)||bq(t==null?void 0:t.content))}var gq=()=>(0,Qn.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,children:(0,Qn.jsx)("path",{d:"M5 13l4 4L19 7"})}),yq=()=>(0,Qn.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,children:(0,Qn.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})});function Q6({node:e,validationFeedback:t}){var me,be,qe,Ke;let r=Li(),n=Yn(),a=Os(),i=yp(),{id:o,content:s,attrs:l}=e,u=(me=l.shuffle)!=null?me:!1,c="prompt"in l?l.prompt:void 0,f="separator"in l&&(be=l.separator)!=null?be:"/",d="pickLimit"in l&&l.pickLimit?l.pickLimit:1,p=l.hideCount===!0,y=p||d>1,x=!p&&d>1,k="layout"in l&&(qe=l.layout)!=null?qe:"row",w=e.type==="inlineChoiceSet",S=JSON.stringify(s),T=u&&a.shuffleSeed!==void 0,E=(0,ru.useMemo)(()=>T?M2(s,`${a.shuffleSeed}:${o}`):null,[T,a.shuffleSeed,o,S]),[z,N]=(0,ru.useState)(s);(0,ru.useEffect)(()=>{T||N(u?Ile(s):s)},[u,T,S]);let O=E!=null?E:z,[H,U]=(0,ru.useState)(new Set),J=(Ke=t==null?void 0:t.showFeedback)!=null?Ke:!1,K=(t==null?void 0:t.correctChoiceIds)||[];(0,ru.useEffect)(()=>{let je=Ye=>{let At=Ye.answers.find(zt=>zt.nodeId===o&&zt.type==="choiceSet");At&&"selectedIds"in At.answer&&U(new Set(At.answer.selectedIds))};return r.on("answers:prefill",je),()=>r.off("answers:prefill",je)},[o,r]),(0,ru.useEffect)(()=>{r.emit({type:"answer:changed",answer:{nodeId:o,type:"choiceSet",timestamp:Date.now(),answer:{selectedIds:Array.from(H)}}})},[H,o,r]);let Y=je=>{J||U(Ye=>{let mt=new Set(Ye);return y?mt.has(je)?mt.delete(je):(p||mt.size<d)&&mt.add(je):mt.has(je)?mt.delete(je):(mt.clear(),mt.add(je)),mt})},ye=je=>zle(Ra(je.content)),se=je=>{let Ye=H.has(je),mt=K.includes(je);return J?mt&&Ye?"correct":mt&&!Ye?"correct-unchosen":!mt&&Ye?"incorrect":"muted":Ye?"selected":"idle"},ue={idle:"",selected:"player-choice--selected",correct:hr("player-choice--correct",i.hop),"correct-unchosen":"player-choice--correct-unchosen",incorrect:hr("player-choice--incorrect",i.shake),muted:"player-choice--muted"},Se={idle:"",selected:"player-inline-choice--selected",correct:hr("player-inline-choice--correct",i.hop),"correct-unchosen":"player-inline-choice--correct-unchosen",incorrect:hr("player-inline-choice--incorrect",i.shake),muted:"player-inline-choice--muted"};if(w)return(0,Qn.jsxs)("span",{className:"inline-choice",children:[c&&(0,Qn.jsxs)("span",{className:"mr-2 font-medium",children:[c,x?(0,Qn.jsx)("span",{className:"ms-1 opacity-60",children:n.chooseN(d)}):null]}),O.map((je,Ye)=>(0,Qn.jsxs)(ru.Fragment,{children:[(0,Qn.jsx)("button",{type:"button",disabled:J,onClick:()=>Y(je.id),className:hr("player-inline-choice",Se[se(je.id)]),"aria-pressed":H.has(je.id),dangerouslySetInnerHTML:{__html:ye(je)}}),Ye<O.length-1&&(0,Qn.jsx)("span",{className:"mx-1",children:f})]},je.id)),l.hint&&l.hint.length>0&&(0,Qn.jsx)(Od,{hint:l.hint})]});let Me=a.layoutBy==="box",de=a.choiceColumns?Math.min(a.choiceColumns,O.length):0,Re=de?{gridAutoRows:"1fr",gridTemplateColumns:`repeat(${de}, minmax(0, 1fr))`}:{gridAutoRows:"1fr"},it=O.some(je=>bq(je.content)),Ie=a.choiceLabels==="letters",Oe=je=>{var Ye;return(Ye=n.choiceLetters[je])!=null?Ye:String(je+1)};return(0,Qn.jsxs)("div",{className:hr("cs-player my-4 space-y-3",Me&&"cs-player--box"),children:[c&&(0,Qn.jsxs)("p",{className:"font-medium",children:[c,x?(0,Qn.jsx)("span",{className:"ms-2 text-sm opacity-70",children:n.chooseN(d)}):null]}),l.hint&&l.hint.length>0&&(0,Qn.jsx)(Od,{hint:l.hint}),(0,Qn.jsx)("div",{className:hr("cs-player__grid",k==="row"&&"cs-player__grid--row"),style:Re,children:O.map((je,Ye)=>{let mt=se(je.id),At=mt==="incorrect"?"incorrect":mt==="correct"||mt==="correct-unchosen"?"correct":null;return(0,Qn.jsxs)("button",{type:"button",disabled:J,onClick:()=>Y(je.id),className:hr("player-choice",it&&"player-choice--tile",ue[mt]),"aria-pressed":H.has(je.id),children:[(0,Qn.jsx)("span",{className:hr("player-choice__mark",y?"player-choice__mark--box":"player-choice__mark--radio",Ie&&"player-choice__mark--letter"),children:Ie?Oe(Ye):mt==="incorrect"?(0,Qn.jsx)(yq,{}):(0,Qn.jsx)(gq,{})}),(0,Qn.jsx)("span",{className:"player-choice__text",dangerouslySetInnerHTML:{__html:ye(je)}}),Ie&&At&&(0,Qn.jsx)("span",{className:`player-choice__verdict player-choice__verdict--${At}`,"aria-hidden":"true",children:At==="incorrect"?(0,Qn.jsx)(yq,{}):(0,Qn.jsx)(gq,{})})]},je.id)})})]})}var io=Ee($t(),1),vl=Ee(_t(),1);function ex({node:e,validationFeedback:t}){var H;let r=Li(),n=Yn(),a=yp(),{id:i,attrs:o}=e,{placeholder:s="___",width:l="auto",hint:u}=o,c=(0,vl.useRef)(null),f=s.trim().split(/\s+/).filter(Boolean).length,d=(0,vl.useContext)(k2),p=!d&&l==="auto"&&f>=4,[y,x]=(0,vl.useState)(""),k=(H=t==null?void 0:t.showFeedback)!=null?H:!1,w=t==null?void 0:t.state,S=w==="validating",T=t==null?void 0:t.displayAnswer,E=t==null?void 0:t.message;(0,vl.useEffect)(()=>{let U=J=>{let Y=J.answers.find(ye=>ye.nodeId===i&&ye.type==="blank");Y&&"mode"in Y.answer&&Y.answer.mode==="typed"&&"text"in Y.answer&&x(Y.answer.text)};return r.on("answers:prefill",U),()=>r.off("answers:prefill",U)},[i,r]),(0,vl.useEffect)(()=>{r.emit({type:"answer:changed",answer:{nodeId:i,type:"blank",timestamp:Date.now(),answer:{mode:"typed",text:y}}})},[y,i,r]);let z=U=>{x(U.target.value)},N=(0,vl.useCallback)(()=>{let U=c.current;U&&(U.style.height="auto",U.style.height=`${U.scrollHeight}px`)},[]);(0,vl.useEffect)(()=>{N()},[y,N]);let O=k&&!S;return(0,io.jsxs)("span",{className:d?"player-blank-cell":hr("inline-flex flex-wrap items-center gap-x-1 gap-y-0.5 align-middle max-w-full",p&&"w-full"),children:[(0,io.jsx)("span",{className:d?"player-blank-cell__box":hr("relative inline-block shrink-0 min-w-0 max-w-full",p&&"w-full flex-1"),children:O?(0,io.jsx)("span",{className:hr("player-typed-blank-feedback",d&&"player-typed-blank-feedback--cell",p&&"w-full",w==="correct"&&hr("player-typed-blank-feedback--correct",a.hop),w==="partial"&&"player-typed-blank-feedback--partial",w==="incorrect"&&hr("player-typed-blank-feedback--incorrect",a.wobble)),children:y||(0,io.jsx)("span",{className:"opacity-40",children:s})}):(0,io.jsxs)(io.Fragment,{children:[(0,io.jsx)("textarea",{ref:c,"aria-label":n.blankAnswerAria,placeholder:s,value:y,onChange:z,disabled:k,rows:1,wrap:d?"off":void 0,className:hr("player-typed-blank",d&&"player-typed-blank--cell",p&&"w-full",S&&"player-typed-blank--pending"),style:d?void 0:l!=="auto"?{width:l}:p?{width:"100%"}:{width:`${Math.max(7,y.length+1)}ch`,maxWidth:"100%"}}),!y&&!S&&!d&&(0,io.jsx)("span",{className:"absolute right-1 top-1/2 -translate-y-1/2 pointer-events-none text-sm",style:{color:"var(--ink-faint, #8d93a0)"},children:"\u270E"}),S&&(0,io.jsx)("span",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,io.jsx)("span",{className:"player-typed-blank-spinner","aria-label":n.aiEvaluationInProgressAria})})]})}),k&&w==="incorrect"&&T&&(0,io.jsxs)("span",{className:"player-blank-reveal",children:["(",T,")"]}),k&&E&&(0,io.jsx)("span",{className:hr("player-blank-feedback",w==="correct"&&"player-blank-feedback--correct",w==="partial"&&"player-blank-feedback--partial",w==="incorrect"&&"player-blank-feedback--incorrect"),children:E}),u&&u.length>0&&(0,io.jsx)(Od,{hint:u})]})}var kl=Ee($t(),1),UM=Ee(_t(),1);var Pe=Ee(_t()),kp=Ee(Qh());var ii=Ee(_t());var _2=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function bp(e){let t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function ux(e){return"nodeType"in e}function oo(e){var t,r;return e?bp(e)?e:ux(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function cx(e){let{Document:t}=oo(e);return e instanceof t}function em(e){return bp(e)?!1:e instanceof oo(e).HTMLElement}function BM(e){return e instanceof oo(e).SVGElement}function xp(e){return e?bp(e)?e.document:ux(e)?cx(e)?e:em(e)||BM(e)?e.ownerDocument:document:document:document}var Vu=_2?ii.useLayoutEffect:ii.useEffect;function A2(e){let t=(0,ii.useRef)(e);return Vu(()=>{t.current=e}),(0,ii.useCallback)(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.current==null?void 0:t.current(...n)},[])}function vq(){let e=(0,ii.useRef)(null),t=(0,ii.useCallback)((n,a)=>{e.current=setInterval(n,a)},[]),r=(0,ii.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function tm(e,t){t===void 0&&(t=[e]);let r=(0,ii.useRef)(e);return Vu(()=>{r.current!==e&&(r.current=e)},t),r}function rm(e,t){let r=(0,ii.useRef)();return(0,ii.useMemo)(()=>{let n=e(r.current);return r.current=n,n},[...t])}function L2(e){let t=A2(e),r=(0,ii.useRef)(null),n=(0,ii.useCallback)(a=>{a!==r.current&&(t==null||t(a,r.current)),r.current=a},[]);return[r,n]}function T2(e){let t=(0,ii.useRef)();return(0,ii.useEffect)(()=>{t.current=e},[e]),t.current}var zM={};function E2(e,t){return(0,ii.useMemo)(()=>{if(t)return t;let r=zM[e]==null?0:zM[e]+1;return zM[e]=r,e+"-"+r},[e,t])}function wq(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return n.reduce((i,o)=>{let s=Object.entries(o);for(let[l,u]of s){let c=i[l];c!=null&&(i[l]=c+e*u)}return i},te({},t))}}var vp=wq(1),D2=wq(-1);function Rle(e){return"clientX"in e&&"clientY"in e}function dx(e){if(!e)return!1;let{KeyboardEvent:t}=oo(e.target);return t&&e instanceof t}function Nle(e){if(!e)return!1;let{TouchEvent:t}=oo(e.target);return t&&e instanceof t}function I2(e){if(Nle(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return Rle(e)?{x:e.clientX,y:e.clientY}:null}var Q1=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Q1.Translate.toString(e),Q1.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),xq="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function kq(e){return e.matches(xq)?e:e.querySelector(xq)}var wp=Ee(_t()),Ole={display:"none"};function Sq(e){let{id:t,value:r}=e;return wp.default.createElement("div",{id:t,style:Ole},r)}function Cq(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e,a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return wp.default.createElement("div",{id:t,style:a,role:"status","aria-live":n,"aria-atomic":!0},r)}function Mq(){let[e,t]=(0,wp.useState)("");return{announce:(0,wp.useCallback)(n=>{n!=null&&t(n)},[]),announcement:e}}var Oq=(0,Pe.createContext)(null);function $M(e){let t=(0,Pe.useContext)(Oq);(0,Pe.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Ple(){let[e]=(0,Pe.useState)(()=>new Set),t=(0,Pe.useCallback)(n=>(e.add(n),()=>e.delete(n)),[e]);return[(0,Pe.useCallback)(n=>{let{type:a,event:i}=n;e.forEach(o=>{var s;return(s=o[a])==null?void 0:s.call(o,i)})},[e]),t]}var Fle={draggable:`
3907
3907
  To pick up a draggable item, press the space bar.
3908
3908
  While dragging, use the arrow keys to move the item.
3909
3909
  Press space again to drop the item in its new position, or press escape to cancel.
@@ -3912,7 +3912,7 @@ l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
3912
3912
  `);else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let s=n.split(/\r?\n|\r/);for(let l=0;l<s.length;l++)l&&this.insertNode(o.linebreakReplacement.create(),r,!0),s[l]&&this.insertNode(o.text(s[l]),r,!/\S/.test(s[l]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let s=a.content[a.content.length-1],l=t.previousSibling;(!s||l&&l.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(n=n.slice(1))}n&&this.insertNode(o.text(n),r,!/\S/.test(n)),this.findInText(t)}else this.findInside(t)}addElement(t,r,n){let a=this.localPreserveWS,i=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let o=t.nodeName.toLowerCase(),s;H$.hasOwnProperty(o)&&this.parser.normalizeLists&&yce(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,n));e:if(l?l.ignore:gce.hasOwnProperty(o))this.findInside(t),this.ignoreFallback(t,r);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let u,c=this.needsBlock;if($$.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),u=!0,i.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,r);break e}let f=l&&l.skip?r:this.readStyles(t,r);f&&this.addAll(t,f),u&&this.sync(i),this.needsBlock=c}else{let u=this.readStyles(t,r);u&&this.addElementByRule(t,l,u,l.consuming===!1?s:void 0)}this.localPreserveWS=a}leafFallback(t,r){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
3913
3913
  `),r)}ignoreFallback(t,r){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),r,!0)}readStyles(t,r){let n=t.style;if(n&&n.length)for(let a=0;a<this.parser.matchedStyles.length;a++){let i=this.parser.matchedStyles[a],o=n.getPropertyValue(i);if(o)for(let s=void 0;;){let l=this.parser.matchStyle(i,o,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?r=r.filter(u=>!l.clearMark(u)):r=r.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return r}addElementByRule(t,r,n,a){let i,o;if(r.node)if(o=this.parser.schema.nodes[r.node],o.isLeaf)this.insertNode(o.create(r.attrs),n,t.nodeName=="BR")||this.leafFallback(t,n);else{let l=this.enter(o,r.attrs||null,n,r.preserveWhitespace);l&&(i=!0,n=l)}else{let l=this.parser.schema.marks[r.mark];n=n.concat(l.create(r.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(a)this.addElement(t,n,a);else if(r.getContent)this.findInside(t),r.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,n,!1));else{let l=t;typeof r.contentElement=="string"?l=t.querySelector(r.contentElement):typeof r.contentElement=="function"?l=r.contentElement(t):r.contentElement&&(l=r.contentElement),this.findAround(t,l,!0),this.addAll(l,n),this.findAround(t,l,!1)}i&&this.sync(s)&&this.open--}addAll(t,r,n,a){let i=n||0;for(let o=n?t.childNodes[n]:t.firstChild,s=a==null?null:t.childNodes[a];o!=s;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o,r);this.findAtPoint(t,i)}findPlace(t,r,n){let a,i;for(let o=this.open,s=0;o>=0;o--){let l=this.nodes[o],u=l.findWrapping(t);if(u&&(!a||a.length>u.length+s)&&(a=u,i=l,!u.length))break;if(l.solid){if(n)break;s+=2}}if(!a)return null;this.sync(i);for(let o=0;o<a.length;o++)r=this.enterInner(a[o],null,r,!1);return r}insertNode(t,r,n){if(t.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(r=this.enterInner(i,null,r))}let a=this.findPlace(t,r,n);if(a){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(t.type));let o=an.none;for(let s of a.concat(t.marks))(i.type?i.type.allowsMarkType(s.type):C$(s.type,t.type))&&(o=s.addToSet(o));return i.content.push(t.mark(o)),!0}return!1}enter(t,r,n,a){let i=this.findPlace(t.create(r),n,!1);return i&&(i=this.enterInner(t,r,n,!0,a)),i}enterInner(t,r,n,a=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(t);let s=k$(t,i,o.options);o.options&U2&&o.content.length==0&&(s|=U2);let l=an.none;return n=n.filter(u=>(o.type?o.type.allowsMarkType(u.type):C$(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new lm(t,r,l,a,null,s)),this.open++,n}closeExtra(t=!1){let r=this.nodes.length-1;if(r>this.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let r=this.open;r>=0;r--){if(this.nodes[r]==t)return this.open=r,!0;this.localPreserveWS&&(this.nodes[r].options|=V2)}return!1}get currentPos(){this.closeExtra();let t=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let a=n.length-1;a>=0;a--)t+=n[a].nodeSize;r&&t++}return t}findAtPoint(t,r){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==r&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&t.nodeType==1&&t.contains(this.find[r].node)&&(this.find[r].pos=this.currentPos)}findAround(t,r,n){if(t!=r&&this.find)for(let a=0;a<this.find.length;a++)this.find[a].pos==null&&t.nodeType==1&&t.contains(this.find[a].node)&&r.compareDocumentPosition(this.find[a].node)&(n?2:4)&&(this.find[a].pos=this.currentPos)}findInText(t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&(this.find[r].pos=this.currentPos-(t.nodeValue.length-this.find[r].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let r=t.split("/"),n=this.options.context,a=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(a?0:1),o=(s,l)=>{for(;s>=0;s--){let u=r[s];if(u==""){if(s==r.length-1||s==0)continue;for(;l>=i;l--)if(o(s-1,l))return!0;return!1}else{let c=l>0||l==0&&a?this.nodes[l].type:n&&l>=i?n.node(l-i).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return o(r.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let r=t.depth;r>=0;r--){let n=t.node(r).contentMatchAt(t.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}};function yce(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let n=t.nodeType==1?t.nodeName.toLowerCase():null;n&&H$.hasOwnProperty(n)&&r?(r.appendChild(t),t=r):n=="li"?r=t:n&&(r=null)}}function bce(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function S$(e){let t={};for(let r in e)t[r]=e[r];return t}function C$(e,t){let r=t.schema.nodes;for(let n in r){let a=r[n];if(!a.allowsMarkType(e))continue;let i=[],o=s=>{i.push(s);for(let l=0;l<s.edgeCount;l++){let{type:u,next:c}=s.edge(l);if(u==t||i.indexOf(c)<0&&o(c))return!0}};if(o(a.contentMatch))return!0}}var n0=class e{constructor(t,r){this.nodes=t,this.marks=r}serializeFragment(t,r={},n){n||(n=XM(r).createDocumentFragment());let a=n,i=[];return t.forEach(o=>{if(i.length||o.marks.length){let s=0,l=0;for(;s<i.length&&l<o.marks.length;){let u=o.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(i[s][0])||u.type.spec.spanning===!1)break;s++,l++}for(;s<i.length;)a=i.pop()[1];for(;l<o.marks.length;){let u=o.marks[l++],c=this.serializeMark(u,o.isInline,r);c&&(i.push([u,a]),a.appendChild(c.dom),a=c.contentDOM||c.dom)}}a.appendChild(this.serializeNodeInner(o,r))}),n}serializeNodeInner(t,r){let{dom:n,contentDOM:a}=kx(XM(r),this.nodes[t.type.name](t),null,t.attrs);if(a){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,r,a)}return n}serializeNode(t,r={}){let n=this.serializeNodeInner(t,r);for(let a=t.marks.length-1;a>=0;a--){let i=this.serializeMark(t.marks[a],t.isInline,r);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,r,n={}){let a=this.marks[t.type.name];return a&&kx(XM(n),a(t,r),null,t.attrs)}static renderSpec(t,r,n=null,a){return kx(t,r,n,a)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let r=M$(t.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(t){return M$(t.marks)}};function M$(e){let t={};for(let r in e){let n=e[r].spec.toDOM;n&&(t[r]=n)}return t}function XM(e){return e.document||window.document}var _$=new WeakMap;function xce(e){let t=_$.get(e);return t===void 0&&_$.set(e,t=vce(e)),t}function vce(e){let t=null;function r(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")t||(t=[]),t.push(n);else for(let a=0;a<n.length;a++)r(n[a]);else for(let a in n)r(n[a])}return r(e),t}function kx(e,t,r,n){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let a=t[0],i;if(typeof a!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(i=xce(n))&&i.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=a.indexOf(" ");o>0&&(r=a.slice(0,o),a=a.slice(o+1));let s,l=r?e.createElementNS(r,a):e.createElement(a),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let f in u)if(u[f]!=null){let d=f.indexOf(" ");d>0?l.setAttributeNS(f.slice(0,d),f.slice(d+1),u[f]):f=="style"&&l.style?l.style.cssText=u[f]:l.setAttribute(f,u[f])}}for(let f=c;f<t.length;f++){let d=t[f];if(d===0){if(f<t.length-1||f>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:y}=kx(e,d,r,n);if(l.appendChild(p),y){if(s)throw new RangeError("Multiple content holes");s=y}}}return{dom:l,contentDOM:s}}var K$=65535,V$=Math.pow(2,16);function wce(e,t){return e+t*V$}function j$(e){return e&K$}function kce(e){return(e-(e&K$))/V$}var G$=1,W$=2,Lx=4,X$=8,X2=class{constructor(t,r,n){this.pos=t,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&X$)>0}get deletedBefore(){return(this.delInfo&(G$|Lx))>0}get deletedAfter(){return(this.delInfo&(W$|Lx))>0}get deletedAcross(){return(this.delInfo&Lx)>0}},a0=class e{constructor(t,r=!1){if(this.ranges=t,this.inverted=r,!t.length&&e.empty)return e.empty}recover(t){let r=0,n=j$(t);if(!this.inverted)for(let a=0;a<n;a++)r+=this.ranges[a*3+2]-this.ranges[a*3+1];return this.ranges[n*3]+r+kce(t)}mapResult(t,r=1){return this._map(t,r,!1)}map(t,r=1){return this._map(t,r,!0)}_map(t,r,n){let a=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?a:0);if(l>t)break;let u=this.ranges[s+i],c=this.ranges[s+o],f=l+u;if(t<=f){let d=u?t==l?-1:t==f?1:r:r,p=l+a+(d<0?0:c);if(n)return p;let y=t==(r<0?l:f)?null:wce(s/3,t-l),x=t==l?W$:t==f?G$:Lx;return(r<0?t!=l:t!=f)&&(x|=X$),new X2(p,x,y)}a+=c-u}return n?t+a:new X2(t+a,0,null)}touches(t,r){let n=0,a=j$(r),i=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?n:0);if(l>t)break;let u=this.ranges[s+i],c=l+u;if(t<=c&&s==a*3)return!0;n+=this.ranges[s+o]-u}return!1}forEach(t){let r=this.inverted?2:1,n=this.inverted?1:2;for(let a=0,i=0;a<this.ranges.length;a+=3){let o=this.ranges[a],s=o-(this.inverted?i:0),l=o+(this.inverted?0:i),u=this.ranges[a+r],c=this.ranges[a+n];t(s,s+u,l,l+c),i+=c-u}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};a0.empty=new a0([]);var Y2=class e{constructor(t,r,n=0,a=t?t.length:0){this.mirror=r,this.from=n,this.to=a,this._maps=t||[],this.ownData=!(t||r)}get maps(){return this._maps}slice(t=0,r=this.maps.length){return new e(this._maps,this.mirror,t,r)}appendMap(t,r){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),r!=null&&this.setMirror(this._maps.length-1,r)}appendMapping(t){for(let r=0,n=this._maps.length;r<t._maps.length;r++){let a=t.getMirror(r);this.appendMap(t._maps[r],a!=null&&a<r?n+a:void 0)}}getMirror(t){if(this.mirror){for(let r=0;r<this.mirror.length;r++)if(this.mirror[r]==t)return this.mirror[r+(r%2?-1:1)]}}setMirror(t,r){this.mirror||(this.mirror=[]),this.mirror.push(t,r)}appendMappingInverted(t){for(let r=t.maps.length-1,n=this._maps.length+t._maps.length;r>=0;r--){let a=t.getMirror(r);this.appendMap(t._maps[r].invert(),a!=null&&a>r?n-a-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(t,r=1){if(this.mirror)return this._map(t,r,!0);for(let n=this.from;n<this.to;n++)t=this._maps[n].map(t,r);return t}mapResult(t,r=1){return this._map(t,r,!1)}_map(t,r,n){let a=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],s=o.mapResult(t,r);if(s.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,t=this._maps[l].recover(s.recover);continue}}a|=s.delInfo,t=s.pos}return n?t:new X2(t,a,null)}},r_=Object.create(null),Di=class{getMap(){return a0.empty}merge(t){return null}static fromJSON(t,r){if(!r||!r.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=r_[r.stepType];if(!n)throw new RangeError(`No step type ${r.stepType} defined`);return n.fromJSON(t,r)}static jsonID(t,r){if(t in r_)throw new RangeError("Duplicate use of step JSON ID "+t);return r_[t]=r,r.prototype.jsonID=t,r}},Ki=class e{constructor(t,r){this.doc=t,this.failed=r}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,r,n,a){try{return e.ok(t.replace(r,n,a))}catch(i){if(i instanceof Ep)return e.fail(i.message);throw i}}};function s_(e,t,r){let n=[];for(let a=0;a<e.childCount;a++){let i=e.child(a);i.content.size&&(i=i.copy(s_(i.content,t,i))),i.isInline&&(i=t(i,r,a)),n.push(i)}return at.fromArray(n)}var J2=class e extends Di{constructor(t,r,n){super(),this.from=t,this.to=r,this.mark=n}apply(t){let r=t.slice(this.from,this.to),n=t.resolve(this.from),a=n.node(n.sharedDepth(this.to)),i=new Ct(s_(r.content,(o,s)=>!o.isAtom||!s.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),a),r.openStart,r.openEnd);return Ki.fromReplace(t,this.from,this.to,i)}invert(){return new i0(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new e(r.pos,n.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(r.from,r.to,t.markFromJSON(r.mark))}};Di.jsonID("addMark",J2);var i0=class e extends Di{constructor(t,r,n){super(),this.from=t,this.to=r,this.mark=n}apply(t){let r=t.slice(this.from,this.to),n=new Ct(s_(r.content,a=>a.mark(this.mark.removeFromSet(a.marks)),t),r.openStart,r.openEnd);return Ki.fromReplace(t,this.from,this.to,n)}invert(){return new J2(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new e(r.pos,n.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(r.from,r.to,t.markFromJSON(r.mark))}};Di.jsonID("removeMark",i0);var Z2=class e extends Di{constructor(t,r){super(),this.pos=t,this.mark=r}apply(t){let r=t.nodeAt(this.pos);if(!r)return Ki.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return Ki.fromReplace(t,this.pos,this.pos+1,new Ct(at.from(n),0,r.isLeaf?0:1))}invert(t){let r=t.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let a=0;a<r.marks.length;a++)if(!r.marks[a].isInSet(n))return new e(this.pos,r.marks[a]);return new e(this.pos,this.mark)}}return new cm(this.pos,this.mark)}map(t){let r=t.mapResult(this.pos,1);return r.deletedAfter?null:new e(r.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new e(r.pos,t.markFromJSON(r.mark))}};Di.jsonID("addNodeMark",Z2);var cm=class e extends Di{constructor(t,r){super(),this.pos=t,this.mark=r}apply(t){let r=t.nodeAt(this.pos);if(!r)return Ki.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.removeFromSet(r.marks));return Ki.fromReplace(t,this.pos,this.pos+1,new Ct(at.from(n),0,r.isLeaf?0:1))}invert(t){let r=t.nodeAt(this.pos);return!r||!this.mark.isInSet(r.marks)?this:new Z2(this.pos,this.mark)}map(t){let r=t.mapResult(this.pos,1);return r.deletedAfter?null:new e(r.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new e(r.pos,t.markFromJSON(r.mark))}};Di.jsonID("removeNodeMark",cm);var lo=class e extends Di{constructor(t,r,n,a=!1){super(),this.from=t,this.to=r,this.slice=n,this.structure=a}apply(t){return this.structure&&i_(t,this.from,this.to)?Ki.fail("Structure replace would overwrite content"):Ki.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new a0([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deletedAcross&&n.deletedAcross?null:new e(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let r=this.slice.size+t.slice.size==0?Ct.empty:new Ct(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),r,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let r=this.slice.size+t.slice.size==0?Ct.empty:new Ct(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,r,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(r.from,r.to,Ct.fromJSON(t,r.slice),!!r.structure)}};Di.jsonID("replace",lo);var si=class e extends Di{constructor(t,r,n,a,i,o,s=!1){super(),this.from=t,this.to=r,this.gapFrom=n,this.gapTo=a,this.slice=i,this.insert=o,this.structure=s}apply(t){if(this.structure&&(i_(t,this.from,this.gapFrom)||i_(t,this.gapTo,this.to)))return Ki.fail("Structure gap-replace would overwrite content");let r=t.slice(this.gapFrom,this.gapTo);if(r.openStart||r.openEnd)return Ki.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,r.content);return n?Ki.fromReplace(t,this.from,this.to,n):Ki.fail("Content does not fit in gap")}getMap(){return new a0([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let r=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+r,this.from+this.insert,this.from+this.insert+r,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),a=this.from==this.gapFrom?r.pos:t.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:t.map(this.gapTo,1);return r.deletedAcross&&n.deletedAcross||a<r.pos||i>n.pos?null:new e(r.pos,n.pos,a,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(r.from,r.to,r.gapFrom,r.gapTo,Ct.fromJSON(t,r.slice),r.insert,!!r.structure)}};Di.jsonID("replaceAround",si);function i_(e,t,r){let n=e.resolve(t),a=r-t,i=n.depth;for(;a>0&&i>0&&n.indexAfter(i)==n.node(i).childCount;)i--,a--;if(a>0){let o=n.node(i).maybeChild(n.indexAfter(i));for(;a>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,a--}}return!1}function Sce(e,t,r,n){let a=[],i=[],o,s;e.doc.nodesBetween(t,r,(l,u,c)=>{if(!l.isInline)return;let f=l.marks;if(!n.isInSet(f)&&c.type.allowsMarkType(n.type)){let d=Math.max(u,t),p=Math.min(u+l.nodeSize,r),y=n.addToSet(f);for(let x=0;x<f.length;x++)f[x].isInSet(y)||(o&&o.to==d&&o.mark.eq(f[x])?o.to=p:a.push(o=new i0(d,p,f[x])));s&&s.to==d?s.to=p:i.push(s=new J2(d,p,n))}}),a.forEach(l=>e.step(l)),i.forEach(l=>e.step(l))}function Cce(e,t,r,n){let a=[],i=0;e.doc.nodesBetween(t,r,(o,s)=>{if(!o.isInline)return;i++;let l=null;if(n instanceof K2){let u=o.marks,c;for(;c=n.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let u=Math.min(s+o.nodeSize,r);for(let c=0;c<l.length;c++){let f=l[c],d;for(let p=0;p<a.length;p++){let y=a[p];y.step==i-1&&f.eq(a[p].style)&&(d=y)}d?(d.to=u,d.step=i):a.push({style:f,from:Math.max(s,t),to:u,step:i})}}}),a.forEach(o=>e.step(new i0(o.from,o.to,o.style)))}function l_(e,t,r,n=r.contentMatch,a=!0){let i=e.doc.nodeAt(t),o=[],s=t+1;for(let l=0;l<i.childCount;l++){let u=i.child(l),c=s+u.nodeSize,f=n.matchType(u.type);if(!f)o.push(new lo(s,c,Ct.empty));else{n=f;for(let d=0;d<u.marks.length;d++)r.allowsMarkType(u.marks[d].type)||e.step(new i0(s,c,u.marks[d]));if(a&&u.isText&&r.whitespace!="pre"){let d,p=/\r?\n|\r/g,y;for(;d=p.exec(u.text);)y||(y=new Ct(at.from(r.schema.text(" ",r.allowedMarks(u.marks))),0,0)),o.push(new lo(s+d.index,s+d.index+d[0].length,y))}}s=c}if(!n.validEnd){let l=n.fillBefore(at.empty,!0);e.replace(s,s,new Ct(l,0,0))}for(let l=o.length-1;l>=0;l--)e.step(o[l])}function Mce(e,t,r){return(t==0||e.canReplace(t,e.childCount))&&(r==e.childCount||e.canReplace(0,r))}function o0(e){let r=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,a=0,i=0;;--n){let o=e.$from.node(n),s=e.$from.index(n)+a,l=e.$to.indexAfter(n)-i;if(n<e.depth&&o.canReplace(s,l,r))return n;if(n==0||o.type.spec.isolating||!Mce(o,s,l))break;s&&(a=1),l<o.childCount&&(i=1)}return null}function _ce(e,t,r){let{$from:n,$to:a,depth:i}=t,o=n.before(i+1),s=a.after(i+1),l=o,u=s,c=at.empty,f=0;for(let y=i,x=!1;y>r;y--)x||n.index(y)>0?(x=!0,c=at.from(n.node(y).copy(c)),f++):l--;let d=at.empty,p=0;for(let y=i,x=!1;y>r;y--)x||a.after(y+1)<a.end(y)?(x=!0,d=at.from(a.node(y).copy(d)),p++):u++;e.step(new si(l,u,o,s,new Ct(c.append(d),f,p),c.size-f,!0))}function pm(e,t,r=null,n=e){let a=Ace(e,t),i=a&&Lce(n,t);return i?a.map(U$).concat({type:t,attrs:r}).concat(i.map(U$)):null}function U$(e){return{type:e,attrs:null}}function Ace(e,t){let{parent:r,startIndex:n,endIndex:a}=e,i=r.contentMatchAt(n).findWrapping(t);if(!i)return null;let o=i.length?i[0]:t;return r.canReplaceWith(n,a,o)?i:null}function Lce(e,t){let{parent:r,startIndex:n,endIndex:a}=e,i=r.child(n),o=t.contentMatch.findWrapping(i.type);if(!o)return null;let l=(o.length?o[o.length-1]:t).contentMatch;for(let u=n;l&&u<a;u++)l=l.matchType(r.child(u).type);return!l||!l.validEnd?null:o}function Tce(e,t,r){let n=at.empty;for(let o=r.length-1;o>=0;o--){if(n.size){let s=r[o].type.contentMatch.matchFragment(n);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=at.from(r[o].type.create(r[o].attrs,n))}let a=t.start,i=t.end;e.step(new si(a,i,a,i,new Ct(n,0,0),r.length,!0))}function Ece(e,t,r,n,a){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,r,(o,s)=>{let l=typeof a=="function"?a(o):a;if(o.isTextblock&&!o.hasMarkup(n,l)&&Dce(e.doc,e.mapping.slice(i).map(s),n)){let u=null;if(n.schema.linebreakReplacement){let p=n.whitespace=="pre",y=!!n.contentMatch.matchType(n.schema.linebreakReplacement);p&&!y?u=!1:!p&&y&&(u=!0)}u===!1&&J$(e,o,s,i),l_(e,e.mapping.slice(i).map(s,1),n,void 0,u===null);let c=e.mapping.slice(i),f=c.map(s,1),d=c.map(s+o.nodeSize,1);return e.step(new si(f,d,f+1,d-1,new Ct(at.from(n.create(l,null,o.marks)),0,0),1,!0)),u===!0&&Y$(e,o,s,i),!1}})}function Y$(e,t,r,n){t.forEach((a,i)=>{if(a.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(a.text);){let l=e.mapping.slice(n).map(r+1+i+o.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function J$(e,t,r,n){t.forEach((a,i)=>{if(a.type==a.type.schema.linebreakReplacement){let o=e.mapping.slice(n).map(r+1+i);e.replaceWith(o,o+1,t.type.schema.text(`
3914
3914
  `))}})}function Dce(e,t,r){let n=e.resolve(t),a=n.index();return n.parent.canReplaceWith(a,a+1,r)}function Ice(e,t,r,n,a){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");r||(r=i.type);let o=r.create(n,null,a||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,o);if(!r.validContent(i.content))throw new RangeError("Invalid content for node type "+r.name);e.step(new si(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new Ct(at.from(o),0,0),1,!0))}function Fs(e,t,r=1,n){let a=e.resolve(t),i=a.depth-r,o=n&&n[n.length-1]||a.parent;if(i<0||a.parent.type.spec.isolating||!a.parent.canReplace(a.index(),a.parent.childCount)||!o.type.validContent(a.parent.content.cutByIndex(a.index(),a.parent.childCount)))return!1;for(let u=a.depth-1,c=r-2;u>i;u--,c--){let f=a.node(u),d=a.index(u);if(f.type.spec.isolating)return!1;let p=f.content.cutByIndex(d,f.childCount),y=n&&n[c+1];y&&(p=p.replaceChild(0,y.type.create(y.attrs)));let x=n&&n[c]||f;if(!f.canReplace(d+1,f.childCount)||!x.type.validContent(p))return!1}let s=a.indexAfter(i),l=n&&n[0];return a.node(i).canReplaceWith(s,s,l?l.type:a.node(i+1).type)}function zce(e,t,r=1,n){let a=e.doc.resolve(t),i=at.empty,o=at.empty;for(let s=a.depth,l=a.depth-r,u=r-1;s>l;s--,u--){i=at.from(a.node(s).copy(i));let c=n&&n[u];o=at.from(c?c.type.create(c.attrs,o):a.node(s).copy(o))}e.step(new lo(t,t,new Ct(i.append(o),r,r),!0))}function Cl(e,t){let r=e.resolve(t),n=r.index();return Z$(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function Bce(e,t){t.content.size||e.type.compatibleContent(t.type);let r=e.contentMatchAt(e.childCount),{linebreakReplacement:n}=e.type.schema;for(let a=0;a<t.childCount;a++){let i=t.child(a),o=i.type==n?e.type.schema.nodes.text:i.type;if(r=r.matchType(o),!r||!e.type.allowsMarks(i.marks))return!1}return r.validEnd}function Z$(e,t){return!!(e&&t&&!e.isLeaf&&Bce(e,t))}function zp(e,t,r=-1){let n=e.resolve(t);for(let a=n.depth;;a--){let i,o,s=n.index(a);if(a==n.depth?(i=n.nodeBefore,o=n.nodeAfter):r>0?(i=n.node(a+1),s++,o=n.node(a).maybeChild(s)):(i=n.node(a).maybeChild(s-1),o=n.node(a+1)),i&&!i.isTextblock&&Z$(i,o)&&n.node(a).canReplace(s,s+1))return t;if(a==0)break;t=r<0?n.before(a):n.after(a)}}function Rce(e,t,r){let n=null,{linebreakReplacement:a}=e.doc.type.schema,i=e.doc.resolve(t-r),o=i.node().type;if(a&&o.inlineContent){let c=o.whitespace=="pre",f=!!o.contentMatch.matchType(a);c&&!f?n=!1:!c&&f&&(n=!0)}let s=e.steps.length;if(n===!1){let c=e.doc.resolve(t+r);J$(e,c.node(),c.before(),s)}o.inlineContent&&l_(e,t+r-1,o,i.node().contentMatchAt(i.index()),n==null);let l=e.mapping.slice(s),u=l.map(t-r);if(e.step(new lo(u,l.map(t+r,-1),Ct.empty,!0)),n===!0){let c=e.doc.resolve(u);Y$(e,c.node(),c.before(),e.steps.length)}return e}function Nce(e,t,r){let n=e.resolve(t);if(n.parent.canReplaceWith(n.index(),n.index(),r))return t;if(n.parentOffset==0)for(let a=n.depth-1;a>=0;a--){let i=n.index(a);if(n.node(a).canReplaceWith(i,i,r))return n.before(a+1);if(i>0)return null}if(n.parentOffset==n.parent.content.size)for(let a=n.depth-1;a>=0;a--){let i=n.indexAfter(a);if(n.node(a).canReplaceWith(i,i,r))return n.after(a+1);if(i<n.node(a).childCount)return null}return null}function Dx(e,t,r){let n=e.resolve(t);if(!r.content.size)return t;let a=r.content;for(let i=0;i<r.openStart;i++)a=a.firstChild.content;for(let i=1;i<=(r.openStart==0&&r.size?2:1);i++)for(let o=n.depth;o>=0;o--){let s=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,l=n.index(o)+(s>0?1:0),u=n.node(o),c=!1;if(i==1)c=u.canReplace(l,l,a);else{let f=u.contentMatchAt(l).findWrapping(a.firstChild.type);c=f&&u.canReplaceWith(l,l,f[0])}if(c)return s==0?n.pos:s<0?n.before(o+1):n.after(o+1)}return null}function Q2(e,t,r=t,n=Ct.empty){if(t==r&&!n.size)return null;let a=e.resolve(t),i=e.resolve(r);return Q$(a,i,n)?new lo(t,r,n):new o_(a,i,n).fit()}function Q$(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}var o_=class{constructor(t,r,n){this.$from=t,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=at.empty;for(let a=0;a<=t.depth;a++){let i=t.node(a);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(a))})}for(let a=t.depth;a>0;a--)this.placed=at.from(t.node(a).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,a=this.close(t<0?this.$to:n.doc.resolve(t));if(!a)return null;let i=this.placed,o=n.depth,s=a.depth;for(;o&&s&&i.childCount==1;)i=i.firstChild.content,o--,s--;let l=new Ct(i,o,s);return t>-1?new si(n.pos,t,this.$to.pos,this.$to.end(),l,r):l.size||n.pos!=this.$to.pos?new lo(n.pos,a.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,a=this.unplaced.openEnd;n<t;n++){let i=r.firstChild;if(r.childCount>1&&(a=0),i.type.spec.isolating&&a<=n){t=n;break}r=i.content}for(let r=1;r<=2;r++)for(let n=r==1?t:this.unplaced.openStart;n>=0;n--){let a,i=null;n?(i=n_(this.unplaced.content,n-1).firstChild,a=i.content):a=this.unplaced.content;let o=a.firstChild;for(let s=this.depth;s>=0;s--){let{type:l,match:u}=this.frontier[s],c,f=null;if(r==1&&(o?u.matchType(o.type)||(f=u.fillBefore(at.from(o),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:s,parent:i,inject:f};if(r==2&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:s,parent:i,wrap:c};if(i&&u.matchType(i.type))break}}}openMore(){let{content:t,openStart:r,openEnd:n}=this.unplaced,a=n_(t,r);return!a.childCount||a.firstChild.isLeaf?!1:(this.unplaced=new Ct(t,r+1,Math.max(n,a.size+r>=t.size-n?r+1:0)),!0)}dropNode(){let{content:t,openStart:r,openEnd:n}=this.unplaced,a=n_(t,r);if(a.childCount<=1&&r>0){let i=t.size-r<=r+a.size;this.unplaced=new Ct(G2(t,r-1,1),r-1,i?r-1:n)}else this.unplaced=new Ct(G2(t,r,1),r,n)}placeNodes({sliceDepth:t,frontierDepth:r,parent:n,inject:a,wrap:i}){for(;this.depth>r;)this.closeFrontierNode();if(i)for(let x=0;x<i.length;x++)this.openFrontierNode(i[x]);let o=this.unplaced,s=n?n.content:o.content,l=o.openStart-t,u=0,c=[],{match:f,type:d}=this.frontier[r];if(a){for(let x=0;x<a.childCount;x++)c.push(a.child(x));f=f.matchFragment(a)}let p=s.size+t-(o.content.size-o.openEnd);for(;u<s.childCount;){let x=s.child(u),k=f.matchType(x.type);if(!k)break;u++,(u>1||l==0||x.content.size)&&(f=k,c.push(eH(x.mark(d.allowedMarks(x.marks)),u==1?l:0,u==s.childCount?p:-1)))}let y=u==s.childCount;y||(p=-1),this.placed=W2(this.placed,r,at.from(c)),this.frontier[r].match=f,y&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let x=0,k=s;x<p;x++){let w=k.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),k=w.content}this.unplaced=y?t==0?Ct.empty:new Ct(G2(o.content,t-1,1),t-1,p<0?o.openEnd:t-1):new Ct(G2(o.content,t,u),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],r;if(!t.type.isTextblock||!a_(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(r=this.findCloseLevel(this.$to))&&r.depth==this.depth)return-1;let{depth:n}=this.$to,a=this.$to.after(n);for(;n>1&&a==this.$to.end(--n);)++a;return a}findCloseLevel(t){e:for(let r=Math.min(this.depth,t.depth);r>=0;r--){let{match:n,type:a}=this.frontier[r],i=r<t.depth&&t.end(r+1)==t.pos+(t.depth-(r+1)),o=a_(t,r,a,n,i);if(o){for(let s=r-1;s>=0;s--){let{match:l,type:u}=this.frontier[s],c=a_(t,s,u,l,!0);if(!c||c.childCount)continue e}return{depth:r,fit:o,move:i?t.doc.resolve(t.after(r+1)):t}}}}close(t){let r=this.findCloseLevel(t);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=W2(this.placed,r.depth,r.fit)),t=r.move;for(let n=r.depth+1;n<=t.depth;n++){let a=t.node(n),i=a.type.contentMatch.fillBefore(a.content,!0,t.index(n));this.openFrontierNode(a.type,a.attrs,i)}return t}openFrontierNode(t,r=null,n){let a=this.frontier[this.depth];a.match=a.match.matchType(t),this.placed=W2(this.placed,this.depth,at.from(t.create(r,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(at.empty,!0);r.childCount&&(this.placed=W2(this.placed,this.frontier.length,r))}};function G2(e,t,r){return t==0?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy(G2(e.firstChild.content,t-1,r)))}function W2(e,t,r){return t==0?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(W2(e.lastChild.content,t-1,r)))}function n_(e,t){for(let r=0;r<t;r++)e=e.firstChild.content;return e}function eH(e,t,r){if(t<=0)return e;let n=e.content;return t>1&&(n=n.replaceChild(0,eH(n.firstChild,t-1,n.childCount==1?r-1:0))),t>0&&(n=e.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(e.type.contentMatch.matchFragment(n).fillBefore(at.empty,!0)))),e.copy(n)}function a_(e,t,r,n,a){let i=e.node(t),o=a?e.indexAfter(t):e.index(t);if(o==i.childCount&&!r.compatibleContent(i.type))return null;let s=n.fillBefore(i.content,!0,o);return s&&!Oce(r,i.content,o)?s:null}function Oce(e,t,r){for(let n=r;n<t.childCount;n++)if(!e.allowsMarks(t.child(n).marks))return!0;return!1}function Pce(e){return e.spec.defining||e.spec.definingForContent}function Fce(e,t,r,n){if(!n.size)return e.deleteRange(t,r);let a=e.doc.resolve(t),i=e.doc.resolve(r);if(Q$(a,i,n))return e.step(new lo(t,r,n));let o=rH(a,i);o[o.length-1]==0&&o.pop();let s=-(a.depth+1);o.unshift(s);for(let d=a.depth,p=a.pos-1;d>0;d--,p--){let y=a.node(d).type.spec;if(y.defining||y.definingAsContext||y.isolating)break;o.indexOf(d)>-1?s=d:a.before(d)==p&&o.splice(1,0,-d)}let l=o.indexOf(s),u=[],c=n.openStart;for(let d=n.content,p=0;;p++){let y=d.firstChild;if(u.push(y),p==n.openStart)break;d=y.content}for(let d=c-1;d>=0;d--){let p=u[d],y=Pce(p.type);if(y&&!p.sameMarkup(a.node(Math.abs(s)-1)))c=d;else if(y||!p.type.isTextblock)break}for(let d=n.openStart;d>=0;d--){let p=(d+c+1)%(n.openStart+1),y=u[p];if(y)for(let x=0;x<o.length;x++){let k=o[(x+l)%o.length],w=!0;k<0&&(w=!1,k=-k);let S=a.node(k-1),T=a.index(k-1);if(S.canReplaceWith(T,T,y.type,y.marks))return e.replace(a.before(k),w?i.after(k):r,new Ct(tH(n.content,0,n.openStart,p),p,n.openEnd))}}let f=e.steps.length;for(let d=o.length-1;d>=0&&(e.replace(t,r,n),!(e.steps.length>f));d--){let p=o[d];p<0||(t=a.before(p),r=i.after(p))}}function tH(e,t,r,n,a){if(t<r){let i=e.firstChild;e=e.replaceChild(0,i.copy(tH(i.content,t+1,r,n,i)))}if(t>n){let i=a.contentMatchAt(0),o=i.fillBefore(e).append(e);e=o.append(i.matchFragment(o).fillBefore(at.empty,!0))}return e}function qce(e,t,r,n){if(!n.isInline&&t==r&&e.doc.resolve(t).parent.content.size){let a=Nce(e.doc,t,n.type);a!=null&&(t=r=a)}e.replaceRange(t,r,new Ct(at.from(n),0,0))}function $ce(e,t,r){let n=e.doc.resolve(t),a=e.doc.resolve(r),i=rH(n,a);for(let o=0;o<i.length;o++){let s=i[o],l=o==i.length-1;if(l&&s==0||n.node(s).type.contentMatch.validEnd)return e.delete(n.start(s),a.end(s));if(s>0&&(l||n.node(s-1).canReplace(n.index(s-1),a.indexAfter(s-1))))return e.delete(n.before(s),a.after(s))}for(let o=1;o<=n.depth&&o<=a.depth;o++)if(t-n.start(o)==n.depth-o&&r>n.end(o)&&a.end(o)-r!=a.depth-o&&n.start(o-1)==a.start(o-1)&&n.node(o-1).canReplace(n.index(o-1),a.index(o-1)))return e.delete(n.before(o),r);e.delete(t,r)}function rH(e,t){let r=[],n=Math.min(e.depth,t.depth);for(let a=n;a>=0;a--){let i=e.start(a);if(i<e.pos-(e.depth-a)||t.end(a)>t.pos+(t.depth-a)||e.node(a).type.spec.isolating||t.node(a).type.spec.isolating)break;(i==t.start(a)||a==e.depth&&a==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&a&&t.start(a-1)==i-1)&&r.push(a)}return r}var Tx=class e extends Di{constructor(t,r,n){super(),this.pos=t,this.attr=r,this.value=n}apply(t){let r=t.nodeAt(this.pos);if(!r)return Ki.fail("No node at attribute step's position");let n=Object.create(null);for(let i in r.attrs)n[i]=r.attrs[i];n[this.attr]=this.value;let a=r.type.create(n,null,r.marks);return Ki.fromReplace(t,this.pos,this.pos+1,new Ct(at.from(a),0,r.isLeaf?0:1))}getMap(){return a0.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let r=t.mapResult(this.pos,1);return r.deletedAfter?null:new e(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e(r.pos,r.attr,r.value)}};Di.jsonID("attr",Tx);var Ex=class e extends Di{constructor(t,r){super(),this.attr=t,this.value=r}apply(t){let r=Object.create(null);for(let a in t.attrs)r[a]=t.attrs[a];r[this.attr]=this.value;let n=t.type.create(r,t.content,t.marks);return Ki.ok(n)}getMap(){return a0.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new e(r.attr,r.value)}};Di.jsonID("docAttr",Ex);var dm=class extends Error{};dm=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r};dm.prototype=Object.create(Error.prototype);dm.prototype.constructor=dm;dm.prototype.name="TransformError";var fm=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Y2}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let r=this.maybeStep(t);if(r.failed)throw new dm(r.failed);return this}maybeStep(t){let r=t.apply(this.doc);return r.failed||this.addStep(t,r.doc),r}get docChanged(){return this.steps.length>0}changedRange(){let t=1e9,r=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let a=this.mapping.maps[n];n&&(t=a.map(t,1),r=a.map(r,-1)),a.forEach((i,o,s,l)=>{t=Math.min(t,s),r=Math.max(r,l)})}return t==1e9?null:{from:t,to:r}}addStep(t,r){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=r}replace(t,r=t,n=Ct.empty){let a=Q2(this.doc,t,r,n);return a&&this.step(a),this}replaceWith(t,r,n){return this.replace(t,r,new Ct(at.from(n),0,0))}delete(t,r){return this.replace(t,r,Ct.empty)}insert(t,r){return this.replaceWith(t,t,r)}replaceRange(t,r,n){return Fce(this,t,r,n),this}replaceRangeWith(t,r,n){return qce(this,t,r,n),this}deleteRange(t,r){return $ce(this,t,r),this}lift(t,r){return _ce(this,t,r),this}join(t,r=1){return Rce(this,t,r),this}wrap(t,r){return Tce(this,t,r),this}setBlockType(t,r=t,n,a=null){return Ece(this,t,r,n,a),this}setNodeMarkup(t,r,n=null,a){return Ice(this,t,r,n,a),this}setNodeAttribute(t,r,n){return this.step(new Tx(t,r,n)),this}setDocAttribute(t,r){return this.step(new Ex(t,r)),this}addNodeMark(t,r){return this.step(new Z2(t,r)),this}removeNodeMark(t,r){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(r instanceof an)r.isInSet(n.marks)&&this.step(new cm(t,r));else{let a=n.marks,i,o=[];for(;i=r.isInSet(a);)o.push(new cm(t,i)),a=i.removeFromSet(a);for(let s=o.length-1;s>=0;s--)this.step(o[s])}return this}split(t,r=1,n){return zce(this,t,r,n),this}addMark(t,r,n){return Sce(this,t,r,n),this}removeMark(t,r,n){return Cce(this,t,r,n),this}clearIncompatible(t,r,n){return l_(this,t,r,n),this}};var u_=Object.create(null),ir=class{constructor(t,r,n){this.$anchor=t,this.$head=r,this.ranges=n||[new zx(t.min(r),t.max(r))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let r=0;r<t.length;r++)if(t[r].$from.pos!=t[r].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,r=Ct.empty){let n=r.content.lastChild,a=null;for(let s=0;s<r.openEnd;s++)a=n,n=n.lastChild;let i=t.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:l,$to:u}=o[s],c=t.mapping.slice(i);t.replaceRange(c.map(l.pos),c.map(u.pos),s?Ct.empty:r),s==0&&iH(t,i,(n?n.isInline:a&&a.isTextblock)?-1:1)}}replaceWith(t,r){let n=t.steps.length,a=this.ranges;for(let i=0;i<a.length;i++){let{$from:o,$to:s}=a[i],l=t.mapping.slice(n),u=l.map(o.pos),c=l.map(s.pos);i?t.deleteRange(u,c):(t.replaceRangeWith(u,c,r),iH(t,n,r.isInline?-1:1))}}static findFrom(t,r,n=!1){let a=t.parent.inlineContent?new Vt(t):hm(t.node(0),t.parent,t.pos,t.index(),r,n);if(a)return a;for(let i=t.depth-1;i>=0;i--){let o=r<0?hm(t.node(0),t.node(i),t.before(i+1),t.index(i),r,n):hm(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,r,n);if(o)return o}return null}static near(t,r=1){return this.findFrom(t,r)||this.findFrom(t,-r)||new zo(t.node(0))}static atStart(t){return hm(t,t,0,0,1)||new zo(t)}static atEnd(t){return hm(t,t,t.content.size,t.childCount,-1)||new zo(t)}static fromJSON(t,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=u_[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(t,r)}static jsonID(t,r){if(t in u_)throw new RangeError("Duplicate use of selection JSON ID "+t);return u_[t]=r,r.prototype.jsonID=t,r}getBookmark(){return Vt.between(this.$anchor,this.$head).getBookmark()}};ir.prototype.visible=!0;var zx=class{constructor(t,r){this.$from=t,this.$to=r}},nH=!1;function aH(e){!nH&&!e.parent.inlineContent&&(nH=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var Vt=class e extends ir{constructor(t,r=t){aH(t),aH(r),super(t,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,r){let n=t.resolve(r.map(this.head));if(!n.parent.inlineContent)return ir.near(n);let a=t.resolve(r.map(this.anchor));return new e(a.parent.inlineContent?a:n,n)}replace(t,r=Ct.empty){if(super.replace(t,r),r==Ct.empty){let n=this.$from.marksAcross(this.$to);n&&t.ensureMarks(n)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Bx(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(r.anchor),t.resolve(r.head))}static create(t,r,n=r){let a=t.resolve(r);return new this(a,n==r?a:t.resolve(n))}static between(t,r,n){let a=t.pos-r.pos;if((!n||a)&&(n=a>=0?1:-1),!r.parent.inlineContent){let i=ir.findFrom(r,n,!0)||ir.findFrom(r,-n,!0);if(i)r=i.$head;else return ir.near(r,n)}return t.parent.inlineContent||(a==0?t=r:(t=(ir.findFrom(t,-n,!0)||ir.findFrom(t,n,!0)).$anchor,t.pos<r.pos!=a<0&&(t=r))),new e(t,r)}};ir.jsonID("text",Vt);var Bx=class e{constructor(t,r){this.anchor=t,this.head=r}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(t){return Vt.between(t.resolve(this.anchor),t.resolve(this.head))}},Pt=class e extends ir{constructor(t){let r=t.nodeAfter,n=t.node(0).resolve(t.pos+r.nodeSize);super(t,n),this.node=r}map(t,r){let{deleted:n,pos:a}=r.mapResult(this.anchor),i=t.resolve(a);return n?ir.near(i):new e(i)}content(){return new Ct(at.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new d_(this.anchor)}static fromJSON(t,r){if(typeof r.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new e(t.resolve(r.anchor))}static create(t,r){return new e(t.resolve(r))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}};Pt.prototype.visible=!1;ir.jsonID("node",Pt);var d_=class e{constructor(t){this.anchor=t}map(t){let{deleted:r,pos:n}=t.mapResult(this.anchor);return r?new Bx(n,n):new e(n)}resolve(t){let r=t.resolve(this.anchor),n=r.nodeAfter;return n&&Pt.isSelectable(n)?new Pt(r):ir.near(r)}},zo=class e extends ir{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,r=Ct.empty){if(r==Ct.empty){t.delete(0,t.doc.content.size);let n=ir.atStart(t.doc);n.eq(t.selection)||t.setSelection(n)}else super.replace(t,r)}toJSON(){return{type:"all"}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return Hce}};ir.jsonID("all",zo);var Hce={map(){return this},resolve(e){return new zo(e)}};function hm(e,t,r,n,a,i=!1){if(t.inlineContent)return Vt.create(e,r);for(let o=n-(a>0?0:1);a>0?o<t.childCount:o>=0;o+=a){let s=t.child(o);if(s.isAtom){if(!i&&Pt.isSelectable(s))return Pt.create(e,r-(a<0?s.nodeSize:0))}else{let l=hm(e,s,r+a,a<0?s.childCount:0,a,i);if(l)return l}r+=s.nodeSize*a}return null}function iH(e,t,r){let n=e.steps.length-1;if(n<t)return;let a=e.steps[n];if(!(a instanceof lo||a instanceof si))return;let i=e.mapping.maps[n],o;i.forEach((s,l,u,c)=>{o==null&&(o=c)}),e.setSelection(ir.near(e.doc.resolve(o),r))}var oH=1,Ix=2,sH=4,f_=class extends fm{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|oH)&~Ix,this.storedMarks=null,this}get selectionSet(){return(this.updated&oH)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Ix,this}ensureMarks(t){return an.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Ix)>0}addStep(t,r){super.addStep(t,r),this.updated=this.updated&~Ix,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,r=!0){let n=this.selection;return r&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||an.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,r,n){let a=this.doc.type.schema;if(r==null)return t?this.replaceSelectionWith(a.text(t),!0):this.deleteSelection();{if(n==null&&(n=r),!t)return this.deleteRange(r,n);let i=this.storedMarks;if(!i){let o=this.doc.resolve(r);i=n==r?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,a.text(t,i)),!this.selection.empty&&this.selection.to==r+t.length&&this.setSelection(ir.near(this.selection.$to)),this}}setMeta(t,r){return this.meta[typeof t=="string"?t:t.key]=r,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=sH,this}get scrolledIntoView(){return(this.updated&sH)>0}};function lH(e,t){return!t||!e?e:e.bind(t)}var Bp=class{constructor(t,r,n){this.name=t,this.init=lH(r.init,n),this.apply=lH(r.apply,n)}},jce=[new Bp("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Bp("selection",{init(e,t){return e.selection||ir.atStart(t.doc)},apply(e){return e.selection}}),new Bp("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,r,n){return n.selection.$cursor?e.storedMarks:null}}),new Bp("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],e3=class{constructor(t,r){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=jce.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new Bp(n.key,n.spec.state,n))})}},Rx=class e{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,r=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=r){let a=this.config.plugins[n];if(a.spec.filterTransaction&&!a.spec.filterTransaction.call(a,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let r=[t],n=this.applyInner(t),a=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let l=a?a[o].n:0,u=a?a[o].state:this,c=l<r.length&&s.spec.appendTransaction.call(s,l?r.slice(l):r,u,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",t),!a){a=[];for(let f=0;f<this.config.plugins.length;f++)a.push(f<o?{state:n,n:r.length}:{state:this,n:0})}r.push(c),n=n.applyInner(c),i=!0}a&&(a[o]={state:n,n:r.length})}}if(!i)return{state:n,transactions:r}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let r=new e(this.config),n=this.config.fields;for(let a=0;a<n.length;a++){let i=n[a];r[i.name]=i.apply(t,this[i.name],this,r)}return r}get tr(){return new f_(this)}static create(t){let r=new e3(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new e(r);for(let a=0;a<r.fields.length;a++)n[r.fields[a].name]=r.fields[a].init(t,n);return n}reconfigure(t){let r=new e3(this.schema,t.plugins),n=r.fields,a=new e(r);for(let i=0;i<n.length;i++){let o=n[i].name;a[o]=this.hasOwnProperty(o)?this[o]:n[i].init(t,a)}return a}toJSON(t){let r={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(r.storedMarks=this.storedMarks.map(n=>n.toJSON())),t&&typeof t=="object")for(let n in t){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let a=t[n],i=a.spec.state;i&&i.toJSON&&(r[n]=i.toJSON.call(a,this[a.key]))}return r}static fromJSON(t,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let a=new e3(t.schema,t.plugins),i=new e(a);return a.fields.forEach(o=>{if(o.name=="doc")i.doc=ss.fromJSON(t.schema,r.doc);else if(o.name=="selection")i.selection=ir.fromJSON(i.doc,r.selection);else if(o.name=="storedMarks")r.storedMarks&&(i.storedMarks=r.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let s in n){let l=n[s],u=l.spec.state;if(l.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(r,s)){i[o.name]=u.fromJSON.call(l,t,r[s],i);return}}i[o.name]=o.init(t,i)}}),i}};function uH(e,t,r){for(let n in e){let a=e[n];a instanceof Function?a=a.bind(t):n=="handleDOMEvents"&&(a=uH(a,t,{})),r[n]=a}return r}var dr=class{constructor(t){this.spec=t,this.props={},t.props&&uH(t.props,this,this.props),this.key=t.key?t.key.key:cH("plugin")}getState(t){return t[this.key]}},c_=Object.create(null);function cH(e){return e in c_?e+"$"+ ++c_[e]:(c_[e]=0,e+"$")}var Tr=class{constructor(t="key"){this.key=cH(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var Nx=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function fH(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("backward",e):r.parentOffset>0)?null:r}var h_=(e,t,r)=>{let n=fH(e,r);if(!n)return!1;let a=g_(n);if(!a){let o=n.blockRange(),s=o&&o0(o);return s==null?!1:(t&&t(e.tr.lift(o,s).scrollIntoView()),!0)}let i=a.nodeBefore;if(wH(e,a,t,-1))return!0;if(n.parent.content.size==0&&(mm(i,"end")||Pt.isSelectable(i)))for(let o=n.depth;;o--){let s=Q2(e.doc,n.before(o),n.after(o),Ct.empty);if(s&&s.slice.size<s.to-s.from){if(t){let l=e.tr.step(s);l.setSelection(mm(i,"end")?ir.findFrom(l.doc.resolve(l.mapping.map(a.pos,-1)),-1):Pt.create(l.doc,a.pos-i.nodeSize)),t(l.scrollIntoView())}return!0}if(o==1||n.node(o-1).childCount>1)break}return i.isAtom&&a.depth==n.depth-1?(t&&t(e.tr.delete(a.pos-i.nodeSize,a.pos).scrollIntoView()),!0):!1},pH=(e,t,r)=>{let n=fH(e,r);if(!n)return!1;let a=g_(n);return a?mH(e,a,t):!1},hH=(e,t,r)=>{let n=gH(e,r);if(!n)return!1;let a=x_(n);return a?mH(e,a,t):!1};function mH(e,t,r){let n=t.nodeBefore,a=n,i=t.pos-1;for(;!a.isTextblock;i--){if(a.type.spec.isolating)return!1;let c=a.lastChild;if(!c)return!1;a=c}let o=t.nodeAfter,s=o,l=t.pos+1;for(;!s.isTextblock;l++){if(s.type.spec.isolating)return!1;let c=s.firstChild;if(!c)return!1;s=c}let u=Q2(e.doc,i,l,Ct.empty);if(!u||u.from!=i||u instanceof lo&&u.slice.size>=l-i)return!1;if(r){let c=e.tr.step(u);c.setSelection(Vt.create(c.doc,i)),r(c.scrollIntoView())}return!0}function mm(e,t,r=!1){for(let n=e;n;n=t=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&n.childCount!=1)return!1}return!1}var m_=(e,t,r)=>{let{$head:n,empty:a}=e.selection,i=n;if(!a)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",e):n.parentOffset>0)return!1;i=g_(n)}let o=i&&i.nodeBefore;return!o||!Pt.isSelectable(o)?!1:(t&&t(e.tr.setSelection(Pt.create(e.doc,i.pos-o.nodeSize)).scrollIntoView()),!0)};function g_(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function gH(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)?null:r}var y_=(e,t,r)=>{let n=gH(e,r);if(!n)return!1;let a=x_(n);if(!a)return!1;let i=a.nodeAfter;if(wH(e,a,t,1))return!0;if(n.parent.content.size==0&&(mm(i,"start")||Pt.isSelectable(i))){let o=Q2(e.doc,n.before(),n.after(),Ct.empty);if(o&&o.slice.size<o.to-o.from){if(t){let s=e.tr.step(o);s.setSelection(mm(i,"start")?ir.findFrom(s.doc.resolve(s.mapping.map(a.pos)),1):Pt.create(s.doc,s.mapping.map(a.pos))),t(s.scrollIntoView())}return!0}}return i.isAtom&&a.depth==n.depth-1?(t&&t(e.tr.delete(a.pos,a.pos+i.nodeSize).scrollIntoView()),!0):!1},b_=(e,t,r)=>{let{$head:n,empty:a}=e.selection,i=n;if(!a)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)return!1;i=x_(n)}let o=i&&i.nodeAfter;return!o||!Pt.isSelectable(o)?!1:(t&&t(e.tr.setSelection(Pt.create(e.doc,i.pos)).scrollIntoView()),!0)};function x_(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let r=e.node(t);if(e.index(t)+1<r.childCount)return e.doc.resolve(e.after(t+1));if(r.type.spec.isolating)break}return null}var yH=(e,t)=>{let r=e.selection,n=r instanceof Pt,a;if(n){if(r.node.isTextblock||!Cl(e.doc,r.from))return!1;a=r.from}else if(a=zp(e.doc,r.from,-1),a==null)return!1;if(t){let i=e.tr.join(a);n&&i.setSelection(Pt.create(i.doc,a-e.doc.resolve(a).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},bH=(e,t)=>{let r=e.selection,n;if(r instanceof Pt){if(r.node.isTextblock||!Cl(e.doc,r.to))return!1;n=r.to}else if(n=zp(e.doc,r.to,1),n==null)return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0},xH=(e,t)=>{let{$from:r,$to:n}=e.selection,a=r.blockRange(n),i=a&&o0(a);return i==null?!1:(t&&t(e.tr.lift(a,i).scrollIntoView()),!0)},v_=(e,t)=>{let{$head:r,$anchor:n}=e.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(t&&t(e.tr.insertText(`
3915
- `).scrollIntoView()),!0)};function w_(e){for(let t=0;t<e.edgeCount;t++){let{type:r}=e.edge(t);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}var k_=(e,t)=>{let{$head:r,$anchor:n}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let a=r.node(-1),i=r.indexAfter(-1),o=w_(a.contentMatchAt(i));if(!o||!a.canReplaceWith(i,i,o))return!1;if(t){let s=r.after(),l=e.tr.replaceWith(s,s,o.createAndFill());l.setSelection(ir.near(l.doc.resolve(s),1)),t(l.scrollIntoView())}return!0},S_=(e,t)=>{let r=e.selection,{$from:n,$to:a}=r;if(r instanceof zo||n.parent.inlineContent||a.parent.inlineContent)return!1;let i=w_(a.parent.contentMatchAt(a.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let o=(!n.parentOffset&&a.index()<a.parent.childCount?n:a).pos,s=e.tr.insert(o,i.createAndFill());s.setSelection(Vt.create(s.doc,o+1)),t(s.scrollIntoView())}return!0},C_=(e,t)=>{let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let i=r.before();if(Fs(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let n=r.blockRange(),a=n&&o0(n);return a==null?!1:(t&&t(e.tr.lift(n,a).scrollIntoView()),!0)};function Uce(e){return(t,r)=>{let{$from:n,$to:a}=t.selection;if(t.selection instanceof Pt&&t.selection.node.isBlock)return!n.parentOffset||!Fs(t.doc,n.pos)?!1:(r&&r(t.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let i=[],o,s,l=!1,u=!1;for(let p=n.depth;;p--)if(n.node(p).isBlock){l=n.end(p)==n.pos+(n.depth-p),u=n.start(p)==n.pos-(n.depth-p),s=w_(n.node(p-1).contentMatchAt(n.indexAfter(p-1)));let x=e&&e(a.parent,l,n);i.unshift(x||(l&&s?{type:s}:null)),o=p;break}else{if(p==1)return!1;i.unshift(null)}let c=t.tr;(t.selection instanceof Vt||t.selection instanceof zo)&&c.deleteSelection();let f=c.mapping.map(n.pos),d=Fs(c.doc,f,i.length,i);if(d||(i[0]=s?{type:s}:null,d=Fs(c.doc,f,i.length,i)),!d)return!1;if(c.split(f,i.length,i),!l&&u&&n.node(o).type!=s){let p=c.mapping.map(n.before(o)),y=c.doc.resolve(p);s&&n.node(o-1).canReplaceWith(y.index(),y.index()+1,s)&&c.setNodeMarkup(c.mapping.map(n.before(o)),s)}return r&&r(c.scrollIntoView()),!0}}var Kce=Uce();var vH=(e,t)=>{let{$from:r,to:n}=e.selection,a,i=r.sharedDepth(n);return i==0?!1:(a=r.before(i),t&&t(e.tr.setSelection(Pt.create(e.doc,a))),!0)},Vce=(e,t)=>(t&&t(e.tr.setSelection(new zo(e.doc))),!0);function Gce(e,t,r){let n=t.nodeBefore,a=t.nodeAfter,i=t.index();return!n||!a||!n.type.compatibleContent(a.type)?!1:!n.content.size&&t.parent.canReplace(i-1,i)?(r&&r(e.tr.delete(t.pos-n.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(a.isTextblock||Cl(e.doc,t.pos))?!1:(r&&r(e.tr.join(t.pos).scrollIntoView()),!0)}function wH(e,t,r,n){let a=t.nodeBefore,i=t.nodeAfter,o,s,l=a.type.spec.isolating||i.type.spec.isolating;if(!l&&Gce(e,t,r))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(o=(s=a.contentMatchAt(a.childCount)).findWrapping(i.type))&&s.matchType(o[0]||i.type).validEnd){if(r){let p=t.pos+i.nodeSize,y=at.empty;for(let w=o.length-1;w>=0;w--)y=at.from(o[w].create(null,y));y=at.from(a.copy(y));let x=e.tr.step(new si(t.pos-1,p,t.pos,p,new Ct(y,1,0),o.length,!0)),k=x.doc.resolve(p+2*o.length);k.nodeAfter&&k.nodeAfter.type==a.type&&Cl(x.doc,k.pos)&&x.join(k.pos),r(x.scrollIntoView())}return!0}let c=i.type.spec.isolating||n>0&&l?null:ir.findFrom(t,1),f=c&&c.$from.blockRange(c.$to),d=f&&o0(f);if(d!=null&&d>=t.depth)return r&&r(e.tr.lift(f,d).scrollIntoView()),!0;if(u&&mm(i,"start",!0)&&mm(a,"end")){let p=a,y=[];for(;y.push(p),!p.isTextblock;)p=p.lastChild;let x=i,k=1;for(;!x.isTextblock;x=x.firstChild)k++;if(p.canReplace(p.childCount,p.childCount,x.content)){if(r){let w=at.empty;for(let T=y.length-1;T>=0;T--)w=at.from(y[T].copy(w));let S=e.tr.step(new si(t.pos-y.length,t.pos+i.nodeSize,t.pos+k,t.pos+i.nodeSize-k,new Ct(w,y.length,0),0,!0));r(S.scrollIntoView())}return!0}}return!1}function kH(e){return function(t,r){let n=t.selection,a=e<0?n.$from:n.$to,i=a.depth;for(;a.node(i).isInline;){if(!i)return!1;i--}return a.node(i).isTextblock?(r&&r(t.tr.setSelection(Vt.create(t.doc,e<0?a.start(i):a.end(i)))),!0):!1}}var M_=kH(-1),__=kH(1);function SH(e,t=null){return function(r,n){let{$from:a,$to:i}=r.selection,o=a.blockRange(i),s=o&&pm(o,e,t);return s?(n&&n(r.tr.wrap(o,s).scrollIntoView()),!0):!1}}function A_(e,t=null){return function(r,n){let a=!1;for(let i=0;i<r.selection.ranges.length&&!a;i++){let{$from:{pos:o},$to:{pos:s}}=r.selection.ranges[i];r.doc.nodesBetween(o,s,(l,u)=>{if(a)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)a=!0;else{let c=r.doc.resolve(u),f=c.index();a=c.parent.canReplaceWith(f,f+1,e)}})}if(!a)return!1;if(n){let i=r.tr;for(let o=0;o<r.selection.ranges.length;o++){let{$from:{pos:s},$to:{pos:l}}=r.selection.ranges[o];i.setBlockType(s,l,e,t)}n(i.scrollIntoView())}return!0}}function L_(...e){return function(t,r,n){for(let a=0;a<e.length;a++)if(e[a](t,r,n))return!0;return!1}}var p_=L_(Nx,h_,m_),dH=L_(Nx,y_,b_),Fd={Enter:L_(v_,S_,C_,Kce),"Mod-Enter":k_,Backspace:p_,"Mod-Backspace":p_,"Shift-Backspace":p_,Delete:dH,"Mod-Delete":dH,"Mod-a":Vce},Wce={"Ctrl-h":Fd.Backspace,"Alt-Backspace":Fd["Mod-Backspace"],"Ctrl-d":Fd.Delete,"Ctrl-Alt-Backspace":Fd["Mod-Delete"],"Alt-Delete":Fd["Mod-Delete"],"Alt-d":Fd["Mod-Delete"],"Ctrl-a":M_,"Ctrl-e":__};for(let e in Fd)Wce[e]=Fd[e];var RSe=typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os!="undefined"&&os.platform?os.platform()=="darwin":!1;function CH(e,t=null){return function(r,n){let{$from:a,$to:i}=r.selection,o=a.blockRange(i);if(!o)return!1;let s=n?r.tr:null;return Xce(s,o,e,t)?(n&&n(s.scrollIntoView()),!0):!1}}function Xce(e,t,r,n=null){let a=!1,i=t,o=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(r)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=o.resolve(t.start-2);i=new Dp(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new Dp(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),a=!0}let s=pm(i,r,n,t);return s?(e&&Yce(e,t,s,a,r),!0):!1}function Yce(e,t,r,n,a){let i=at.empty;for(let c=r.length-1;c>=0;c--)i=at.from(r[c].type.create(r[c].attrs,i));e.step(new si(t.start-(n?2:0),t.end,t.start,t.end,new Ct(i,0,0),r.length,!0));let o=0;for(let c=0;c<r.length;c++)r[c].type==a&&(o=c+1);let s=r.length-o,l=t.start+r.length-(n?2:0),u=t.parent;for(let c=t.startIndex,f=t.endIndex,d=!0;c<f;c++,d=!1)!d&&Fs(e.doc,l,s)&&(e.split(l,s),l+=2*s),l+=u.child(c).nodeSize;return e}function MH(e){return function(t,r){let{$from:n,$to:a}=t.selection,i=n.blockRange(a,o=>o.childCount>0&&o.firstChild.type==e);return i?r?n.node(i.depth-1).type==e?Jce(t,r,e,i):Zce(t,r,i):!0:!1}}function Jce(e,t,r,n){let a=e.tr,i=n.end,o=n.$to.end(n.depth);i<o&&(a.step(new si(i-1,o,i,o,new Ct(at.from(r.create(null,n.parent.copy())),1,0),1,!0)),n=new Dp(a.doc.resolve(n.$from.pos),a.doc.resolve(o),n.depth));let s=o0(n);if(s==null)return!1;a.lift(n,s);let l=a.doc.resolve(a.mapping.map(i,-1)-1);return Cl(a.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&a.join(l.pos),t(a.scrollIntoView()),!0}function Zce(e,t,r){let n=e.tr,a=r.parent;for(let p=r.end,y=r.endIndex-1,x=r.startIndex;y>x;y--)p-=a.child(y).nodeSize,n.delete(p-1,p+1);let i=n.doc.resolve(r.start),o=i.nodeAfter;if(n.mapping.map(r.end)!=r.start+i.nodeAfter.nodeSize)return!1;let s=r.startIndex==0,l=r.endIndex==a.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(s?0:1),c+1,o.content.append(l?at.empty:at.from(a))))return!1;let f=i.pos,d=f+o.nodeSize;return n.step(new si(f-(s?1:0),d+(l?1:0),f+1,d-1,new Ct((s?at.empty:at.from(a.copy(at.empty))).append(l?at.empty:at.from(a.copy(at.empty))),s?0:1,l?0:1),s?0:1)),t(n.scrollIntoView()),!0}function _H(e){return function(t,r){let{$from:n,$to:a}=t.selection,i=n.blockRange(a,u=>u.childCount>0&&u.firstChild.type==e);if(!i)return!1;let o=i.startIndex;if(o==0)return!1;let s=i.parent,l=s.child(o-1);if(l.type!=e)return!1;if(r){let u=l.lastChild&&l.lastChild.type==s.type,c=at.from(u?e.create():null),f=new Ct(at.from(e.create(null,at.from(s.type.create(null,c)))),u?3:1,0),d=i.start,p=i.end;r(t.tr.step(new si(d-(u?3:1),p,d,p,f,1,!0)).scrollIntoView())}return!0}}var Vi=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},vm=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},B_=null,l0=function(e,t,r){let n=B_||(B_=document.createRange());return n.setEnd(e,r==null?e.nodeValue.length:r),n.setStart(e,t||0),n},Qce=function(){B_=null},$p=function(e,t,r,n){return r&&(AH(e,t,r,n,-1)||AH(e,t,r,n,1))},e0e=/^(img|br|input|textarea|hr)$/i;function AH(e,t,r,n,a){for(var i;;){if(e==r&&t==n)return!0;if(t==(a<0?0:_l(e))){let o=e.parentNode;if(!o||o.nodeType!=1||l3(e)||e0e.test(e.nodeName)||e.contentEditable=="false")return!1;t=Vi(e)+(a<0?0:1),e=o}else if(e.nodeType==1){let o=e.childNodes[t+(a<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((i=o.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)t+=a;else return!1;else e=o,t=a<0?_l(e):0}else return!1}}function _l(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function t0e(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=_l(e)}else if(e.parentNode&&!l3(e))t=Vi(e),e=e.parentNode;else return null}}function r0e(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!l3(e))t=Vi(e)+1,e=e.parentNode;else return null}}function n0e(e,t,r){for(let n=t==0,a=t==_l(e);n||a;){if(e==r)return!0;let i=Vi(e);if(e=e.parentNode,!e)return!1;n=n&&i==0,a=a&&i==_l(e)}}function l3(e){let t;for(let r=e;r&&!(t=r.pmViewDesc);r=r.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var Gx=function(e){return e.focusNode&&$p(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Rp(e,t){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=e,r.key=r.code=t,r}function a0e(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function i0e(e,t,r){if(e.caretPositionFromPoint)try{let n=e.caretPositionFromPoint(t,r);if(n)return{node:n.offsetNode,offset:Math.min(_l(n.offsetNode),n.offset)}}catch(n){}if(e.caretRangeFromPoint){let n=e.caretRangeFromPoint(t,r);if(n)return{node:n.startContainer,offset:Math.min(_l(n.startContainer),n.startOffset)}}}var Yu=typeof navigator!="undefined"?navigator:null,LH=typeof document!="undefined"?document:null,Kd=Yu&&Yu.userAgent||"",R_=/Edge\/(\d+)/.exec(Kd),oj=/MSIE \d/.exec(Kd),N_=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Kd),ls=!!(oj||N_||R_),jd=oj?document.documentMode:N_?+N_[1]:R_?+R_[1]:0,Al=!ls&&/gecko\/(\d+)/i.test(Kd);Al&&+(/Firefox\/(\d+)/.exec(Kd)||[0,0])[1];var O_=!ls&&/Chrome\/(\d+)/.exec(Kd),Gi=!!O_,sj=O_?+O_[1]:0,co=!ls&&!!Yu&&/Apple Computer/.test(Yu.vendor),wm=co&&(/Mobile\/\w+/.test(Kd)||!!Yu&&Yu.maxTouchPoints>2),Ml=wm||(Yu?/Mac/.test(Yu.platform):!1),lj=Yu?/Win/.test(Yu.platform):!1,u0=/Android \d/.test(Kd),u3=!!LH&&"webkitFontSmoothing"in LH.documentElement.style,o0e=u3?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function s0e(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function s0(e,t){return typeof e=="number"?e:e[t]}function l0e(e){let t=e.getBoundingClientRect(),r=t.width/e.offsetWidth||1,n=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*r,top:t.top,bottom:t.top+e.clientHeight*n}}function TH(e,t,r){let n=e.someProp("scrollThreshold")||0,a=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let o=r||e.dom;o;){if(o.nodeType!=1){o=vm(o);continue}let s=o,l=s==i.body,u=l?s0e(i):l0e(s),c=0,f=0;if(t.top<u.top+s0(n,"top")?f=-(u.top-t.top+s0(a,"top")):t.bottom>u.bottom-s0(n,"bottom")&&(f=t.bottom-t.top>u.bottom-u.top?t.top+s0(a,"top")-u.top:t.bottom-u.bottom+s0(a,"bottom")),t.left<u.left+s0(n,"left")?c=-(u.left-t.left+s0(a,"left")):t.right>u.right-s0(n,"right")&&(c=t.right-u.right+s0(a,"right")),c||f)if(l)i.defaultView.scrollBy(c,f);else{let p=s.scrollLeft,y=s.scrollTop;f&&(s.scrollTop+=f),c&&(s.scrollLeft+=c);let x=s.scrollLeft-p,k=s.scrollTop-y;t={left:t.left-x,top:t.top-k,right:t.right-x,bottom:t.bottom-k}}let d=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(d))break;o=d=="absolute"?o.offsetParent:vm(o)}}function u0e(e){let t=e.dom.getBoundingClientRect(),r=Math.max(0,t.top),n,a;for(let i=(t.left+t.right)/2,o=r+1;o<Math.min(innerHeight,t.bottom);o+=5){let s=e.root.elementFromPoint(i,o);if(!s||s==e.dom||!e.dom.contains(s))continue;let l=s.getBoundingClientRect();if(l.top>=r-20){n=s,a=l.top;break}}return{refDOM:n,refTop:a,stack:uj(e.dom)}}function uj(e){let t=[],r=e.ownerDocument;for(let n=e;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),e!=r);n=vm(n));return t}function c0e({refDOM:e,refTop:t,stack:r}){let n=e?e.getBoundingClientRect().top:0;cj(r,n==0?0:n-t)}function cj(e,t){for(let r=0;r<e.length;r++){let{dom:n,top:a,left:i}=e[r];n.scrollTop!=a+t&&(n.scrollTop=a+t),n.scrollLeft!=i&&(n.scrollLeft=i)}}var gm=null;function d0e(e){if(e.setActive)return e.setActive();if(gm)return e.focus(gm);let t=uj(e);e.focus(gm==null?{get preventScroll(){return gm={preventScroll:!0},!0}}:void 0),gm||(gm=!1,cj(t,0))}function dj(e,t){let r,n=2e8,a,i=0,o=t.top,s=t.top,l,u;for(let c=e.firstChild,f=0;c;c=c.nextSibling,f++){let d;if(c.nodeType==1)d=c.getClientRects();else if(c.nodeType==3)d=l0(c).getClientRects();else continue;for(let p=0;p<d.length;p++){let y=d[p];if(y.top<=o&&y.bottom>=s){o=Math.max(y.bottom,o),s=Math.min(y.top,s);let x=y.left>t.left?y.left-t.left:y.right<t.left?t.left-y.right:0;if(x<n){r=c,n=x,a=x&&r.nodeType==3?{left:y.right<t.left?y.right:y.left,top:t.top}:t,c.nodeType==1&&x&&(i=f+(t.left>=(y.left+y.right)/2?1:0));continue}}else y.top>t.top&&!l&&y.left<=t.left&&y.right>=t.left&&(l=c,u={left:Math.max(y.left,Math.min(y.right,t.left)),top:y.top});!r&&(t.left>=y.right&&t.top>=y.top||t.left>=y.left&&t.top>=y.bottom)&&(i=f+1)}}return!r&&l&&(r=l,a=u,n=0),r&&r.nodeType==3?f0e(r,a):!r||n&&r.nodeType==1?{node:e,offset:i}:dj(r,a)}function f0e(e,t){let r=e.nodeValue.length,n=document.createRange(),a;for(let i=0;i<r;i++){n.setEnd(e,i+1),n.setStart(e,i);let o=qd(n,1);if(o.top!=o.bottom&&Z_(t,o)){a={node:e,offset:i+(t.left>=(o.left+o.right)/2?1:0)};break}}return n.detach(),a||{node:e,offset:0}}function Z_(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function p0e(e,t){let r=e.parentNode;return r&&/^li$/i.test(r.nodeName)&&t.left<e.getBoundingClientRect().left?r:e}function h0e(e,t,r){let{node:n,offset:a}=dj(t,r),i=-1;if(n.nodeType==1&&!n.firstChild){let o=n.getBoundingClientRect();i=o.left!=o.right&&r.left>(o.left+o.right)/2?1:-1}return e.docView.posFromDOM(n,a,i)}function m0e(e,t,r,n){let a=-1;for(let i=t,o=!1;i!=e.dom;){let s=e.docView.nearestDesc(i,!0),l;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((l=s.dom.getBoundingClientRect()).width||l.height)&&(s.node.isBlock&&s.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(s.dom.nodeName)&&(!o&&l.left>n.left||l.top>n.top?a=s.posBefore:(!o&&l.right<n.left||l.bottom<n.top)&&(a=s.posAfter),o=!0),!s.contentDOM&&a<0&&!s.node.isText))return(s.node.isBlock?n.top<(l.top+l.bottom)/2:n.left<(l.left+l.right)/2)?s.posBefore:s.posAfter;i=s.dom.parentNode}return a>-1?a:e.docView.posFromDOM(t,r,-1)}function fj(e,t,r){let n=e.childNodes.length;if(n&&r.top<r.bottom)for(let a=Math.max(0,Math.min(n-1,Math.floor(n*(t.top-r.top)/(r.bottom-r.top))-2)),i=a;;){let o=e.childNodes[i];if(o.nodeType==1){let s=o.getClientRects();for(let l=0;l<s.length;l++){let u=s[l];if(Z_(t,u))return fj(o,t,u)}}if((i=(i+1)%n)==a)break}return e}function g0e(e,t){let r=e.dom.ownerDocument,n,a=0,i=i0e(r,t.left,t.top);i&&({node:n,offset:a}=i);let o=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top),s;if(!o||!e.dom.contains(o.nodeType!=1?o.parentNode:o)){let u=e.dom.getBoundingClientRect();if(!Z_(t,u)||(o=fj(e.dom,t,u),!o))return null}if(co)for(let u=o;n&&u;u=vm(u))u.draggable&&(n=void 0);if(o=p0e(o,t),n){if(Al&&n.nodeType==1&&(a=Math.min(a,n.childNodes.length),a<n.childNodes.length)){let c=n.childNodes[a],f;c.nodeName=="IMG"&&(f=c.getBoundingClientRect()).right<=t.left&&f.bottom>t.top&&a++}let u;u3&&a&&n.nodeType==1&&(u=n.childNodes[a-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&a--,n==e.dom&&a==n.childNodes.length-1&&n.lastChild.nodeType==1&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(a==0||n.nodeType!=1||n.childNodes[a-1].nodeName!="BR")&&(s=m0e(e,n,a,t))}s==null&&(s=h0e(e,o,t));let l=e.docView.nearestDesc(o,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function EH(e){return e.top<e.bottom||e.left<e.right}function qd(e,t){let r=e.getClientRects();if(r.length){let n=r[t<0?0:r.length-1];if(EH(n))return n}return Array.prototype.find.call(r,EH)||e.getBoundingClientRect()}var y0e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function pj(e,t,r){let{node:n,offset:a,atom:i}=e.docView.domFromPos(t,r<0?-1:1),o=u3||Al;if(n.nodeType==3)if(o&&(y0e.test(n.nodeValue)||(r<0?!a:a==n.nodeValue.length))){let l=qd(l0(n,a,a),r);if(Al&&a&&/\s/.test(n.nodeValue[a-1])&&a<n.nodeValue.length){let u=qd(l0(n,a-1,a-1),-1);if(u.top==l.top){let c=qd(l0(n,a,a+1),-1);if(c.top!=l.top)return t3(c,c.left<u.left)}}return l}else{let l=a,u=a,c=r<0?1:-1;return r<0&&!a?(u++,c=-1):r>=0&&a==n.nodeValue.length?(l--,c=1):r<0?l--:u++,t3(qd(l0(n,l,u),c),c<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&a&&(r<0||a==_l(n))){let l=n.childNodes[a-1];if(l.nodeType==1)return T_(l.getBoundingClientRect(),!1)}if(i==null&&a<_l(n)){let l=n.childNodes[a];if(l.nodeType==1)return T_(l.getBoundingClientRect(),!0)}return T_(n.getBoundingClientRect(),r>=0)}if(i==null&&a&&(r<0||a==_l(n))){let l=n.childNodes[a-1],u=l.nodeType==3?l0(l,_l(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return t3(qd(u,1),!1)}if(i==null&&a<_l(n)){let l=n.childNodes[a];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?l0(l,0,o?0:1):l.nodeType==1?l:null:null;if(u)return t3(qd(u,-1),!0)}return t3(qd(n.nodeType==3?l0(n):n,-r),r>=0)}function t3(e,t){if(e.width==0)return e;let r=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:r,right:r}}function T_(e,t){if(e.height==0)return e;let r=t?e.top:e.bottom;return{top:r,bottom:r,left:e.left,right:e.right}}function hj(e,t,r){let n=e.state,a=e.root.activeElement;n!=t&&e.updateState(t),a!=e.dom&&e.focus();try{return r()}finally{n!=t&&e.updateState(n),a!=e.dom&&a&&a.focus()}}function b0e(e,t,r){let n=t.selection,a=r=="up"?n.$from:n.$to;return hj(e,t,()=>{let{node:i}=e.docView.domFromPos(a.pos,r=="up"?-1:1);for(;;){let s=e.docView.nearestDesc(i,!0);if(!s)break;if(s.node.isBlock){i=s.contentDOM||s.dom;break}i=s.dom.parentNode}let o=pj(e,a.pos,1);for(let s=i.firstChild;s;s=s.nextSibling){let l;if(s.nodeType==1)l=s.getClientRects();else if(s.nodeType==3)l=l0(s,0,s.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let c=l[u];if(c.bottom>c.top+1&&(r=="up"?o.top-c.top>(c.bottom-o.top)*2:c.bottom-o.bottom>(o.bottom-c.top)*2))return!1}}return!0})}var x0e=/[\u0590-\u08ac]/;function v0e(e,t,r){let{$head:n}=t.selection;if(!n.parent.isTextblock)return!1;let a=n.parentOffset,i=!a,o=a==n.parent.content.size,s=e.domSelection();return s?!x0e.test(n.parent.textContent)||!s.modify?r=="left"||r=="backward"?i:o:hj(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:f}=e.domSelectionRange(),d=s.caretBidiLevel;s.modify("move",r,"character");let p=n.depth?e.docView.domAfterPos(n.before()):e.dom,{focusNode:y,focusOffset:x}=e.domSelectionRange(),k=y&&!p.contains(y.nodeType==1?y:y.parentNode)||l==y&&u==x;try{s.collapse(c,f),l&&(l!=c||u!=f)&&s.extend&&s.extend(l,u)}catch(w){}return d!=null&&(s.caretBidiLevel=d),k}):n.pos==n.start()||n.pos==n.end()}var DH=null,IH=null,zH=!1;function w0e(e,t,r){return DH==t&&IH==r?zH:(DH=t,IH=r,zH=r=="up"||r=="down"?b0e(e,t,r):v0e(e,t,r))}var Ll=0,BH=1,Np=2,Ju=3,Hp=class{constructor(t,r,n,a){this.parent=t,this.children=r,this.dom=n,this.contentDOM=a,this.dirty=Ll,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,r,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let r=0;r<this.children.length;r++)t+=this.children[r].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let r=0,n=this.posAtStart;;r++){let a=this.children[r];if(a==t)return n;n+=a.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,r,n){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(n<0){let i,o;if(t==this.contentDOM)i=t.childNodes[r-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.previousSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(o)+o.size:this.posAtStart}else{let i,o;if(t==this.contentDOM)i=t.childNodes[r];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.nextSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(o):this.posAtEnd}let a;if(t==this.dom&&this.contentDOM)a=r>Vi(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))a=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(r==0)for(let i=t;;i=i.parentNode){if(i==this.dom){a=!1;break}if(i.previousSibling)break}if(a==null&&r==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){a=!0;break}if(i.nextSibling)break}}return(a==null?n>0:a)?this.posAtEnd:this.posAtStart}nearestDesc(t,r=!1){for(let n=!0,a=t;a;a=a.parentNode){let i=this.getDesc(a),o;if(i&&(!r||i.node))if(n&&(o=i.nodeDOM)&&!(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))n=!1;else return i}}getDesc(t){let r=t.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(t,r,n){for(let a=t;a;a=a.parentNode){let i=this.getDesc(a);if(i)return i.localPosFromDOM(t,r,n)}return-1}descAt(t){for(let r=0,n=0;r<this.children.length;r++){let a=this.children[r],i=n+a.size;if(n==t&&i!=n){for(;!a.border&&a.children.length;)for(let o=0;o<a.children.length;o++){let s=a.children[o];if(s.size){a=s;break}}return a}if(t<i)return a.descAt(t-n-a.border);n=i}}domFromPos(t,r){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let n=0,a=0;for(let i=0;n<this.children.length;n++){let o=this.children[n],s=i+o.size;if(s>t||o instanceof Fx){a=t-i;break}i=s}if(a)return this.children[n].domFromPos(a-this.children[n].border,r);for(let i;n&&!(i=this.children[n-1]).size&&i instanceof Ox&&i.side>=0;n--);if(r<=0){let i,o=!0;for(;i=n?this.children[n-1]:null,!(!i||i.dom.parentNode==this.contentDOM);n--,o=!1);return i&&r&&o&&!i.border&&!i.domAtom?i.domFromPos(i.size,r):{node:this.contentDOM,offset:i?Vi(i.dom)+1:0}}else{let i,o=!0;for(;i=n<this.children.length?this.children[n]:null,!(!i||i.dom.parentNode==this.contentDOM);n++,o=!1);return i&&o&&!i.border&&!i.domAtom?i.domFromPos(0,r):{node:this.contentDOM,offset:i?Vi(i.dom):this.contentDOM.childNodes.length}}}parseRange(t,r,n=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:r,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let a=-1,i=-1;for(let o=n,s=0;;s++){let l=this.children[s],u=o+l.size;if(a==-1&&t<=u){let c=o+l.border;if(t>=c&&r<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,r,c);t=o;for(let f=s;f>0;f--){let d=this.children[f-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){a=Vi(d.dom)+1;break}t-=d.size}a==-1&&(a=0)}if(a>-1&&(u>r||s==this.children.length-1)){r=u;for(let c=s+1;c<this.children.length;c++){let f=this.children[c];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){i=Vi(f.dom);break}r+=f.size}i==-1&&(i=this.contentDOM.childNodes.length);break}o=u}return{node:this.contentDOM,from:t,to:r,fromOffset:a,toOffset:i}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let r=this.children[t<0?0:this.children.length-1];return r.size==0||r.emptyChildAt(t)}domAfterPos(t){let{node:r,offset:n}=this.domFromPos(t,0);if(r.nodeType!=1||n==r.childNodes.length)throw new RangeError("No node after pos "+t);return r.childNodes[n]}setSelection(t,r,n,a=!1){let i=Math.min(t,r),o=Math.max(t,r);for(let p=0,y=0;p<this.children.length;p++){let x=this.children[p],k=y+x.size;if(i>y&&o<k)return x.setSelection(t-y-x.border,r-y-x.border,n,a);y=k}let s=this.domFromPos(t,t?-1:1),l=r==t?s:this.domFromPos(r,r?-1:1),u=n.root.getSelection(),c=n.domSelectionRange(),f=!1;if((Al||co)&&t==r){let{node:p,offset:y}=s;if(p.nodeType==3){if(f=!!(y&&p.nodeValue[y-1]==`
3915
+ `).scrollIntoView()),!0)};function w_(e){for(let t=0;t<e.edgeCount;t++){let{type:r}=e.edge(t);if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}var k_=(e,t)=>{let{$head:r,$anchor:n}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let a=r.node(-1),i=r.indexAfter(-1),o=w_(a.contentMatchAt(i));if(!o||!a.canReplaceWith(i,i,o))return!1;if(t){let s=r.after(),l=e.tr.replaceWith(s,s,o.createAndFill());l.setSelection(ir.near(l.doc.resolve(s),1)),t(l.scrollIntoView())}return!0},S_=(e,t)=>{let r=e.selection,{$from:n,$to:a}=r;if(r instanceof zo||n.parent.inlineContent||a.parent.inlineContent)return!1;let i=w_(a.parent.contentMatchAt(a.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let o=(!n.parentOffset&&a.index()<a.parent.childCount?n:a).pos,s=e.tr.insert(o,i.createAndFill());s.setSelection(Vt.create(s.doc,o+1)),t(s.scrollIntoView())}return!0},C_=(e,t)=>{let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let i=r.before();if(Fs(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let n=r.blockRange(),a=n&&o0(n);return a==null?!1:(t&&t(e.tr.lift(n,a).scrollIntoView()),!0)};function Uce(e){return(t,r)=>{let{$from:n,$to:a}=t.selection;if(t.selection instanceof Pt&&t.selection.node.isBlock)return!n.parentOffset||!Fs(t.doc,n.pos)?!1:(r&&r(t.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let i=[],o,s,l=!1,u=!1;for(let p=n.depth;;p--)if(n.node(p).isBlock){l=n.end(p)==n.pos+(n.depth-p),u=n.start(p)==n.pos-(n.depth-p),s=w_(n.node(p-1).contentMatchAt(n.indexAfter(p-1)));let x=e&&e(a.parent,l,n);i.unshift(x||(l&&s?{type:s}:null)),o=p;break}else{if(p==1)return!1;i.unshift(null)}let c=t.tr;(t.selection instanceof Vt||t.selection instanceof zo)&&c.deleteSelection();let f=c.mapping.map(n.pos),d=Fs(c.doc,f,i.length,i);if(d||(i[0]=s?{type:s}:null,d=Fs(c.doc,f,i.length,i)),!d)return!1;if(c.split(f,i.length,i),!l&&u&&n.node(o).type!=s){let p=c.mapping.map(n.before(o)),y=c.doc.resolve(p);s&&n.node(o-1).canReplaceWith(y.index(),y.index()+1,s)&&c.setNodeMarkup(c.mapping.map(n.before(o)),s)}return r&&r(c.scrollIntoView()),!0}}var Kce=Uce();var vH=(e,t)=>{let{$from:r,to:n}=e.selection,a,i=r.sharedDepth(n);return i==0?!1:(a=r.before(i),t&&t(e.tr.setSelection(Pt.create(e.doc,a))),!0)},Vce=(e,t)=>(t&&t(e.tr.setSelection(new zo(e.doc))),!0);function Gce(e,t,r){let n=t.nodeBefore,a=t.nodeAfter,i=t.index();return!n||!a||!n.type.compatibleContent(a.type)?!1:!n.content.size&&t.parent.canReplace(i-1,i)?(r&&r(e.tr.delete(t.pos-n.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(a.isTextblock||Cl(e.doc,t.pos))?!1:(r&&r(e.tr.join(t.pos).scrollIntoView()),!0)}function wH(e,t,r,n){let a=t.nodeBefore,i=t.nodeAfter,o,s,l=a.type.spec.isolating||i.type.spec.isolating;if(!l&&Gce(e,t,r))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(o=(s=a.contentMatchAt(a.childCount)).findWrapping(i.type))&&s.matchType(o[0]||i.type).validEnd){if(r){let p=t.pos+i.nodeSize,y=at.empty;for(let w=o.length-1;w>=0;w--)y=at.from(o[w].create(null,y));y=at.from(a.copy(y));let x=e.tr.step(new si(t.pos-1,p,t.pos,p,new Ct(y,1,0),o.length,!0)),k=x.doc.resolve(p+2*o.length);k.nodeAfter&&k.nodeAfter.type==a.type&&Cl(x.doc,k.pos)&&x.join(k.pos),r(x.scrollIntoView())}return!0}let c=i.type.spec.isolating||n>0&&l?null:ir.findFrom(t,1),f=c&&c.$from.blockRange(c.$to),d=f&&o0(f);if(d!=null&&d>=t.depth)return r&&r(e.tr.lift(f,d).scrollIntoView()),!0;if(u&&mm(i,"start",!0)&&mm(a,"end")){let p=a,y=[];for(;y.push(p),!p.isTextblock;)p=p.lastChild;let x=i,k=1;for(;!x.isTextblock;x=x.firstChild)k++;if(p.canReplace(p.childCount,p.childCount,x.content)){if(r){let w=at.empty;for(let T=y.length-1;T>=0;T--)w=at.from(y[T].copy(w));let S=e.tr.step(new si(t.pos-y.length,t.pos+i.nodeSize,t.pos+k,t.pos+i.nodeSize-k,new Ct(w,y.length,0),0,!0));r(S.scrollIntoView())}return!0}}return!1}function kH(e){return function(t,r){let n=t.selection,a=e<0?n.$from:n.$to,i=a.depth;for(;a.node(i).isInline;){if(!i)return!1;i--}return a.node(i).isTextblock?(r&&r(t.tr.setSelection(Vt.create(t.doc,e<0?a.start(i):a.end(i)))),!0):!1}}var M_=kH(-1),__=kH(1);function SH(e,t=null){return function(r,n){let{$from:a,$to:i}=r.selection,o=a.blockRange(i),s=o&&pm(o,e,t);return s?(n&&n(r.tr.wrap(o,s).scrollIntoView()),!0):!1}}function A_(e,t=null){return function(r,n){let a=!1;for(let i=0;i<r.selection.ranges.length&&!a;i++){let{$from:{pos:o},$to:{pos:s}}=r.selection.ranges[i];r.doc.nodesBetween(o,s,(l,u)=>{if(a)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)a=!0;else{let c=r.doc.resolve(u),f=c.index();a=c.parent.canReplaceWith(f,f+1,e)}})}if(!a)return!1;if(n){let i=r.tr;for(let o=0;o<r.selection.ranges.length;o++){let{$from:{pos:s},$to:{pos:l}}=r.selection.ranges[o];i.setBlockType(s,l,e,t)}n(i.scrollIntoView())}return!0}}function L_(...e){return function(t,r,n){for(let a=0;a<e.length;a++)if(e[a](t,r,n))return!0;return!1}}var p_=L_(Nx,h_,m_),dH=L_(Nx,y_,b_),Fd={Enter:L_(v_,S_,C_,Kce),"Mod-Enter":k_,Backspace:p_,"Mod-Backspace":p_,"Shift-Backspace":p_,Delete:dH,"Mod-Delete":dH,"Mod-a":Vce},Wce={"Ctrl-h":Fd.Backspace,"Alt-Backspace":Fd["Mod-Backspace"],"Ctrl-d":Fd.Delete,"Ctrl-Alt-Backspace":Fd["Mod-Delete"],"Alt-Delete":Fd["Mod-Delete"],"Alt-d":Fd["Mod-Delete"],"Ctrl-a":M_,"Ctrl-e":__};for(let e in Fd)Wce[e]=Fd[e];var NSe=typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os!="undefined"&&os.platform?os.platform()=="darwin":!1;function CH(e,t=null){return function(r,n){let{$from:a,$to:i}=r.selection,o=a.blockRange(i);if(!o)return!1;let s=n?r.tr:null;return Xce(s,o,e,t)?(n&&n(s.scrollIntoView()),!0):!1}}function Xce(e,t,r,n=null){let a=!1,i=t,o=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(r)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=o.resolve(t.start-2);i=new Dp(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new Dp(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),a=!0}let s=pm(i,r,n,t);return s?(e&&Yce(e,t,s,a,r),!0):!1}function Yce(e,t,r,n,a){let i=at.empty;for(let c=r.length-1;c>=0;c--)i=at.from(r[c].type.create(r[c].attrs,i));e.step(new si(t.start-(n?2:0),t.end,t.start,t.end,new Ct(i,0,0),r.length,!0));let o=0;for(let c=0;c<r.length;c++)r[c].type==a&&(o=c+1);let s=r.length-o,l=t.start+r.length-(n?2:0),u=t.parent;for(let c=t.startIndex,f=t.endIndex,d=!0;c<f;c++,d=!1)!d&&Fs(e.doc,l,s)&&(e.split(l,s),l+=2*s),l+=u.child(c).nodeSize;return e}function MH(e){return function(t,r){let{$from:n,$to:a}=t.selection,i=n.blockRange(a,o=>o.childCount>0&&o.firstChild.type==e);return i?r?n.node(i.depth-1).type==e?Jce(t,r,e,i):Zce(t,r,i):!0:!1}}function Jce(e,t,r,n){let a=e.tr,i=n.end,o=n.$to.end(n.depth);i<o&&(a.step(new si(i-1,o,i,o,new Ct(at.from(r.create(null,n.parent.copy())),1,0),1,!0)),n=new Dp(a.doc.resolve(n.$from.pos),a.doc.resolve(o),n.depth));let s=o0(n);if(s==null)return!1;a.lift(n,s);let l=a.doc.resolve(a.mapping.map(i,-1)-1);return Cl(a.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&a.join(l.pos),t(a.scrollIntoView()),!0}function Zce(e,t,r){let n=e.tr,a=r.parent;for(let p=r.end,y=r.endIndex-1,x=r.startIndex;y>x;y--)p-=a.child(y).nodeSize,n.delete(p-1,p+1);let i=n.doc.resolve(r.start),o=i.nodeAfter;if(n.mapping.map(r.end)!=r.start+i.nodeAfter.nodeSize)return!1;let s=r.startIndex==0,l=r.endIndex==a.childCount,u=i.node(-1),c=i.index(-1);if(!u.canReplace(c+(s?0:1),c+1,o.content.append(l?at.empty:at.from(a))))return!1;let f=i.pos,d=f+o.nodeSize;return n.step(new si(f-(s?1:0),d+(l?1:0),f+1,d-1,new Ct((s?at.empty:at.from(a.copy(at.empty))).append(l?at.empty:at.from(a.copy(at.empty))),s?0:1,l?0:1),s?0:1)),t(n.scrollIntoView()),!0}function _H(e){return function(t,r){let{$from:n,$to:a}=t.selection,i=n.blockRange(a,u=>u.childCount>0&&u.firstChild.type==e);if(!i)return!1;let o=i.startIndex;if(o==0)return!1;let s=i.parent,l=s.child(o-1);if(l.type!=e)return!1;if(r){let u=l.lastChild&&l.lastChild.type==s.type,c=at.from(u?e.create():null),f=new Ct(at.from(e.create(null,at.from(s.type.create(null,c)))),u?3:1,0),d=i.start,p=i.end;r(t.tr.step(new si(d-(u?3:1),p,d,p,f,1,!0)).scrollIntoView())}return!0}}var Vi=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},vm=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},B_=null,l0=function(e,t,r){let n=B_||(B_=document.createRange());return n.setEnd(e,r==null?e.nodeValue.length:r),n.setStart(e,t||0),n},Qce=function(){B_=null},$p=function(e,t,r,n){return r&&(AH(e,t,r,n,-1)||AH(e,t,r,n,1))},e0e=/^(img|br|input|textarea|hr)$/i;function AH(e,t,r,n,a){for(var i;;){if(e==r&&t==n)return!0;if(t==(a<0?0:_l(e))){let o=e.parentNode;if(!o||o.nodeType!=1||l3(e)||e0e.test(e.nodeName)||e.contentEditable=="false")return!1;t=Vi(e)+(a<0?0:1),e=o}else if(e.nodeType==1){let o=e.childNodes[t+(a<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((i=o.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)t+=a;else return!1;else e=o,t=a<0?_l(e):0}else return!1}}function _l(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function t0e(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=_l(e)}else if(e.parentNode&&!l3(e))t=Vi(e),e=e.parentNode;else return null}}function r0e(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!l3(e))t=Vi(e)+1,e=e.parentNode;else return null}}function n0e(e,t,r){for(let n=t==0,a=t==_l(e);n||a;){if(e==r)return!0;let i=Vi(e);if(e=e.parentNode,!e)return!1;n=n&&i==0,a=a&&i==_l(e)}}function l3(e){let t;for(let r=e;r&&!(t=r.pmViewDesc);r=r.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var Gx=function(e){return e.focusNode&&$p(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Rp(e,t){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=e,r.key=r.code=t,r}function a0e(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function i0e(e,t,r){if(e.caretPositionFromPoint)try{let n=e.caretPositionFromPoint(t,r);if(n)return{node:n.offsetNode,offset:Math.min(_l(n.offsetNode),n.offset)}}catch(n){}if(e.caretRangeFromPoint){let n=e.caretRangeFromPoint(t,r);if(n)return{node:n.startContainer,offset:Math.min(_l(n.startContainer),n.startOffset)}}}var Yu=typeof navigator!="undefined"?navigator:null,LH=typeof document!="undefined"?document:null,Kd=Yu&&Yu.userAgent||"",R_=/Edge\/(\d+)/.exec(Kd),oj=/MSIE \d/.exec(Kd),N_=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Kd),ls=!!(oj||N_||R_),jd=oj?document.documentMode:N_?+N_[1]:R_?+R_[1]:0,Al=!ls&&/gecko\/(\d+)/i.test(Kd);Al&&+(/Firefox\/(\d+)/.exec(Kd)||[0,0])[1];var O_=!ls&&/Chrome\/(\d+)/.exec(Kd),Gi=!!O_,sj=O_?+O_[1]:0,co=!ls&&!!Yu&&/Apple Computer/.test(Yu.vendor),wm=co&&(/Mobile\/\w+/.test(Kd)||!!Yu&&Yu.maxTouchPoints>2),Ml=wm||(Yu?/Mac/.test(Yu.platform):!1),lj=Yu?/Win/.test(Yu.platform):!1,u0=/Android \d/.test(Kd),u3=!!LH&&"webkitFontSmoothing"in LH.documentElement.style,o0e=u3?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function s0e(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function s0(e,t){return typeof e=="number"?e:e[t]}function l0e(e){let t=e.getBoundingClientRect(),r=t.width/e.offsetWidth||1,n=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*r,top:t.top,bottom:t.top+e.clientHeight*n}}function TH(e,t,r){let n=e.someProp("scrollThreshold")||0,a=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let o=r||e.dom;o;){if(o.nodeType!=1){o=vm(o);continue}let s=o,l=s==i.body,u=l?s0e(i):l0e(s),c=0,f=0;if(t.top<u.top+s0(n,"top")?f=-(u.top-t.top+s0(a,"top")):t.bottom>u.bottom-s0(n,"bottom")&&(f=t.bottom-t.top>u.bottom-u.top?t.top+s0(a,"top")-u.top:t.bottom-u.bottom+s0(a,"bottom")),t.left<u.left+s0(n,"left")?c=-(u.left-t.left+s0(a,"left")):t.right>u.right-s0(n,"right")&&(c=t.right-u.right+s0(a,"right")),c||f)if(l)i.defaultView.scrollBy(c,f);else{let p=s.scrollLeft,y=s.scrollTop;f&&(s.scrollTop+=f),c&&(s.scrollLeft+=c);let x=s.scrollLeft-p,k=s.scrollTop-y;t={left:t.left-x,top:t.top-k,right:t.right-x,bottom:t.bottom-k}}let d=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(d))break;o=d=="absolute"?o.offsetParent:vm(o)}}function u0e(e){let t=e.dom.getBoundingClientRect(),r=Math.max(0,t.top),n,a;for(let i=(t.left+t.right)/2,o=r+1;o<Math.min(innerHeight,t.bottom);o+=5){let s=e.root.elementFromPoint(i,o);if(!s||s==e.dom||!e.dom.contains(s))continue;let l=s.getBoundingClientRect();if(l.top>=r-20){n=s,a=l.top;break}}return{refDOM:n,refTop:a,stack:uj(e.dom)}}function uj(e){let t=[],r=e.ownerDocument;for(let n=e;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),e!=r);n=vm(n));return t}function c0e({refDOM:e,refTop:t,stack:r}){let n=e?e.getBoundingClientRect().top:0;cj(r,n==0?0:n-t)}function cj(e,t){for(let r=0;r<e.length;r++){let{dom:n,top:a,left:i}=e[r];n.scrollTop!=a+t&&(n.scrollTop=a+t),n.scrollLeft!=i&&(n.scrollLeft=i)}}var gm=null;function d0e(e){if(e.setActive)return e.setActive();if(gm)return e.focus(gm);let t=uj(e);e.focus(gm==null?{get preventScroll(){return gm={preventScroll:!0},!0}}:void 0),gm||(gm=!1,cj(t,0))}function dj(e,t){let r,n=2e8,a,i=0,o=t.top,s=t.top,l,u;for(let c=e.firstChild,f=0;c;c=c.nextSibling,f++){let d;if(c.nodeType==1)d=c.getClientRects();else if(c.nodeType==3)d=l0(c).getClientRects();else continue;for(let p=0;p<d.length;p++){let y=d[p];if(y.top<=o&&y.bottom>=s){o=Math.max(y.bottom,o),s=Math.min(y.top,s);let x=y.left>t.left?y.left-t.left:y.right<t.left?t.left-y.right:0;if(x<n){r=c,n=x,a=x&&r.nodeType==3?{left:y.right<t.left?y.right:y.left,top:t.top}:t,c.nodeType==1&&x&&(i=f+(t.left>=(y.left+y.right)/2?1:0));continue}}else y.top>t.top&&!l&&y.left<=t.left&&y.right>=t.left&&(l=c,u={left:Math.max(y.left,Math.min(y.right,t.left)),top:y.top});!r&&(t.left>=y.right&&t.top>=y.top||t.left>=y.left&&t.top>=y.bottom)&&(i=f+1)}}return!r&&l&&(r=l,a=u,n=0),r&&r.nodeType==3?f0e(r,a):!r||n&&r.nodeType==1?{node:e,offset:i}:dj(r,a)}function f0e(e,t){let r=e.nodeValue.length,n=document.createRange(),a;for(let i=0;i<r;i++){n.setEnd(e,i+1),n.setStart(e,i);let o=qd(n,1);if(o.top!=o.bottom&&Z_(t,o)){a={node:e,offset:i+(t.left>=(o.left+o.right)/2?1:0)};break}}return n.detach(),a||{node:e,offset:0}}function Z_(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function p0e(e,t){let r=e.parentNode;return r&&/^li$/i.test(r.nodeName)&&t.left<e.getBoundingClientRect().left?r:e}function h0e(e,t,r){let{node:n,offset:a}=dj(t,r),i=-1;if(n.nodeType==1&&!n.firstChild){let o=n.getBoundingClientRect();i=o.left!=o.right&&r.left>(o.left+o.right)/2?1:-1}return e.docView.posFromDOM(n,a,i)}function m0e(e,t,r,n){let a=-1;for(let i=t,o=!1;i!=e.dom;){let s=e.docView.nearestDesc(i,!0),l;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((l=s.dom.getBoundingClientRect()).width||l.height)&&(s.node.isBlock&&s.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(s.dom.nodeName)&&(!o&&l.left>n.left||l.top>n.top?a=s.posBefore:(!o&&l.right<n.left||l.bottom<n.top)&&(a=s.posAfter),o=!0),!s.contentDOM&&a<0&&!s.node.isText))return(s.node.isBlock?n.top<(l.top+l.bottom)/2:n.left<(l.left+l.right)/2)?s.posBefore:s.posAfter;i=s.dom.parentNode}return a>-1?a:e.docView.posFromDOM(t,r,-1)}function fj(e,t,r){let n=e.childNodes.length;if(n&&r.top<r.bottom)for(let a=Math.max(0,Math.min(n-1,Math.floor(n*(t.top-r.top)/(r.bottom-r.top))-2)),i=a;;){let o=e.childNodes[i];if(o.nodeType==1){let s=o.getClientRects();for(let l=0;l<s.length;l++){let u=s[l];if(Z_(t,u))return fj(o,t,u)}}if((i=(i+1)%n)==a)break}return e}function g0e(e,t){let r=e.dom.ownerDocument,n,a=0,i=i0e(r,t.left,t.top);i&&({node:n,offset:a}=i);let o=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top),s;if(!o||!e.dom.contains(o.nodeType!=1?o.parentNode:o)){let u=e.dom.getBoundingClientRect();if(!Z_(t,u)||(o=fj(e.dom,t,u),!o))return null}if(co)for(let u=o;n&&u;u=vm(u))u.draggable&&(n=void 0);if(o=p0e(o,t),n){if(Al&&n.nodeType==1&&(a=Math.min(a,n.childNodes.length),a<n.childNodes.length)){let c=n.childNodes[a],f;c.nodeName=="IMG"&&(f=c.getBoundingClientRect()).right<=t.left&&f.bottom>t.top&&a++}let u;u3&&a&&n.nodeType==1&&(u=n.childNodes[a-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&a--,n==e.dom&&a==n.childNodes.length-1&&n.lastChild.nodeType==1&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(a==0||n.nodeType!=1||n.childNodes[a-1].nodeName!="BR")&&(s=m0e(e,n,a,t))}s==null&&(s=h0e(e,o,t));let l=e.docView.nearestDesc(o,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function EH(e){return e.top<e.bottom||e.left<e.right}function qd(e,t){let r=e.getClientRects();if(r.length){let n=r[t<0?0:r.length-1];if(EH(n))return n}return Array.prototype.find.call(r,EH)||e.getBoundingClientRect()}var y0e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function pj(e,t,r){let{node:n,offset:a,atom:i}=e.docView.domFromPos(t,r<0?-1:1),o=u3||Al;if(n.nodeType==3)if(o&&(y0e.test(n.nodeValue)||(r<0?!a:a==n.nodeValue.length))){let l=qd(l0(n,a,a),r);if(Al&&a&&/\s/.test(n.nodeValue[a-1])&&a<n.nodeValue.length){let u=qd(l0(n,a-1,a-1),-1);if(u.top==l.top){let c=qd(l0(n,a,a+1),-1);if(c.top!=l.top)return t3(c,c.left<u.left)}}return l}else{let l=a,u=a,c=r<0?1:-1;return r<0&&!a?(u++,c=-1):r>=0&&a==n.nodeValue.length?(l--,c=1):r<0?l--:u++,t3(qd(l0(n,l,u),c),c<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&a&&(r<0||a==_l(n))){let l=n.childNodes[a-1];if(l.nodeType==1)return T_(l.getBoundingClientRect(),!1)}if(i==null&&a<_l(n)){let l=n.childNodes[a];if(l.nodeType==1)return T_(l.getBoundingClientRect(),!0)}return T_(n.getBoundingClientRect(),r>=0)}if(i==null&&a&&(r<0||a==_l(n))){let l=n.childNodes[a-1],u=l.nodeType==3?l0(l,_l(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return t3(qd(u,1),!1)}if(i==null&&a<_l(n)){let l=n.childNodes[a];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?l0(l,0,o?0:1):l.nodeType==1?l:null:null;if(u)return t3(qd(u,-1),!0)}return t3(qd(n.nodeType==3?l0(n):n,-r),r>=0)}function t3(e,t){if(e.width==0)return e;let r=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:r,right:r}}function T_(e,t){if(e.height==0)return e;let r=t?e.top:e.bottom;return{top:r,bottom:r,left:e.left,right:e.right}}function hj(e,t,r){let n=e.state,a=e.root.activeElement;n!=t&&e.updateState(t),a!=e.dom&&e.focus();try{return r()}finally{n!=t&&e.updateState(n),a!=e.dom&&a&&a.focus()}}function b0e(e,t,r){let n=t.selection,a=r=="up"?n.$from:n.$to;return hj(e,t,()=>{let{node:i}=e.docView.domFromPos(a.pos,r=="up"?-1:1);for(;;){let s=e.docView.nearestDesc(i,!0);if(!s)break;if(s.node.isBlock){i=s.contentDOM||s.dom;break}i=s.dom.parentNode}let o=pj(e,a.pos,1);for(let s=i.firstChild;s;s=s.nextSibling){let l;if(s.nodeType==1)l=s.getClientRects();else if(s.nodeType==3)l=l0(s,0,s.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let c=l[u];if(c.bottom>c.top+1&&(r=="up"?o.top-c.top>(c.bottom-o.top)*2:c.bottom-o.bottom>(o.bottom-c.top)*2))return!1}}return!0})}var x0e=/[\u0590-\u08ac]/;function v0e(e,t,r){let{$head:n}=t.selection;if(!n.parent.isTextblock)return!1;let a=n.parentOffset,i=!a,o=a==n.parent.content.size,s=e.domSelection();return s?!x0e.test(n.parent.textContent)||!s.modify?r=="left"||r=="backward"?i:o:hj(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:f}=e.domSelectionRange(),d=s.caretBidiLevel;s.modify("move",r,"character");let p=n.depth?e.docView.domAfterPos(n.before()):e.dom,{focusNode:y,focusOffset:x}=e.domSelectionRange(),k=y&&!p.contains(y.nodeType==1?y:y.parentNode)||l==y&&u==x;try{s.collapse(c,f),l&&(l!=c||u!=f)&&s.extend&&s.extend(l,u)}catch(w){}return d!=null&&(s.caretBidiLevel=d),k}):n.pos==n.start()||n.pos==n.end()}var DH=null,IH=null,zH=!1;function w0e(e,t,r){return DH==t&&IH==r?zH:(DH=t,IH=r,zH=r=="up"||r=="down"?b0e(e,t,r):v0e(e,t,r))}var Ll=0,BH=1,Np=2,Ju=3,Hp=class{constructor(t,r,n,a){this.parent=t,this.children=r,this.dom=n,this.contentDOM=a,this.dirty=Ll,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,r,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let r=0;r<this.children.length;r++)t+=this.children[r].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let r=0,n=this.posAtStart;;r++){let a=this.children[r];if(a==t)return n;n+=a.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,r,n){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(n<0){let i,o;if(t==this.contentDOM)i=t.childNodes[r-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.previousSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(o)+o.size:this.posAtStart}else{let i,o;if(t==this.contentDOM)i=t.childNodes[r];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.nextSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(o):this.posAtEnd}let a;if(t==this.dom&&this.contentDOM)a=r>Vi(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))a=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(r==0)for(let i=t;;i=i.parentNode){if(i==this.dom){a=!1;break}if(i.previousSibling)break}if(a==null&&r==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){a=!0;break}if(i.nextSibling)break}}return(a==null?n>0:a)?this.posAtEnd:this.posAtStart}nearestDesc(t,r=!1){for(let n=!0,a=t;a;a=a.parentNode){let i=this.getDesc(a),o;if(i&&(!r||i.node))if(n&&(o=i.nodeDOM)&&!(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))n=!1;else return i}}getDesc(t){let r=t.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(t,r,n){for(let a=t;a;a=a.parentNode){let i=this.getDesc(a);if(i)return i.localPosFromDOM(t,r,n)}return-1}descAt(t){for(let r=0,n=0;r<this.children.length;r++){let a=this.children[r],i=n+a.size;if(n==t&&i!=n){for(;!a.border&&a.children.length;)for(let o=0;o<a.children.length;o++){let s=a.children[o];if(s.size){a=s;break}}return a}if(t<i)return a.descAt(t-n-a.border);n=i}}domFromPos(t,r){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let n=0,a=0;for(let i=0;n<this.children.length;n++){let o=this.children[n],s=i+o.size;if(s>t||o instanceof Fx){a=t-i;break}i=s}if(a)return this.children[n].domFromPos(a-this.children[n].border,r);for(let i;n&&!(i=this.children[n-1]).size&&i instanceof Ox&&i.side>=0;n--);if(r<=0){let i,o=!0;for(;i=n?this.children[n-1]:null,!(!i||i.dom.parentNode==this.contentDOM);n--,o=!1);return i&&r&&o&&!i.border&&!i.domAtom?i.domFromPos(i.size,r):{node:this.contentDOM,offset:i?Vi(i.dom)+1:0}}else{let i,o=!0;for(;i=n<this.children.length?this.children[n]:null,!(!i||i.dom.parentNode==this.contentDOM);n++,o=!1);return i&&o&&!i.border&&!i.domAtom?i.domFromPos(0,r):{node:this.contentDOM,offset:i?Vi(i.dom):this.contentDOM.childNodes.length}}}parseRange(t,r,n=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:r,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let a=-1,i=-1;for(let o=n,s=0;;s++){let l=this.children[s],u=o+l.size;if(a==-1&&t<=u){let c=o+l.border;if(t>=c&&r<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,r,c);t=o;for(let f=s;f>0;f--){let d=this.children[f-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){a=Vi(d.dom)+1;break}t-=d.size}a==-1&&(a=0)}if(a>-1&&(u>r||s==this.children.length-1)){r=u;for(let c=s+1;c<this.children.length;c++){let f=this.children[c];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){i=Vi(f.dom);break}r+=f.size}i==-1&&(i=this.contentDOM.childNodes.length);break}o=u}return{node:this.contentDOM,from:t,to:r,fromOffset:a,toOffset:i}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let r=this.children[t<0?0:this.children.length-1];return r.size==0||r.emptyChildAt(t)}domAfterPos(t){let{node:r,offset:n}=this.domFromPos(t,0);if(r.nodeType!=1||n==r.childNodes.length)throw new RangeError("No node after pos "+t);return r.childNodes[n]}setSelection(t,r,n,a=!1){let i=Math.min(t,r),o=Math.max(t,r);for(let p=0,y=0;p<this.children.length;p++){let x=this.children[p],k=y+x.size;if(i>y&&o<k)return x.setSelection(t-y-x.border,r-y-x.border,n,a);y=k}let s=this.domFromPos(t,t?-1:1),l=r==t?s:this.domFromPos(r,r?-1:1),u=n.root.getSelection(),c=n.domSelectionRange(),f=!1;if((Al||co)&&t==r){let{node:p,offset:y}=s;if(p.nodeType==3){if(f=!!(y&&p.nodeValue[y-1]==`
3916
3916
  `),f&&y==p.nodeValue.length)for(let x=p,k;x;x=x.parentNode){if(k=x.nextSibling){k.nodeName=="BR"&&(s=l={node:k.parentNode,offset:Vi(k)+1});break}let w=x.pmViewDesc;if(w&&w.node&&w.node.isBlock)break}}else{let x=p.childNodes[y-1];f=x&&(x.nodeName=="BR"||x.contentEditable=="false")}}if(Al&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(a=!0)}if(!(a||f&&co)&&$p(s.node,s.offset,c.anchorNode,c.anchorOffset)&&$p(l.node,l.offset,c.focusNode,c.focusOffset))return;let d=!1;if((u.extend||t==r)&&!(f&&Al)){u.collapse(s.node,s.offset);try{t!=r&&u.extend(l.node,l.offset),d=!0}catch(p){}}if(!d){if(t>r){let y=s;s=l,l=y}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(s.node,s.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,r){for(let n=0,a=0;a<this.children.length;a++){let i=this.children[a],o=n+i.size;if(n==o?t<=o&&r>=n:t<o&&r>n){let s=n+i.border,l=o-i.border;if(t>=s&&r<=l){this.dirty=t==n||r==o?Np:BH,t==s&&r==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Ju:i.markDirty(t-s,r-s);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Np:Ju}n=o}this.dirty=Np}markParentsDirty(){let t=1;for(let r=this.parent;r;r=r.parent,t++){let n=t==1?Np:BH;r.dirty<n&&(r.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}},Ox=class extends Hp{constructor(t,r,n,a){let i,o=r.type.toDOM;if(typeof o=="function"&&(o=o(n,()=>{if(!i)return a;if(i.parent)return i.parent.posBeforeChild(i)})),!r.type.spec.raw){if(o.nodeType!=1){let s=document.createElement("span");s.appendChild(o),o=s}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=r,this.widget=r,i=this}matchesWidget(t){return this.dirty==Ll&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let r=this.widget.spec.stopEvent;return r?r(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},P_=class extends Hp{constructor(t,r,n,a){super(t,[],r,null),this.textDOM=n,this.text=a}get size(){return this.text.length}localPosFromDOM(t,r){return t!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}},km=class e extends Hp{constructor(t,r,n,a,i){super(t,[],n,a),this.mark=r,this.spec=i}static create(t,r,n,a){let i=a.nodeViews[r.type.name],o=i&&i(r,a,n);return(!o||!o.dom)&&(o=n0.renderSpec(document,r.type.spec.toDOM(r,n),null,r.attrs)),new e(t,r,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Ju||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Ju&&this.mark.eq(t)}markDirty(t,r){if(super.markDirty(t,r),this.dirty!=Ll){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty<this.dirty&&(n.dirty=this.dirty),this.dirty=Ll}}slice(t,r,n){let a=e.create(this.parent,this.mark,!0,n),i=this.children,o=this.size;r<o&&(i=H_(i,r,o,n)),t>0&&(i=H_(i,0,t,n));for(let s=0;s<i.length;s++)i[s].parent=a;return a.children=i,a}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},Ud=class e extends Hp{constructor(t,r,n,a,i,o,s,l,u){super(t,[],i,o),this.node=r,this.outerDeco=n,this.innerDeco=a,this.nodeDOM=s}static create(t,r,n,a,i,o){let s=i.nodeViews[r.type.name],l,u=s&&s(r,i,()=>{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},n,a),c=u&&u.dom,f=u&&u.contentDOM;if(r.isText){if(!c)c=document.createTextNode(r.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:f}=n0.renderSpec(document,r.type.spec.toDOM(r),null,r.attrs));!f&&!r.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),r.type.spec.draggable&&(c.draggable=!0));let d=c;return c=yj(c,n,r),u?l=new F_(t,r,n,a,c,f||null,d,u,i,o+1):r.isText?new Px(t,r,n,a,c,d,i):new e(t,r,n,a,c,f||null,d,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>at.empty)}return t}matchesNode(t,r,n){return this.dirty==Ll&&t.eq(this.node)&&qx(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,r){let n=this.node.inlineContent,a=r,i=t.composing?this.localCompositionInfo(t,r):null,o=i&&i.pos>-1?i:null,s=i&&i.pos<0,l=new $_(this,o&&o.node,t);M0e(this.node,this.innerDeco,(u,c,f)=>{u.spec.marks?l.syncToMarks(u.spec.marks,n,t,c):u.type.side>=0&&!f&&l.syncToMarks(c==this.node.childCount?an.none:this.node.child(c).marks,n,t,c),l.placeWidget(u,t,a)},(u,c,f,d)=>{l.syncToMarks(u.marks,n,t,d);let p;l.findNodeMatch(u,c,f,d)||s&&t.state.selection.from>a&&t.state.selection.to<a+u.nodeSize&&(p=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(u,c,f,p,t)||l.updateNextNode(u,c,f,t,d,a)||l.addNode(u,c,f,t,a),a+=u.nodeSize}),l.syncToMarks([],n,t,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Np)&&(o&&this.protectLocalComposition(t,o),mj(this.contentDOM,this.children,t),wm&&_0e(this.dom))}localCompositionInfo(t,r){let{from:n,to:a}=t.state.selection;if(!(t.state.selection instanceof Vt)||n<r||a>r+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let o=i.nodeValue,s=A0e(this.node.content,o,n-r,a-r);return s<0?null:{node:i,pos:s,text:o}}else return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:r,pos:n,text:a}){if(this.getDesc(r))return;let i=r;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new P_(this,i,r,a);t.input.compositionNodes.push(o),this.children=H_(this.children,n,n+a.length,t,o)}update(t,r,n,a){return this.dirty==Ju||!t.sameMarkup(this.node)?!1:(this.updateInner(t,r,n,a),!0)}updateInner(t,r,n,a){this.updateOuterDeco(r),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(a,this.posAtStart),this.dirty=Ll}updateOuterDeco(t){if(qx(t,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=gj(this.dom,this.nodeDOM,q_(this.outerDeco,this.node,r),q_(t,this.node,r)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function RH(e,t,r,n,a){yj(n,t,e);let i=new Ud(void 0,e,t,r,n,n,n,a,0);return i.contentDOM&&i.updateChildren(a,0),i}var Px=class e extends Ud{constructor(t,r,n,a,i,o,s){super(t,r,n,a,i,null,o,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,r,n,a){return this.dirty==Ju||this.dirty!=Ll&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=Ll||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,a.trackWrites==this.nodeDOM&&(a.trackWrites=null)),this.node=t,this.dirty=Ll,!0)}inParent(){let t=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,r,n){return t==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(t,r,n)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,r,n){let a=this.node.cut(t,r),i=document.createTextNode(a.text);return new e(this.parent,a,this.outerDeco,this.innerDeco,i,i,n)}markDirty(t,r){super.markDirty(t,r),this.dom!=this.nodeDOM&&(t==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=Ju)}get domAtom(){return!1}isText(t){return this.node.text==t}},Fx=class extends Hp{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Ll&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},F_=class extends Ud{constructor(t,r,n,a,i,o,s,l,u,c){super(t,r,n,a,i,o,s,u,c),this.spec=l}update(t,r,n,a){if(this.dirty==Ju)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,r,n);return i&&this.updateInner(t,r,n,a),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,r,n,a)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,r,n,a){this.spec.setSelection?this.spec.setSelection(t,r,n.root):super.setSelection(t,r,n,a)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function mj(e,t,r){let n=e.firstChild,a=!1;for(let i=0;i<t.length;i++){let o=t[i],s=o.dom;if(s.parentNode==e){for(;s!=n;)n=NH(n),a=!0;n=n.nextSibling}else a=!0,e.insertBefore(s,n);if(o instanceof km){let l=n?n.previousSibling:e.lastChild;mj(o.contentDOM,o.children,r),n=l?l.nextSibling:e.firstChild}}for(;n;)n=NH(n),a=!0;a&&r.trackWrites==e&&(r.trackWrites=null)}var r3=function(e){e&&(this.nodeName=e)};r3.prototype=Object.create(null);var Op=[new r3];function q_(e,t,r){if(e.length==0)return Op;let n=r?Op[0]:new r3,a=[n];for(let i=0;i<e.length;i++){let o=e[i].type.attrs;if(o){o.nodeName&&a.push(n=new r3(o.nodeName));for(let s in o){let l=o[s];l!=null&&(r&&a.length==1&&a.push(n=new r3(t.isInline?"span":"div")),s=="class"?n.class=(n.class?n.class+" ":"")+l:s=="style"?n.style=(n.style?n.style+";":"")+l:s!="nodeName"&&(n[s]=l))}}}return a}function gj(e,t,r,n){if(r==Op&&n==Op)return t;let a=t;for(let i=0;i<n.length;i++){let o=n[i],s=r[i];if(i){let l;s&&s.nodeName==o.nodeName&&a!=e&&(l=a.parentNode)&&l.nodeName.toLowerCase()==o.nodeName||(l=document.createElement(o.nodeName),l.pmIsDeco=!0,l.appendChild(a),s=Op[0]),a=l}k0e(a,s||Op[0],o)}return a}function k0e(e,t,r){for(let n in t)n!="class"&&n!="style"&&n!="nodeName"&&!(n in r)&&e.removeAttribute(n);for(let n in r)n!="class"&&n!="style"&&n!="nodeName"&&r[n]!=t[n]&&e.setAttribute(n,r[n]);if(t.class!=r.class){let n=t.class?t.class.split(" ").filter(Boolean):[],a=r.class?r.class.split(" ").filter(Boolean):[];for(let i=0;i<n.length;i++)a.indexOf(n[i])==-1&&e.classList.remove(n[i]);for(let i=0;i<a.length;i++)n.indexOf(a[i])==-1&&e.classList.add(a[i]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=r.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,a;for(;a=n.exec(t.style);)e.style.removeProperty(a[1])}r.style&&(e.style.cssText+=r.style)}}function yj(e,t,r){return gj(e,e,Op,q_(t,r,e.nodeType!=1))}function qx(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].type.eq(t[r].type))return!1;return!0}function NH(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var $_=class{constructor(t,r,n){this.lock=r,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=S0e(t.node.content,t)}destroyBetween(t,r){if(t!=r){for(let n=t;n<r;n++)this.top.children[n].destroy();this.top.children.splice(t,r-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,r,n,a){let i=0,o=this.stack.length>>1,s=Math.min(o,t.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(t[i])&&t[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=Ll,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<t.length;){this.stack.push(this.top,this.index+1);let l=-1,u=this.top.children.length;a<this.preMatch.index&&(u=Math.min(this.index+3,u));for(let c=this.index;c<u;c++){let f=this.top.children[c];if(f.matchesMark(t[o])&&!this.isLocked(f.dom)){l=c;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=km.create(this.top,t[o],r,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}}findNodeMatch(t,r,n,a){let i=-1,o;if(a>=this.preMatch.index&&(o=this.preMatch.matches[a-this.preMatch.index]).parent==this.top&&o.matchesNode(t,r,n))i=this.top.children.indexOf(o,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s<l;s++){let u=this.top.children[s];if(u.matchesNode(t,r,n)&&!this.preMatch.matched.has(u)){i=s;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(t,r,n,a,i){let o=this.top.children[a];return o.dirty==Ju&&o.dom==o.contentDOM&&(o.dirty=Np),o.update(t,r,n,i)?(this.destroyBetween(this.index,a),this.index++,!0):!1}findIndexWithChild(t){for(;;){let r=t.parentNode;if(!r)return-1;if(r==this.top.contentDOM){let n=t.pmViewDesc;if(n){for(let a=this.index;a<this.top.children.length;a++)if(this.top.children[a]==n)return a}return-1}t=r}}updateNextNode(t,r,n,a,i,o){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof Ud){let u=this.preMatch.matched.get(l);if(u!=null&&u!=i)return!1;let c=l.dom,f,d=this.isLocked(c)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=Ju&&qx(r,l.outerDeco));if(!d&&l.update(t,r,n,a))return this.destroyBetween(this.index,s),l.dom!=c&&(this.changed=!0),this.index++,!0;if(!d&&(f=this.recreateWrapper(l,t,r,n,a,o)))return this.destroyBetween(this.index,s),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=Np,f.updateChildren(a,o+1),f.dirty=Ll),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,r,n,a,i,o){if(t.dirty||r.isAtom||!t.children.length||!t.node.content.eq(r.content)||!qx(n,t.outerDeco)||!a.eq(t.innerDeco))return null;let s=Ud.create(this.top,r,n,a,i,o);if(s.contentDOM){s.children=t.children,t.children=[];for(let l of s.children)l.parent=s}return t.destroy(),s}addNode(t,r,n,a,i){let o=Ud.create(this.top,t,r,n,a,i);o.contentDOM&&o.updateChildren(a,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(t,r,n){let a=this.index<this.top.children.length?this.top.children[this.index]:null;if(a&&a.matchesWidget(t)&&(t==a.widget||!a.widget.type.toDOM.parentNode))this.index++;else{let i=new Ox(this.top,t,r,n);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],r=this.top;for(;t instanceof km;)r=t,t=r.children[r.children.length-1];(!t||!(t instanceof Px)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((co||Gi)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",r),this.addHackNode("BR",this.top))}addHackNode(t,r){if(r==this.top&&this.index<r.children.length&&r.children[this.index].matchesHack(t))this.index++;else{let n=document.createElement(t);t=="IMG"&&(n.className="ProseMirror-separator",n.alt=""),t=="BR"&&(n.className="ProseMirror-trailingBreak");let a=new Fx(this.top,[],n,null);r!=this.top?r.children.push(a):r.children.splice(this.index++,0,a),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}};function S0e(e,t){let r=t,n=r.children.length,a=e.childCount,i=new Map,o=[];e:for(;a>0;){let s;for(;;)if(n){let u=r.children[n-1];if(u instanceof km)r=u,n=u.children.length;else{s=u,n--;break}}else{if(r==t)break e;n=r.parent.children.indexOf(r),r=r.parent}let l=s.node;if(l){if(l!=e.child(a-1))break;--a,i.set(s,a),o.push(s)}}return{index:a,matched:i,matches:o.reverse()}}function C0e(e,t){return e.type.side-t.type.side}function M0e(e,t,r,n){let a=t.locals(e),i=0;if(a.length==0){for(let u=0;u<e.childCount;u++){let c=e.child(u);n(c,a,t.forChild(i,c),u),i+=c.nodeSize}return}let o=0,s=[],l=null;for(let u=0;;){let c,f;for(;o<a.length&&a[o].to==i;){let k=a[o++];k.widget&&(c?(f||(f=[c])).push(k):c=k)}if(c)if(f){f.sort(C0e);for(let k=0;k<f.length;k++)r(f[k],u,!!l)}else r(c,u,!!l);let d,p;if(l)p=-1,d=l,l=null;else if(u<e.childCount)p=u,d=e.child(u++);else break;for(let k=0;k<s.length;k++)s[k].to<=i&&s.splice(k--,1);for(;o<a.length&&a[o].from<=i&&a[o].to>i;)s.push(a[o++]);let y=i+d.nodeSize;if(d.isText){let k=y;o<a.length&&a[o].from<k&&(k=a[o].from);for(let w=0;w<s.length;w++)s[w].to<k&&(k=s[w].to);k<y&&(l=d.cut(k-i),d=d.cut(0,k-i),y=k,p=-1)}else for(;o<a.length&&a[o].to<y;)o++;let x=d.isInline&&!d.isLeaf?s.filter(k=>!k.inline):s.slice();n(d,x,t.forChild(i,d),p),i=y}}function _0e(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function A0e(e,t,r,n){for(let a=0,i=0;a<e.childCount&&i<=n;){let o=e.child(a++),s=i;if(i+=o.nodeSize,!o.isText)continue;let l=o.text;for(;a<e.childCount;){let u=e.child(a++);if(i+=u.nodeSize,!u.isText)break;l+=u.text}if(i>=r){if(i>=n&&l.slice(n-t.length-s,n-s)==t)return n-t.length;let u=s<n?l.lastIndexOf(t,n-s-1):-1;if(u>=0&&u+t.length+s>=r)return s+u;if(r==n&&l.length>=n+t.length-s&&l.slice(n-s,n-s+t.length)==t)return n}}return-1}function H_(e,t,r,n,a){let i=[];for(let o=0,s=0;o<e.length;o++){let l=e[o],u=s,c=s+=l.size;u>=r||c<=t?i.push(l):(u<t&&i.push(l.slice(0,t-u,n)),a&&(i.push(a),a=void 0),c>r&&i.push(l.slice(r-u,l.size,n)))}return i}function Q_(e,t=null){let r=e.domSelectionRange(),n=e.state.doc;if(!r.focusNode)return null;let a=e.docView.nearestDesc(r.focusNode),i=a&&a.size==0,o=e.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(o<0)return null;let s=n.resolve(o),l,u;if(Gx(r)){for(l=o;a&&!a.node;)a=a.parent;let f=a.node;if(a&&f.isAtom&&Pt.isSelectable(f)&&a.parent&&!(f.isInline&&n0e(r.focusNode,r.focusOffset,a.dom))){let d=a.posBefore;u=new Pt(o==d?s:n.resolve(d))}}else{if(r instanceof e.dom.ownerDocument.defaultView.Selection&&r.rangeCount>1){let f=o,d=o;for(let p=0;p<r.rangeCount;p++){let y=r.getRangeAt(p);f=Math.min(f,e.docView.posFromDOM(y.startContainer,y.startOffset,1)),d=Math.max(d,e.docView.posFromDOM(y.endContainer,y.endOffset,-1))}if(f<0)return null;[l,o]=d==e.state.selection.anchor?[d,f]:[f,d],s=n.resolve(o)}else l=e.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(l<0)return null}let c=n.resolve(l);if(!u){let f=t=="pointer"||e.state.selection.head<s.pos&&!i?1:-1;u=eA(e,c,s,f)}return u}function bj(e){return e.editable?e.hasFocus():vj(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function c0(e,t=!1){let r=e.state.selection;if(xj(e,r),!!bj(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Gi){let n=e.domSelectionRange(),a=e.domObserver.currentSelection;if(n.anchorNode&&a.anchorNode&&$p(n.anchorNode,n.anchorOffset,a.anchorNode,a.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)T0e(e);else{let{anchor:n,head:a}=r,i,o;OH&&!(r instanceof Vt)&&(r.$from.parent.inlineContent||(i=PH(e,r.from)),!r.empty&&!r.$from.parent.inlineContent&&(o=PH(e,r.to))),e.docView.setSelection(n,a,e,t),OH&&(i&&FH(i),o&&FH(o)),r.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&L0e(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var OH=co||Gi&&sj<63;function PH(e,t){let{node:r,offset:n}=e.docView.domFromPos(t,0),a=n<r.childNodes.length?r.childNodes[n]:null,i=n?r.childNodes[n-1]:null;if(co&&a&&a.contentEditable=="false")return E_(a);if((!a||a.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(a)return E_(a);if(i)return E_(i)}}function E_(e){return e.contentEditable="true",co&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function FH(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function L0e(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let r=e.domSelectionRange(),n=r.anchorNode,a=r.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(r.anchorNode!=n||r.anchorOffset!=a)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!bj(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function T0e(e){let t=e.domSelection();if(!t)return;let r=e.cursorWrapper.dom,n=r.nodeName=="IMG";n?t.collapse(r.parentNode,Vi(r)+1):t.collapse(r,0),!n&&!e.state.selection.visible&&ls&&jd<=11&&(r.disabled=!0,r.disabled=!1)}function xj(e,t){if(t instanceof Pt){let r=e.docView.descAt(t.from);r!=e.lastSelectedViewDesc&&(qH(e),r&&r.selectNode(),e.lastSelectedViewDesc=r)}else qH(e)}function qH(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function eA(e,t,r,n){return e.someProp("createSelectionBetween",a=>a(e,t,r))||Vt.between(t,r,n)}function $H(e){return e.editable&&!e.hasFocus()?!1:vj(e)}function vj(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch(r){return!1}}function E0e(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),r=e.domSelectionRange();return $p(t.node,t.offset,r.anchorNode,r.anchorOffset)}function j_(e,t){let{$anchor:r,$head:n}=e.selection,a=t>0?r.max(n):r.min(n),i=a.parent.inlineContent?a.depth?e.doc.resolve(t>0?a.after():a.before()):null:a;return i&&ir.findFrom(i,t)}function $d(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function HH(e,t,r){let n=e.state.selection;if(n instanceof Vt)if(r.indexOf("s")>-1){let{$head:a}=n,i=a.textOffset?null:t<0?a.nodeBefore:a.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let o=e.state.doc.resolve(a.pos+i.nodeSize*(t<0?-1:1));return $d(e,new Vt(n.$anchor,o))}else if(n.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let a=j_(e.state,t);return a&&a instanceof Pt?$d(e,a):!1}else if(!(Ml&&r.indexOf("m")>-1)){let a=n.$head,i=a.textOffset?null:t<0?a.nodeBefore:a.nodeAfter,o;if(!i||i.isText)return!1;let s=t<0?a.pos-i.nodeSize:a.pos;return i.isAtom||(o=e.docView.descAt(s))&&!o.contentDOM?Pt.isSelectable(i)?$d(e,new Pt(t<0?e.state.doc.resolve(a.pos-i.nodeSize):a)):u3?$d(e,new Vt(e.state.doc.resolve(t<0?s:s+i.nodeSize))):!1:!1}}else return!1;else{if(n instanceof Pt&&n.node.isInline)return $d(e,new Vt(t>0?n.$to:n.$from));{let a=j_(e.state,t);return a?$d(e,a):!1}}}function $x(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function n3(e,t){let r=e.pmViewDesc;return r&&r.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function ym(e,t){return t<0?D0e(e):I0e(e)}function D0e(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let a,i,o=!1;for(Al&&r.nodeType==1&&n<$x(r)&&n3(r.childNodes[n],-1)&&(o=!0);;)if(n>0){if(r.nodeType!=1)break;{let s=r.childNodes[n-1];if(n3(s,-1))a=r,i=--n;else if(s.nodeType==3)r=s,n=r.nodeValue.length;else break}}else{if(wj(r))break;{let s=r.previousSibling;for(;s&&n3(s,-1);)a=r.parentNode,i=Vi(s),s=s.previousSibling;if(s)r=s,n=$x(r);else{if(r=r.parentNode,r==e.dom)break;n=0}}}o?U_(e,r,n):a&&U_(e,a,i)}function I0e(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let a=$x(r),i,o;for(;;)if(n<a){if(r.nodeType!=1)break;let s=r.childNodes[n];if(n3(s,1))i=r,o=++n;else break}else{if(wj(r))break;{let s=r.nextSibling;for(;s&&n3(s,1);)i=s.parentNode,o=Vi(s)+1,s=s.nextSibling;if(s)r=s,n=0,a=$x(r);else{if(r=r.parentNode,r==e.dom)break;n=a=0}}}i&&U_(e,i,o)}function wj(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function z0e(e,t){for(;e&&t==e.childNodes.length&&!l3(e);)t=Vi(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let r=e.childNodes[t];if(r.nodeType==3)return r;if(r.nodeType==1&&r.contentEditable=="false")break;e=r,t=0}}function B0e(e,t){for(;e&&!t&&!l3(e);)t=Vi(e),e=e.parentNode;for(;e&&t;){let r=e.childNodes[t-1];if(r.nodeType==3)return r;if(r.nodeType==1&&r.contentEditable=="false")break;e=r,t=e.childNodes.length}}function U_(e,t,r){if(t.nodeType!=3){let i,o;(o=z0e(t,r))?(t=o,r=0):(i=B0e(t,r))&&(t=i,r=i.nodeValue.length)}let n=e.domSelection();if(!n)return;if(Gx(n)){let i=document.createRange();i.setEnd(t,r),i.setStart(t,r),n.removeAllRanges(),n.addRange(i)}else n.extend&&n.extend(t,r);e.domObserver.setCurSelection();let{state:a}=e;setTimeout(()=>{e.state==a&&c0(e)},50)}function jH(e,t){let r=e.state.doc.resolve(t);if(!(Gi||lj)&&r.parent.inlineContent){let a=e.coordsAtPos(t);if(t>r.start()){let i=e.coordsAtPos(t-1),o=(i.top+i.bottom)/2;if(o>a.top&&o<a.bottom&&Math.abs(i.left-a.left)>1)return i.left<a.left?"ltr":"rtl"}if(t<r.end()){let i=e.coordsAtPos(t+1),o=(i.top+i.bottom)/2;if(o>a.top&&o<a.bottom&&Math.abs(i.left-a.left)>1)return i.left>a.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function UH(e,t,r){let n=e.state.selection;if(n instanceof Vt&&!n.empty||r.indexOf("s")>-1||Ml&&r.indexOf("m")>-1)return!1;let{$from:a,$to:i}=n;if(!a.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let o=j_(e.state,t);if(o&&o instanceof Pt)return $d(e,o)}if(!a.parent.inlineContent){let o=t<0?a:i,s=n instanceof zo?ir.near(o,t):ir.findFrom(o,t);return s?$d(e,s):!1}return!1}function KH(e,t){if(!(e.state.selection instanceof Vt))return!0;let{$head:r,$anchor:n,empty:a}=e.state.selection;if(!r.sameParent(n))return!0;if(!a)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(i&&!i.isText){let o=e.state.tr;return t<0?o.delete(r.pos-i.nodeSize,r.pos):o.delete(r.pos,r.pos+i.nodeSize),e.dispatch(o),!0}return!1}function VH(e,t,r){e.domObserver.stop(),t.contentEditable=r,e.domObserver.start()}function R0e(e){if(!co||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:r}=e.domSelectionRange();if(t&&t.nodeType==1&&r==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let n=t.firstChild;VH(e,n,"true"),setTimeout(()=>VH(e,n,"false"),20)}return!1}function N0e(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function O0e(e,t){let r=t.keyCode,n=N0e(t);if(r==8||Ml&&r==72&&n=="c")return KH(e,-1)||ym(e,-1);if(r==46&&!t.shiftKey||Ml&&r==68&&n=="c")return KH(e,1)||ym(e,1);if(r==13||r==27)return!0;if(r==37||Ml&&r==66&&n=="c"){let a=r==37?jH(e,e.state.selection.from)=="ltr"?-1:1:-1;return HH(e,a,n)||ym(e,a)}else if(r==39||Ml&&r==70&&n=="c"){let a=r==39?jH(e,e.state.selection.from)=="ltr"?1:-1:1;return HH(e,a,n)||ym(e,a)}else{if(r==38||Ml&&r==80&&n=="c")return UH(e,-1,n)||ym(e,-1);if(r==40||Ml&&r==78&&n=="c")return R0e(e)||UH(e,1,n)||ym(e,1);if(n==(Ml?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function tA(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let r=[],{content:n,openStart:a,openEnd:i}=t;for(;a>1&&i>1&&n.childCount==1&&n.firstChild.childCount==1;){a--,i--;let p=n.firstChild;r.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),n=p.content}let o=e.someProp("clipboardSerializer")||n0.fromSchema(e.state.schema),s=Aj(),l=s.createElement("div");l.appendChild(o.serializeFragment(n,{document:s}));let u=l.firstChild,c,f=0;for(;u&&u.nodeType==1&&(c=_j[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let y=s.createElement(c[p]);for(;l.firstChild;)y.appendChild(l.firstChild);l.appendChild(y),f++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${a} ${i}${f?` -${f}`:""} ${JSON.stringify(r)}`);let d=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
3917
3917
 
3918
3918
  `);return{dom:l,text:d,slice:t}}function kj(e,t,r,n,a){let i=a.parent.type.spec.code,o,s;if(!r&&!t)return null;let l=!!t&&(n||i||!r);if(l){if(e.someProp("transformPastedText",d=>{t=d(t,i||n,e)}),i)return s=new Ct(at.from(e.state.schema.text(t.replace(/\r\n?/g,`
@@ -4006,7 +4006,7 @@ ${k}
4006
4006
  `);z.trim()&&(t.customNestedParser?S=t.customNestedParser(z):S=r.blockTokens(z))}let E=t.createToken(y,S);l.push(E)}if(l.length!==0)return{items:l,raw:u}}function g3(e,t,r,n){if(!e||!Array.isArray(e.content))return"";let a=typeof r=="function"?r(n):r,[i,...o]=e.content,s=t.renderChildren([i]),l=[`${a}${s}`];return o&&o.length>0&&o.forEach(u=>{let c=t.renderChildren([u]);if(c){let f=c.split(`
4007
4007
  `).map(d=>d?t.indent(d):"").join(`
4008
4008
  `);l.push(f)}}),l.join(`
4009
- `)}function _pe(e,t,r={}){let{state:n}=t,{doc:a,tr:i}=n,o=e;a.descendants((s,l)=>{let u=i.mapping.map(l),c=i.mapping.map(l)+s.nodeSize,f=null;if(s.marks.forEach(p=>{if(p!==o)return!1;f=p}),!f)return;let d=!1;if(Object.keys(r).forEach(p=>{r[p]!==f.attrs[p]&&(d=!0)}),d){let p=e.type.create(te(te({},e.attrs),r));i.removeMark(u,c,e.type),i.addMark(u,c,p)}}),i.docChanged&&t.view.dispatch(i)}var ta=class TU extends vA{constructor(){super(...arguments),this.type="node"}static create(t={}){let r=typeof t=="function"?t():t;return new TU(r)}configure(t){return super.configure(t)}extend(t){let r=typeof t=="function"?t():t;return super.extend(r)}};function Tl(e){return new dpe({find:e.find,handler:({state:t,range:r,match:n,pasteEvent:a})=>{let i=xn(e.getAttributes,void 0,n,a);if(i===!1||i===null)return null;let{tr:o}=t,s=n[n.length-1],l=n[0],u=r.to;if(s){let c=l.search(/\S/),f=r.from+l.indexOf(s),d=f+s.length;if(lv(r.from,r.to,t.doc).filter(y=>y.mark.type.excluded.find(k=>k===e.type&&k!==y.mark.type)).filter(y=>y.to>f).length)return null;d<r.to&&o.delete(d,r.to),f>r.from&&o.delete(r.from+c,f),u=r.from+c+s.length,o.addMark(r.from+c,u,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}var Wd=Ee(_t(),1);var{getOwnPropertyNames:Ape,getOwnPropertySymbols:Lpe}=Object,{hasOwnProperty:Tpe}=Object.prototype;function SA(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function pv(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);let{cache:i}=a,o=i.get(r),s=i.get(n);if(o&&s)return o===n&&s===r;i.set(r,n),i.set(n,r);let l=e(r,n,a);return i.delete(r),i.delete(n),l}}function Epe(e){return e!=null?e[Symbol.toStringTag]:void 0}function EU(e){return Ape(e).concat(Lpe(e))}var Dpe=Object.hasOwn||((e,t)=>Tpe.call(e,t));function Up(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Ipe="__v",zpe="__o",Bpe="_owner",{getOwnPropertyDescriptor:DU,keys:IU}=Object;function Rpe(e,t){return e.byteLength===t.byteLength&&hv(new Uint8Array(e),new Uint8Array(t))}function Npe(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Ope(e,t){return e.byteLength===t.byteLength&&hv(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Ppe(e,t){return Up(e.getTime(),t.getTime())}function Fpe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function qpe(e,t){return e===t}function zU(e,t,r){let n=e.size;if(n!==t.size)return!1;if(!n)return!0;let a=new Array(n),i=e.entries(),o,s,l=0;for(;(o=i.next())&&!o.done;){let u=t.entries(),c=!1,f=0;for(;(s=u.next())&&!s.done;){if(a[f]){f++;continue}let d=o.value,p=s.value;if(r.equals(d[0],p[0],l,f,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){c=a[f]=!0;break}f++}if(!c)return!1;l++}return!0}var $pe=Up;function Hpe(e,t,r){let n=IU(e),a=n.length;if(IU(t).length!==a)return!1;for(;a-- >0;)if(!RU(e,t,r,n[a]))return!1;return!0}function y3(e,t,r){let n=EU(e),a=n.length;if(EU(t).length!==a)return!1;let i,o,s;for(;a-- >0;)if(i=n[a],!RU(e,t,r,i)||(o=DU(e,i),s=DU(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function jpe(e,t){return Up(e.valueOf(),t.valueOf())}function Upe(e,t){return e.source===t.source&&e.flags===t.flags}function BU(e,t,r){let n=e.size;if(n!==t.size)return!1;if(!n)return!0;let a=new Array(n),i=e.values(),o,s;for(;(o=i.next())&&!o.done;){let l=t.values(),u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!a[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=a[c]=!0;break}c++}if(!u)return!1}return!0}function hv(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Kpe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function RU(e,t,r,n){return(n===Bpe||n===zpe||n===Ipe)&&(e.$$typeof||t.$$typeof)?!0:Dpe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Vpe="[object ArrayBuffer]",Gpe="[object Arguments]",Wpe="[object Boolean]",Xpe="[object DataView]",Ype="[object Date]",Jpe="[object Error]",Zpe="[object Map]",Qpe="[object Number]",ehe="[object Object]",the="[object RegExp]",rhe="[object Set]",nhe="[object String]",ahe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},ihe="[object URL]",ohe=Object.prototype.toString;function she({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:a,areFunctionsEqual:i,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:f,areTypedArraysEqual:d,areUrlsEqual:p,unknownTagComparators:y}){return function(k,w,S){if(k===w)return!0;if(k==null||w==null)return!1;let T=typeof k;if(T!==typeof w)return!1;if(T!=="object")return T==="number"?s(k,w,S):T==="function"?i(k,w,S):!1;let E=k.constructor;if(E!==w.constructor)return!1;if(E===Object)return l(k,w,S);if(Array.isArray(k))return t(k,w,S);if(E===Date)return n(k,w,S);if(E===RegExp)return c(k,w,S);if(E===Map)return o(k,w,S);if(E===Set)return f(k,w,S);let z=ohe.call(k);if(z===Ype)return n(k,w,S);if(z===the)return c(k,w,S);if(z===Zpe)return o(k,w,S);if(z===rhe)return f(k,w,S);if(z===ehe)return typeof k.then!="function"&&typeof w.then!="function"&&l(k,w,S);if(z===ihe)return p(k,w,S);if(z===Jpe)return a(k,w,S);if(z===Gpe)return l(k,w,S);if(ahe[z])return d(k,w,S);if(z===Vpe)return e(k,w,S);if(z===Xpe)return r(k,w,S);if(z===Wpe||z===Qpe||z===nhe)return u(k,w,S);if(y){let N=y[z];if(!N){let O=Epe(k);O&&(N=y[O])}if(N)return N(k,w,S)}return!1}}function lhe({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:Rpe,areArraysEqual:r?y3:Npe,areDataViewsEqual:Ope,areDatesEqual:Ppe,areErrorsEqual:Fpe,areFunctionsEqual:qpe,areMapsEqual:r?SA(zU,y3):zU,areNumbersEqual:$pe,areObjectsEqual:r?y3:Hpe,arePrimitiveWrappersEqual:jpe,areRegExpsEqual:Upe,areSetsEqual:r?SA(BU,y3):BU,areTypedArraysEqual:r?SA(hv,y3):hv,areUrlsEqual:Kpe,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){let a=pv(n.areArraysEqual),i=pv(n.areMapsEqual),o=pv(n.areObjectsEqual),s=pv(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:o,areSetsEqual:s})}return n}function uhe(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function che({circular:e,comparator:t,createState:r,equals:n,strict:a}){if(r)return function(s,l){let{cache:u=e?new WeakMap:void 0,meta:c}=r();return t(s,l,{cache:u,equals:n,meta:c,strict:a})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:a})};let i={cache:void 0,equals:n,meta:void 0,strict:a};return function(s,l){return t(s,l,i)}}var NU=Vd(),_Me=Vd({strict:!0}),AMe=Vd({circular:!0}),LMe=Vd({circular:!0,strict:!0}),TMe=Vd({createInternalComparator:()=>Up}),EMe=Vd({strict:!0,createInternalComparator:()=>Up}),DMe=Vd({circular:!0,createInternalComparator:()=>Up}),IMe=Vd({circular:!0,createInternalComparator:()=>Up,strict:!0});function Vd(e={}){let{circular:t=!1,createInternalComparator:r,createState:n,strict:a=!1}=e,i=lhe(e),o=she(i),s=r?r(o):uhe(o);return che({circular:t,comparator:o,createState:n,equals:s,strict:a})}var Xd=Ee(_t(),1);var mv=Ee(_t());function OU(e,t,r,n,a){let i=(0,mv.useRef)(null);return(0,mv.useSyncExternalStore)(e,()=>{let l=t(),u=n(l);return a&&i.current!==null&&a(i.current,u)?i.current:i.current=u},r?()=>n(r()):void 0)}var HU=Ee($t(),1),b3=Ee(_t(),1),She=Ee($t(),1),UU=Ee(_t(),1),KU=Ee($t(),1);var VU=Ee(_t(),1),Che=Ee(_t(),1),Mhe=Ee(Qh(),1),_he=Ee($t(),1),Ahe=Ee($t(),1);var _A=Ee(_t(),1),Lhe=Ee($t(),1),Kp=Ee(_t(),1),gv=Ee($t(),1);var dhe=(...e)=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r&&(r.current=t)})},fhe=({contentComponent:e})=>{let t=(0,H2.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,p0.jsx)(p0.Fragment,{children:Object.values(t)})};function phe(){let e=new Set,t={};return{subscribe(r){return e.add(r),()=>{e.delete(r)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(r,n){t=Ue(te({},t),{[r]:FU.default.createPortal(n.reactElement,n.element,r)}),e.forEach(a=>a())},removeRenderer(r){let n=te({},t);delete n[r],t=n,e.forEach(a=>a())}}}var hhe=class extends Gd.default.Component{constructor(e){var t;super(e),this.editorContentRef=Gd.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&((e=t.view.dom)!=null&&e.parentNode)){if(t.contentComponent)return;let r=this.editorContentRef.current;r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r}),t.contentComponent=phe(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.parentNode))return;let r=document.createElement("div");r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r})}catch(r){}}}render(){let n=this.props,{editor:e,innerRef:t}=n,r=Pn(n,["editor","innerRef"]);return(0,p0.jsxs)(p0.Fragment,{children:[(0,p0.jsx)("div",te({ref:dhe(t,this.editorContentRef)},r)),(e==null?void 0:e.contentComponent)&&(0,p0.jsx)(fhe,{contentComponent:e.contentComponent})]})}},mhe=(0,Gd.forwardRef)((e,t)=>{let r=Gd.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Gd.default.createElement(hhe,te({key:r,innerRef:t},e))}),MA=Gd.default.memo(mhe),ghe=typeof window!="undefined"?Xd.useLayoutEffect:Xd.useEffect,yhe=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t=()=>{this.transactionNumber+=1,this.subscribers.forEach(n=>n())},r=this.editor;return r.on("transaction",t),()=>{r.off("transaction",t)}}}};function bhe(e){var t;let[r]=(0,Xd.useState)(()=>new yhe(e.editor)),n=OU(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:NU);return ghe(()=>r.watch(e.editor),[e.editor,r]),(0,Xd.useDebugValue)(n),n}var PU=!1,CA=typeof window=="undefined",xhe=CA||!!(typeof window!="undefined"&&window.next),vhe=class qU{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(r=>r())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(CA||xhe){if(PU)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&CA&&PU)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let t=Ue(te({},this.options.current),{onBeforeCreate:(...n)=>{var a,i;return(i=(a=this.options.current).onBeforeCreate)==null?void 0:i.call(a,...n)},onBlur:(...n)=>{var a,i;return(i=(a=this.options.current).onBlur)==null?void 0:i.call(a,...n)},onCreate:(...n)=>{var a,i;return(i=(a=this.options.current).onCreate)==null?void 0:i.call(a,...n)},onDestroy:(...n)=>{var a,i;return(i=(a=this.options.current).onDestroy)==null?void 0:i.call(a,...n)},onFocus:(...n)=>{var a,i;return(i=(a=this.options.current).onFocus)==null?void 0:i.call(a,...n)},onSelectionUpdate:(...n)=>{var a,i;return(i=(a=this.options.current).onSelectionUpdate)==null?void 0:i.call(a,...n)},onTransaction:(...n)=>{var a,i;return(i=(a=this.options.current).onTransaction)==null?void 0:i.call(a,...n)},onUpdate:(...n)=>{var a,i;return(i=(a=this.options.current).onUpdate)==null?void 0:i.call(a,...n)},onContentError:(...n)=>{var a,i;return(i=(a=this.options.current).onContentError)==null?void 0:i.call(a,...n)},onDrop:(...n)=>{var a,i;return(i=(a=this.options.current).onDrop)==null?void 0:i.call(a,...n)},onPaste:(...n)=>{var a,i;return(i=(a=this.options.current).onPaste)==null?void 0:i.call(a,...n)},onDelete:(...n)=>{var a,i;return(i=(a=this.options.current).onDelete)==null?void 0:i.call(a,...n)}});return new _U(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,r){return Object.keys(t).every(n=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)?!0:n==="extensions"&&t.extensions&&r.extensions?t.extensions.length!==r.extensions.length?!1:t.extensions.every((a,i)=>{var o;return a===((o=r.extensions)==null?void 0:o[i])}):t[n]===r[n])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?qU.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions(Ue(te({},this.options.current),{editable:this.editor.isEditable})):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((n,a)=>n===t[a]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,r=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){r&&r.setOptions(this.options.current);return}r&&!r.isDestroyed&&(r.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function $U(e={},t=[]){let r=(0,Wd.useRef)(e);r.current=e;let[n]=(0,Wd.useState)(()=>new vhe(r)),a=(0,H2.useSyncExternalStore)(n.subscribe,n.getEditor,n.getServerSnapshot);return(0,Wd.useDebugValue)(a),(0,Wd.useEffect)(n.onRender(t)),bhe({editor:a,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&i===0?0:i+1}),a}var jU=(0,yv.createContext)({editor:null}),qMe=jU.Consumer;var whe=(0,b3.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var khe=()=>(0,b3.useContext)(whe);var $Me=UU.default.forwardRef((e,t)=>{let{onDragStart:r}=khe(),n=e.as||"div";return(0,KU.jsx)(n,Ue(te({},e),{ref:t,"data-node-view-wrapper":"",onDragStart:r,style:te({whiteSpace:"normal"},e.style)}))});var HMe=VU.default.createContext({markViewContentRef:()=>{}});var AA=(0,Kp.createContext)({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});AA.displayName="TiptapContext";var The=()=>(0,Kp.useContext)(AA);function GU({editor:e,instance:t,children:r}){let n=e!=null?e:t;if(!n)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let a=(0,Kp.useMemo)(()=>({editor:n}),[n]),i=(0,Kp.useMemo)(()=>({editor:n}),[n]);return(0,gv.jsx)(jU.Provider,{value:i,children:(0,gv.jsx)(AA.Provider,{value:a,children:r})})}GU.displayName="Tiptap";function WU(t){var e=Pn(t,[]);let{editor:r}=The();return(0,gv.jsx)(MA,te({editor:r},e))}WU.displayName="Tiptap.Content";var jMe=Object.assign(GU,{Content:WU});var Mm=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let a=t!=null?t:{},{children:r}=a,n=Pn(a,["children"]);if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,n,r]};var Ehe=/^\s*>\s$/,XU=ta.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return Mm("blockquote",Ue(te({},Fr(this.options.HTMLAttributes,e)),{children:Mm("slot",{})}))},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let r=">",n=[];return e.content.forEach(a=>{let s=t.renderChildren([a]).split(`
4009
+ `)}function _pe(e,t,r={}){let{state:n}=t,{doc:a,tr:i}=n,o=e;a.descendants((s,l)=>{let u=i.mapping.map(l),c=i.mapping.map(l)+s.nodeSize,f=null;if(s.marks.forEach(p=>{if(p!==o)return!1;f=p}),!f)return;let d=!1;if(Object.keys(r).forEach(p=>{r[p]!==f.attrs[p]&&(d=!0)}),d){let p=e.type.create(te(te({},e.attrs),r));i.removeMark(u,c,e.type),i.addMark(u,c,p)}}),i.docChanged&&t.view.dispatch(i)}var ta=class TU extends vA{constructor(){super(...arguments),this.type="node"}static create(t={}){let r=typeof t=="function"?t():t;return new TU(r)}configure(t){return super.configure(t)}extend(t){let r=typeof t=="function"?t():t;return super.extend(r)}};function Tl(e){return new dpe({find:e.find,handler:({state:t,range:r,match:n,pasteEvent:a})=>{let i=xn(e.getAttributes,void 0,n,a);if(i===!1||i===null)return null;let{tr:o}=t,s=n[n.length-1],l=n[0],u=r.to;if(s){let c=l.search(/\S/),f=r.from+l.indexOf(s),d=f+s.length;if(lv(r.from,r.to,t.doc).filter(y=>y.mark.type.excluded.find(k=>k===e.type&&k!==y.mark.type)).filter(y=>y.to>f).length)return null;d<r.to&&o.delete(d,r.to),f>r.from&&o.delete(r.from+c,f),u=r.from+c+s.length,o.addMark(r.from+c,u,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}var Wd=Ee(_t(),1);var{getOwnPropertyNames:Ape,getOwnPropertySymbols:Lpe}=Object,{hasOwnProperty:Tpe}=Object.prototype;function SA(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function pv(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);let{cache:i}=a,o=i.get(r),s=i.get(n);if(o&&s)return o===n&&s===r;i.set(r,n),i.set(n,r);let l=e(r,n,a);return i.delete(r),i.delete(n),l}}function Epe(e){return e!=null?e[Symbol.toStringTag]:void 0}function EU(e){return Ape(e).concat(Lpe(e))}var Dpe=Object.hasOwn||((e,t)=>Tpe.call(e,t));function Up(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Ipe="__v",zpe="__o",Bpe="_owner",{getOwnPropertyDescriptor:DU,keys:IU}=Object;function Rpe(e,t){return e.byteLength===t.byteLength&&hv(new Uint8Array(e),new Uint8Array(t))}function Npe(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Ope(e,t){return e.byteLength===t.byteLength&&hv(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Ppe(e,t){return Up(e.getTime(),t.getTime())}function Fpe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function qpe(e,t){return e===t}function zU(e,t,r){let n=e.size;if(n!==t.size)return!1;if(!n)return!0;let a=new Array(n),i=e.entries(),o,s,l=0;for(;(o=i.next())&&!o.done;){let u=t.entries(),c=!1,f=0;for(;(s=u.next())&&!s.done;){if(a[f]){f++;continue}let d=o.value,p=s.value;if(r.equals(d[0],p[0],l,f,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){c=a[f]=!0;break}f++}if(!c)return!1;l++}return!0}var $pe=Up;function Hpe(e,t,r){let n=IU(e),a=n.length;if(IU(t).length!==a)return!1;for(;a-- >0;)if(!RU(e,t,r,n[a]))return!1;return!0}function y3(e,t,r){let n=EU(e),a=n.length;if(EU(t).length!==a)return!1;let i,o,s;for(;a-- >0;)if(i=n[a],!RU(e,t,r,i)||(o=DU(e,i),s=DU(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function jpe(e,t){return Up(e.valueOf(),t.valueOf())}function Upe(e,t){return e.source===t.source&&e.flags===t.flags}function BU(e,t,r){let n=e.size;if(n!==t.size)return!1;if(!n)return!0;let a=new Array(n),i=e.values(),o,s;for(;(o=i.next())&&!o.done;){let l=t.values(),u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!a[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=a[c]=!0;break}c++}if(!u)return!1}return!0}function hv(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Kpe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function RU(e,t,r,n){return(n===Bpe||n===zpe||n===Ipe)&&(e.$$typeof||t.$$typeof)?!0:Dpe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Vpe="[object ArrayBuffer]",Gpe="[object Arguments]",Wpe="[object Boolean]",Xpe="[object DataView]",Ype="[object Date]",Jpe="[object Error]",Zpe="[object Map]",Qpe="[object Number]",ehe="[object Object]",the="[object RegExp]",rhe="[object Set]",nhe="[object String]",ahe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},ihe="[object URL]",ohe=Object.prototype.toString;function she({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:a,areFunctionsEqual:i,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:f,areTypedArraysEqual:d,areUrlsEqual:p,unknownTagComparators:y}){return function(k,w,S){if(k===w)return!0;if(k==null||w==null)return!1;let T=typeof k;if(T!==typeof w)return!1;if(T!=="object")return T==="number"?s(k,w,S):T==="function"?i(k,w,S):!1;let E=k.constructor;if(E!==w.constructor)return!1;if(E===Object)return l(k,w,S);if(Array.isArray(k))return t(k,w,S);if(E===Date)return n(k,w,S);if(E===RegExp)return c(k,w,S);if(E===Map)return o(k,w,S);if(E===Set)return f(k,w,S);let z=ohe.call(k);if(z===Ype)return n(k,w,S);if(z===the)return c(k,w,S);if(z===Zpe)return o(k,w,S);if(z===rhe)return f(k,w,S);if(z===ehe)return typeof k.then!="function"&&typeof w.then!="function"&&l(k,w,S);if(z===ihe)return p(k,w,S);if(z===Jpe)return a(k,w,S);if(z===Gpe)return l(k,w,S);if(ahe[z])return d(k,w,S);if(z===Vpe)return e(k,w,S);if(z===Xpe)return r(k,w,S);if(z===Wpe||z===Qpe||z===nhe)return u(k,w,S);if(y){let N=y[z];if(!N){let O=Epe(k);O&&(N=y[O])}if(N)return N(k,w,S)}return!1}}function lhe({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:Rpe,areArraysEqual:r?y3:Npe,areDataViewsEqual:Ope,areDatesEqual:Ppe,areErrorsEqual:Fpe,areFunctionsEqual:qpe,areMapsEqual:r?SA(zU,y3):zU,areNumbersEqual:$pe,areObjectsEqual:r?y3:Hpe,arePrimitiveWrappersEqual:jpe,areRegExpsEqual:Upe,areSetsEqual:r?SA(BU,y3):BU,areTypedArraysEqual:r?SA(hv,y3):hv,areUrlsEqual:Kpe,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){let a=pv(n.areArraysEqual),i=pv(n.areMapsEqual),o=pv(n.areObjectsEqual),s=pv(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:o,areSetsEqual:s})}return n}function uhe(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function che({circular:e,comparator:t,createState:r,equals:n,strict:a}){if(r)return function(s,l){let{cache:u=e?new WeakMap:void 0,meta:c}=r();return t(s,l,{cache:u,equals:n,meta:c,strict:a})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:a})};let i={cache:void 0,equals:n,meta:void 0,strict:a};return function(s,l){return t(s,l,i)}}var NU=Vd(),AMe=Vd({strict:!0}),LMe=Vd({circular:!0}),TMe=Vd({circular:!0,strict:!0}),EMe=Vd({createInternalComparator:()=>Up}),DMe=Vd({strict:!0,createInternalComparator:()=>Up}),IMe=Vd({circular:!0,createInternalComparator:()=>Up}),zMe=Vd({circular:!0,createInternalComparator:()=>Up,strict:!0});function Vd(e={}){let{circular:t=!1,createInternalComparator:r,createState:n,strict:a=!1}=e,i=lhe(e),o=she(i),s=r?r(o):uhe(o);return che({circular:t,comparator:o,createState:n,equals:s,strict:a})}var Xd=Ee(_t(),1);var mv=Ee(_t());function OU(e,t,r,n,a){let i=(0,mv.useRef)(null);return(0,mv.useSyncExternalStore)(e,()=>{let l=t(),u=n(l);return a&&i.current!==null&&a(i.current,u)?i.current:i.current=u},r?()=>n(r()):void 0)}var HU=Ee($t(),1),b3=Ee(_t(),1),She=Ee($t(),1),UU=Ee(_t(),1),KU=Ee($t(),1);var VU=Ee(_t(),1),Che=Ee(_t(),1),Mhe=Ee(Qh(),1),_he=Ee($t(),1),Ahe=Ee($t(),1);var _A=Ee(_t(),1),Lhe=Ee($t(),1),Kp=Ee(_t(),1),gv=Ee($t(),1);var dhe=(...e)=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r&&(r.current=t)})},fhe=({contentComponent:e})=>{let t=(0,H2.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,p0.jsx)(p0.Fragment,{children:Object.values(t)})};function phe(){let e=new Set,t={};return{subscribe(r){return e.add(r),()=>{e.delete(r)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(r,n){t=Ue(te({},t),{[r]:FU.default.createPortal(n.reactElement,n.element,r)}),e.forEach(a=>a())},removeRenderer(r){let n=te({},t);delete n[r],t=n,e.forEach(a=>a())}}}var hhe=class extends Gd.default.Component{constructor(e){var t;super(e),this.editorContentRef=Gd.default.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&((e=t.view.dom)!=null&&e.parentNode)){if(t.contentComponent)return;let r=this.editorContentRef.current;r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r}),t.contentComponent=phe(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.parentNode))return;let r=document.createElement("div");r.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:r})}catch(r){}}}render(){let n=this.props,{editor:e,innerRef:t}=n,r=Pn(n,["editor","innerRef"]);return(0,p0.jsxs)(p0.Fragment,{children:[(0,p0.jsx)("div",te({ref:dhe(t,this.editorContentRef)},r)),(e==null?void 0:e.contentComponent)&&(0,p0.jsx)(fhe,{contentComponent:e.contentComponent})]})}},mhe=(0,Gd.forwardRef)((e,t)=>{let r=Gd.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Gd.default.createElement(hhe,te({key:r,innerRef:t},e))}),MA=Gd.default.memo(mhe),ghe=typeof window!="undefined"?Xd.useLayoutEffect:Xd.useEffect,yhe=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let t=()=>{this.transactionNumber+=1,this.subscribers.forEach(n=>n())},r=this.editor;return r.on("transaction",t),()=>{r.off("transaction",t)}}}};function bhe(e){var t;let[r]=(0,Xd.useState)(()=>new yhe(e.editor)),n=OU(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:NU);return ghe(()=>r.watch(e.editor),[e.editor,r]),(0,Xd.useDebugValue)(n),n}var PU=!1,CA=typeof window=="undefined",xhe=CA||!!(typeof window!="undefined"&&window.next),vhe=class qU{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(r=>r())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(CA||xhe){if(PU)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&CA&&PU)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let t=Ue(te({},this.options.current),{onBeforeCreate:(...n)=>{var a,i;return(i=(a=this.options.current).onBeforeCreate)==null?void 0:i.call(a,...n)},onBlur:(...n)=>{var a,i;return(i=(a=this.options.current).onBlur)==null?void 0:i.call(a,...n)},onCreate:(...n)=>{var a,i;return(i=(a=this.options.current).onCreate)==null?void 0:i.call(a,...n)},onDestroy:(...n)=>{var a,i;return(i=(a=this.options.current).onDestroy)==null?void 0:i.call(a,...n)},onFocus:(...n)=>{var a,i;return(i=(a=this.options.current).onFocus)==null?void 0:i.call(a,...n)},onSelectionUpdate:(...n)=>{var a,i;return(i=(a=this.options.current).onSelectionUpdate)==null?void 0:i.call(a,...n)},onTransaction:(...n)=>{var a,i;return(i=(a=this.options.current).onTransaction)==null?void 0:i.call(a,...n)},onUpdate:(...n)=>{var a,i;return(i=(a=this.options.current).onUpdate)==null?void 0:i.call(a,...n)},onContentError:(...n)=>{var a,i;return(i=(a=this.options.current).onContentError)==null?void 0:i.call(a,...n)},onDrop:(...n)=>{var a,i;return(i=(a=this.options.current).onDrop)==null?void 0:i.call(a,...n)},onPaste:(...n)=>{var a,i;return(i=(a=this.options.current).onPaste)==null?void 0:i.call(a,...n)},onDelete:(...n)=>{var a,i;return(i=(a=this.options.current).onDelete)==null?void 0:i.call(a,...n)}});return new _U(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,r){return Object.keys(t).every(n=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)?!0:n==="extensions"&&t.extensions&&r.extensions?t.extensions.length!==r.extensions.length?!1:t.extensions.every((a,i)=>{var o;return a===((o=r.extensions)==null?void 0:o[i])}):t[n]===r[n])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?qU.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions(Ue(te({},this.options.current),{editable:this.editor.isEditable})):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((n,a)=>n===t[a]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){let t=this.instanceId,r=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){r&&r.setOptions(this.options.current);return}r&&!r.isDestroyed&&(r.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function $U(e={},t=[]){let r=(0,Wd.useRef)(e);r.current=e;let[n]=(0,Wd.useState)(()=>new vhe(r)),a=(0,H2.useSyncExternalStore)(n.subscribe,n.getEditor,n.getServerSnapshot);return(0,Wd.useDebugValue)(a),(0,Wd.useEffect)(n.onRender(t)),bhe({editor:a,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&i===0?0:i+1}),a}var jU=(0,yv.createContext)({editor:null}),$Me=jU.Consumer;var whe=(0,b3.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var khe=()=>(0,b3.useContext)(whe);var HMe=UU.default.forwardRef((e,t)=>{let{onDragStart:r}=khe(),n=e.as||"div";return(0,KU.jsx)(n,Ue(te({},e),{ref:t,"data-node-view-wrapper":"",onDragStart:r,style:te({whiteSpace:"normal"},e.style)}))});var jMe=VU.default.createContext({markViewContentRef:()=>{}});var AA=(0,Kp.createContext)({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});AA.displayName="TiptapContext";var The=()=>(0,Kp.useContext)(AA);function GU({editor:e,instance:t,children:r}){let n=e!=null?e:t;if(!n)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let a=(0,Kp.useMemo)(()=>({editor:n}),[n]),i=(0,Kp.useMemo)(()=>({editor:n}),[n]);return(0,gv.jsx)(jU.Provider,{value:i,children:(0,gv.jsx)(AA.Provider,{value:a,children:r})})}GU.displayName="Tiptap";function WU(t){var e=Pn(t,[]);let{editor:r}=The();return(0,gv.jsx)(MA,te({editor:r},e))}WU.displayName="Tiptap.Content";var UMe=Object.assign(GU,{Content:WU});var Mm=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let a=t!=null?t:{},{children:r}=a,n=Pn(a,["children"]);if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,n,r]};var Ehe=/^\s*>\s$/,XU=ta.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return Mm("blockquote",Ue(te({},Fr(this.options.HTMLAttributes,e)),{children:Mm("slot",{})}))},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let r=">",n=[];return e.content.forEach(a=>{let s=t.renderChildren([a]).split(`
4010
4010
  `).map(l=>l.trim()===""?r:`${r} ${l}`);n.push(s.join(`
4011
4011
  `))}),n.join(`
4012
4012
  ${r}
@@ -4046,7 +4046,7 @@ ${p.slice(u+2)}`,f+=1;else break}t.push({indent:u,number:parseInt(s,10),content:
4046
4046
  `):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/),r=t==null?void 0:t.index;return r!==void 0?r:-1},tokenize:(e,t,r)=>{var n;let a=e.split(`
4047
4047
  `),[i,o]=b1e(a);if(i.length===0)return;let s=EK(i,0,r);return s.length===0?void 0:{type:"list",ordered:!0,start:((n=i[0])==null?void 0:n.number)||1,items:s,raw:a.slice(0,o).join(`
4048
4048
  `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(v1e,this.editor.getAttributes(SK)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=ec({find:CK,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,r)=>r.childCount+r.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=ec({find:CK,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>te({start:+t[1]},this.editor.getAttributes(SK)),joinPredicate:(t,r)=>r.childCount+r.attrs.start===+t[1],editor:this.editor})),[e]}}),w1e=/^\s*(\[([( |x])?\])\s$/,k1e=ta.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",Fr(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let r=[];if(e.tokens&&e.tokens.length>0?r.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?r.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):r.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let n=t.parseChildren(e.nestedTokens);r.push(...n)}return t.createNode("taskItem",{checked:e.checked||!1},r)},renderMarkdown:(e,t)=>{var r;let a=`- [${(r=e.attrs)!=null&&r.checked?"x":" "}] `;return g3(e,t,a)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?Ue(te({},e),{Tab:()=>this.editor.commands.sinkListItem(this.name)}):e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:r,editor:n})=>{let a=document.createElement("li"),i=document.createElement("label"),o=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div"),u=f=>{var d,p;s.ariaLabel=((p=(d=this.options.a11y)==null?void 0:d.checkboxLabel)==null?void 0:p.call(d,f,s.checked))||`Task item checkbox for ${f.textContent||"empty task item"}`};u(e),i.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",f=>f.preventDefault()),s.addEventListener("change",f=>{if(!n.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:d}=f.target;n.isEditable&&typeof r=="function"&&n.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:p})=>{let y=r();if(typeof y!="number")return!1;let x=p.doc.nodeAt(y);return p.setNodeMarkup(y,void 0,Ue(te({},x==null?void 0:x.attrs),{checked:d})),!0}).run(),!n.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,d)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([f,d])=>{a.setAttribute(f,d)}),a.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,i.append(s,o),a.append(i,l),Object.entries(t).forEach(([f,d])=>{a.setAttribute(f,d)});let c=new Set(Object.keys(t));return{dom:a,contentDOM:l,update:f=>{if(f.type!==this.type)return!1;a.dataset.checked=f.attrs.checked,s.checked=f.attrs.checked,u(f);let d=n.extensionManager.attributes,p=Cm(f,d),y=new Set(Object.keys(p)),x=this.options.HTMLAttributes;return c.forEach(k=>{y.has(k)||(k in x?a.setAttribute(k,x[k]):a.removeAttribute(k))}),Object.entries(p).forEach(([k,w])=>{w==null?k in x?a.setAttribute(k,x[k]):a.removeAttribute(k):a.setAttribute(k,w)}),c=y,!0}}}},addInputRules(){return[ec({find:w1e,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),S1e=ta.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",Fr(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
4049
- `):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let r=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return r!==void 0?r:-1},tokenize(e,t,r){let n=i=>{let o=fv(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,l)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:r.inlineTokens(s.mainContent),nestedTokens:l}),customNestedParser:n},r);return o?[{type:"taskList",raw:o.raw,items:o.items}]:r.blockTokens(i)},a=fv(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,o)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:r.inlineTokens(i.mainContent),nestedTokens:o}),customNestedParser:n},r);if(a)return{type:"taskList",raw:a.raw,items:a.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),V_e=on.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(eL.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(tL.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(nL.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(aL.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(k1e.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(S1e.configure(this.options.taskList)),e}});var DK="&nbsp;",C1e="\xA0",IK=ta.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Fr(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let r=e.tokens||[];if(r.length===1&&r[0].type==="image")return t.parseChildren([r[0]]);let n=t.parseInline(r);return n.length===1&&n[0].type==="text"&&(n[0].text===DK||n[0].text===C1e)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,n)},renderMarkdown:(e,t)=>{if(!e)return"";let r=Array.isArray(e.content)?e.content:[];return r.length===0?DK:t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var M1e=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,_1e=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,zK=qs.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Fr(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Qu({find:M1e,type:this.type})]},addPasteRules(){return[Tl({find:_1e,type:this.type})]}});var BK=ta.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var RK=qs.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",Fr(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,r){let a=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!a)return;let i=a[2].trim();return{type:"underline",raw:a[0],text:i,tokens:r.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function NK(e={}){return new dr({view(t){return new iL(t,e)}})}var iL=class{constructor(t,r){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(n=r.width)!==null&&n!==void 0?n:1,this.color=r.color===!1?void 0:r.color||"black",this.class=r.class,this.handlers=["dragover","dragend","drop","dragleave"].map(a=>{let i=o=>{this[a](o)};return t.dom.addEventListener(a,i),{name:a,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:r})=>this.editorView.dom.removeEventListener(t,r))}update(t,r){this.cursorPos!=null&&r.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),r=!t.parent.inlineContent,n,a=this.editorView.dom,i=a.getBoundingClientRect(),o=i.width/a.offsetWidth,s=i.height/a.offsetHeight;if(r){let f=t.nodeBefore,d=t.nodeAfter;if(f||d){let p=this.editorView.nodeDOM(this.cursorPos-(f?f.nodeSize:0));if(p){let y=p.getBoundingClientRect(),x=f?y.bottom:y.top;f&&d&&(x=(x+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let k=this.width/2*s;n={left:y.left,right:y.right,top:x-k,bottom:x+k}}}}if(!n){let f=this.editorView.coordsAtPos(this.cursorPos),d=this.width/2*o;n={left:f.left-d,right:f.left+d,top:f.top,bottom:f.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let f=l.getBoundingClientRect(),d=f.width/l.offsetWidth,p=f.height/l.offsetHeight;u=f.left-l.scrollLeft*d,c=f.top-l.scrollTop*p}this.element.style.left=(n.left-u)/o+"px",this.element.style.top=(n.top-c)/s+"px",this.element.style.width=(n.right-n.left)/o+"px",this.element.style.height=(n.bottom-n.top)/s+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let r=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=r&&r.inside>=0&&this.editorView.state.doc.nodeAt(r.inside),a=n&&n.type.spec.disableDropCursor,i=typeof a=="function"?a(this.editorView,r,t):a;if(r&&!i){let o=r.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=Dx(this.editorView.state.doc,o,this.editorView.dragging.slice);s!=null&&(o=s)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var po=class e extends ir{constructor(t){super(t,t)}map(t,r){let n=t.resolve(r.map(this.head));return e.valid(n)?new e(n):ir.near(n)}content(){return Ct.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(r.pos))}getBookmark(){return new oL(this.anchor)}static valid(t){let r=t.parent;if(r.isTextblock||!A1e(t)||!L1e(t))return!1;let n=r.type.spec.allowGapCursor;if(n!=null)return n;let a=r.contentMatchAt(t.index()).defaultType;return a&&a.isTextblock}static findGapCursorFrom(t,r,n=!1){e:for(;;){if(!n&&e.valid(t))return t;let a=t.pos,i=null;for(let o=t.depth;;o--){let s=t.node(o);if(r>0?t.indexAfter(o)<s.childCount:t.index(o)>0){i=s.child(r>0?t.indexAfter(o):t.index(o)-1);break}else if(o==0)return null;a+=r;let l=t.doc.resolve(a);if(e.valid(l))return l}for(;;){let o=r>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!Pt.isSelectable(i)){t=t.doc.resolve(a+i.nodeSize*r),n=!1;continue e}break}i=o,a+=r;let s=t.doc.resolve(a);if(e.valid(s))return s}return null}}};po.prototype.visible=!1;po.findFrom=po.findGapCursorFrom;ir.jsonID("gapcursor",po);var oL=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let r=t.resolve(this.pos);return po.valid(r)?new po(r):ir.near(r)}};function OK(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function A1e(e){for(let t=e.depth;t>=0;t--){let r=e.index(t),n=e.node(t);if(r==0){if(n.type.spec.isolating)return!0;continue}for(let a=n.child(r-1);;a=a.lastChild){if(a.childCount==0&&!a.inlineContent||OK(a.type))return!0;if(a.inlineContent)return!1}}return!0}function L1e(e){for(let t=e.depth;t>=0;t--){let r=e.indexAfter(t),n=e.node(t);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let a=n.child(r);;a=a.firstChild){if(a.childCount==0&&!a.inlineContent||OK(a.type))return!0;if(a.inlineContent)return!1}}return!0}function PK(){return new dr({props:{decorations:I1e,createSelectionBetween(e,t,r){return t.pos==r.pos&&po.valid(r)?new po(r):null},handleClick:E1e,handleKeyDown:T1e,handleDOMEvents:{beforeinput:D1e}}})}var T1e=sA({ArrowLeft:Zv("horiz",-1),ArrowRight:Zv("horiz",1),ArrowUp:Zv("vert",-1),ArrowDown:Zv("vert",1)});function Zv(e,t){let r=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(n,a,i){let o=n.selection,s=t>0?o.$to:o.$from,l=o.empty;if(o instanceof Vt){if(!i.endOfTextblock(r)||s.depth==0)return!1;l=!1,s=n.doc.resolve(t>0?s.after():s.before())}let u=po.findGapCursorFrom(s,t,l);return u?(a&&a(n.tr.setSelection(new po(u))),!0):!1}}function E1e(e,t,r){if(!e||!e.editable)return!1;let n=e.state.doc.resolve(t);if(!po.valid(n))return!1;let a=e.posAtCoords({left:r.clientX,top:r.clientY});return a&&a.inside>-1&&Pt.isSelectable(e.state.doc.nodeAt(a.inside))?!1:(e.dispatch(e.state.tr.setSelection(new po(n))),!0)}function D1e(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof po))return!1;let{$from:r}=e.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(e.state.schema.nodes.text);if(!n)return!1;let a=at.empty;for(let o=n.length-1;o>=0;o--)a=at.from(n[o].createAndFill(null,a));let i=e.state.tr.replace(r.pos,r.pos,new Ct(a,0,0));return i.setSelection(Vt.near(i.doc.resolve(r.pos+1))),e.dispatch(i),!1}function I1e(e){if(!(e.selection instanceof po))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Wa.create(e.doc,[fo.widget(e.selection.head,t,{key:"gapcursor"})])}var Qv=200,Wi=function(){};Wi.prototype.append=function(t){return t.length?(t=Wi.from(t),!this.length&&t||t.length<Qv&&this.leafAppend(t)||this.length<Qv&&t.leafPrepend(this)||this.appendInner(t)):this};Wi.prototype.prepend=function(t){return t.length?Wi.from(t).append(this):this};Wi.prototype.appendInner=function(t){return new z1e(this,t)};Wi.prototype.slice=function(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.length),t>=r?Wi.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,r))};Wi.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Wi.prototype.forEach=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length),r<=n?this.forEachInner(t,r,n,0):this.forEachInvertedInner(t,r,n,0)};Wi.prototype.map=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length);var a=[];return this.forEach(function(i,o){return a.push(t(i,o))},r,n),a};Wi.from=function(t){return t instanceof Wi?t:t&&t.length?new FK(t):Wi.empty};var FK=(function(e){function t(n){e.call(this),this.values=n}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(a,i){return a==0&&i==this.length?this:new t(this.values.slice(a,i))},t.prototype.getInner=function(a){return this.values[a]},t.prototype.forEachInner=function(a,i,o,s){for(var l=i;l<o;l++)if(a(this.values[l],s+l)===!1)return!1},t.prototype.forEachInvertedInner=function(a,i,o,s){for(var l=i-1;l>=o;l--)if(a(this.values[l],s+l)===!1)return!1},t.prototype.leafAppend=function(a){if(this.length+a.length<=Qv)return new t(this.values.concat(a.flatten()))},t.prototype.leafPrepend=function(a){if(this.length+a.length<=Qv)return new t(a.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(t.prototype,r),t})(Wi);Wi.empty=new FK([]);var z1e=(function(e){function t(r,n){e.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},t.prototype.forEachInner=function(n,a,i,o){var s=this.left.length;if(a<s&&this.left.forEachInner(n,a,Math.min(i,s),o)===!1||i>s&&this.right.forEachInner(n,Math.max(a-s,0),Math.min(this.length,i)-s,o+s)===!1)return!1},t.prototype.forEachInvertedInner=function(n,a,i,o){var s=this.left.length;if(a>s&&this.right.forEachInvertedInner(n,a-s,Math.max(i,s)-s,o+s)===!1||i<s&&this.left.forEachInvertedInner(n,Math.min(a,s),i,o)===!1)return!1},t.prototype.sliceInner=function(n,a){if(n==0&&a==this.length)return this;var i=this.left.length;return a<=i?this.left.slice(n,a):n>=i?this.right.slice(n-i,a-i):this.left.slice(n,i).append(this.right.slice(0,a-i))},t.prototype.leafAppend=function(n){var a=this.right.leafAppend(n);if(a)return new t(this.left,a)},t.prototype.leafPrepend=function(n){var a=this.left.leafPrepend(n);if(a)return new t(a,this.right)},t.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new t(this.left,new t(this.right,n)):new t(this,n)},t})(Wi),sL=Wi;var B1e=500,Xp=class e{constructor(t,r){this.items=t,this.eventCount=r}popEvent(t,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let a,i;r&&(a=this.remapping(n,this.items.length),i=a.maps.length);let o=t.tr,s,l,u=[],c=[];return this.items.forEach((f,d)=>{if(!f.step){a||(a=this.remapping(n,d+1),i=a.maps.length),i--,c.push(f);return}if(a){c.push(new nc(f.map));let p=f.step.map(a.slice(i)),y;p&&o.maybeStep(p).doc&&(y=o.mapping.maps[o.mapping.maps.length-1],u.push(new nc(y,void 0,void 0,u.length+c.length))),i--,y&&a.appendMap(y,i)}else o.maybeStep(f.step);if(f.selection)return s=a?f.selection.map(a.slice(i)):f.selection,l=new e(this.items.slice(0,n).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:s}}addTransform(t,r,n,a){let i=[],o=this.eventCount,s=this.items,l=!a&&s.length?s.get(s.length-1):null;for(let c=0;c<t.steps.length;c++){let f=t.steps[c].invert(t.docs[c]),d=new nc(t.mapping.maps[c],f,r),p;(p=l&&l.merge(d))&&(d=p,c?i.pop():s=s.slice(0,s.length-1)),i.push(d),r&&(o++,r=void 0),a||(l=d)}let u=o-n.depth;return u>N1e&&(s=R1e(s,u),o-=u),new e(s.append(i),o)}remapping(t,r){let n=new Y2;return this.items.forEach((a,i)=>{let o=a.mirrorOffset!=null&&i-a.mirrorOffset>=t?n.maps.length-a.mirrorOffset:void 0;n.appendMap(a.map,o)},t,r),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(r=>new nc(r))),this.eventCount)}rebased(t,r){if(!this.eventCount)return this;let n=[],a=Math.max(0,this.items.length-r),i=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(d=>{d.selection&&s--},a);let l=r;this.items.forEach(d=>{let p=i.getMirror(--l);if(p==null)return;o=Math.min(o,p);let y=i.maps[p];if(d.step){let x=t.steps[p].invert(t.docs[p]),k=d.selection&&d.selection.map(i.slice(l+1,p));k&&s++,n.push(new nc(y,x,k))}else n.push(new nc(y))},a);let u=[];for(let d=r;d<o;d++)u.push(new nc(i.maps[d]));let c=this.items.slice(0,a).append(u).append(n),f=new e(c,s);return f.emptyItemCount()>B1e&&(f=f.compress(this.items.length-n.length)),f}emptyItemCount(){let t=0;return this.items.forEach(r=>{r.step||t++}),t}compress(t=this.items.length){let r=this.remapping(0,t),n=r.maps.length,a=[],i=0;return this.items.forEach((o,s)=>{if(s>=t)a.push(o),o.selection&&i++;else if(o.step){let l=o.step.map(r.slice(n)),u=l&&l.getMap();if(n--,u&&r.appendMap(u,n),l){let c=o.selection&&o.selection.map(r.slice(n));c&&i++;let f=new nc(u.invert(),l,c),d,p=a.length-1;(d=a.length&&a[p].merge(f))?a[p]=d:a.push(f)}}else o.map&&n--},this.items.length,0),new e(sL.from(a.reverse()),i)}};Xp.empty=new Xp(sL.empty,0);function R1e(e,t){let r;return e.forEach((n,a)=>{if(n.selection&&t--==0)return r=a,!1}),e.slice(r)}var nc=class e{constructor(t,r,n,a){this.map=t,this.step=r,this.selection=n,this.mirrorOffset=a}merge(t){if(this.step&&t.step&&!t.selection){let r=t.step.merge(this.step);if(r)return new e(r.getMap().invert(),r,this.selection)}}},ac=class{constructor(t,r,n,a,i){this.done=t,this.undone=r,this.prevRanges=n,this.prevTime=a,this.prevComposition=i}},N1e=20;function O1e(e,t,r,n){let a=r.getMeta(Wp),i;if(a)return a.historyState;r.getMeta(q1e)&&(e=new ac(e.done,e.undone,null,0,-1));let o=r.getMeta("appendedTransaction");if(r.steps.length==0)return e;if(o&&o.getMeta(Wp))return o.getMeta(Wp).redo?new ac(e.done.addTransform(r,void 0,n,e7(t)),e.undone,qK(r.mapping.maps),e.prevTime,e.prevComposition):new ac(e.done,e.undone.addTransform(r,void 0,n,e7(t)),null,e.prevTime,e.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let s=r.getMeta("composition"),l=e.prevTime==0||!o&&e.prevComposition!=s&&(e.prevTime<(r.time||0)-n.newGroupDelay||!P1e(r,e.prevRanges)),u=o?lL(e.prevRanges,r.mapping):qK(r.mapping.maps);return new ac(e.done.addTransform(r,l?t.selection.getBookmark():void 0,n,e7(t)),Xp.empty,u,r.time,s==null?e.prevComposition:s)}else return(i=r.getMeta("rebased"))?new ac(e.done.rebased(r,i),e.undone.rebased(r,i),lL(e.prevRanges,r.mapping),e.prevTime,e.prevComposition):new ac(e.done.addMaps(r.mapping.maps),e.undone.addMaps(r.mapping.maps),lL(e.prevRanges,r.mapping),e.prevTime,e.prevComposition)}function P1e(e,t){if(!t)return!1;if(!e.docChanged)return!0;let r=!1;return e.mapping.maps[0].forEach((n,a)=>{for(let i=0;i<t.length;i+=2)n<=t[i+1]&&a>=t[i]&&(r=!0)}),r}function qK(e){let t=[];for(let r=e.length-1;r>=0&&t.length==0;r--)e[r].forEach((n,a,i,o)=>t.push(i,o));return t}function lL(e,t){if(!e)return null;let r=[];for(let n=0;n<e.length;n+=2){let a=t.map(e[n],1),i=t.map(e[n+1],-1);a<=i&&r.push(a,i)}return r}function F1e(e,t,r){let n=e7(t),a=Wp.get(t).spec.config,i=(r?e.undone:e.done).popEvent(t,n);if(!i)return null;let o=i.selection.resolve(i.transform.doc),s=(r?e.done:e.undone).addTransform(i.transform,t.selection.getBookmark(),a,n),l=new ac(r?s:i.remaining,r?i.remaining:s,null,0,-1);return i.transform.setSelection(o).setMeta(Wp,{redo:r,historyState:l})}var uL=!1,$K=null;function e7(e){let t=e.plugins;if($K!=t){uL=!1,$K=t;for(let r=0;r<t.length;r++)if(t[r].spec.historyPreserveItems){uL=!0;break}}return uL}var Wp=new Tr("history"),q1e=new Tr("closeHistory");function HK(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new dr({key:Wp,state:{init(){return new ac(Xp.empty,Xp.empty,null,0,-1)},apply(t,r,n){return O1e(r,n,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,r){let n=r.inputType,a=n=="historyUndo"?cL:n=="historyRedo"?dL:null;return!a||!t.editable?!1:(r.preventDefault(),a(t.state,t.dispatch))}}}})}function t7(e,t){return(r,n)=>{let a=Wp.getState(r);if(!a||(e?a.undone:a.done).eventCount==0)return!1;if(n){let i=F1e(a,r,e);i&&n(t?i.scrollIntoView():i)}return!0}}var cL=t7(!1,!0),dL=t7(!0,!0),xAe=t7(!1,!1),vAe=t7(!0,!1);var _Ae=on.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){let n=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(n)}return t.nodeSize},this.storage.words=e=>{let t=(e==null?void 0:e.node)||this.editor.state.doc,r=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(r)}},addProseMirrorPlugins(){let e=!1;return[new dr({key:new Tr("characterCount"),appendTransaction:(t,r,n)=>{if(e)return;let a=this.options.limit;if(a==null||a===0){e=!0;return}let i=this.storage.characters({node:n.doc});if(i>a){let o=i-a,s=0,l=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${a} characters. Content was automatically trimmed.`);let u=n.tr.deleteRange(s,l);return e=!0,u}e=!0},filterTransaction:(t,r)=>{let n=this.options.limit;if(!t.docChanged||n===0||n===null||n===void 0)return!0;let a=this.storage.characters({node:r.doc}),i=this.storage.characters({node:t.doc});if(i<=n||a>n&&i>n&&i<=a)return!0;if(a>n&&i>n&&i>a||!t.getMeta("paste"))return!1;let s=t.selection.$head.pos,l=i-n,u=s-l,c=s;return t.deleteRange(u,c),!(this.storage.characters({node:t.doc})>n)}})]}}),KK=on.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[NK(this.options)]}}),IAe=on.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new dr({key:new Tr("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:r,isFocused:n}=this.editor,{anchor:a}=t,i=[];if(!r||!n)return Wa.create(e,[]);let o=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(l.isText)return;if(!(a>=u&&a<=u+l.nodeSize-1))return!1;o+=1});let s=0;return e.descendants((l,u)=>{if(l.isText||!(a>=u&&a<=u+l.nodeSize-1))return!1;if(s+=1,this.options.mode==="deepest"&&o-s>0||this.options.mode==="shallowest"&&s>1)return this.options.mode==="deepest";i.push(fo.node(u,u+l.nodeSize,{class:this.options.className}))}),Wa.create(e,i)}}})]}}),VK=on.create({name:"gapCursor",addProseMirrorPlugins(){return[PK()]},extendNodeSchema(e){var t;let r={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=xn(jt(e,"allowGapCursor",r)))!=null?t:null}}}),jK="placeholder";function $1e(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var PAe=on.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:jK,placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${$1e(this.options.dataAttribute)}`:`data-${jK}`;return[new dr({key:new Tr("placeholder"),props:{decorations:({doc:t,selection:r})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:a}=r,i=[];if(!n)return null;let o=this.editor.isEmpty;return t.descendants((s,l)=>{let u=a>=l&&a<=l+s.nodeSize,c=!s.isLeaf&&h3(s);if((u||!this.options.showOnlyCurrent)&&c){let f=[this.options.emptyNodeClass];o&&f.push(this.options.emptyEditorClass);let d=fo.node(l,l+s.nodeSize,{class:f.join(" "),[e]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:l,hasAnchor:u}):this.options.placeholder});i.push(d)}return this.options.includeChildren}),Wa.create(t,i)}}})]}}),HAe=on.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new dr({key:new Tr("selection"),props:{decorations(r){return r.selection.empty||e.isFocused||!e.isEditable||uv(r.selection)||e.view.dragging?null:Wa.create(r.doc,[fo.inline(r.selection.from,r.selection.to,{class:t.className})])}}})]}});function UK({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}var GK=on.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Tr(this.name),r=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",n=Object.entries(this.editor.schema.nodes).map(([,a])=>a).filter(a=>(this.options.notAfter||[]).concat(r).includes(a.name));return[new dr({key:t,appendTransaction:(a,i,o)=>{let{doc:s,tr:l,schema:u}=o,c=t.getState(o),f=s.content.size,d=u.nodes[r];if(c)return l.insert(f,d.create())},state:{init:(a,i)=>{let o=i.tr.doc.lastChild;return!UK({node:o,types:n})},apply:(a,i)=>{if(!a.docChanged||a.getMeta("__uniqueIDTransaction"))return i;let o=a.doc.lastChild;return!UK({node:o,types:n})}}})]}}),WK=on.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>cL(e,t),redo:()=>({state:e,dispatch:t})=>dL(e,t)}},addProseMirrorPlugins(){return[HK(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var H1e=on.create({name:"starterKit",addExtensions(){var e,t,r,n;let a=[];return this.options.bold!==!1&&a.push(YU.configure(this.options.bold)),this.options.blockquote!==!1&&a.push(XU.configure(this.options.blockquote)),this.options.bulletList!==!1&&a.push(eL.configure(this.options.bulletList)),this.options.code!==!1&&a.push(JU.configure(this.options.code)),this.options.codeBlock!==!1&&a.push(ZU.configure(this.options.codeBlock)),this.options.document!==!1&&a.push(QU.configure(this.options.document)),this.options.dropcursor!==!1&&a.push(KK.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&a.push(VK.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&a.push(eK.configure(this.options.hardBreak)),this.options.heading!==!1&&a.push(tK.configure(this.options.heading)),this.options.undoRedo!==!1&&a.push(WK.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&a.push(rK.configure(this.options.horizontalRule)),this.options.italic!==!1&&a.push(nK.configure(this.options.italic)),this.options.listItem!==!1&&a.push(tL.configure(this.options.listItem)),this.options.listKeymap!==!1&&a.push(nL.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&a.push(xK.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&a.push(aL.configure(this.options.orderedList)),this.options.paragraph!==!1&&a.push(IK.configure(this.options.paragraph)),this.options.strike!==!1&&a.push(zK.configure(this.options.strike)),this.options.text!==!1&&a.push(BK.configure(this.options.text)),this.options.underline!==!1&&a.push(RK.configure((r=this.options)==null?void 0:r.underline)),this.options.trailingNode!==!1&&a.push(GK.configure((n=this.options)==null?void 0:n.trailingNode)),a}}),fL=H1e;function XK(e){return e.trim().split(/\s+/).filter(Boolean).length}function YK(e){return e.length}function j1e(e){let t=r=>r.map(n=>{var a;return((a=n.text)!=null?a:"")+(n.content?t(n.content):"")}).join(" ");return XK(t(e))}function U1e(e){let t=r=>r.map(n=>{var a;return((a=n.text)!=null?a:"")+(n.content?t(n.content):"")}).join("");return YK(t(e))}function K1e(e){return/youtube\.com|youtu\.be/i.test(e)?"youtube":/vimeo\.com/i.test(e)?"vimeo":"other"}function V1e(e){let t=e.match(/[?&]v=([^&]+)/)||e.match(/youtu\.be\/([^?]+)/)||e.match(/embed\/([^?]+)/);return t?t[1]:null}function pL(e){let t=Math.floor(e/60),r=e%60;return`${t}:${r.toString().padStart(2,"0")}`}function ox({node:e,validationFeedback:t,readOnly:r=!1,mediaHandler:n}){var J;let a=Li(),i=Yn(),{id:o,attrs:s}=e,{mode:l,placeholder:u,allowFormatting:c,wordLimit:f,characterLimit:d,allowedTypes:p,allowMultiple:y,fileInstructions:x,maxDuration:k,hint:w}=s,S=r||((J=t==null?void 0:t.showFeedback)!=null?J:!1),T=t==null?void 0:t.state,E=(0,Gt.useRef)(null),z=(0,Gt.useCallback)(K=>{E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{var ye;let Y=(ye=K.files)==null?void 0:ye.map(se=>({url:se.url,mimeType:se.kind==="videoLink"?"video/x-link":se.mimeType,name:se.kind==="videoLink"?void 0:se.name,duration:se.kind==="videoLink"?void 0:se.duration}));a.emit({type:"answer:changed",answer:{nodeId:o,type:"openResponse",timestamp:Date.now(),answer:Ue(te({},K),{files:Y})}})},300)},[o,a]);(0,Gt.useEffect)(()=>{z({})},[]);let[N,O]=(0,Gt.useState)([]);(0,Gt.useEffect)(()=>{(l==="file"||l==="text+file")&&l==="file"&&z({files:N})},[N,l]),(0,Gt.useEffect)(()=>{let K=()=>{O([])};return a.on("answers:reset",K),()=>a.off("answers:reset",K)},[a]),(0,Gt.useEffect)(()=>{let K=Y=>{var ue,Se;let se=((ue=Y.answers)!=null?ue:[]).find(Me=>Me.nodeId===o&&Me.type==="openResponse");se&&(E.current&&(clearTimeout(E.current),E.current=null),(Se=se.answer)!=null&&Se.files&&O(se.answer.files))};return a.on("answers:prefill",K),()=>a.off("answers:prefill",K)},[o,a]);let H=t==null?void 0:t.showFeedback,U=hr(!H&&"player-or-field--pre",H&&T==="correct"&&"player-or-field--correct",H&&T==="partial"&&"player-or-field--partial",H&&T==="incorrect"&&"player-or-field--incorrect",H&&T==="awaiting_review"&&"player-or-field--review");return(0,$e.jsxs)("div",{className:"my-3 space-y-2",children:[!S&&w&&w.length>0&&(0,$e.jsx)("div",{className:"flex justify-end",children:(0,$e.jsx)(Od,{hint:w})}),l==="text"&&(0,$e.jsx)(JK,{nodeId:o,placeholder:u,allowFormatting:c,wordLimit:f,characterLimit:d,isDisabled:S,feedbackBorderClass:U,emitAnswer:K=>z({text:K}),answerBus:a}),l==="file"&&(0,$e.jsx)(hL,{allowedTypes:p!=null?p:["image"],allowMultiple:!!y,fileInstructions:x,isDisabled:S,feedbackBorderClass:U,files:N,setFiles:O,mediaHandler:n,t:i}),(l==="audio"||l==="video"||l==="screen")&&(0,$e.jsx)(rme,{nodeId:o,answerBus:a,kind:l,maxDuration:k,isDisabled:S,feedbackBorderClass:U,mediaHandler:n,emitAnswer:K=>z({recording:K}),t:i}),l==="text+file"&&(0,$e.jsx)(Y1e,{nodeId:o,placeholder:u,allowFormatting:c,wordLimit:f,characterLimit:d,allowedTypes:p!=null?p:["image"],allowMultiple:!!y,fileInstructions:x,isDisabled:S,feedbackBorderClass:U,files:N,setFiles:O,emitAnswer:z,answerBus:a,mediaHandler:n,t:i}),(t==null?void 0:t.showFeedback)&&T==="awaiting_review"&&(0,$e.jsxs)("div",{className:"flex items-center gap-2 text-sm border rounded px-3 py-2",style:{color:"var(--almost-ink, #8a5a08)",background:"var(--almost-soft, #fbf1dc)",borderColor:"var(--almost, #c8810e)"},children:[(0,$e.jsx)(pl,{size:15,style:ai(15),className:"animate-pulse"}),(0,$e.jsx)("span",{children:i.openResponseAwaitingReview})]}),(t==null?void 0:t.showFeedback)&&T!=="awaiting_review"&&t.teacherFeedback&&(0,$e.jsx)(nme,{feedback:t.teacherFeedback,feedbackState:T,score:t.score,t:i})]})}function JK({nodeId:e,placeholder:t,allowFormatting:r,wordLimit:n,characterLimit:a,isDisabled:i,feedbackBorderClass:o,emitAnswer:s,answerBus:l}){let u=Yn(),[c,f]=(0,Gt.useState)(""),[d,p]=(0,Gt.useState)(0),[y,x]=(0,Gt.useState)(0),k=(0,Gt.useRef)(null),w=(0,Gt.useCallback)(()=>{let ue=k.current;ue&&(ue.style.height="auto",ue.style.height=`${ue.scrollHeight}px`)},[]),S=$U({extensions:[fL.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1})],immediatelyRender:!1,editable:!i,content:"",onUpdate({editor:ue}){var it;if(i)return;let Me=(it=ue.getJSON().content)!=null?it:[],de=j1e(Me),Re=U1e(Me);p(de),x(Re),s({content:Me,wordCount:de})}});(0,Gt.useEffect)(()=>{S&&S.setEditable(!i)},[i,S]);let T=(0,Gt.useRef)(null);(0,Gt.useEffect)(()=>{S&&T.current!==null&&(S.commands.setContent({type:"doc",content:T.current}),T.current=null)},[S]),(0,Gt.useEffect)(()=>{let ue=Se=>{var Re,it,Ie;let Me=((Re=Se.answers)!=null?Re:[]).find(Oe=>Oe.nodeId===e&&Oe.type==="openResponse");if(!((it=Me==null?void 0:Me.answer)!=null&&it.text))return;let de=(Ie=Me.answer.text.content)!=null?Ie:[];if(r)S?S.commands.setContent({type:"doc",content:de}):T.current=de;else{let Oe=de.flatMap(me=>{var be,qe,Ke;return(Ke=(be=me.content)==null?void 0:be.map(je=>{var Ye;return(Ye=je.text)!=null?Ye:""}))!=null?Ke:[(qe=me.text)!=null?qe:""]}).join(`
4049
+ `):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let r=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return r!==void 0?r:-1},tokenize(e,t,r){let n=i=>{let o=fv(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,l)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:r.inlineTokens(s.mainContent),nestedTokens:l}),customNestedParser:n},r);return o?[{type:"taskList",raw:o.raw,items:o.items}]:r.blockTokens(i)},a=fv(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,o)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:r.inlineTokens(i.mainContent),nestedTokens:o}),customNestedParser:n},r);if(a)return{type:"taskList",raw:a.raw,items:a.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),G_e=on.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(eL.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(tL.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(nL.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(aL.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(k1e.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(S1e.configure(this.options.taskList)),e}});var DK="&nbsp;",C1e="\xA0",IK=ta.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Fr(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let r=e.tokens||[];if(r.length===1&&r[0].type==="image")return t.parseChildren([r[0]]);let n=t.parseInline(r);return n.length===1&&n[0].type==="text"&&(n[0].text===DK||n[0].text===C1e)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,n)},renderMarkdown:(e,t)=>{if(!e)return"";let r=Array.isArray(e.content)?e.content:[];return r.length===0?DK:t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var M1e=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,_1e=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,zK=qs.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Fr(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Qu({find:M1e,type:this.type})]},addPasteRules(){return[Tl({find:_1e,type:this.type})]}});var BK=ta.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var RK=qs.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",Fr(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,r){let a=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!a)return;let i=a[2].trim();return{type:"underline",raw:a[0],text:i,tokens:r.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function NK(e={}){return new dr({view(t){return new iL(t,e)}})}var iL=class{constructor(t,r){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(n=r.width)!==null&&n!==void 0?n:1,this.color=r.color===!1?void 0:r.color||"black",this.class=r.class,this.handlers=["dragover","dragend","drop","dragleave"].map(a=>{let i=o=>{this[a](o)};return t.dom.addEventListener(a,i),{name:a,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:r})=>this.editorView.dom.removeEventListener(t,r))}update(t,r){this.cursorPos!=null&&r.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),r=!t.parent.inlineContent,n,a=this.editorView.dom,i=a.getBoundingClientRect(),o=i.width/a.offsetWidth,s=i.height/a.offsetHeight;if(r){let f=t.nodeBefore,d=t.nodeAfter;if(f||d){let p=this.editorView.nodeDOM(this.cursorPos-(f?f.nodeSize:0));if(p){let y=p.getBoundingClientRect(),x=f?y.bottom:y.top;f&&d&&(x=(x+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let k=this.width/2*s;n={left:y.left,right:y.right,top:x-k,bottom:x+k}}}}if(!n){let f=this.editorView.coordsAtPos(this.cursorPos),d=this.width/2*o;n={left:f.left-d,right:f.left+d,top:f.top,bottom:f.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let f=l.getBoundingClientRect(),d=f.width/l.offsetWidth,p=f.height/l.offsetHeight;u=f.left-l.scrollLeft*d,c=f.top-l.scrollTop*p}this.element.style.left=(n.left-u)/o+"px",this.element.style.top=(n.top-c)/s+"px",this.element.style.width=(n.right-n.left)/o+"px",this.element.style.height=(n.bottom-n.top)/s+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let r=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=r&&r.inside>=0&&this.editorView.state.doc.nodeAt(r.inside),a=n&&n.type.spec.disableDropCursor,i=typeof a=="function"?a(this.editorView,r,t):a;if(r&&!i){let o=r.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=Dx(this.editorView.state.doc,o,this.editorView.dragging.slice);s!=null&&(o=s)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var po=class e extends ir{constructor(t){super(t,t)}map(t,r){let n=t.resolve(r.map(this.head));return e.valid(n)?new e(n):ir.near(n)}content(){return Ct.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(r.pos))}getBookmark(){return new oL(this.anchor)}static valid(t){let r=t.parent;if(r.isTextblock||!A1e(t)||!L1e(t))return!1;let n=r.type.spec.allowGapCursor;if(n!=null)return n;let a=r.contentMatchAt(t.index()).defaultType;return a&&a.isTextblock}static findGapCursorFrom(t,r,n=!1){e:for(;;){if(!n&&e.valid(t))return t;let a=t.pos,i=null;for(let o=t.depth;;o--){let s=t.node(o);if(r>0?t.indexAfter(o)<s.childCount:t.index(o)>0){i=s.child(r>0?t.indexAfter(o):t.index(o)-1);break}else if(o==0)return null;a+=r;let l=t.doc.resolve(a);if(e.valid(l))return l}for(;;){let o=r>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!Pt.isSelectable(i)){t=t.doc.resolve(a+i.nodeSize*r),n=!1;continue e}break}i=o,a+=r;let s=t.doc.resolve(a);if(e.valid(s))return s}return null}}};po.prototype.visible=!1;po.findFrom=po.findGapCursorFrom;ir.jsonID("gapcursor",po);var oL=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let r=t.resolve(this.pos);return po.valid(r)?new po(r):ir.near(r)}};function OK(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function A1e(e){for(let t=e.depth;t>=0;t--){let r=e.index(t),n=e.node(t);if(r==0){if(n.type.spec.isolating)return!0;continue}for(let a=n.child(r-1);;a=a.lastChild){if(a.childCount==0&&!a.inlineContent||OK(a.type))return!0;if(a.inlineContent)return!1}}return!0}function L1e(e){for(let t=e.depth;t>=0;t--){let r=e.indexAfter(t),n=e.node(t);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let a=n.child(r);;a=a.firstChild){if(a.childCount==0&&!a.inlineContent||OK(a.type))return!0;if(a.inlineContent)return!1}}return!0}function PK(){return new dr({props:{decorations:I1e,createSelectionBetween(e,t,r){return t.pos==r.pos&&po.valid(r)?new po(r):null},handleClick:E1e,handleKeyDown:T1e,handleDOMEvents:{beforeinput:D1e}}})}var T1e=sA({ArrowLeft:Zv("horiz",-1),ArrowRight:Zv("horiz",1),ArrowUp:Zv("vert",-1),ArrowDown:Zv("vert",1)});function Zv(e,t){let r=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(n,a,i){let o=n.selection,s=t>0?o.$to:o.$from,l=o.empty;if(o instanceof Vt){if(!i.endOfTextblock(r)||s.depth==0)return!1;l=!1,s=n.doc.resolve(t>0?s.after():s.before())}let u=po.findGapCursorFrom(s,t,l);return u?(a&&a(n.tr.setSelection(new po(u))),!0):!1}}function E1e(e,t,r){if(!e||!e.editable)return!1;let n=e.state.doc.resolve(t);if(!po.valid(n))return!1;let a=e.posAtCoords({left:r.clientX,top:r.clientY});return a&&a.inside>-1&&Pt.isSelectable(e.state.doc.nodeAt(a.inside))?!1:(e.dispatch(e.state.tr.setSelection(new po(n))),!0)}function D1e(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof po))return!1;let{$from:r}=e.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(e.state.schema.nodes.text);if(!n)return!1;let a=at.empty;for(let o=n.length-1;o>=0;o--)a=at.from(n[o].createAndFill(null,a));let i=e.state.tr.replace(r.pos,r.pos,new Ct(a,0,0));return i.setSelection(Vt.near(i.doc.resolve(r.pos+1))),e.dispatch(i),!1}function I1e(e){if(!(e.selection instanceof po))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Wa.create(e.doc,[fo.widget(e.selection.head,t,{key:"gapcursor"})])}var Qv=200,Wi=function(){};Wi.prototype.append=function(t){return t.length?(t=Wi.from(t),!this.length&&t||t.length<Qv&&this.leafAppend(t)||this.length<Qv&&t.leafPrepend(this)||this.appendInner(t)):this};Wi.prototype.prepend=function(t){return t.length?Wi.from(t).append(this):this};Wi.prototype.appendInner=function(t){return new z1e(this,t)};Wi.prototype.slice=function(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.length),t>=r?Wi.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,r))};Wi.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Wi.prototype.forEach=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length),r<=n?this.forEachInner(t,r,n,0):this.forEachInvertedInner(t,r,n,0)};Wi.prototype.map=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length);var a=[];return this.forEach(function(i,o){return a.push(t(i,o))},r,n),a};Wi.from=function(t){return t instanceof Wi?t:t&&t.length?new FK(t):Wi.empty};var FK=(function(e){function t(n){e.call(this),this.values=n}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(a,i){return a==0&&i==this.length?this:new t(this.values.slice(a,i))},t.prototype.getInner=function(a){return this.values[a]},t.prototype.forEachInner=function(a,i,o,s){for(var l=i;l<o;l++)if(a(this.values[l],s+l)===!1)return!1},t.prototype.forEachInvertedInner=function(a,i,o,s){for(var l=i-1;l>=o;l--)if(a(this.values[l],s+l)===!1)return!1},t.prototype.leafAppend=function(a){if(this.length+a.length<=Qv)return new t(this.values.concat(a.flatten()))},t.prototype.leafPrepend=function(a){if(this.length+a.length<=Qv)return new t(a.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(t.prototype,r),t})(Wi);Wi.empty=new FK([]);var z1e=(function(e){function t(r,n){e.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},t.prototype.forEachInner=function(n,a,i,o){var s=this.left.length;if(a<s&&this.left.forEachInner(n,a,Math.min(i,s),o)===!1||i>s&&this.right.forEachInner(n,Math.max(a-s,0),Math.min(this.length,i)-s,o+s)===!1)return!1},t.prototype.forEachInvertedInner=function(n,a,i,o){var s=this.left.length;if(a>s&&this.right.forEachInvertedInner(n,a-s,Math.max(i,s)-s,o+s)===!1||i<s&&this.left.forEachInvertedInner(n,Math.min(a,s),i,o)===!1)return!1},t.prototype.sliceInner=function(n,a){if(n==0&&a==this.length)return this;var i=this.left.length;return a<=i?this.left.slice(n,a):n>=i?this.right.slice(n-i,a-i):this.left.slice(n,i).append(this.right.slice(0,a-i))},t.prototype.leafAppend=function(n){var a=this.right.leafAppend(n);if(a)return new t(this.left,a)},t.prototype.leafPrepend=function(n){var a=this.left.leafPrepend(n);if(a)return new t(a,this.right)},t.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new t(this.left,new t(this.right,n)):new t(this,n)},t})(Wi),sL=Wi;var B1e=500,Xp=class e{constructor(t,r){this.items=t,this.eventCount=r}popEvent(t,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let a,i;r&&(a=this.remapping(n,this.items.length),i=a.maps.length);let o=t.tr,s,l,u=[],c=[];return this.items.forEach((f,d)=>{if(!f.step){a||(a=this.remapping(n,d+1),i=a.maps.length),i--,c.push(f);return}if(a){c.push(new nc(f.map));let p=f.step.map(a.slice(i)),y;p&&o.maybeStep(p).doc&&(y=o.mapping.maps[o.mapping.maps.length-1],u.push(new nc(y,void 0,void 0,u.length+c.length))),i--,y&&a.appendMap(y,i)}else o.maybeStep(f.step);if(f.selection)return s=a?f.selection.map(a.slice(i)):f.selection,l=new e(this.items.slice(0,n).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:s}}addTransform(t,r,n,a){let i=[],o=this.eventCount,s=this.items,l=!a&&s.length?s.get(s.length-1):null;for(let c=0;c<t.steps.length;c++){let f=t.steps[c].invert(t.docs[c]),d=new nc(t.mapping.maps[c],f,r),p;(p=l&&l.merge(d))&&(d=p,c?i.pop():s=s.slice(0,s.length-1)),i.push(d),r&&(o++,r=void 0),a||(l=d)}let u=o-n.depth;return u>N1e&&(s=R1e(s,u),o-=u),new e(s.append(i),o)}remapping(t,r){let n=new Y2;return this.items.forEach((a,i)=>{let o=a.mirrorOffset!=null&&i-a.mirrorOffset>=t?n.maps.length-a.mirrorOffset:void 0;n.appendMap(a.map,o)},t,r),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(r=>new nc(r))),this.eventCount)}rebased(t,r){if(!this.eventCount)return this;let n=[],a=Math.max(0,this.items.length-r),i=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(d=>{d.selection&&s--},a);let l=r;this.items.forEach(d=>{let p=i.getMirror(--l);if(p==null)return;o=Math.min(o,p);let y=i.maps[p];if(d.step){let x=t.steps[p].invert(t.docs[p]),k=d.selection&&d.selection.map(i.slice(l+1,p));k&&s++,n.push(new nc(y,x,k))}else n.push(new nc(y))},a);let u=[];for(let d=r;d<o;d++)u.push(new nc(i.maps[d]));let c=this.items.slice(0,a).append(u).append(n),f=new e(c,s);return f.emptyItemCount()>B1e&&(f=f.compress(this.items.length-n.length)),f}emptyItemCount(){let t=0;return this.items.forEach(r=>{r.step||t++}),t}compress(t=this.items.length){let r=this.remapping(0,t),n=r.maps.length,a=[],i=0;return this.items.forEach((o,s)=>{if(s>=t)a.push(o),o.selection&&i++;else if(o.step){let l=o.step.map(r.slice(n)),u=l&&l.getMap();if(n--,u&&r.appendMap(u,n),l){let c=o.selection&&o.selection.map(r.slice(n));c&&i++;let f=new nc(u.invert(),l,c),d,p=a.length-1;(d=a.length&&a[p].merge(f))?a[p]=d:a.push(f)}}else o.map&&n--},this.items.length,0),new e(sL.from(a.reverse()),i)}};Xp.empty=new Xp(sL.empty,0);function R1e(e,t){let r;return e.forEach((n,a)=>{if(n.selection&&t--==0)return r=a,!1}),e.slice(r)}var nc=class e{constructor(t,r,n,a){this.map=t,this.step=r,this.selection=n,this.mirrorOffset=a}merge(t){if(this.step&&t.step&&!t.selection){let r=t.step.merge(this.step);if(r)return new e(r.getMap().invert(),r,this.selection)}}},ac=class{constructor(t,r,n,a,i){this.done=t,this.undone=r,this.prevRanges=n,this.prevTime=a,this.prevComposition=i}},N1e=20;function O1e(e,t,r,n){let a=r.getMeta(Wp),i;if(a)return a.historyState;r.getMeta(q1e)&&(e=new ac(e.done,e.undone,null,0,-1));let o=r.getMeta("appendedTransaction");if(r.steps.length==0)return e;if(o&&o.getMeta(Wp))return o.getMeta(Wp).redo?new ac(e.done.addTransform(r,void 0,n,e7(t)),e.undone,qK(r.mapping.maps),e.prevTime,e.prevComposition):new ac(e.done,e.undone.addTransform(r,void 0,n,e7(t)),null,e.prevTime,e.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let s=r.getMeta("composition"),l=e.prevTime==0||!o&&e.prevComposition!=s&&(e.prevTime<(r.time||0)-n.newGroupDelay||!P1e(r,e.prevRanges)),u=o?lL(e.prevRanges,r.mapping):qK(r.mapping.maps);return new ac(e.done.addTransform(r,l?t.selection.getBookmark():void 0,n,e7(t)),Xp.empty,u,r.time,s==null?e.prevComposition:s)}else return(i=r.getMeta("rebased"))?new ac(e.done.rebased(r,i),e.undone.rebased(r,i),lL(e.prevRanges,r.mapping),e.prevTime,e.prevComposition):new ac(e.done.addMaps(r.mapping.maps),e.undone.addMaps(r.mapping.maps),lL(e.prevRanges,r.mapping),e.prevTime,e.prevComposition)}function P1e(e,t){if(!t)return!1;if(!e.docChanged)return!0;let r=!1;return e.mapping.maps[0].forEach((n,a)=>{for(let i=0;i<t.length;i+=2)n<=t[i+1]&&a>=t[i]&&(r=!0)}),r}function qK(e){let t=[];for(let r=e.length-1;r>=0&&t.length==0;r--)e[r].forEach((n,a,i,o)=>t.push(i,o));return t}function lL(e,t){if(!e)return null;let r=[];for(let n=0;n<e.length;n+=2){let a=t.map(e[n],1),i=t.map(e[n+1],-1);a<=i&&r.push(a,i)}return r}function F1e(e,t,r){let n=e7(t),a=Wp.get(t).spec.config,i=(r?e.undone:e.done).popEvent(t,n);if(!i)return null;let o=i.selection.resolve(i.transform.doc),s=(r?e.done:e.undone).addTransform(i.transform,t.selection.getBookmark(),a,n),l=new ac(r?s:i.remaining,r?i.remaining:s,null,0,-1);return i.transform.setSelection(o).setMeta(Wp,{redo:r,historyState:l})}var uL=!1,$K=null;function e7(e){let t=e.plugins;if($K!=t){uL=!1,$K=t;for(let r=0;r<t.length;r++)if(t[r].spec.historyPreserveItems){uL=!0;break}}return uL}var Wp=new Tr("history"),q1e=new Tr("closeHistory");function HK(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new dr({key:Wp,state:{init(){return new ac(Xp.empty,Xp.empty,null,0,-1)},apply(t,r,n){return O1e(r,n,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,r){let n=r.inputType,a=n=="historyUndo"?cL:n=="historyRedo"?dL:null;return!a||!t.editable?!1:(r.preventDefault(),a(t.state,t.dispatch))}}}})}function t7(e,t){return(r,n)=>{let a=Wp.getState(r);if(!a||(e?a.undone:a.done).eventCount==0)return!1;if(n){let i=F1e(a,r,e);i&&n(t?i.scrollIntoView():i)}return!0}}var cL=t7(!1,!0),dL=t7(!0,!0),vAe=t7(!1,!1),wAe=t7(!0,!1);var AAe=on.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){let n=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(n)}return t.nodeSize},this.storage.words=e=>{let t=(e==null?void 0:e.node)||this.editor.state.doc,r=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(r)}},addProseMirrorPlugins(){let e=!1;return[new dr({key:new Tr("characterCount"),appendTransaction:(t,r,n)=>{if(e)return;let a=this.options.limit;if(a==null||a===0){e=!0;return}let i=this.storage.characters({node:n.doc});if(i>a){let o=i-a,s=0,l=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${a} characters. Content was automatically trimmed.`);let u=n.tr.deleteRange(s,l);return e=!0,u}e=!0},filterTransaction:(t,r)=>{let n=this.options.limit;if(!t.docChanged||n===0||n===null||n===void 0)return!0;let a=this.storage.characters({node:r.doc}),i=this.storage.characters({node:t.doc});if(i<=n||a>n&&i>n&&i<=a)return!0;if(a>n&&i>n&&i>a||!t.getMeta("paste"))return!1;let s=t.selection.$head.pos,l=i-n,u=s-l,c=s;return t.deleteRange(u,c),!(this.storage.characters({node:t.doc})>n)}})]}}),KK=on.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[NK(this.options)]}}),zAe=on.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new dr({key:new Tr("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:r,isFocused:n}=this.editor,{anchor:a}=t,i=[];if(!r||!n)return Wa.create(e,[]);let o=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(l.isText)return;if(!(a>=u&&a<=u+l.nodeSize-1))return!1;o+=1});let s=0;return e.descendants((l,u)=>{if(l.isText||!(a>=u&&a<=u+l.nodeSize-1))return!1;if(s+=1,this.options.mode==="deepest"&&o-s>0||this.options.mode==="shallowest"&&s>1)return this.options.mode==="deepest";i.push(fo.node(u,u+l.nodeSize,{class:this.options.className}))}),Wa.create(e,i)}}})]}}),VK=on.create({name:"gapCursor",addProseMirrorPlugins(){return[PK()]},extendNodeSchema(e){var t;let r={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=xn(jt(e,"allowGapCursor",r)))!=null?t:null}}}),jK="placeholder";function $1e(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var FAe=on.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:jK,placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${$1e(this.options.dataAttribute)}`:`data-${jK}`;return[new dr({key:new Tr("placeholder"),props:{decorations:({doc:t,selection:r})=>{let n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:a}=r,i=[];if(!n)return null;let o=this.editor.isEmpty;return t.descendants((s,l)=>{let u=a>=l&&a<=l+s.nodeSize,c=!s.isLeaf&&h3(s);if((u||!this.options.showOnlyCurrent)&&c){let f=[this.options.emptyNodeClass];o&&f.push(this.options.emptyEditorClass);let d=fo.node(l,l+s.nodeSize,{class:f.join(" "),[e]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:l,hasAnchor:u}):this.options.placeholder});i.push(d)}return this.options.includeChildren}),Wa.create(t,i)}}})]}}),jAe=on.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new dr({key:new Tr("selection"),props:{decorations(r){return r.selection.empty||e.isFocused||!e.isEditable||uv(r.selection)||e.view.dragging?null:Wa.create(r.doc,[fo.inline(r.selection.from,r.selection.to,{class:t.className})])}}})]}});function UK({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}var GK=on.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Tr(this.name),r=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",n=Object.entries(this.editor.schema.nodes).map(([,a])=>a).filter(a=>(this.options.notAfter||[]).concat(r).includes(a.name));return[new dr({key:t,appendTransaction:(a,i,o)=>{let{doc:s,tr:l,schema:u}=o,c=t.getState(o),f=s.content.size,d=u.nodes[r];if(c)return l.insert(f,d.create())},state:{init:(a,i)=>{let o=i.tr.doc.lastChild;return!UK({node:o,types:n})},apply:(a,i)=>{if(!a.docChanged||a.getMeta("__uniqueIDTransaction"))return i;let o=a.doc.lastChild;return!UK({node:o,types:n})}}})]}}),WK=on.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>cL(e,t),redo:()=>({state:e,dispatch:t})=>dL(e,t)}},addProseMirrorPlugins(){return[HK(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var H1e=on.create({name:"starterKit",addExtensions(){var e,t,r,n;let a=[];return this.options.bold!==!1&&a.push(YU.configure(this.options.bold)),this.options.blockquote!==!1&&a.push(XU.configure(this.options.blockquote)),this.options.bulletList!==!1&&a.push(eL.configure(this.options.bulletList)),this.options.code!==!1&&a.push(JU.configure(this.options.code)),this.options.codeBlock!==!1&&a.push(ZU.configure(this.options.codeBlock)),this.options.document!==!1&&a.push(QU.configure(this.options.document)),this.options.dropcursor!==!1&&a.push(KK.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&a.push(VK.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&a.push(eK.configure(this.options.hardBreak)),this.options.heading!==!1&&a.push(tK.configure(this.options.heading)),this.options.undoRedo!==!1&&a.push(WK.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&a.push(rK.configure(this.options.horizontalRule)),this.options.italic!==!1&&a.push(nK.configure(this.options.italic)),this.options.listItem!==!1&&a.push(tL.configure(this.options.listItem)),this.options.listKeymap!==!1&&a.push(nL.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&a.push(xK.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&a.push(aL.configure(this.options.orderedList)),this.options.paragraph!==!1&&a.push(IK.configure(this.options.paragraph)),this.options.strike!==!1&&a.push(zK.configure(this.options.strike)),this.options.text!==!1&&a.push(BK.configure(this.options.text)),this.options.underline!==!1&&a.push(RK.configure((r=this.options)==null?void 0:r.underline)),this.options.trailingNode!==!1&&a.push(GK.configure((n=this.options)==null?void 0:n.trailingNode)),a}}),fL=H1e;function XK(e){return e.trim().split(/\s+/).filter(Boolean).length}function YK(e){return e.length}function j1e(e){let t=r=>r.map(n=>{var a;return((a=n.text)!=null?a:"")+(n.content?t(n.content):"")}).join(" ");return XK(t(e))}function U1e(e){let t=r=>r.map(n=>{var a;return((a=n.text)!=null?a:"")+(n.content?t(n.content):"")}).join("");return YK(t(e))}function K1e(e){return/youtube\.com|youtu\.be/i.test(e)?"youtube":/vimeo\.com/i.test(e)?"vimeo":"other"}function V1e(e){let t=e.match(/[?&]v=([^&]+)/)||e.match(/youtu\.be\/([^?]+)/)||e.match(/embed\/([^?]+)/);return t?t[1]:null}function pL(e){let t=Math.floor(e/60),r=e%60;return`${t}:${r.toString().padStart(2,"0")}`}function ox({node:e,validationFeedback:t,readOnly:r=!1,mediaHandler:n}){var J;let a=Li(),i=Yn(),{id:o,attrs:s}=e,{mode:l,placeholder:u,allowFormatting:c,wordLimit:f,characterLimit:d,allowedTypes:p,allowMultiple:y,fileInstructions:x,maxDuration:k,hint:w}=s,S=r||((J=t==null?void 0:t.showFeedback)!=null?J:!1),T=t==null?void 0:t.state,E=(0,Gt.useRef)(null),z=(0,Gt.useCallback)(K=>{E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{var ye;let Y=(ye=K.files)==null?void 0:ye.map(se=>({url:se.url,mimeType:se.kind==="videoLink"?"video/x-link":se.mimeType,name:se.kind==="videoLink"?void 0:se.name,duration:se.kind==="videoLink"?void 0:se.duration}));a.emit({type:"answer:changed",answer:{nodeId:o,type:"openResponse",timestamp:Date.now(),answer:Ue(te({},K),{files:Y})}})},300)},[o,a]);(0,Gt.useEffect)(()=>{z({})},[]);let[N,O]=(0,Gt.useState)([]);(0,Gt.useEffect)(()=>{(l==="file"||l==="text+file")&&l==="file"&&z({files:N})},[N,l]),(0,Gt.useEffect)(()=>{let K=()=>{O([])};return a.on("answers:reset",K),()=>a.off("answers:reset",K)},[a]),(0,Gt.useEffect)(()=>{let K=Y=>{var ue,Se;let se=((ue=Y.answers)!=null?ue:[]).find(Me=>Me.nodeId===o&&Me.type==="openResponse");se&&(E.current&&(clearTimeout(E.current),E.current=null),(Se=se.answer)!=null&&Se.files&&O(se.answer.files))};return a.on("answers:prefill",K),()=>a.off("answers:prefill",K)},[o,a]);let H=t==null?void 0:t.showFeedback,U=hr(!H&&"player-or-field--pre",H&&T==="correct"&&"player-or-field--correct",H&&T==="partial"&&"player-or-field--partial",H&&T==="incorrect"&&"player-or-field--incorrect",H&&T==="awaiting_review"&&"player-or-field--review");return(0,$e.jsxs)("div",{className:"my-3 space-y-2",children:[!S&&w&&w.length>0&&(0,$e.jsx)("div",{className:"flex justify-end",children:(0,$e.jsx)(Od,{hint:w})}),l==="text"&&(0,$e.jsx)(JK,{nodeId:o,placeholder:u,allowFormatting:c,wordLimit:f,characterLimit:d,isDisabled:S,feedbackBorderClass:U,emitAnswer:K=>z({text:K}),answerBus:a}),l==="file"&&(0,$e.jsx)(hL,{allowedTypes:p!=null?p:["image"],allowMultiple:!!y,fileInstructions:x,isDisabled:S,feedbackBorderClass:U,files:N,setFiles:O,mediaHandler:n,t:i}),(l==="audio"||l==="video"||l==="screen")&&(0,$e.jsx)(rme,{nodeId:o,answerBus:a,kind:l,maxDuration:k,isDisabled:S,feedbackBorderClass:U,mediaHandler:n,emitAnswer:K=>z({recording:K}),t:i}),l==="text+file"&&(0,$e.jsx)(Y1e,{nodeId:o,placeholder:u,allowFormatting:c,wordLimit:f,characterLimit:d,allowedTypes:p!=null?p:["image"],allowMultiple:!!y,fileInstructions:x,isDisabled:S,feedbackBorderClass:U,files:N,setFiles:O,emitAnswer:z,answerBus:a,mediaHandler:n,t:i}),(t==null?void 0:t.showFeedback)&&T==="awaiting_review"&&(0,$e.jsxs)("div",{className:"flex items-center gap-2 text-sm border rounded px-3 py-2",style:{color:"var(--almost-ink, #8a5a08)",background:"var(--almost-soft, #fbf1dc)",borderColor:"var(--almost, #c8810e)"},children:[(0,$e.jsx)(pl,{size:15,style:ai(15),className:"animate-pulse"}),(0,$e.jsx)("span",{children:i.openResponseAwaitingReview})]}),(t==null?void 0:t.showFeedback)&&T!=="awaiting_review"&&t.teacherFeedback&&(0,$e.jsx)(nme,{feedback:t.teacherFeedback,feedbackState:T,score:t.score,t:i})]})}function JK({nodeId:e,placeholder:t,allowFormatting:r,wordLimit:n,characterLimit:a,isDisabled:i,feedbackBorderClass:o,emitAnswer:s,answerBus:l}){let u=Yn(),[c,f]=(0,Gt.useState)(""),[d,p]=(0,Gt.useState)(0),[y,x]=(0,Gt.useState)(0),k=(0,Gt.useRef)(null),w=(0,Gt.useCallback)(()=>{let ue=k.current;ue&&(ue.style.height="auto",ue.style.height=`${ue.scrollHeight}px`)},[]),S=$U({extensions:[fL.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1})],immediatelyRender:!1,editable:!i,content:"",onUpdate({editor:ue}){var it;if(i)return;let Me=(it=ue.getJSON().content)!=null?it:[],de=j1e(Me),Re=U1e(Me);p(de),x(Re),s({content:Me,wordCount:de})}});(0,Gt.useEffect)(()=>{S&&S.setEditable(!i)},[i,S]);let T=(0,Gt.useRef)(null);(0,Gt.useEffect)(()=>{S&&T.current!==null&&(S.commands.setContent({type:"doc",content:T.current}),T.current=null)},[S]),(0,Gt.useEffect)(()=>{let ue=Se=>{var Re,it,Ie;let Me=((Re=Se.answers)!=null?Re:[]).find(Oe=>Oe.nodeId===e&&Oe.type==="openResponse");if(!((it=Me==null?void 0:Me.answer)!=null&&it.text))return;let de=(Ie=Me.answer.text.content)!=null?Ie:[];if(r)S?S.commands.setContent({type:"doc",content:de}):T.current=de;else{let Oe=de.flatMap(me=>{var be,qe,Ke;return(Ke=(be=me.content)==null?void 0:be.map(je=>{var Ye;return(Ye=je.text)!=null?Ye:""}))!=null?Ke:[(qe=me.text)!=null?qe:""]}).join(`
4050
4050
  `);f(Oe),setTimeout(w,0)}};return l.on("answers:prefill",ue),()=>l.off("answers:prefill",ue)},[e,l,r,S]),(0,Gt.useEffect)(()=>{let ue=()=>{r&&S?S.commands.clearContent():(f(""),setTimeout(w,0)),p(0),x(0)};return l.on("answers:reset",ue),()=>l.off("answers:reset",ue)},[l,r,S,w]);let E=!!n,z=!!a&&!n,N=E?d:y,O=E?n==null?void 0:n.max:a==null?void 0:a.max,H=E?n==null?void 0:n.min:a==null?void 0:a.min,U=O!=null&&N>O,J=O!=null&&N>=O*.8&&!U,K=H!=null&&N<H&&N>0,Y="text-xs tabular-nums",ye=U?{color:"var(--pen, #d23b2b)",fontWeight:500}:J||K?{color:"var(--almost, #c8810e)"}:{color:"var(--ink-faint, #8d93a0)"},se=E?O?`${d} / ${O} ${u.openResponseWords}`:H?`${d} ${u.openResponseWords} (min. ${H})`:`${d} ${u.openResponseWords}`:z?O?`${y} / ${O} ${u.openResponseChars}`:`${y} ${u.openResponseChars}`:null;return r?(0,$e.jsxs)("div",{className:"relative",children:[(0,$e.jsxs)("div",{className:hr("rounded border transition-colors min-h-[120px]",o),children:[!i&&(0,$e.jsxs)("div",{className:"sticky top-0 z-10 flex gap-1 px-2 pt-1.5 pb-1 border-b border-gray-100 bg-white rounded-t",children:[[{label:"B",cmd:"toggleBold",style:"font-bold"},{label:"I",cmd:"toggleItalic",style:"italic"}].map(({label:ue,cmd:Se,style:Me})=>(0,$e.jsx)("button",{type:"button",onMouseDown:de=>{var Re;de.preventDefault(),(Re=S==null?void 0:S.chain().focus())==null||Re[Se]().run()},className:`text-xs px-1.5 py-0.5 rounded hover:bg-gray-100 ${Me}`,children:ue},ue)),(0,$e.jsx)("button",{type:"button",onMouseDown:ue=>{ue.preventDefault(),S==null||S.chain().focus().toggleBulletList().run()},className:"text-xs px-1.5 py-0.5 rounded hover:bg-gray-100",children:"\u2022\u2014"})]}),(0,$e.jsx)(MA,{editor:S,className:"prose prose-sm max-w-none p-3 outline-none [&_.ProseMirror]:min-h-[80px] [&_.ProseMirror]:outline-none"})]}),se&&(0,$e.jsx)("div",{className:hr("absolute bottom-2 right-3",Y),style:ye,children:se})]}):(0,$e.jsxs)("div",{className:"relative",children:[(0,$e.jsx)("textarea",{ref:k,value:c,onChange:ue=>{if(i)return;let Se=ue.target.value;f(Se);let Me=XK(Se),de=YK(Se);p(Me),x(de),w(),s({content:[{type:"paragraph",content:[{type:"text",text:Se}]}],wordCount:Me})},onInput:w,disabled:i,placeholder:t||u.openResponseTextPlaceholder,rows:4,style:{resize:"none",overflow:"hidden"},className:hr("w-full px-3 py-2 text-base min-h-[100px] rounded border transition-colors outline-none",o,i&&"cursor-default")}),se&&(0,$e.jsx)("div",{className:hr("absolute bottom-2 right-3",Y),children:se})]})}var G1e={image:"image/*",pdf:"application/pdf",audio:"audio/*",video:"video/*"},W1e={image:(0,$e.jsx)(Q4,{size:12,style:ai(12)}),pdf:(0,$e.jsx)(H1,{size:12,style:ai(12)}),audio:(0,$e.jsx)(i2,{size:12,style:ai(12)}),video:(0,$e.jsx)(U1,{size:12,style:ai(12)}),videoLink:(0,$e.jsx)(t2,{size:12,style:ai(12)})};function hL({allowedTypes:e,allowMultiple:t,fileInstructions:r,isDisabled:n,files:a,setFiles:i,mediaHandler:o,t:s,compact:l=!1}){let u=(0,Gt.useRef)(null),[c,f]=(0,Gt.useState)(!1),[d,p]=(0,Gt.useState)(!1),[y,x]=(0,Gt.useState)(""),k=e.some(J=>J!=="videoLink"),w=e.includes("videoLink"),S=t||a.length===0,T=e.filter(J=>J!=="videoLink").map(J=>G1e[J]).filter(Boolean).join(","),E=(0,Gt.useCallback)(J=>{i(K=>t?[...K,J]:[J])},[t,i]),z=(0,Gt.useCallback)(J=>{i(K=>K.filter((Y,ye)=>ye!==J))},[i]),N=async J=>{var K;if(!(!S||n)){f(!0);try{let Y=J.type.startsWith("image/")?"image":J.type==="application/pdf"?"document":J.type.startsWith("audio/")?"audio":J.type.startsWith("video/")?"video":"file";if(o){let ye=await o.upload(J,Y);E({kind:"file",url:ye.url,mimeType:(K=ye.mimeType)!=null?K:J.type,name:J.name})}else{let ye=URL.createObjectURL(J);E({kind:"file",url:ye,mimeType:J.type,name:J.name})}}finally{f(!1)}}},O=async J=>{var Y;if(J.preventDefault(),p(!1),n||!S)return;let K=(Y=J.dataTransfer.files)==null?void 0:Y[0];K&&await N(K)},H=()=>{let J=y.trim();J&&(E({kind:"videoLink",url:J,platform:K1e(J)}),x(""))},U={image:s.openResponseTypeImage,pdf:s.openResponseTypePdf,audio:s.openResponseTypeAudio,video:s.openResponseTypeVideo,videoLink:s.openResponseTypeVideoLink};return(0,$e.jsxs)("div",{className:"space-y-2",children:[r&&!l&&(0,$e.jsx)("p",{className:"text-sm text-gray-600 italic",children:r}),a.length>0&&(0,$e.jsx)("div",{className:l?"flex flex-wrap gap-1.5":"space-y-2",children:a.map((J,K)=>(0,$e.jsx)(X1e,{file:J,onRemove:n?void 0:()=>z(K),compact:l,t:s},K))}),!n&&S&&(0,$e.jsxs)("div",{className:"space-y-2",children:[k&&!l&&(0,$e.jsxs)("div",{onDragOver:J=>{J.preventDefault(),p(!0)},onDragLeave:()=>p(!1),onDrop:O,className:"border-2 border-dashed rounded-lg p-6 text-center transition-colors cursor-pointer",style:{borderColor:d?"var(--ink-faint, #8d93a0)":"var(--line-strong, #d6d3cc)",background:d?"var(--ui-muted, #f5f4f1)":"transparent"},onClick:()=>{var J;return(J=u.current)==null?void 0:J.click()},children:[(0,$e.jsx)(Z4,{size:26,className:"mx-auto mb-2",style:Ue(te({},ai(26)),{color:"var(--ink-soft, #565b66)"})}),(0,$e.jsx)("p",{className:"text-sm font-medium",style:{color:"var(--ink-soft, #565b66)"},children:s.openResponseDropZoneLabel}),(0,$e.jsx)("p",{className:"text-xs hover:underline mt-0.5",style:{color:"var(--ink, #1d2025)"},children:s.openResponseDropZoneBrowse}),c&&(0,$e.jsx)("p",{className:"text-xs mt-1 animate-pulse",style:{color:"var(--ink-faint, #8d93a0)"},children:s.openResponseUploading}),(0,$e.jsx)("div",{className:"flex flex-wrap justify-center gap-1.5 mt-3",children:e.filter(J=>J!=="videoLink").map(J=>(0,$e.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 bg-gray-100 text-gray-600 rounded-full",children:[W1e[J]," ",U[J]]},J))})]}),k&&l&&(0,$e.jsx)("button",{type:"button",onClick:()=>{var J;return(J=u.current)==null?void 0:J.click()},disabled:c,className:"text-xs px-3 py-1.5 rounded border border-dashed disabled:opacity-50",style:{borderColor:"var(--line-strong, #d6d3cc)",color:"var(--ink-soft, #565b66)"},children:c?s.openResponseUploading:`+ ${s.openResponseAttachFile}`}),(0,$e.jsx)("input",{ref:u,type:"file",accept:T,onChange:async J=>{var Y;let K=(Y=J.target.files)==null?void 0:Y[0];K&&(await N(K),J.target.value="")},className:"hidden"}),w&&(0,$e.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,$e.jsx)("input",{type:"url",value:y,onChange:J=>x(J.target.value),placeholder:s.openResponseVideoLinkPlaceholder,className:"flex-1 text-sm border rounded px-2 py-1.5 outline-none",style:{borderColor:"var(--line-strong, #d6d3cc)"},onKeyDown:J=>{J.key==="Enter"&&(J.preventDefault(),H())}}),(0,$e.jsx)("button",{type:"button",onClick:H,disabled:!y.trim(),className:"text-sm px-3 py-1.5 rounded text-white disabled:opacity-50",style:{background:"var(--ink, #1d2025)"},children:s.openResponseAddVideoLink})]})]}),n&&a.length===0&&(0,$e.jsx)("p",{className:"text-sm text-gray-400 text-center py-3",children:s.openResponseNoSubmission})]})}function X1e({file:e,onRemove:t,compact:r,t:n}){var a,i,o,s,l,u;if(e.kind==="videoLink"){let c=e.platform==="youtube"?V1e(e.url):null;return(0,$e.jsxs)("div",{className:hr("bg-white rounded border border-gray-200",r?"px-2 py-1 flex items-center gap-1.5":"p-3 space-y-1"),children:[c&&!r&&(0,$e.jsx)("iframe",{src:`https://www.youtube.com/embed/${c}`,width:240,height:135,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"rounded w-full"}),(0,$e.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 underline truncate block max-w-[200px]",children:e.url}),t&&(0,$e.jsx)("button",{type:"button",onClick:t,className:"ml-auto text-gray-400 hover:text-rose-500 text-xs",children:"\u2715"})]})}return(0,$e.jsxs)("div",{className:hr("bg-white rounded border border-gray-200",r?"px-2 py-1 flex items-center gap-1.5":"p-2 flex items-center gap-2"),children:[(a=e.mimeType)!=null&&a.startsWith("image/")?(0,$e.jsx)("img",{src:e.url,alt:(i=e.name)!=null?i:"upload",className:r?"h-6 w-6 object-cover rounded":"h-16 w-16 object-cover rounded"}):(o=e.mimeType)!=null&&o.startsWith("audio/")?r?null:(0,$e.jsx)("span",{className:"flex-1 min-w-0",children:(0,$e.jsx)(Nu,{src:e.url,durationHint:e.duration})}):(s=e.mimeType)!=null&&s.startsWith("video/")?(0,$e.jsx)("video",{src:e.url,controls:!0,className:r?"hidden":"h-16 max-w-[240px] rounded"}):(0,$e.jsx)(H1,{size:20,style:Ue(te({},ai(20)),{color:"var(--ink-soft, #565b66)"})}),(0,$e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$e.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-gray-700 truncate block hover:underline",children:(l=e.name)!=null?l:n.openResponseFile}),r&&((u=e.mimeType)==null?void 0:u.startsWith("audio/"))&&(0,$e.jsx)(Nu,{src:e.url,durationHint:e.duration})]}),t&&(0,$e.jsx)("button",{type:"button",onClick:t,className:"ml-auto text-gray-400 hover:text-rose-500 text-xs shrink-0",children:"\u2715"})]})}function Y1e({nodeId:e,placeholder:t,allowFormatting:r,wordLimit:n,characterLimit:a,allowedTypes:i,allowMultiple:o,fileInstructions:s,isDisabled:l,feedbackBorderClass:u,files:c,setFiles:f,emitAnswer:d,answerBus:p,mediaHandler:y,t:x}){let[k,w]=(0,Gt.useState)(null),[S,T]=(0,Gt.useState)(!1);return(0,Gt.useEffect)(()=>{d(Ue(te({},k&&{text:k}),{files:c.length>0?c:void 0}))},[k,c]),(0,$e.jsxs)("div",{className:"space-y-2",children:[(0,$e.jsx)(JK,{nodeId:e,placeholder:t,allowFormatting:r,wordLimit:n,characterLimit:a,isDisabled:l,feedbackBorderClass:u,emitAnswer:E=>w(E),answerBus:p}),!l&&(0,$e.jsxs)("div",{children:[(0,$e.jsxs)("button",{type:"button",onClick:()=>T(!S),className:"flex items-center gap-1.5 text-xs",style:{color:"var(--ink-soft, #565b66)"},children:[(0,$e.jsx)("span",{children:S?"\u25BE":"\u25B8"}),(0,$e.jsxs)("span",{children:[x.openResponseAttachFiles,c.length>0&&(0,$e.jsx)("span",{className:"ml-1 rounded-full px-1.5 py-0.5 text-[10px]",style:{background:"var(--ui-muted, #f5f4f1)",color:"var(--ink, #1d2025)"},children:c.length})]})]}),S&&(0,$e.jsx)("div",{className:"mt-1.5",children:(0,$e.jsx)(hL,{allowedTypes:i,allowMultiple:o,fileInstructions:s,isDisabled:l,feedbackBorderClass:u,files:c,setFiles:f,mediaHandler:y,t:x,compact:!0})})]}),l&&c.length>0&&(0,$e.jsxs)("div",{className:"space-y-1",children:[(0,$e.jsx)("p",{className:"text-xs text-gray-500 font-medium",children:x.openResponseAttachedFiles}),(0,$e.jsx)(hL,{allowedTypes:i,allowMultiple:o,isDisabled:!0,feedbackBorderClass:u,files:c,setFiles:f,t:x,compact:!0})]})]})}var J1e=180,Z1e={audio:["audio/webm;codecs=opus","audio/webm","audio/mp4;codecs=mp4a.40.2","audio/mp4","audio/aac","audio/ogg;codecs=opus"],video:["video/webm;codecs=vp9,opus","video/webm;codecs=vp8,opus","video/webm","video/mp4"]};function Q1e(e){if(!(typeof MediaRecorder=="undefined"||typeof MediaRecorder.isTypeSupported!="function"))return Z1e[e].find(t=>MediaRecorder.isTypeSupported(t))}function eme(e,t){let r=e.split(";")[0].trim().toLowerCase();return r.endsWith("/webm")?"webm":r.endsWith("/ogg")?"ogg":r.endsWith("/aac")?"aac":r.endsWith("/mp4")?t==="audio"?"m4a":"mp4":"webm"}function tme(e){return e instanceof DOMException?e.name==="AbortError":(e==null?void 0:e.name)==="AbortError"}function rme({nodeId:e,kind:t,maxDuration:r,isDisabled:n,feedbackBorderClass:a,mediaHandler:i,emitAnswer:o,answerBus:s,t:l}){var zt,Ht,Yr,Hr;let u=t==="audio"?"audio":"video",c=r&&r>0?r:t==="audio"?J1e:null,[f,d]=(0,Gt.useState)("idle"),[p,y]=(0,Gt.useState)(null),[x,k]=(0,Gt.useState)(null),[w,S]=(0,Gt.useState)(0),[T,E]=(0,Gt.useState)(null),[z,N]=(0,Gt.useState)(null),O=(0,Gt.useRef)(null),H=(0,Gt.useRef)(null),U=(0,Gt.useRef)([]),J=(0,Gt.useRef)(0),K=(0,Gt.useRef)(null),Y=(0,Gt.useRef)(null),ye=(0,Gt.useRef)(null),se=(0,Gt.useRef)(null),ue=(0,Gt.useRef)(0),Se=(0,Gt.useRef)(null),Me=(0,Gt.useRef)(null),de=(0,Gt.useRef)(null);(0,Gt.useEffect)(()=>{let xt=wr=>{var ot,Lt;let et=((ot=wr.answers)!=null?ot:[]).find(ft=>ft.nodeId===e&&ft.type==="openResponse"),De=(Lt=et==null?void 0:et.answer)==null?void 0:Lt.recording;De!=null&&De.url&&(y(De),d("saved"))},Ut=()=>{var wr;(wr=Se.current)==null||wr.abort(),y(null),k(null),N(null),d("idle")};return s.on("answers:prefill",xt),s.on("answers:reset",Ut),()=>{s.off("answers:prefill",xt),s.off("answers:reset",Ut)}},[e,s]);let Re=()=>{cancelAnimationFrame(ue.current);let xt=se.current;se.current=null,xt&&xt.state!=="closed"&&xt.close().catch(()=>{})},it=()=>{var xt;(xt=H.current)==null||xt.getTracks().forEach(Ut=>Ut.stop()),H.current=null};(0,Gt.useEffect)(()=>()=>{var xt;K.current&&clearInterval(K.current),Re(),it(),(xt=Se.current)==null||xt.abort()},[]),(0,Gt.useEffect)(()=>{let xt=x==null?void 0:x.url;return()=>{xt&&URL.revokeObjectURL(xt)}},[x==null?void 0:x.url]);let Ie=xt=>{let Ut=ye.current,wr=window.AudioContext||window.webkitAudioContext;if(!Ut||!wr)return;let et;try{et=new wr}catch(We){return}se.current=et;let De=et.createAnalyser();De.fftSize=512,et.createMediaStreamSource(xt).connect(De);let ot=new Uint8Array(De.fftSize),Lt=window.devicePixelRatio||1,ft=Math.max(1,Ut.clientWidth),tt=Math.max(1,Ut.clientHeight);Ut.width=Math.round(ft*Lt),Ut.height=Math.round(tt*Lt);let Un=Ut.getContext("2d");if(!Un)return;Un.scale(Lt,Lt);let Et=3,Oi=2,wn=[],ja=Math.floor(ft/(Et+Oi)),aa=0,Dr=We=>{if(ue.current=requestAnimationFrame(Dr),We-aa<50)return;aa=We,De.getByteTimeDomainData(ot);let ma=0;for(let st=0;st<ot.length;st++){let Ja=(ot[st]-128)/128;ma+=Ja*Ja}wn.push(Math.min(1,Math.sqrt(ma/ot.length)*3)),wn.length>ja&&wn.shift(),Un.clearRect(0,0,ft,tt),Un.fillStyle="#1d2025";let di=ft-wn.length*(Et+Oi);wn.forEach((st,Ja)=>{let Da=Math.max(2,st*tt);Un.fillRect(di+Ja*(Et+Oi),(tt-Da)/2,Et,Da)})};ue.current=requestAnimationFrame(Dr)};(0,Gt.useEffect)(()=>{f==="recording"&&t==="audio"&&H.current&&Ie(H.current)},[f]);let Oe=async(xt,Ut)=>{var et;if(!i)return;let wr=new AbortController;Se.current=wr,Me.current={file:xt,duration:Ut},N(null),E(0),d("uploading");try{let De=await i.upload(xt,u,{onProgress:Lt=>{wr.signal.aborted||E(Math.max(0,Math.min(1,Lt)))},signal:wr.signal});if(wr.signal.aborted)return;let ot={url:De.url,mimeType:(et=De.mimeType)!=null?et:xt.type,duration:Ut,kind:u};Me.current=null,y(ot),d("saved"),o(ot)}catch(De){if(wr.signal.aborted||tme(De))return;d("failed"),N(l.recorderFailed)}finally{E(null)}},me=()=>{var xt;(xt=Se.current)==null||xt.abort(),Me.current=null,k(null),E(null),d(de.current?"saved":"idle")},be=()=>{let xt=Me.current;xt&&Oe(xt.file,xt.duration)},qe=()=>{K.current&&(clearInterval(K.current),K.current=null);let xt=O.current;xt&&xt.state!=="inactive"&&xt.stop()},Ke=async()=>{var De,ot,Lt;if(!i){N(l.recorderUnavailableHere);return}if(!(typeof MediaRecorder!="undefined"&&typeof navigator!="undefined"&&!!((De=navigator.mediaDevices)!=null&&De.getUserMedia)&&(t!=="screen"||!!navigator.mediaDevices.getDisplayMedia))){N(l.recorderUnsupported);return}(ot=Se.current)==null||ot.abort(),de.current=p,N(null),d("requesting");let Ut;try{if(t==="screen"){Ut=await navigator.mediaDevices.getDisplayMedia({video:!0,audio:!1});try{let tt=(await navigator.mediaDevices.getUserMedia({audio:!0})).getAudioTracks()[0];tt&&Ut.addTrack(tt)}catch(ft){}(Lt=Ut.getVideoTracks()[0])==null||Lt.addEventListener("ended",()=>qe())}else t==="video"?Ut=await navigator.mediaDevices.getUserMedia({audio:!0,video:{facingMode:"user"}}):Ut=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(ft){let tt=ft==null?void 0:ft.name;d(p?"saved":"idle"),N(tt==="NotAllowedError"||tt==="SecurityError"||tt==="NotFoundError"?l.openResponsePermissionDenied:l.recorderUnsupported);return}let wr=Q1e(u),et;try{et=wr?new MediaRecorder(Ut,{mimeType:wr}):new MediaRecorder(Ut)}catch(ft){try{et=new MediaRecorder(Ut)}catch(tt){Ut.getTracks().forEach(Un=>Un.stop()),d(p?"saved":"idle"),N(l.recorderUnsupported);return}}H.current=Ut,O.current=et,U.current=[],et.ondataavailable=ft=>{ft.data.size>0&&U.current.push(ft.data)},et.onstop=()=>{let ft=Math.max(1,Math.round((performance.now()-J.current)/1e3)),tt=et.mimeType||wr||`${u}/webm`,Un=new Blob(U.current,{type:tt});if(U.current=[],Re(),it(),Y.current&&(Y.current.srcObject=null),Un.size===0){d(de.current?"saved":"idle"),N(l.recorderUnsupported);return}let Et=new File([Un],`recording.${eme(tt,u)}`,{type:tt});k({url:URL.createObjectURL(Un),duration:ft}),Oe(Et,ft)},et.start(250),J.current=performance.now(),S(0),d("recording"),K.current=setInterval(()=>{let ft=(performance.now()-J.current)/1e3;S(ft),c&&ft>=c&&qe()},200)};(0,Gt.useEffect)(()=>{let xt=Y.current;f==="recording"&&xt&&H.current&&(xt.srcObject=H.current,xt.play().catch(()=>{}))},[f]);let je=(Ht=(zt=x==null?void 0:x.url)!=null?zt:p==null?void 0:p.url)!=null?Ht:null,Ye=(Hr=(Yr=x==null?void 0:x.duration)!=null?Yr:p==null?void 0:p.duration)!=null?Hr:null,mt=je?u==="audio"?(0,$e.jsx)(Nu,{src:je,durationHint:Ye}):(0,$e.jsx)("video",{src:je,controls:!0,playsInline:!0,preload:"metadata"}):null;if(n)return(0,$e.jsx)("div",{className:hr("edp-rec",a),children:p?u==="audio"?(0,$e.jsx)(Nu,{src:p.url,durationHint:p.duration}):(0,$e.jsx)("video",{src:p.url,controls:!0,playsInline:!0,preload:"metadata"}):(0,$e.jsx)("p",{className:"edp-rec-message",children:l.recorderNone})});let At=t==="audio"?(0,$e.jsx)(n2,{"aria-hidden":!0}):t==="screen"?(0,$e.jsx)(a2,{"aria-hidden":!0}):(0,$e.jsx)(U1,{"aria-hidden":!0});return(0,$e.jsxs)("div",{className:hr("edp-rec",a),children:[(f==="idle"||f==="requesting")&&(0,$e.jsxs)("div",{className:"edp-rec-idle",children:[(0,$e.jsx)("button",{type:"button",className:"edp-rec-record",onClick:Ke,disabled:f==="requesting"||!i,"aria-label":t==="screen"?l.openResponseTapToRecordScreen:l.recorderRecord,children:At}),(0,$e.jsx)("span",{className:"edp-rec-label",children:f==="requesting"?l.openResponseRequestingPermission:l.recorderRecord}),c&&(0,$e.jsx)("span",{className:"edp-rec-limit",children:l.recorderUpTo(pL(c))}),!i&&(0,$e.jsx)("p",{className:"edp-rec-message",children:l.recorderUnavailableHere})]}),f==="recording"&&(0,$e.jsxs)($e.Fragment,{children:[u==="video"&&(0,$e.jsx)("video",{ref:Y,muted:!0,playsInline:!0}),(0,$e.jsxs)("div",{className:"edp-rec-live",role:"status","aria-label":l.recorderRecordingAria,children:[t==="audio"?(0,$e.jsx)("canvas",{ref:ye,className:"edp-rec-level","aria-hidden":!0}):(0,$e.jsx)("span",{style:{flex:1}}),(0,$e.jsxs)("span",{className:"edp-rec-clock",dir:"ltr",children:[(0,$e.jsx)("span",{className:"edp-rec-dot","aria-hidden":!0}),pL(Math.floor(w)),c&&(0,$e.jsxs)("small",{children:["/ ",pL(c)]})]}),(0,$e.jsxs)("button",{type:"button",className:"edp-rec-stop",onClick:qe,children:[(0,$e.jsx)("i",{"aria-hidden":!0}),l.openResponseStopRecording]})]})]}),(f==="uploading"||f==="saved"||f==="failed")&&(0,$e.jsxs)($e.Fragment,{children:[mt,(0,$e.jsxs)("div",{className:"edp-rec-foot",children:[f==="uploading"&&(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsx)("span",{className:"edp-rec-status","aria-live":"polite",children:T&&T>0?l.recorderSaving(Math.round(T*100)):l.openResponseUploading}),(0,$e.jsx)("span",{className:"edp-rec-progress","aria-hidden":!0,children:(0,$e.jsx)("span",{style:{width:`${Math.round((T!=null?T:0)*100)}%`}})}),(0,$e.jsx)("button",{type:"button",className:"edp-rec-link",onClick:me,children:l.recorderCancel})]}),f==="saved"&&(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsxs)("span",{className:"edp-rec-status edp-rec-status--ok","aria-live":"polite",children:[(0,$e.jsx)(zs,{size:16,"aria-hidden":!0}),l.recorderSaved]}),(0,$e.jsx)("button",{type:"button",className:"edp-rec-link",onClick:Ke,children:l.recorderRecordAgain})]}),f==="failed"&&(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsxs)("span",{className:"edp-rec-status edp-rec-status--error",role:"alert",children:[(0,$e.jsx)(Bu,{size:16,"aria-hidden":!0}),z!=null?z:l.recorderFailed]}),(0,$e.jsxs)("span",{style:{display:"inline-flex",gap:"1rem"},children:[(0,$e.jsx)("button",{type:"button",className:"edp-rec-link",onClick:be,children:l.recorderRetry}),(0,$e.jsx)("button",{type:"button",className:"edp-rec-link",onClick:Ke,children:l.recorderRecordAgain})]})]})]})]}),z&&f!=="failed"&&(0,$e.jsx)("p",{className:"edp-rec-message",role:"alert",children:z})]})}function nme({feedback:e,feedbackState:t,score:r,t:n}){let a=t==="correct"?{bg:"var(--ok-soft, #ecf8f0)",border:"var(--ok, #1f8a4c)",ink:"var(--ok, #1f8a4c)"}:t==="incorrect"?{bg:"var(--pen-soft, #fdeeec)",border:"var(--pen, #d23b2b)",ink:"var(--pen, #d23b2b)"}:{bg:"var(--almost-soft, #fbf1dc)",border:"var(--almost, #c8810e)",ink:"var(--almost-ink, #8a5a08)"};return(0,$e.jsxs)("div",{className:"rounded p-3 text-sm border",style:{background:a.bg,borderColor:a.border,color:"var(--ink, #1d2025)"},children:[(0,$e.jsx)("p",{className:"text-xs font-medium mb-1 opacity-70",children:n.openResponseTeacherFeedbackLabel}),e.flatMap(i=>{var o,s,l;return(l=(o=i.content)==null?void 0:o.map(u=>{var c;return(c=u.text)!=null?c:""}))!=null?l:[(s=i.text)!=null?s:""]}).join(" "),r!=null&&(0,$e.jsxs)("div",{className:"mt-1 text-right",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',fontSize:St("1.4rem"),lineHeight:1,color:a.ink},children:[r," pts"]})]})}var Ya=Ee($t(),1),pu=Ee(_t(),1);function vye(e){return e!=null&&e.showFeedback?e.state==="validating"?"validating":e.state==="correct"?"correct":e.state==="incorrect"?"incorrect":"idle":"idle"}function sx({nodeId:e,placeholder:t,hint:r,validationFeedback:n,readOnly:a=!1}){let i=Yn(),o=Li(),s=(0,pu.useRef)(null),[l,u]=(0,pu.useState)(""),[c,f]=(0,pu.useState)(!1),d=vye(n),p=n==null?void 0:n.score,y=n==null?void 0:n.maxScore,x=E=>Number.isInteger(E)?String(E):E.toFixed(2),k=n==null?void 0:n.displayAnswer,w=(0,pu.useMemo)(()=>k?hp(k,!1):"",[k]);(0,pu.useEffect)(()=>{Promise.resolve().then(()=>(nZ(),rZ)).then(()=>{f(!0)}).catch(()=>{})},[]),(0,pu.useEffect)(()=>{let E=z=>{var O,H;let N=(O=z.answers)==null?void 0:O.find(U=>U.nodeId===e&&U.type==="mathResponse");((H=N==null?void 0:N.answer)==null?void 0:H.latex)!==void 0&&(u(N.answer.latex),s.current&&(s.current.value=N.answer.latex))};return o.on("answers:prefill",E),()=>o.off("answers:prefill",E)},[o,e]),(0,pu.useEffect)(()=>{o.emit({type:"answer:changed",answer:{nodeId:e,type:"mathResponse",timestamp:Date.now(),answer:{latex:l}}})},[l,e,o]);let S=E=>{var N,O;let z=(O=(N=E.target)==null?void 0:N.value)!=null?O:"";u(z)},T=d==="correct"?"player-math-field--correct":d==="incorrect"?"player-math-field--incorrect":d==="validating"?"player-math-field--validating":"";return(0,Ya.jsxs)("div",{dir:"ltr",className:"math-response-player",children:[(0,Ya.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:St("0.4rem")},children:[(0,Ya.jsx)("div",{className:"player-math-field"+(T?" "+T:"")+(a?" player-math-field--readonly":""),children:c?(0,Ya.jsx)("math-field",{ref:s,value:l,onInput:S,"virtual-keyboard-mode":"onfocus","smart-fence":"true",className:"player-math-field__input",style:{opacity:a?.7:1,pointerEvents:a?"none":"auto"}}):(0,Ya.jsx)("input",{type:"text",value:l,onChange:E=>u(E.target.value),placeholder:t||"Enter LaTeX (e.g. \\frac{x^2}{2})",readOnly:a,className:"player-math-field__fallback"})}),(0,Ya.jsx)(Ku,{hint:r})]}),(n==null?void 0:n.showFeedback)&&(0,Ya.jsxs)("div",{className:"player-math-feedback player-math-feedback--"+d,children:[d==="validating"&&(0,Ya.jsxs)(Ya.Fragment,{children:[(0,Ya.jsx)("span",{className:"player-math-spinner"}),(0,Ya.jsx)("span",{children:i.mathChecking})]}),d==="correct"&&(0,Ya.jsxs)(Ya.Fragment,{children:[(0,Ya.jsxs)("span",{children:["\u2713 ",i.mathCorrect]}),p!=null&&(0,Ya.jsxs)("span",{className:"player-math-score",children:[x(p),y!=null?` / ${x(y)}`:""]})]}),d==="incorrect"&&(0,Ya.jsxs)("span",{children:["\u2717 ",i.mathIncorrect]}),d==="incorrect"&&w&&(0,Ya.jsxs)("span",{className:"player-blank-reveal player-math-reveal",children:["(",(0,Ya.jsx)("span",{dangerouslySetInnerHTML:{__html:w}}),")"]})]})]})}var Xt=Ee($t(),1),Ul=Ee(_t(),1);function W9(e,t){if(e===t)return!0;if(e===null||t===null||typeof e!=typeof t||typeof e!="object")return!1;let r=Array.isArray(e),n=Array.isArray(t);if(r!==n)return!1;if(r&&n){let l=e,u=t;return l.length!==u.length?!1:l.every((c,f)=>W9(c,u[f]))}let a=e,i=t,o=Object.keys(a),s=Object.keys(i);return o.length!==s.length?!1:o.every(l=>W9(a[l],i[l]))}var yxe=`
4051
4051
  "use strict";
4052
4052
 
@@ -4125,7 +4125,7 @@ sys.stdin = io.StringIO(${JSON.stringify(o)})
4125
4125
  `);V0(`@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_AMS-Regular.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Main-Bold.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Main-Italic.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Main-Regular.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Math-Italic.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Script-Regular.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Size1-Regular.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Size2-Regular.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Size3-Regular.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Size4-Regular.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/fonts/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.28"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}
4126
4126
  `);V0(`.edpire-annex-layout{display:flex;flex:1;min-width:0;height:100%;overflow:hidden;position:relative}.edpire-annex-main{flex:1;min-width:0;overflow:hidden;display:flex;flex-direction:column}.edpire-annex-panel{width:38%;min-width:calc(280px * var(--edp-scale, 1));max-width:calc(480px * var(--edp-scale, 1));flex-shrink:0;display:flex;flex-direction:column;border-right:1px solid #e5e7eb;background:#fff;overflow:hidden}.edpire-annex-panel__header{flex-shrink:0;padding:calc(12px * var(--edp-scale, 1)) calc(20px * var(--edp-scale, 1));border-bottom:1px solid #f3f4f6;background:#f9fafb}.edpire-annex-panel__header-label{font-size:calc(11px * var(--edp-scale, 1));font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#6b7280}.edpire-annex-panel__scroll{flex:1;overflow-y:auto;padding:calc(24px * var(--edp-scale, 1)) calc(20px * var(--edp-scale, 1));display:flex;flex-direction:column;gap:calc(32px * var(--edp-scale, 1))}.edpire-annex-tab,.edpire-annex-drawer,.edpire-annex-backdrop{display:none}@media(max-width:1023px){.edpire-annex-panel{display:none}.edpire-annex-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(8px * var(--edp-scale, 1));position:fixed;left:0;top:50%;transform:translateY(-50%);z-index:40;background:var(--edpire-annex-tab-bg, #2563eb);color:var(--edpire-annex-tab-color, #ffffff);border:none;border-radius:0 calc(10px * var(--edp-scale, 1)) calc(10px * var(--edp-scale, 1)) 0;padding:calc(18px * var(--edp-scale, 1)) calc(10px * var(--edp-scale, 1));cursor:pointer;box-shadow:2px 2px 16px #0000002e;transition:filter .15s}.edpire-annex-tab:hover{filter:brightness(.88)}.edpire-annex-tab__label{writing-mode:vertical-rl;text-orientation:mixed;transform:rotate(180deg);font-size:calc(11px * var(--edp-scale, 1));font-weight:700;letter-spacing:.07em;text-transform:uppercase;white-space:nowrap}.edpire-annex-drawer{display:flex;flex-direction:column;position:fixed;left:0;top:0;bottom:0;width:min(84vw,calc(440px * var(--edp-scale, 1)));background:#fff;z-index:50;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1);box-shadow:4px 0 32px #00000021;overflow:hidden}.edpire-annex-drawer--open{transform:translate(0)}.edpire-annex-drawer__header{display:flex;align-items:center;justify-content:space-between;padding:calc(16px * var(--edp-scale, 1)) calc(20px * var(--edp-scale, 1));border-bottom:1px solid #f3f4f6;background:#f9fafb;flex-shrink:0}.edpire-annex-drawer__label{font-size:calc(13px * var(--edp-scale, 1));font-weight:700;color:#111827}.edpire-annex-drawer__close{display:flex;align-items:center;justify-content:center;width:calc(28px * var(--edp-scale, 1));height:calc(28px * var(--edp-scale, 1));background:none;border:none;cursor:pointer;font-size:calc(20px * var(--edp-scale, 1));line-height:1;color:#9ca3af;border-radius:calc(6px * var(--edp-scale, 1));transition:color .15s,background .15s}.edpire-annex-drawer__close:hover{color:#111827;background:#f3f4f6}.edpire-annex-drawer__scroll{flex:1;overflow-y:auto;padding:calc(24px * var(--edp-scale, 1)) calc(20px * var(--edp-scale, 1));display:flex;flex-direction:column;gap:calc(32px * var(--edp-scale, 1))}.edpire-annex-backdrop{display:block;position:fixed;inset:0;background:#00000061;z-index:45;cursor:pointer}}
4127
4127
  `);V0(`/*! tailwindcss v4.2.0 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){.edpire-scope *,.edpire-scope :before,.edpire-scope :after,.edpire-scope ::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{.edpire-scope{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-950:oklch(25.8% .092 26.042);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-900:oklch(41.4% .112 45.904);--color-blue-600:oklch(54.6% .245 262.881);--color-rose-500:oklch(64.5% .246 16.439);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-800:oklch(27.9% .041 260.031);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}.edpire-scope .\\@container{container-type:inline-size}.edpire-scope .pointer-events-none{pointer-events:none}.edpire-scope .collapse{visibility:collapse}.edpire-scope .invisible{visibility:hidden}.edpire-scope .visible{visibility:visible}.edpire-scope .absolute{position:absolute}.edpire-scope .fixed{position:fixed}.edpire-scope .relative{position:relative}.edpire-scope .static{position:static}.edpire-scope .sticky{position:sticky}.edpire-scope .inset-0{inset:calc(var(--spacing) * 0)}.edpire-scope .start{inset-inline-start:var(--spacing)}.edpire-scope .start-0{inset-inline-start:calc(var(--spacing) * 0)}.edpire-scope .start-2{inset-inline-start:calc(var(--spacing) * 2)}.edpire-scope .end{inset-inline-end:var(--spacing)}.edpire-scope .end-2{inset-inline-end:calc(var(--spacing) * 2)}.edpire-scope .top-0{top:calc(var(--spacing) * 0)}.edpire-scope .top-1\\/2{top:50%}.edpire-scope .top-2{top:calc(var(--spacing) * 2)}.edpire-scope .top-4{top:calc(var(--spacing) * 4)}.edpire-scope .top-\\[calc\\(var\\(--edp-bar\\)\\+1rem\\)\\]{top:calc(var(--edp-bar) + 1rem)}.edpire-scope .right-1{right:calc(var(--spacing) * 1)}.edpire-scope .right-3{right:calc(var(--spacing) * 3)}.edpire-scope .bottom-2{bottom:calc(var(--spacing) * 2)}.edpire-scope .isolate{isolation:isolate}.edpire-scope .z-10{z-index:10}.edpire-scope .z-20{z-index:20}.edpire-scope .z-30{z-index:30}.edpire-scope .z-40{z-index:40}.edpire-scope .z-50{z-index:50}.edpire-scope .z-\\[60\\]{z-index:60}.edpire-scope .container{width:100%}@media(min-width:40rem){.edpire-scope .container{max-width:40rem}}@media(min-width:48rem){.edpire-scope .container{max-width:48rem}}@media(min-width:64rem){.edpire-scope .container{max-width:64rem}}@media(min-width:80rem){.edpire-scope .container{max-width:80rem}}@media(min-width:96rem){.edpire-scope .container{max-width:96rem}}.edpire-scope .-mx-3{margin-inline:calc(var(--spacing) * -3)}.edpire-scope .mx-1{margin-inline:calc(var(--spacing) * 1)}.edpire-scope .mx-4{margin-inline:calc(var(--spacing) * 4)}.edpire-scope .mx-auto{margin-inline:auto}.edpire-scope .my-1{margin-block:calc(var(--spacing) * 1)}.edpire-scope .my-3{margin-block:calc(var(--spacing) * 3)}.edpire-scope .my-4{margin-block:calc(var(--spacing) * 4)}.edpire-scope .ms-0\\.5{margin-inline-start:calc(var(--spacing) * .5)}.edpire-scope .ms-1{margin-inline-start:calc(var(--spacing) * 1)}.edpire-scope .ms-2{margin-inline-start:calc(var(--spacing) * 2)}.edpire-scope .ms-auto{margin-inline-start:auto}.edpire-scope .mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.edpire-scope .mt-1{margin-top:calc(var(--spacing) * 1)}.edpire-scope .mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.edpire-scope .mt-2{margin-top:calc(var(--spacing) * 2)}.edpire-scope .mt-3{margin-top:calc(var(--spacing) * 3)}.edpire-scope .mt-4{margin-top:calc(var(--spacing) * 4)}.edpire-scope .mt-6{margin-top:calc(var(--spacing) * 6)}.edpire-scope .mt-px{margin-top:1px}.edpire-scope .mr-2{margin-right:calc(var(--spacing) * 2)}.edpire-scope .mb-1{margin-bottom:calc(var(--spacing) * 1)}.edpire-scope .mb-2{margin-bottom:calc(var(--spacing) * 2)}.edpire-scope .mb-3{margin-bottom:calc(var(--spacing) * 3)}.edpire-scope .mb-5{margin-bottom:calc(var(--spacing) * 5)}.edpire-scope .ml-1{margin-left:calc(var(--spacing) * 1)}.edpire-scope .ml-auto{margin-left:auto}.edpire-scope .line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.edpire-scope .block{display:block}.edpire-scope .contents{display:contents}.edpire-scope .flex{display:flex}.edpire-scope .grid{display:grid}.edpire-scope .hidden{display:none}.edpire-scope .inline{display:inline}.edpire-scope .inline-block{display:inline-block}.edpire-scope .inline-flex{display:inline-flex}.edpire-scope .table{display:table}.edpire-scope .h-2{height:calc(var(--spacing) * 2)}.edpire-scope .h-3{height:calc(var(--spacing) * 3)}.edpire-scope .h-4{height:calc(var(--spacing) * 4)}.edpire-scope .h-5{height:calc(var(--spacing) * 5)}.edpire-scope .h-6{height:calc(var(--spacing) * 6)}.edpire-scope .h-7{height:calc(var(--spacing) * 7)}.edpire-scope .h-8{height:calc(var(--spacing) * 8)}.edpire-scope .h-9{height:calc(var(--spacing) * 9)}.edpire-scope .h-11{height:calc(var(--spacing) * 11)}.edpire-scope .h-16{height:calc(var(--spacing) * 16)}.edpire-scope .h-24{height:calc(var(--spacing) * 24)}.edpire-scope .h-\\[600px\\]{height:600px}.edpire-scope .h-dvh{height:100dvh}.edpire-scope .h-full{height:100%}.edpire-scope .h-screen{height:100vh}.edpire-scope .max-h-48{max-height:calc(var(--spacing) * 48)}.edpire-scope .max-h-\\[calc\\(100dvh-8rem\\)\\]{max-height:calc(100dvh - 8rem)}.edpire-scope .max-h-\\[calc\\(100dvh-var\\(--edp-bar\\)-2rem\\)\\]{max-height:calc(100dvh - var(--edp-bar) - 2rem)}.edpire-scope .max-h-\\[calc\\(100svh-6rem\\)\\]{max-height:calc(100svh - 6rem)}.edpire-scope .min-h-0{min-height:calc(var(--spacing) * 0)}.edpire-scope .min-h-\\[72px\\]{min-height:72px}.edpire-scope .min-h-\\[100px\\]{min-height:100px}.edpire-scope .min-h-\\[120px\\]{min-height:120px}.edpire-scope .min-h-\\[200px\\]{min-height:200px}.edpire-scope .min-h-dvh{min-height:100dvh}.edpire-scope .w-3{width:calc(var(--spacing) * 3)}.edpire-scope .w-4{width:calc(var(--spacing) * 4)}.edpire-scope .w-5{width:calc(var(--spacing) * 5)}.edpire-scope .w-6{width:calc(var(--spacing) * 6)}.edpire-scope .w-7{width:calc(var(--spacing) * 7)}.edpire-scope .w-9{width:calc(var(--spacing) * 9)}.edpire-scope .w-11{width:calc(var(--spacing) * 11)}.edpire-scope .w-12{width:calc(var(--spacing) * 12)}.edpire-scope .w-16{width:calc(var(--spacing) * 16)}.edpire-scope .w-24{width:calc(var(--spacing) * 24)}.edpire-scope .w-\\[88\\%\\]{width:88%}.edpire-scope .w-full{width:100%}.edpire-scope .w-px{width:1px}.edpire-scope .max-w-3xl{max-width:var(--container-3xl)}.edpire-scope .max-w-\\[32ch\\]{max-width:32ch}.edpire-scope .max-w-\\[200px\\]{max-width:200px}.edpire-scope .max-w-\\[240px\\]{max-width:240px}.edpire-scope .max-w-full{max-width:100%}.edpire-scope .max-w-none{max-width:none}.edpire-scope .max-w-sm{max-width:var(--container-sm)}.edpire-scope .max-w-xs{max-width:var(--container-xs)}.edpire-scope .min-w-0{min-width:calc(var(--spacing) * 0)}.edpire-scope .min-w-\\[80px\\]{min-width:80px}.edpire-scope .min-w-\\[140px\\]{min-width:140px}.edpire-scope .flex-1{flex:1}.edpire-scope .flex-none{flex:none}.edpire-scope .flex-shrink-0,.edpire-scope .shrink-0{flex-shrink:0}.edpire-scope .grow{flex-grow:1}.edpire-scope .-translate-x-\\[110\\%\\]{--tw-translate-x: -110% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.edpire-scope .translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.edpire-scope .-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.edpire-scope .transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.edpire-scope .animate-pulse{animation:var(--animate-pulse)}.edpire-scope .animate-spin{animation:var(--animate-spin)}.edpire-scope .cursor-default{cursor:default}.edpire-scope .cursor-pointer{cursor:pointer}.edpire-scope .resize{resize:both}.edpire-scope .flex-col{flex-direction:column}.edpire-scope .flex-wrap{flex-wrap:wrap}.edpire-scope .items-baseline{align-items:baseline}.edpire-scope .items-center{align-items:center}.edpire-scope .items-start{align-items:flex-start}.edpire-scope .justify-between{justify-content:space-between}.edpire-scope .justify-center{justify-content:center}.edpire-scope .justify-end{justify-content:flex-end}.edpire-scope .gap-0\\.5{gap:calc(var(--spacing) * .5)}.edpire-scope .gap-1{gap:calc(var(--spacing) * 1)}.edpire-scope .gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.edpire-scope .gap-2{gap:calc(var(--spacing) * 2)}.edpire-scope .gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.edpire-scope .gap-3{gap:calc(var(--spacing) * 3)}.edpire-scope .gap-4{gap:calc(var(--spacing) * 4)}.edpire-scope .gap-5{gap:calc(var(--spacing) * 5)}.edpire-scope .gap-6{gap:calc(var(--spacing) * 6)}.edpire-scope :where(.edpire-scope .space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}.edpire-scope :where(.edpire-scope .space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}.edpire-scope :where(.edpire-scope .space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}.edpire-scope .gap-x-1{column-gap:calc(var(--spacing) * 1)}.edpire-scope .gap-x-4{column-gap:calc(var(--spacing) * 4)}.edpire-scope .gap-y-0\\.5{row-gap:calc(var(--spacing) * .5)}.edpire-scope .gap-y-2{row-gap:calc(var(--spacing) * 2)}.edpire-scope .self-start{align-self:flex-start}.edpire-scope .self-stretch{align-self:stretch}.edpire-scope .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.edpire-scope .overflow-auto{overflow:auto}.edpire-scope .overflow-hidden{overflow:hidden}.edpire-scope .overflow-visible{overflow:visible}.edpire-scope .overflow-y-auto{overflow-y:auto}.edpire-scope .rounded{border-radius:.25rem}.edpire-scope .rounded-2xl{border-radius:var(--radius-2xl)}.edpire-scope .rounded-\\[10px\\]{border-radius:10px}.edpire-scope .rounded-\\[14px\\]{border-radius:14px}.edpire-scope .rounded-full{border-radius:3.40282e38px}.edpire-scope .rounded-lg{border-radius:var(--radius-lg)}.edpire-scope .rounded-md{border-radius:var(--radius-md)}.edpire-scope .rounded-sm{border-radius:var(--radius-sm)}.edpire-scope .rounded-xl{border-radius:var(--radius-xl)}.edpire-scope .rounded-e-lg{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.edpire-scope .rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.edpire-scope .border{border-style:var(--tw-border-style);border-width:1px}.edpire-scope .border-2{border-style:var(--tw-border-style);border-width:2px}.edpire-scope .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.edpire-scope .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.edpire-scope .border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.edpire-scope .border-dashed{--tw-border-style:dashed;border-style:dashed}.edpire-scope .border-\\[\\#c5e8d1\\]{border-color:#c5e8d1}.edpire-scope .border-\\[\\#d6d3cc\\]{border-color:#d6d3cc}.edpire-scope .border-\\[\\#e7e5e0\\]{border-color:#e7e5e0}.edpire-scope .border-\\[\\#f2e2bf\\]{border-color:#f2e2bf}.edpire-scope .border-\\[\\#f6cfc9\\]{border-color:#f6cfc9}.edpire-scope .border-amber-200{border-color:var(--color-amber-200)}.edpire-scope .border-gray-100{border-color:var(--color-gray-100)}.edpire-scope .border-gray-200{border-color:var(--color-gray-200)}.edpire-scope .border-gray-300{border-color:var(--color-gray-300)}.edpire-scope .bg-\\[\\#1d2025\\]{background-color:#1d2025}.edpire-scope .bg-\\[\\#e7e5e0\\]{background-color:#e7e5e0}.edpire-scope .bg-\\[\\#ecf8f0\\]{background-color:#ecf8f0}.edpire-scope .bg-\\[\\#f1efe9\\]{background-color:#f1efe9}.edpire-scope .bg-\\[\\#f2e2bf\\]{background-color:#f2e2bf}.edpire-scope .bg-\\[\\#f5f4f1\\]{background-color:#f5f4f1}.edpire-scope .bg-\\[\\#fbf1dc\\]{background-color:#fbf1dc}.edpire-scope .bg-\\[\\#fbfaf7\\]{background-color:#fbfaf7}.edpire-scope .bg-\\[\\#fdeeec\\]{background-color:#fdeeec}.edpire-scope .bg-amber-50{background-color:var(--color-amber-50)}.edpire-scope .bg-black\\/25{background-color:#00000040}@supports (color:color-mix(in lab,red,red)){.edpire-scope .bg-black\\/25{background-color:color-mix(in oklab,var(--color-black) 25%,transparent)}}.edpire-scope .bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.edpire-scope .bg-black\\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.edpire-scope .bg-gray-50{background-color:var(--color-gray-50)}.edpire-scope .bg-gray-100{background-color:var(--color-gray-100)}.edpire-scope .bg-gray-300{background-color:var(--color-gray-300)}.edpire-scope .bg-red-950\\/80{background-color:#460809cc}@supports (color:color-mix(in lab,red,red)){.edpire-scope .bg-red-950\\/80{background-color:color-mix(in oklab,var(--color-red-950) 80%,transparent)}}.edpire-scope .bg-white{background-color:var(--color-white)}.edpire-scope .bg-white\\/60{background-color:#fff9}@supports (color:color-mix(in lab,red,red)){.edpire-scope .bg-white\\/60{background-color:color-mix(in oklab,var(--color-white) 60%,transparent)}}.edpire-scope .object-contain{object-fit:contain}.edpire-scope .object-cover{object-fit:cover}.edpire-scope .p-1{padding:calc(var(--spacing) * 1)}.edpire-scope .p-1\\.5{padding:calc(var(--spacing) * 1.5)}.edpire-scope .p-2{padding:calc(var(--spacing) * 2)}.edpire-scope .p-3{padding:calc(var(--spacing) * 3)}.edpire-scope .p-4{padding:calc(var(--spacing) * 4)}.edpire-scope .p-6{padding:calc(var(--spacing) * 6)}.edpire-scope .px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.edpire-scope .px-2{padding-inline:calc(var(--spacing) * 2)}.edpire-scope .px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.edpire-scope .px-3{padding-inline:calc(var(--spacing) * 3)}.edpire-scope .px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.edpire-scope .px-4{padding-inline:calc(var(--spacing) * 4)}.edpire-scope .px-5{padding-inline:calc(var(--spacing) * 5)}.edpire-scope .px-6{padding-inline:calc(var(--spacing) * 6)}.edpire-scope .px-10{padding-inline:calc(var(--spacing) * 10)}.edpire-scope .py-0\\.5{padding-block:calc(var(--spacing) * .5)}.edpire-scope .py-1{padding-block:calc(var(--spacing) * 1)}.edpire-scope .py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.edpire-scope .py-2{padding-block:calc(var(--spacing) * 2)}.edpire-scope .py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.edpire-scope .py-3{padding-block:calc(var(--spacing) * 3)}.edpire-scope .py-5{padding-block:calc(var(--spacing) * 5)}.edpire-scope .py-8{padding-block:calc(var(--spacing) * 8)}.edpire-scope .py-16{padding-block:calc(var(--spacing) * 16)}.edpire-scope .ps-2{padding-inline-start:calc(var(--spacing) * 2)}.edpire-scope .ps-\\[23px\\]{padding-inline-start:23px}.edpire-scope .pe-2\\.5{padding-inline-end:calc(var(--spacing) * 2.5)}.edpire-scope .pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.edpire-scope .pt-2{padding-top:calc(var(--spacing) * 2)}.edpire-scope .pb-1{padding-bottom:calc(var(--spacing) * 1)}.edpire-scope .pb-5{padding-bottom:calc(var(--spacing) * 5)}.edpire-scope .pl-2{padding-left:calc(var(--spacing) * 2)}.edpire-scope .text-center{text-align:center}.edpire-scope .text-right{text-align:right}.edpire-scope .text-start{text-align:start}.edpire-scope .align-middle{vertical-align:middle}.edpire-scope .font-sans{font-family:var(--font-sans)}.edpire-scope .text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.edpire-scope .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.edpire-scope .text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.edpire-scope .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.edpire-scope .text-\\[1\\.6rem\\]{font-size:1.6rem}.edpire-scope .text-\\[10px\\]{font-size:10px}.edpire-scope .text-\\[11px\\]{font-size:11px}.edpire-scope .leading-none{--tw-leading:1;line-height:1}.edpire-scope .leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.edpire-scope .leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.edpire-scope .font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.edpire-scope .font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.edpire-scope .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.edpire-scope .font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.edpire-scope .tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.edpire-scope .tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.edpire-scope .tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.edpire-scope .tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.edpire-scope .\\[overflow-wrap\\:anywhere\\]{overflow-wrap:anywhere}.edpire-scope .break-words{overflow-wrap:break-word}.edpire-scope .whitespace-pre-wrap{white-space:pre-wrap}.edpire-scope .text-\\[\\#1d2025\\]{color:#1d2025}.edpire-scope .text-\\[\\#1f8a4c\\]{color:#1f8a4c}.edpire-scope .text-\\[\\#8a5a08\\]{color:#8a5a08}.edpire-scope .text-\\[\\#8a8f99\\]{color:#8a8f99}.edpire-scope .text-\\[\\#8d93a0\\]{color:#8d93a0}.edpire-scope .text-\\[\\#565b66\\]{color:#565b66}.edpire-scope .text-\\[\\#a32b1e\\]{color:#a32b1e}.edpire-scope .text-\\[\\#c8810e\\]{color:#c8810e}.edpire-scope .text-\\[\\#d23b2b\\]{color:#d23b2b}.edpire-scope .text-amber-900{color:var(--color-amber-900)}.edpire-scope .text-blue-600{color:var(--color-blue-600)}.edpire-scope .text-gray-400{color:var(--color-gray-400)}.edpire-scope .text-gray-500{color:var(--color-gray-500)}.edpire-scope .text-gray-600{color:var(--color-gray-600)}.edpire-scope .text-gray-700{color:var(--color-gray-700)}.edpire-scope .text-gray-800{color:var(--color-gray-800)}.edpire-scope .text-red-200{color:var(--color-red-200)}.edpire-scope .text-red-300{color:var(--color-red-300)}.edpire-scope .text-slate-500{color:var(--color-slate-500)}.edpire-scope .text-slate-800{color:var(--color-slate-800)}.edpire-scope .text-white{color:var(--color-white)}.edpire-scope .uppercase{text-transform:uppercase}.edpire-scope .italic{font-style:italic}.edpire-scope .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.edpire-scope .line-through{text-decoration-line:line-through}.edpire-scope .underline{text-decoration-line:underline}.edpire-scope .underline-offset-2{text-underline-offset:2px}.edpire-scope .underline-offset-4{text-underline-offset:4px}.edpire-scope .opacity-40{opacity:.4}.edpire-scope .opacity-60{opacity:.6}.edpire-scope .opacity-70{opacity:.7}.edpire-scope .shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.edpire-scope .shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.edpire-scope .shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.edpire-scope .shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.edpire-scope .outline{outline-style:var(--tw-outline-style);outline-width:1px}.edpire-scope .grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.edpire-scope .backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.edpire-scope .transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.edpire-scope .transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.edpire-scope .transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.edpire-scope .transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.edpire-scope .transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.edpire-scope .duration-300{--tw-duration:.3s;transition-duration:.3s}.edpire-scope .duration-700{--tw-duration:.7s;transition-duration:.7s}.edpire-scope .ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.edpire-scope .ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.edpire-scope .outline-none{--tw-outline-style:none;outline-style:none}.edpire-scope .select-none{-webkit-user-select:none;user-select:none}.edpire-scope .\\[--edp-bar\\:0px\\]{--edp-bar:0px}.edpire-scope :is(.edpire-scope .group-open\\:rotate-90):is(:where(.group):is([open],.edpire-scope :popover-open,.edpire-scope :open) *){rotate:90deg}@media(hover:hover){.edpire-scope :is(.edpire-scope .group-hover\\:text-\\[\\#1d2025\\]):is(:where(.group):hover *){color:#1d2025}.edpire-scope :is(.edpire-scope .group-hover\\:shadow-md):is(:where(.group):hover *){--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.edpire-scope :is(.edpire-scope .hover\\:border-\\[\\#8d93a0\\]):hover{border-color:#8d93a0}.edpire-scope :is(.edpire-scope .hover\\:bg-\\[\\#31353c\\]):hover{background-color:#31353c}.edpire-scope :is(.edpire-scope .hover\\:bg-\\[\\#e7e5e0\\]):hover{background-color:#e7e5e0}.edpire-scope :is(.edpire-scope .hover\\:bg-\\[\\#f1efe9\\]):hover{background-color:#f1efe9}.edpire-scope :is(.edpire-scope .hover\\:bg-gray-100):hover{background-color:var(--color-gray-100)}.edpire-scope :is(.edpire-scope .hover\\:bg-white):hover{background-color:var(--color-white)}.edpire-scope :is(.edpire-scope .hover\\:text-\\[\\#1d2025\\]):hover{color:#1d2025}.edpire-scope :is(.edpire-scope .hover\\:text-gray-700):hover{color:var(--color-gray-700)}.edpire-scope :is(.edpire-scope .hover\\:text-rose-500):hover{color:var(--color-rose-500)}.edpire-scope :is(.edpire-scope .hover\\:underline):hover{text-decoration-line:underline}}.edpire-scope :is(.edpire-scope .focus\\:outline-none):focus{--tw-outline-style:none;outline-style:none}.edpire-scope :is(.edpire-scope .focus-visible\\:ring-2):focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.edpire-scope :is(.edpire-scope .focus-visible\\:ring-\\[\\#8d93a0\\]):focus-visible{--tw-ring-color:#8d93a0}.edpire-scope :is(.edpire-scope .focus-visible\\:ring-offset-2):focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.edpire-scope :is(.edpire-scope .focus-visible\\:outline-2):focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.edpire-scope :is(.edpire-scope .focus-visible\\:outline-\\[\\#1d2025\\]):focus-visible{outline-color:#1d2025}.edpire-scope :is(.edpire-scope .disabled\\:cursor-not-allowed):disabled{cursor:not-allowed}.edpire-scope :is(.edpire-scope .disabled\\:opacity-50):disabled{opacity:.5}.edpire-scope :is(.edpire-scope .data-\\[flash\\=true\\]\\:bg-\\[\\#fbf1dc\\])[data-flash=true]{background-color:#fbf1dc}.edpire-scope :is(.edpire-scope .data-\\[flash\\=true\\]\\:duration-150)[data-flash=true]{--tw-duration:.15s;transition-duration:.15s}@media(min-width:40rem){.edpire-scope .sm\\:block{display:block}.edpire-scope .sm\\:hidden{display:none}.edpire-scope .sm\\:inline{display:inline}.edpire-scope .sm\\:inline-flex{display:inline-flex}.edpire-scope .sm\\:flex-row{flex-direction:row}.edpire-scope .sm\\:flex-nowrap{flex-wrap:nowrap}.edpire-scope .sm\\:items-center{align-items:center}.edpire-scope .sm\\:gap-4{gap:calc(var(--spacing) * 4)}.edpire-scope .sm\\:px-4{padding-inline:calc(var(--spacing) * 4)}.edpire-scope .sm\\:px-6{padding-inline:calc(var(--spacing) * 6)}.edpire-scope .sm\\:py-4{padding-block:calc(var(--spacing) * 4)}.edpire-scope .sm\\:text-\\[2rem\\]{font-size:2rem}}@container (min-width:72rem){.edpire-scope .\\@6xl\\:flex{display:flex}.edpire-scope .\\@6xl\\:hidden{display:none}}.edpire-scope :is(.edpire-scope .rtl\\:translate-x-\\[110\\%\\]):where(:dir(rtl),.edpire-scope [dir=rtl],.edpire-scope [dir=rtl] *){--tw-translate-x:110%;translate:var(--tw-translate-x) var(--tw-translate-y)}.edpire-scope :is(.edpire-scope .\\[\\&_\\.ProseMirror\\]\\:min-h-\\[80px\\]) .ProseMirror{min-height:80px}.edpire-scope :is(.edpire-scope .\\[\\&_\\.ProseMirror\\]\\:outline-none) .ProseMirror{--tw-outline-style:none;outline-style:none}.edpire-scope :is(.edpire-scope .\\[\\&_\\.ProseMirror_p\\.is-editor-empty\\:first-child\\:\\:before\\]\\:pointer-events-none) .ProseMirror p.is-editor-empty:first-child:before{pointer-events:none}.edpire-scope :is(.edpire-scope .\\[\\&_\\.ProseMirror_p\\.is-editor-empty\\:first-child\\:\\:before\\]\\:float-left) .ProseMirror p.is-editor-empty:first-child:before{float:left}.edpire-scope :is(.edpire-scope .\\[\\&_\\.ProseMirror_p\\.is-editor-empty\\:first-child\\:\\:before\\]\\:h-0) .ProseMirror p.is-editor-empty:first-child:before{height:calc(var(--spacing) * 0)}.edpire-scope :is(.edpire-scope .\\[\\&_\\.ProseMirror_p\\.is-editor-empty\\:first-child\\:\\:before\\]\\:text-gray-400) .ProseMirror p.is-editor-empty:first-child:before{color:var(--color-gray-400)}.edpire-scope :is(.edpire-scope .\\[\\&_\\.ProseMirror_p\\.is-editor-empty\\:first-child\\:\\:before\\]\\:content-\\[attr\\(data-placeholder\\)\\]) .ProseMirror p.is-editor-empty:first-child:before{--tw-content:attr(data-placeholder);content:var(--tw-content)}.edpire-scope :is(.edpire-scope .\\[\\&_\\[data-exercise-id\\]\\]\\:scroll-mt-\\[calc\\(var\\(--edp-bar\\)\\+0\\.75rem\\)\\]) [data-exercise-id],.edpire-scope :is(.edpire-scope .\\[\\&_\\[data-question-id\\]\\]\\:scroll-mt-\\[calc\\(var\\(--edp-bar\\)\\+0\\.75rem\\)\\]) [data-question-id]{scroll-margin-top:calc(var(--edp-bar) + .75rem)}@layer base{.edpire-scope *,.edpire-scope :after,.edpire-scope :before,.edpire-scope ::backdrop{border-color:var(--color-gray-200,currentColor)}.edpire-scope ::file-selector-button{border-color:var(--color-gray-200,currentColor)}}@supports not (height:100dvh){.edpire-scope .h-dvh{height:100vh}}.edpire-scope :where(span:has(>textarea.player-typed-blank)){line-height:0}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
4128
- `);var Le=Ee($t()),F7e="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234f46e5'%3E%3Cpath d='M12 2L2 7v10l10 5 10-5V7L12 2zm0 2.18L19.5 8 12 11.82 4.5 8 12 4.18zM4 9.6l7 3.5v7.3L4 16.9V9.6zm9 10.8v-7.3l7-3.5v7.3L13 20.4z'/%3E%3C/svg%3E";function q7e(e){var t;for(let r of e.exercises)for(let n of r.questions)if(((t=n.content.content)!=null?t:[]).some(i=>i.type==="aiAnswerInput"))return!0;return!1}function _re(e){var r;let t=e;return typeof t.totalMaxScore=="number"?t.totalMaxScore:((r=t.answerKeys)!=null?r:[]).reduce((n,a)=>{var i,o;return n+((o=(i=a.scoring)==null?void 0:i.maxScore)!=null?o:0)},0)}function wre(e){return e.questions.reduce((t,r)=>t+_re(r),0)}function G0(e){return Number.isInteger(e)?String(e):parseFloat(e.toFixed(2)).toString()}var gI=5;function kre({label:e}){return(0,Le.jsx)("span",{className:"ms-0.5 text-[#d23b2b]",title:e,"aria-label":e,children:"*"})}function Are(e){return e==="full"?"#1f8a4c":e==="partial"?"#c8810e":"#d23b2b"}function Sre({outcome:e}){let t=e==="full"?"M20 54 L41 75 L82 24":e==="none"?"M27 27 L73 73 M73 27 L27 73":"M14 58 C29 33 40 33 52 51 C64 69 74 69 88 42";return(0,Le.jsx)("svg",{width:14,height:14,viewBox:"0 0 100 100",fill:"none",stroke:Are(e),strokeWidth:9,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,Le.jsx)("path",{d:t})})}function $7e({score:e,weight:t,unit:r,t:n,hidden:a=!1}){if(e){if(e.awaiting)return(0,Le.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-lg border border-[#f2e2bf] bg-[#fbf1dc] px-2 py-0.5 text-xs font-semibold text-[#8a5a08]",children:[(0,Le.jsx)(pl,{size:11}),n("pendingReview")]});let i=a?e.outcome:e.m>0&&e.s>=e.m?"full":e.s>0?"partial":"none";return a?(0,Le.jsx)("span",{className:"inline-flex items-center rounded-lg border border-[#e7e5e0] bg-[#f5f4f1] px-2 py-1",children:(0,Le.jsx)(Sre,{outcome:i})}):(0,Le.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-lg border border-[#e7e5e0] bg-[#f5f4f1] ps-2 pe-2.5 py-0.5",children:[(0,Le.jsx)(Sre,{outcome:i}),(0,Le.jsxs)("span",{className:"font-bold leading-none",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',fontSize:"1.05rem",color:Are(i)},children:[G0(e.s)," / ",G0(e.m)]})]})}return t>0&&!a?(0,Le.jsxs)("span",{className:"text-xs font-semibold tabular-nums text-[#8d93a0]",children:[G0(t)," ",r(t)]}):null}function Cre(e){var s,l;let t=0,r=0,n=!1,a=0,i=0;for(let u of e)t+=(s=u.score)!=null?s:0,r+=(l=u.maxScore)!=null?l:0,u.status==="awaiting_review"&&(n=!0),u.status==="correct"&&a++,(u.status==="correct"||u.status==="partial")&&i++;let o=e.length>0&&a===e.length?"full":i>0?"partial":"none";return{score:t,maxScore:r,awaiting:n,outcome:o}}function Mre(e){var r;let t=new Map;for(let n of(r=e==null?void 0:e.exerciseAnswers)!=null?r:[])for(let a of n.questionAnswers)t.set(a.questionId,a.answers);return t}function H7e(e,t){return t.size===0?e:{exerciseAnswers:e.exerciseAnswers.map(r=>Ue(te({},r),{questionAnswers:r.questionAnswers.map(n=>n.answers.length===0&&t.has(n.questionId)?Ue(te({},n),{answers:t.get(n.questionId)}):n)}))}}function j7e({timeLimitMinutes:e,startedAt:t,onExpire:r}){let n=e*6e4,a=new Date(t).getTime()+n,[i,o]=(0,Ft.useState)(()=>Math.max(a-Date.now(),0)),s=(0,Ft.useRef)(r);s.current=r,(0,Ft.useEffect)(()=>{if(i<=0){s.current();return}let x=setInterval(()=>{let k=Math.max(a-Date.now(),0);o(k),k<=0&&(clearInterval(x),s.current())},1e3);return()=>clearInterval(x)},[a]);let l=i/n,u=l<.1?"bg-[#fdeeec] text-[#a32b1e] border-[#f6cfc9] animate-pulse":l<.25?"bg-[#fbf1dc] text-[#8a5a08] border-[#f2e2bf]":"bg-[#f5f4f1] text-[#565b66] border-[#e7e5e0]",c=Math.ceil(i/1e3),f=Math.floor(c/3600),d=Math.floor(c%3600/60),p=c%60,y=f>0?`${f}:${String(d).padStart(2,"0")}:${String(p).padStart(2,"0")}`:`${d}:${String(p).padStart(2,"0")}`;return(0,Le.jsxs)("span",{className:ci("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full border text-xs font-bold tabular-nums transition-colors",u),children:[(0,Le.jsx)(pl,{size:12}),y]})}function cw({assessment:e,meta:t,scoreHidden:r=!1,isForm:n=!1,requiredQuestionIds:a,locale:i="en",branding:o,timeLimitMinutes:s,startedAt:l,initialAnswers:u,onAnswersChange:c,saveState:f,resumed:d=!1,onSubmit:p,review:y,onViewReport:x,reportLabel:k,onBack:w,backLabel:S,allowReset:T,onReset:E,overlayConfig:z,contained:N=!1,layout:O,onClose:H,mediaHandler:U,onAddAnnex:J,fallbackLogoUrl:K}){var Ua,Rt,yn,Vn,jo,ne,fi,ce,bs,Zs;let Y=(0,Ft.useMemo)(()=>xre(i),[i]),ye=(0,Ft.useCallback)(gt=>bre(i,gt),[i]),se=mI(i)?"rtl":"ltr",ue=(0,Ft.useRef)(null),Se=(0,Ft.useRef)(null);(0,Ft.useEffect)(()=>{let gt=Se.current,Qt=ue.current;if(!gt||!Qt||typeof ResizeObserver=="undefined")return;let vt=()=>Qt.style.setProperty("--edp-bar",`${gt.offsetHeight}px`);vt();let Dn=new ResizeObserver(vt);return Dn.observe(gt),()=>Dn.disconnect()},[]);let Me=(Ua=O==null?void 0:O.maxWidth)!=null?Ua:vre,de=(Rt=o==null?void 0:o.branding)==null?void 0:Rt.primaryColor,Re=(yn=o==null?void 0:o.branding)==null?void 0:yn.accentColor,it=(Vn=o==null?void 0:o.branding)==null?void 0:Vn.fontFamily,Ie=(jo=o==null?void 0:o.branding)==null?void 0:jo.fontUrl,Oe=((ne=o==null?void 0:o.branding)==null?void 0:ne.showPoweredBy)!==!1;(0,Ft.useEffect)(()=>{if(!Ie||typeof document=="undefined"||document.querySelector(`link[href="${Ie}"]`))return;let Qt=document.createElement("link");Qt.rel="stylesheet",Qt.href=Ie,document.head.appendChild(Qt)},[Ie]);let[me,be]=(0,Ft.useState)(()=>{var gt,Qt;return(Qt=(gt=y==null?void 0:y.answers)!=null?gt:u)!=null?Qt:{exerciseAnswers:[]}}),[qe]=(0,Ft.useState)(()=>y?new Map:Mre(u)),Ke=(0,Ft.useRef)(c);Ke.current=c;let[je]=(0,Ft.useState)(()=>{var gt;return(gt=y?y.answers:u)==null?void 0:gt.mediaPlays}),Ye=(0,Ft.useRef)(je),mt=(0,Ft.useCallback)(gt=>Ye.current&&Object.keys(Ye.current).length>0?Ue(te({},gt),{mediaPlays:Ye.current}):gt,[]),At=(0,Ft.useRef)(me);At.current=me;let zt=(0,Ft.useRef)(!1),Ht=(0,Ft.useCallback)(gt=>{var vt;let Qt=mt(H7e(gt,qe));be(Qt),(vt=Ke.current)==null||vt.call(Ke,Qt)},[qe,mt]),Yr=(0,Ft.useCallback)(gt=>{var vt;if(Ye.current=gt,y||zt.current)return;let Qt=mt(At.current);be(Qt),(vt=Ke.current)==null||vt.call(Ke,Qt)},[y,mt]),[Hr,xt]=(0,Ft.useState)(null);(0,Ft.useEffect)(()=>{xt(Date.now())},[]);let[Ut,wr]=(0,Ft.useState)(d&&!y),et=(0,Ft.useMemo)(()=>{if(Hr===null||!s||s<=0||!l)return null;let gt=new Date(l).getTime()+s*6e4-Hr;return gt>0?Math.max(1,Math.floor(gt/6e4)):null},[Hr,s,l]),[De,ot]=(0,Ft.useState)(!1),[Lt,ft]=(0,Ft.useState)(!1),[tt,Un]=(0,Ft.useState)((fi=y==null?void 0:y.result)!=null?fi:null);zt.current=tt!==null;let Et=(0,Ft.useMemo)(()=>Mre(y==null?void 0:y.answers),[y]),[Oi,wn]=(0,Ft.useState)(null),[ja,aa]=(0,Ft.useState)(!1),Dr=(0,Ft.useRef)(!1),We=(0,Ft.useMemo)(()=>q7e(e),[e]),ma=(0,Ft.useMemo)(()=>Lt?pI(e,me):[],[Lt,e,me]),di=ma.length,st=(0,Ft.useCallback)(gt=>{var Dn;ft(!1);let Qt=(Dn=ue.current)==null?void 0:Dn.querySelectorAll(`[data-question-id="${CSS.escape(gt)}"]`),vt=Array.from(Qt!=null?Qt:[]).find(fr=>fr.getClientRects().length>0);vt&&requestAnimationFrame(()=>vt.scrollIntoView({block:"start",behavior:"smooth"}))},[]),Ja=(a!=null?a:[]).join(" "),Da=(0,Ft.useMemo)(()=>new Set(Ja?Ja.split(" "):[]),[Ja]),[Nn,Zi]=(0,Ft.useState)(!1),xo=(0,Ft.useMemo)(()=>Nn?hI(e,me,Da).map(gt=>gt.questionId).join(" "):"",[Nn,e,me,Da]),Ho=(0,Ft.useMemo)(()=>new Set(xo?xo.split(" "):[]),[xo]),Tn=(0,Ft.useCallback)(()=>{let gt=hI(e,me,Da);if(gt.length===0){ft(!0);return}Zi(!0),st(gt[0].questionId)},[e,me,Da,st]),Ca=(0,Ft.useMemo)(()=>e.exercises.reduce((gt,Qt)=>gt+wre(Qt),0),[e]),sr=(0,Ft.useMemo)(()=>tt?uw(tt.exerciseFeedback):void 0,[tt]),dn=(0,Ft.useMemo)(()=>{var Qt;let gt=new Map;for(let vt of(Qt=tt==null?void 0:tt.exerciseFeedback)!=null?Qt:[])for(let Dn of vt.questions)Dn.explanation&&gt.set(Dn.questionId,Dn);return gt},[tt]),En=r||(tt==null?void 0:tt.scoreHidden)===!0,Za=(0,Ft.useMemo)(()=>{if(!tt)return{};let gt={};for(let Qt of tt.exerciseFeedback)gt[Qt.exerciseId]=Cre(Qt.questions.flatMap(vt=>vt.nodeResults));return gt},[tt]),Kn=(0,Ft.useMemo)(()=>{if(!tt)return{};let gt={};for(let Qt of tt.exerciseFeedback)for(let vt of Qt.questions)vt.nodeResults.length>0&&(gt[vt.questionId]=Cre(vt.nodeResults));return gt},[tt]),Nr=(0,Ft.useCallback)(async()=>{ot(!0),wn(null);try{let gt=await p(me);Un(gt),typeof window!="undefined"&&window.scrollTo({top:0,behavior:"smooth"})}catch(gt){wn(gt instanceof Error?gt.message==="required_unanswered"?Y("requiredBlocked"):gt.message:Y("confirmCancel"))}finally{ot(!1),ft(!1)}},[me,p,Y]),On=(0,Ft.useCallback)(()=>{!tt||!x||x(tt)},[tt,x]),Ir=(0,Ft.useCallback)(()=>{var gt;Dr.current||De||tt||(Dr.current=!0,aa(!0),ft(!1),typeof document!="undefined"&&((gt=document.activeElement)==null||gt.blur()),setTimeout(()=>{ot(!0),wn(null),p(me).then(Qt=>{Un(Qt),typeof window!="undefined"&&window.scrollTo({top:0,behavior:"smooth"})}).catch(Qt=>{wn(Qt instanceof Error?Qt.message:"submit_error")}).finally(()=>{ot(!1),aa(!1)})},800))},[me,De,p,tt]),A=(0,Ft.useCallback)((gt,Qt,vt)=>{let Dn=wre(gt),fr=Za[gt.id],vo=gt.questions.length>1,gu=(0,Ft.isValidElement)(Qt)?(0,Ft.cloneElement)(Qt,{renderQuestion:(Pi,wo,pi)=>{var bu;let Qi=Pi.id,W0=qe.get(Qi),Qs=te(te(te({},U?{mediaHandler:U}:{}),y?{initialAnswers:(bu=Et.get(Qi))!=null?bu:[],readOnly:!0}:W0?{initialAnswers:W0}:{}),tt!==null?{readOnly:!0}:{}),Sc=Object.keys(Qs).length>0&&(0,Ft.isValidElement)(wo)?(0,Ft.cloneElement)(wo,Qs):wo,X0=Da.has(Qi),yu=Ho.has(Qi)?(0,Le.jsxs)("p",{role:"alert",className:"mt-2 flex items-center gap-1.5 text-sm font-medium text-[#a32b1e]",children:[(0,Le.jsx)(Bu,{size:14,className:"flex-shrink-0"}),Y("requiredMissing")]}):null,ga=dn.get(Qi),Y0=ga!=null&&ga.explanation?(0,Le.jsx)(gre,{content:ga.explanation,nodeResults:ga.nodeResults,label:Y("explanation")}):null;if(!vo)return(0,Le.jsxs)("div",{"data-question-id":Qi,children:[Sc,yu,Y0]},Qi);let Vl=Kn[Qi],Rg=_re(Pi);return(0,Le.jsxs)("div",{"data-question-id":Qi,children:[(0,Le.jsxs)("div",{className:"flex items-center gap-2.5 mb-3",children:[(0,Le.jsxs)("span",{className:"inline-flex items-center rounded-lg border border-[#e7e5e0] bg-[#f1efe9] px-3 py-1 text-xs font-bold tracking-tight text-[#1d2025]",children:[Y("question",{index:pi+1}),X0&&(0,Le.jsx)(kre,{label:Y("required")})]}),(0,Le.jsx)($7e,{hidden:En,score:Vl?{s:Vl.score,m:Vl.maxScore,awaiting:Vl.awaiting,outcome:Vl.outcome}:null,weight:Rg,unit:ye,t:Y})]}),Sc,yu,Y0]},Qi)},renderSeparator:Pi=>(0,Le.jsx)("div",{className:"border-t border-[#e7e5e0] my-1"},`qsep-${Pi}`)}):Qt;return(0,Le.jsxs)("div",{"data-exercise-id":gt.id,className:"bg-white rounded-[14px] border border-[#e7e5e0] shadow-sm overflow-hidden",children:[(0,Le.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-[#f1efe9] border-b border-[#e7e5e0]",style:Re?{backgroundColor:Re}:void 0,children:[(0,Le.jsxs)("span",{dir:"auto",className:"min-w-0 text-sm font-bold text-[#1d2025] [overflow-wrap:anywhere]",children:[Oh(Y,gt.title,vt),!vo&&gt.questions[0]&&Da.has(gt.questions[0].id)&&(0,Le.jsx)(kre,{label:Y("required")})]}),En?null:fr!=null&&fr.awaiting?(0,Le.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-[#8a5a08] bg-[#fbf1dc] border border-[#f2e2bf] rounded-full px-2 py-0.5",children:[(0,Le.jsx)(pl,{size:11}),Y("pendingReview")]}):fr?(0,Le.jsxs)("span",{className:"font-bold leading-none tabular-nums",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',fontSize:"1.15rem",color:fr.maxScore>0&&fr.score>=fr.maxScore?"#1f8a4c":fr.maxScore>0&&fr.score>0?"#c8810e":fr.maxScore>0?"#d23b2b":"#8d93a0"},children:[G0(fr.score)," / ",G0(fr.maxScore)]}):Dn>0?(0,Le.jsxs)("span",{className:"text-xs font-semibold text-[#8d93a0] tabular-nums",children:["/ ",G0(Dn)," ",ye(Dn)]}):null]}),(0,Le.jsx)("div",{className:"p-4",children:gu})]},gt.id)},[Y,ye,Za,Kn,Re,U,y,Et,qe,dn,En,Da,Ho,tt]),I=(0,Ft.useMemo)(()=>fI(e).length>0,[e]),Fe=(0,Ft.useCallback)(gt=>{var Qt;return(0,Le.jsxs)("div",{className:"flex items-center gap-3 py-2",children:[(0,Le.jsx)("div",{className:"flex-1 border-t border-dashed border-[#e7e5e0]"}),(0,Le.jsx)("span",{className:"text-[10px] font-bold text-[#8d93a0] uppercase tracking-widest",children:Oh(Y,(Qt=e.exercises[gt+1])==null?void 0:Qt.title,gt+1)}),(0,Le.jsx)("div",{className:"flex-1 border-t border-dashed border-[#e7e5e0]"})]},`sep-${gt}`)},[Y,e]),q=Oe?(0,Le.jsx)("p",{className:"pt-2 pb-1 text-center text-xs text-[#8d93a0] select-none",children:Y("poweredBy")}):null,Q=tt!==null,yr=n||(tt==null?void 0:tt.isForm)===!0,rt=(tt==null?void 0:tt.showVerdict)!==!1,Gr=rt?tt!=null&&tt.passed?"#1f8a4c":"#d23b2b":"#1d2025";return(0,Le.jsx)(S6,{initial:je,onChange:Yr,children:(0,Le.jsx)("div",{className:"edpire-scope",style:{display:"contents"},children:(0,Le.jsxs)("div",{ref:ue,dir:se,className:ci("flex flex-col [--edp-bar:0px] [&_[data-exercise-id]]:scroll-mt-[calc(var(--edp-bar)+0.75rem)] [&_[data-question-id]]:scroll-mt-[calc(var(--edp-bar)+0.75rem)]",N?"h-full":"min-h-dvh"),style:it?{fontFamily:it}:void 0,children:[(0,Le.jsx)(dre,te({visible:De&&!ja&&!yr,hasAiNodes:We,text:Y("evaluating"),aiText:Y("aiEvaluating"),contained:N},z)),ja&&(0,Le.jsxs)("div",{className:ci("fixed inset-0 z-50 flex flex-col items-center justify-center gap-3 bg-red-950/80 backdrop-blur-sm",N&&"absolute"),children:[(0,Le.jsx)(pl,{size:40,className:"text-red-300"}),(0,Le.jsx)("p",{className:"text-xl font-black text-white tracking-tight",children:Y("timeUp.title")}),(0,Le.jsx)("p",{className:"text-sm text-red-200",children:Y("timeUp.submitting")})]}),(0,Le.jsxs)("div",{ref:Se,className:"sticky top-0 z-10 flex-shrink-0 flex items-center justify-between gap-2 px-4 py-2.5 border-b border-[#e7e5e0] bg-[#fbfaf7]",style:Re?{backgroundColor:Re}:void 0,children:[(0,Le.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,Le.jsx)("img",{src:(bs=(ce=o==null?void 0:o.logoUrl)!=null?ce:K)!=null?bs:F7e,alt:(Zs=o==null?void 0:o.name)!=null?Zs:"Edpire",width:24,height:24,loading:"lazy",className:"flex-none rounded object-contain"}),(0,Le.jsxs)("div",{className:"min-w-0",children:[(0,Le.jsx)("h1",{dir:"auto",title:t.title,className:"line-clamp-2 text-sm font-bold leading-snug text-[#1d2025] [overflow-wrap:anywhere]",children:t.title}),(0,Le.jsx)("p",{className:"text-[11px] text-[#8d93a0]",children:Ca>0&&!En&&(0,Le.jsxs)("span",{className:"ms-2 font-semibold text-[#565b66]",children:["/ ",G0(Ca)," ",ye(Ca)]})})]}),!Q&&Hr!==null&&s&&s>0&&l&&(0,Le.jsx)(j7e,{timeLimitMinutes:s,startedAt:l,onExpire:Ir}),!Q&&(f==="saving"||f==="saved")&&(0,Le.jsxs)("span",{role:"status",className:"hidden sm:inline-flex items-center gap-1 text-[11px] font-medium text-[#8d93a0]",children:[f==="saved"?(0,Le.jsx)(zs,{size:12}):(0,Le.jsx)(Ru,{size:12,className:"animate-spin"}),Y(f==="saved"?"answersSaved":"answersSaving")]})]}),(0,Le.jsxs)("div",{className:"flex flex-none items-center gap-2",children:[T&&(0,Le.jsxs)("button",{onClick:E,className:"flex items-center gap-1.5 px-3 py-2 text-sm font-medium text-[#565b66] hover:text-[#1d2025] hover:bg-[#f1efe9] rounded-lg transition-colors",children:[(0,Le.jsx)(up,{size:13}),Y("reset")]}),(!Q||y)&&w&&(0,Le.jsxs)("button",{onClick:w,className:"flex items-center gap-1.5 px-3 py-2 text-sm font-medium text-[#565b66] hover:text-[#1d2025] hover:bg-[#f1efe9] rounded-lg transition-colors",children:[(0,Le.jsx)(no,{size:13}),S!=null?S:Y("back")]}),H&&(0,Le.jsx)("button",{onClick:H,className:"p-1.5 text-[#8d93a0] hover:text-[#1d2025] hover:bg-[#f1efe9] rounded-lg transition-colors",children:(0,Le.jsx)(no,{size:15})}),!Q&&(0,Le.jsx)("button",{onClick:Tn,disabled:De,style:de?{backgroundColor:de}:void 0,className:"flex flex-shrink-0 items-center gap-2 px-3.5 sm:px-4 py-2 bg-[#1d2025] text-white text-sm font-semibold rounded-lg hover:bg-[#31353c] transition-colors disabled:opacity-50",children:De?(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(Ru,{size:14,className:"animate-spin"}),Y(yr?"formSending":"submitting")]}):(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(j1,{size:14}),(0,Le.jsx)("span",{className:"sm:hidden",children:Y(yr?"formSubmit":"confirmSubmit")}),(0,Le.jsx)("span",{className:"hidden sm:inline",children:Y(yr?"formSubmit":"submit")})]})})]})]}),Oi&&(0,Le.jsx)("div",{className:"flex-shrink-0 bg-[#fdeeec] border-b border-[#f6cfc9] px-4 py-2 text-sm text-[#a32b1e]",children:Oi}),!Q&&f==="failed"&&(0,Le.jsxs)("div",{role:"alert",className:"flex-shrink-0 flex items-center gap-2 bg-[#fbf1dc] border-b border-[#f2e2bf] px-4 py-2 text-sm font-semibold text-[#8a5a08]",children:[(0,Le.jsx)(J4,{size:15,className:"flex-shrink-0"}),Y("answersNotSaved")]}),!Q&&Ut&&(qe.size>0||et!==null)&&(0,Le.jsxs)("div",{role:"status",className:"flex-shrink-0 flex items-center gap-2 bg-[#f5f4f1] border-b border-[#e7e5e0] px-4 py-2 text-sm text-[#1d2025]",children:[et!==null&&(0,Le.jsx)(pl,{size:15,className:"flex-shrink-0 text-[#565b66]"}),(0,Le.jsxs)("span",{className:"flex-1 min-w-0",children:[qe.size>0?Y("resumeRestored"):Y("resumeFresh"),et!==null&&(0,Le.jsxs)(Le.Fragment,{children:[" ",Y("resumeTimeLeft",{minutes:et})]})]}),(0,Le.jsx)("button",{type:"button",onClick:()=>wr(!1),"aria-label":Y("close"),className:"flex-shrink-0 p-1 rounded-md text-[#8d93a0] hover:text-[#1d2025] hover:bg-[#e7e5e0] transition-colors",children:(0,Le.jsx)(no,{size:14})})]}),Q&&(tt!=null&&tt.isForm)?(0,Le.jsx)(yre,{t:Y,rtl:mI(i),showClose:!N,onContinue:x&&tt.returnUrl?On:void 0,continueLabel:k,primaryColor:de}):Q&&tt&&(tt.awaitingManualGrading?(0,Le.jsx)("div",{className:"flex-shrink-0 border-b bg-[#fbf1dc] border-[#f2e2bf]",children:(0,Le.jsx)("div",{className:"mx-auto px-4 py-3 sm:px-6 sm:py-4",style:{maxWidth:Me},children:(0,Le.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2 sm:gap-4",children:[(0,Le.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Le.jsx)(pl,{size:20,className:"text-[#c8810e] flex-shrink-0"}),(0,Le.jsx)("span",{className:"text-sm font-semibold text-[#8a5a08]",children:tt.aiPending?Y("beingMarked"):Y("awaitingReview")})]}),(0,Le.jsx)("div",{className:"hidden sm:block w-px h-8 bg-[#f2e2bf]"}),(0,Le.jsx)("p",{className:"text-sm text-[#8a5a08] flex-1 min-w-0",children:tt.aiPending?Y("beingMarkedDesc"):Y("awaitingReviewDesc")}),x&&(0,Le.jsxs)("button",{onClick:On,style:de?{backgroundColor:de}:void 0,className:"flex-shrink-0 flex items-center gap-2 px-4 py-2 bg-[#1d2025] text-white text-sm font-semibold rounded-lg hover:bg-[#31353c] transition-colors",children:[(0,Le.jsx)(zu,{size:14}),k!=null?k:Y("viewFullReport")]})]})})}):tt.scoreHidden?(0,Le.jsx)("div",{className:"flex-shrink-0 border-b bg-[#f5f4f1] border-[#e7e5e0]",children:(0,Le.jsx)("div",{className:"mx-auto px-4 py-3 sm:px-6 sm:py-4",style:{maxWidth:Me},children:(0,Le.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2 sm:gap-4",children:[(0,Le.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Le.jsx)(Xc,{size:20,className:"text-[#1d2025] flex-shrink-0"}),(0,Le.jsx)("span",{className:"text-sm font-semibold text-[#1d2025]",children:Y("submittedNoScore")})]}),(0,Le.jsx)("div",{className:"hidden sm:block w-px h-8 bg-[#e7e5e0]"}),(0,Le.jsx)("p",{className:"text-sm text-[#565b66] flex-1 min-w-0",children:Y("submittedNoScoreDesc")}),x&&(0,Le.jsxs)("button",{onClick:On,style:de?{backgroundColor:de}:void 0,className:"flex-shrink-0 flex items-center gap-2 px-4 py-2 bg-[#1d2025] text-white text-sm font-semibold rounded-lg hover:bg-[#31353c] transition-colors",children:[(0,Le.jsx)(zu,{size:14}),k!=null?k:Y("viewFullReport")]})]})})}):(0,Le.jsx)("div",{className:ci("flex-shrink-0 border-b",rt?tt.passed?"bg-[#ecf8f0] border-[#c5e8d1]":"bg-[#fdeeec] border-[#f6cfc9]":"bg-[#f5f4f1] border-[#e7e5e0]"),children:(0,Le.jsx)("div",{className:"mx-auto px-4 py-3 sm:px-6 sm:py-4",style:{maxWidth:Me},children:(0,Le.jsxs)("div",{className:"flex flex-wrap sm:flex-nowrap items-center gap-x-4 gap-y-2",children:[(0,Le.jsxs)("div",{className:"flex items-center gap-2",children:[rt?tt.passed?(0,Le.jsx)(Xc,{size:20,className:"text-[#1f8a4c] flex-shrink-0"}):(0,Le.jsx)(Td,{size:20,className:"text-[#d23b2b] flex-shrink-0"}):null,(0,Le.jsx)("span",{className:"text-sm font-semibold",style:{color:Gr},children:rt?tt.passed?Y("assessmentPassed"):Y("assessmentNotPassed"):Y("yourScore")})]}),(0,Le.jsx)("div",{className:"hidden sm:block w-px h-8 bg-[#e7e5e0]"}),(0,Le.jsxs)("div",{className:"flex items-baseline gap-1.5",children:[(0,Le.jsxs)("span",{className:"leading-none tabular-nums text-[1.6rem] sm:text-[2rem]",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',color:Gr},children:[G0(tt.totalScore)," / ",G0(tt.maxScore)]}),(0,Le.jsx)("span",{className:"text-sm text-[#8d93a0] font-medium",children:ye(tt.maxScore)})]}),(0,Le.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-[140px]",children:[(0,Le.jsx)("div",{className:"flex-1 h-2 bg-[#e7e5e0] rounded-full overflow-hidden min-w-[80px]",children:(0,Le.jsx)("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${tt.percentage}%`,backgroundColor:Gr}})}),(0,Le.jsxs)("span",{className:"text-sm font-bold tabular-nums flex-shrink-0",style:{color:Gr},children:[tt.percentage,"%"]})]}),x&&(0,Le.jsxs)("button",{onClick:On,style:de?{backgroundColor:de}:void 0,className:"flex-shrink-0 flex items-center gap-2 px-4 py-2 bg-[#1d2025] text-white text-sm font-semibold rounded-lg hover:bg-[#31353c] transition-colors",children:[(0,Le.jsx)(zu,{size:14}),k!=null?k:Y("viewFullReport")]})]})})})),(0,Le.jsx)("div",{className:ci("flex-1 flex flex-col",N&&"overflow-hidden",ja&&"pointer-events-none opacity-60",(tt==null?void 0:tt.isForm)&&"hidden"),children:e.annex||I?(0,Le.jsx)(pre,{assessment:e,isSubmitted:Q,setAnswers:Ht,validationFeedback:sr,renderExercise:A,renderSeparator:Fe,primaryColor:de,contained:N,locale:i,contentMaxWidth:Me,t:Y,footer:q}):J?(0,Le.jsx)(mre,{assessment:e,isSubmitted:Q,setAnswers:Ht,validationFeedback:sr,renderExercise:A,renderSeparator:Fe,primaryColor:de,contained:N,locale:i,contentMaxWidth:Me,t:Y,onAddAnnex:J,footer:q}):(0,Le.jsx)("div",{className:ci("flex-1",N&&"overflow-y-auto"),children:(0,Le.jsxs)("div",{className:"mx-auto p-6 flex flex-col gap-4",style:{maxWidth:Me},children:[(0,Le.jsx)(Rf,{assessment:e,onAnswersChange:Q?void 0:Ht,validationFeedback:sr,renderExercise:A,renderSeparator:Fe,locale:i}),q]})})}),Lt&&(0,Le.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:(0,Le.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"edpire-submit-confirm-title",className:"bg-white rounded-[14px] shadow-xl p-6 max-w-sm mx-4",children:[(0,Le.jsx)("h3",{id:"edpire-submit-confirm-title",className:"text-base font-bold text-[#1d2025] mb-2",children:Y(yr?"formConfirmTitle":"confirmTitle")}),di>0&&(0,Le.jsxs)("div",{className:"text-sm text-[#8a5a08] bg-[#fbf1dc] border border-[#f2e2bf] rounded-lg px-3 py-2 mb-3",children:[(0,Le.jsxs)("p",{className:"flex items-start gap-2 font-semibold",children:[(0,Le.jsx)(Ed,{size:15,className:"flex-shrink-0 mt-px"}),(0,Le.jsx)("span",{children:di===1?Y("unansweredOne"):Y("unansweredMany",{count:di})})]}),(0,Le.jsxs)("ul",{className:"mt-1 ps-[23px] flex flex-col gap-0.5",children:[ma.slice(0,gI).map(gt=>(0,Le.jsx)("li",{children:(0,Le.jsx)("button",{type:"button",onClick:()=>st(gt.questionId),className:"text-start underline underline-offset-2 hover:text-[#1d2025] cursor-pointer",children:gt.only?Oh(Y,gt.exerciseTitle,gt.exerciseIndex):`${Oh(Y,gt.exerciseTitle,gt.exerciseIndex)} \xB7 ${Y("question",{index:gt.questionIndex+1})}`})},gt.questionId)),di>gI&&(0,Le.jsx)("li",{children:Y("unansweredMore",{count:di-gI})})]})]}),(0,Le.jsx)("p",{className:"text-sm text-[#565b66] mb-5",children:Y(yr?"formConfirmDescription":"confirmDescription")}),(0,Le.jsxs)("div",{className:"flex gap-3 justify-end",children:[(0,Le.jsx)("button",{onClick:()=>ft(!1),className:"px-4 py-2 text-sm font-medium text-[#565b66] hover:bg-[#f1efe9] rounded-lg transition-colors",children:Y("confirmCancel")}),(0,Le.jsxs)("button",{onClick:Nr,disabled:De,style:de?{backgroundColor:de}:void 0,className:"flex items-center gap-2 px-4 py-2 bg-[#1d2025] text-white text-sm font-semibold rounded-lg hover:bg-[#31353c] transition-colors disabled:opacity-50",children:[De?(0,Le.jsx)(Ru,{size:14,className:"animate-spin"}):(0,Le.jsx)(j1,{size:14}),Y(yr?"formSubmit":"confirmSubmit")]})]})]})})]})})})}function dw(e){return(e!=null?e:[]).map(t=>({exerciseId:t.exercise_id,questions:t.questions.map(r=>Ue(te({questionId:r.question_id},r.explanation?{explanation:r.explanation}:{}),{nodeResults:r.node_results.map(n=>te(te(te(te(te(te({nodeId:n.node_id,status:n.status},n.score!==void 0?{score:n.score}:{}),n.max_score!==void 0?{maxScore:n.max_score}:{}),n.feedback!==void 0?{feedback:n.feedback}:{}),n.display_answer!==void 0?{displayAnswer:n.display_answer}:{}),n.detail!==void 0?{detail:n.detail}:{}),n.teacher_feedback!==void 0?{teacherFeedback:n.teacher_feedback}:{}))}))}))}var Tre=Ee($t());function yI(e,t){var n,a,i,o,s,l;let r=dw(e.exercise_feedback);return Ue(te({submissionId:e.submission_id,totalScore:(n=e.score)!=null?n:0,maxScore:(a=e.max_score)!=null?a:0,percentage:(i=e.percentage)!=null?i:0,passed:(o=e.passed)!=null?o:!1},e.score_hidden?{scoreHidden:!0}:{}),{returnUrl:t!=null?t:null,exerciseFeedback:r,awaitingManualGrading:(s=e.awaiting_manual_grading)!=null?s:!1,aiPending:(l=e.ai_pending)!=null?l:!1})}function bI(e){var t;return{annex:(t=e.annex)!=null?t:void 0,exercises:e.exercises.map(r=>Ue(te({id:r.id},r.title?{title:r.title}:{}),{sharedContext:r.sharedContext,questions:r.questions.map(n=>({id:n.id,version:"1.0",content:n.content,answerKeys:[]}))}))}}function Lre({token:e,data:t,baseUrl:r,options:n}){var z,N,O;let{locale:a,branding:i,returnUrl:o,reportLabel:s,backLabel:l,onBack:u,overlayConfig:c,layout:f,mediaHandler:d,onComplete:p,onError:y}=n,x=(z=i!=null?i:t.branding)!=null?z:void 0,k=(N=a!=null?a:t.meta.language)!=null?N:"en",w=(0,Fh.useMemo)(()=>bI(t.assessment),[t]),[S]=(0,Fh.useState)(()=>new Date().toISOString()),T=(0,Fh.useCallback)(async H=>{let U=await fetch(`${r}/api/v1/embed/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e,answers:H})});if(!U.ok){let K=await U.json().catch(()=>({}));if(U.status===422&&K.code==="required_unanswered")throw new Error("required_unanswered");let Y=typeof K.error=="string"?K.error:"Submission failed",ye=U.status===401?"TOKEN_INVALID":U.status===409?"TOKEN_USED":U.status===404?"ASSESSMENT_NOT_FOUND":"UNKNOWN";throw y==null||y({code:ye,message:Y}),new Error(Y)}let J=await U.json();return p==null||p(J),yI(J,o)},[r,e,p,y,o]),E=(0,Fh.useCallback)(H=>{if(o)try{let U=new URL(o);U.searchParams.set("submission_id",H.submissionId),!H.awaitingManualGrading&&!H.scoreHidden&&(U.searchParams.set("score",String(H.totalScore)),U.searchParams.set("max_score",String(H.maxScore))),window.location.href=U.toString()}catch(U){window.location.href=o}},[o]);return(0,Tre.jsx)(cw,{assessment:w,meta:{title:t.meta.title,category:(O=t.meta.category)!=null?O:null},locale:k,branding:x,scoreHidden:t.meta.score_hidden===!0,requiredQuestionIds:t.meta.required_question_ids,timeLimitMinutes:t.meta.settings.time_limit_minutes,startedAt:S,onSubmit:T,onViewReport:o?E:void 0,reportLabel:s,onBack:u,backLabel:l,overlayConfig:c,layout:f,mediaHandler:d})}var xI=Ee(_t());var Dre=Ee($t());function U7e(){return Promise.reject(new Error("A review cannot be submitted"))}function Ere({review:e,locale:t,branding:r,layout:n,onBack:a,backLabel:i}){var u,c,f;let o=(0,xI.useMemo)(()=>bI(e.assessment),[e]),s=(0,xI.useMemo)(()=>({answers:e.answers,result:yI({submission_id:e.submission.id,score:e.submission.score,max_score:e.submission.max_score,percentage:e.submission.percentage,passed:e.submission.passed,awaiting_manual_grading:e.submission.awaiting_manual_grading,ai_pending:e.submission.ai_pending,score_hidden:e.submission.score_hidden,exercise_feedback:e.exercise_feedback})}),[e]),l=(u=t!=null?t:e.meta.language)!=null?u:"en";return(0,Dre.jsx)(cw,{assessment:o,meta:{title:e.meta.title,category:(c=e.meta.category)!=null?c:null},locale:l,branding:(f=r!=null?r:e.branding)!=null?f:void 0,review:s,scoreHidden:e.submission.score_hidden===!0,onSubmit:U7e,onBack:a,backLabel:i,layout:n})}var zre=Ee(_t()),Bre=Ee(EC());var pw=Ee(_t());var fw=Ee($t()),Ire=pw.default.memo(function({content:t,onAnswersChange:r,feedback:n,initialAnswers:a,readOnly:i,className:o,dir:s}){let l=(0,pw.useMemo)(()=>{if(n)return new Map(Object.entries(n))},[n]),u=(0,fw.jsx)(Tg,{content:t,onAnswersChange:r,initialAnswers:a,validationFeedback:l,readOnly:i,className:o});return(0,fw.jsx)("div",{className:"edpire-scope",style:{display:"contents"},children:s?(0,fw.jsx)("div",{dir:s,children:u}):u})});function Rre(e){let{container:t,content:r,onAnswersChange:n,feedback:a,initialAnswers:i,readOnly:o,dir:s}=e,l=typeof t=="string"?document.querySelector(t):t;if(!l)throw new Error(`EdpireSDK.renderQuestion: container not found: ${String(t)}`);let u={content:r,onAnswersChange:n,feedback:a,initialAnswers:i,readOnly:o,dir:s},c=(0,Bre.createRoot)(l);function f(){c.render(zre.default.createElement(Ire,u))}return f(),{setContent(d){u=Ue(te({},u),{content:d,feedback:null}),f()},setFeedback(d){u=Ue(te({},u),{feedback:d}),f()},setInitialAnswers(d){u=Ue(te({},u),{initialAnswers:d}),f()},unmount(){c.unmount()}}}function Nre(e){let t=[],r=0;for(let n of e.exercises)for(let a of n.questions)t.push({exerciseId:n.id,questionId:a.id,content:a.content_ast,points:a.points,sequenceNumber:a.sequence_number,index:r++});return t}function Ore(e){var i,o,s,l,u,c,f;let t=uw(dw(e.exercise_feedback)),r=new Map;for(let d of e.answers.exerciseAnswers)for(let p of d.questionAnswers)r.set(p.questionId,p.answers);let n=[],a=0;for(let d of e.assessment.exercises){let p=t.get(d.id);for(let y of d.questions){let x=p==null?void 0:p.get(y.id),k=(i=e.exercise_feedback.find(z=>z.exercise_id===d.id))==null?void 0:i.questions.find(z=>z.question_id===y.id),w=(o=k==null?void 0:k.node_results)!=null?o:[],S=0,T=0,E=!1;for(let z of w)S+=(s=z.score)!=null?s:0,T+=(l=z.max_score)!=null?l:0,z.status==="awaiting_review"&&(E=!0);n.push({exerciseId:d.id,questionId:y.id,content:y.content,sharedContext:(u=d.sharedContext)!=null?u:null,explanation:(c=k==null?void 0:k.explanation)!=null?c:null,answers:(f=r.get(y.id))!=null?f:[],feedback:x?Object.fromEntries(x):{},score:S,maxScore:T,status:E?"awaiting_review":T===0?"unscored":S>=T?"correct":S>0?"partial":"incorrect",index:a++})}}return n}function Pre(e){let t=new Map;for(let r of e)t.has(r.exerciseId)||t.set(r.exerciseId,[]),t.get(r.exerciseId).push({questionId:r.questionId,answers:r.answers});return{exerciseAnswers:Array.from(t.entries()).map(([r,n])=>({exerciseId:r,questionAnswers:n}))}}var K7e="https://edpire.com";function Fre(e,t,r){e.textContent="";let n=document.createElement("div");n.style.cssText="padding:32px;text-align:center;color:#dc2626;font-family:sans-serif";let a=document.createElement("div");if(a.textContent=t,n.appendChild(a),r){let i=document.createElement("div");i.style.cssText="margin-top:8px;font-size:13px;color:#6b7280",i.textContent=r,n.appendChild(i)}e.appendChild(n)}var V7e={mount(e){let{token:t,container:r,baseUrl:n=K7e,onError:a}=e,i=typeof r=="string"?document.querySelector(r):r;if(!i){let u={code:"UNKNOWN",message:`Container not found: ${r}`};return a==null||a(u),{unmount:()=>{}}}let o=null,s=!1;function l(){if(s)return;s=!0;let u=o;o=null,setTimeout(()=>{u==null||u.unmount()},0)}return(async()=>{i.innerHTML='<div style="padding:32px;text-align:center;color:#6b7280;font-family:sans-serif">Loading assessment\u2026</div>';let u;try{let c=await fetch(`${n}/api/v1/embed/assessments?token=${encodeURIComponent(t)}`,{method:"GET"});if(!c.ok){let f=await c.json().catch(()=>({})),d=typeof f.error=="string"?f.error:"Failed to load assessment",p=c.status===401?"TOKEN_INVALID":c.status===403?"ORIGIN_NOT_ALLOWED":c.status===404?"ASSESSMENT_NOT_FOUND":"UNKNOWN";a==null||a({code:p,message:d});let y=p==="ORIGIN_NOT_ALLOWED"?`Add ${typeof location!="undefined"?location.origin:"this origin"} to Allowed Embed Origins in Edpire, under Integrations then Origins.`:"";Fre(i,d,y);return}u=await c.json()}catch(c){a==null||a({code:"NETWORK_ERROR",message:"Failed to connect to Edpire"}),Fre(i,"Failed to connect to Edpire. Please try again.","");return}s||(i.innerHTML="",o=(0,wI.createRoot)(i),o.render(vI.default.createElement(Lre,{token:t,data:u,baseUrl:n,options:e})))})(),{unmount:l}},review(e){let i=e,{container:t}=i,r=Pn(i,["container"]),n=typeof t=="string"?document.querySelector(t):t;if(!n)return{unmount:()=>{}};n.textContent="";let a=(0,wI.createRoot)(n);return a.render(vI.default.createElement(Ere,r)),{unmount(){let o=a;a=null,setTimeout(()=>o==null?void 0:o.unmount(),0)}}}};return Sne(G7e);})();
4128
+ `);var Le=Ee($t()),F7e="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234f46e5'%3E%3Cpath d='M12 2L2 7v10l10 5 10-5V7L12 2zm0 2.18L19.5 8 12 11.82 4.5 8 12 4.18zM4 9.6l7 3.5v7.3L4 16.9V9.6zm9 10.8v-7.3l7-3.5v7.3L13 20.4z'/%3E%3C/svg%3E";function q7e(e){var t;for(let r of e.exercises)for(let n of r.questions)if(((t=n.content.content)!=null?t:[]).some(i=>i.type==="aiAnswerInput"))return!0;return!1}function _re(e){var r;let t=e;return typeof t.totalMaxScore=="number"?t.totalMaxScore:((r=t.answerKeys)!=null?r:[]).reduce((n,a)=>{var i,o;return n+((o=(i=a.scoring)==null?void 0:i.maxScore)!=null?o:0)},0)}function wre(e){return e.questions.reduce((t,r)=>t+_re(r),0)}function G0(e){return Number.isInteger(e)?String(e):parseFloat(e.toFixed(2)).toString()}var gI=5;function kre({label:e}){return(0,Le.jsx)("span",{className:"ms-0.5 text-[#d23b2b]",title:e,"aria-label":e,children:"*"})}function Are(e){return e==="full"?"#1f8a4c":e==="partial"?"#c8810e":"#d23b2b"}function Sre({outcome:e}){let t=e==="full"?"M20 54 L41 75 L82 24":e==="none"?"M27 27 L73 73 M73 27 L27 73":"M14 58 C29 33 40 33 52 51 C64 69 74 69 88 42";return(0,Le.jsx)("svg",{width:14,height:14,viewBox:"0 0 100 100",fill:"none",stroke:Are(e),strokeWidth:9,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,Le.jsx)("path",{d:t})})}function $7e({score:e,weight:t,unit:r,t:n,hidden:a=!1}){if(e){if(e.awaiting)return(0,Le.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-lg border border-[#f2e2bf] bg-[#fbf1dc] px-2 py-0.5 text-xs font-semibold text-[#8a5a08]",children:[(0,Le.jsx)(pl,{size:11}),n("pendingReview")]});let i=a?e.outcome:e.m>0&&e.s>=e.m?"full":e.s>0?"partial":"none";return a?(0,Le.jsx)("span",{className:"inline-flex items-center rounded-lg border border-[#e7e5e0] bg-[#f5f4f1] px-2 py-1",children:(0,Le.jsx)(Sre,{outcome:i})}):(0,Le.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-lg border border-[#e7e5e0] bg-[#f5f4f1] ps-2 pe-2.5 py-0.5",children:[(0,Le.jsx)(Sre,{outcome:i}),(0,Le.jsxs)("span",{className:"font-bold leading-none",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',fontSize:"1.05rem",color:Are(i)},children:[G0(e.s)," / ",G0(e.m)]})]})}return t>0&&!a?(0,Le.jsxs)("span",{className:"text-xs font-semibold tabular-nums text-[#8d93a0]",children:[G0(t)," ",r(t)]}):null}function Cre(e){var s,l;let t=0,r=0,n=!1,a=0,i=0;for(let u of e)t+=(s=u.score)!=null?s:0,r+=(l=u.maxScore)!=null?l:0,u.status==="awaiting_review"&&(n=!0),u.status==="correct"&&a++,(u.status==="correct"||u.status==="partial")&&i++;let o=e.length>0&&a===e.length?"full":i>0?"partial":"none";return{score:t,maxScore:r,awaiting:n,outcome:o}}function Mre(e){var r;let t=new Map;for(let n of(r=e==null?void 0:e.exerciseAnswers)!=null?r:[])for(let a of n.questionAnswers)t.set(a.questionId,a.answers);return t}function H7e(e,t){return t.size===0?e:{exerciseAnswers:e.exerciseAnswers.map(r=>Ue(te({},r),{questionAnswers:r.questionAnswers.map(n=>n.answers.length===0&&t.has(n.questionId)?Ue(te({},n),{answers:t.get(n.questionId)}):n)}))}}function j7e({timeLimitMinutes:e,startedAt:t,onExpire:r}){let n=e*6e4,a=new Date(t).getTime()+n,[i,o]=(0,Ft.useState)(()=>Math.max(a-Date.now(),0)),s=(0,Ft.useRef)(r);s.current=r,(0,Ft.useEffect)(()=>{if(i<=0){s.current();return}let x=setInterval(()=>{let k=Math.max(a-Date.now(),0);o(k),k<=0&&(clearInterval(x),s.current())},1e3);return()=>clearInterval(x)},[a]);let l=i/n,u=l<.1?"bg-[#fdeeec] text-[#a32b1e] border-[#f6cfc9] animate-pulse":l<.25?"bg-[#fbf1dc] text-[#8a5a08] border-[#f2e2bf]":"bg-[#f5f4f1] text-[#565b66] border-[#e7e5e0]",c=Math.ceil(i/1e3),f=Math.floor(c/3600),d=Math.floor(c%3600/60),p=c%60,y=f>0?`${f}:${String(d).padStart(2,"0")}:${String(p).padStart(2,"0")}`:`${d}:${String(p).padStart(2,"0")}`;return(0,Le.jsxs)("span",{className:ci("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full border text-xs font-bold tabular-nums transition-colors",u),children:[(0,Le.jsx)(pl,{size:12}),y]})}function cw({assessment:e,meta:t,scoreHidden:r=!1,isForm:n=!1,requiredQuestionIds:a,locale:i="en",branding:o,timeLimitMinutes:s,startedAt:l,initialAnswers:u,onAnswersChange:c,saveState:f,resumed:d=!1,onSubmit:p,review:y,onViewReport:x,reportLabel:k,onBack:w,backLabel:S,allowReset:T,onReset:E,overlayConfig:z,contained:N=!1,layout:O,onClose:H,mediaHandler:U,onAddAnnex:J,fallbackLogoUrl:K}){var Ua,Rt,yn,Vn,jo,ne,fi,ce,bs,Zs;let Y=(0,Ft.useMemo)(()=>xre(i),[i]),ye=(0,Ft.useCallback)(gt=>bre(i,gt),[i]),se=mI(i)?"rtl":"ltr",ue=(0,Ft.useRef)(null),Se=(0,Ft.useRef)(null);(0,Ft.useEffect)(()=>{let gt=Se.current,Qt=ue.current;if(!gt||!Qt||typeof ResizeObserver=="undefined")return;let vt=()=>Qt.style.setProperty("--edp-bar",`${gt.offsetHeight}px`);vt();let Dn=new ResizeObserver(vt);return Dn.observe(gt),()=>Dn.disconnect()},[]);let Me=(Ua=O==null?void 0:O.maxWidth)!=null?Ua:vre,de=(Rt=o==null?void 0:o.branding)==null?void 0:Rt.primaryColor,Re=(yn=o==null?void 0:o.branding)==null?void 0:yn.accentColor,it=(Vn=o==null?void 0:o.branding)==null?void 0:Vn.fontFamily,Ie=(jo=o==null?void 0:o.branding)==null?void 0:jo.fontUrl,Oe=((ne=o==null?void 0:o.branding)==null?void 0:ne.showPoweredBy)!==!1;(0,Ft.useEffect)(()=>{if(!Ie||typeof document=="undefined"||document.querySelector(`link[href="${Ie}"]`))return;let Qt=document.createElement("link");Qt.rel="stylesheet",Qt.href=Ie,document.head.appendChild(Qt)},[Ie]);let[me,be]=(0,Ft.useState)(()=>{var gt,Qt;return(Qt=(gt=y==null?void 0:y.answers)!=null?gt:u)!=null?Qt:{exerciseAnswers:[]}}),[qe]=(0,Ft.useState)(()=>y?new Map:Mre(u)),Ke=(0,Ft.useRef)(c);Ke.current=c;let[je]=(0,Ft.useState)(()=>{var gt;return(gt=y?y.answers:u)==null?void 0:gt.mediaPlays}),Ye=(0,Ft.useRef)(je),mt=(0,Ft.useCallback)(gt=>Ye.current&&Object.keys(Ye.current).length>0?Ue(te({},gt),{mediaPlays:Ye.current}):gt,[]),At=(0,Ft.useRef)(me);At.current=me;let zt=(0,Ft.useRef)(!1),Ht=(0,Ft.useCallback)(gt=>{var vt;let Qt=mt(H7e(gt,qe));be(Qt),(vt=Ke.current)==null||vt.call(Ke,Qt)},[qe,mt]),Yr=(0,Ft.useCallback)(gt=>{var vt;if(Ye.current=gt,y||zt.current)return;let Qt=mt(At.current);be(Qt),(vt=Ke.current)==null||vt.call(Ke,Qt)},[y,mt]),[Hr,xt]=(0,Ft.useState)(null);(0,Ft.useEffect)(()=>{xt(Date.now())},[]);let[Ut,wr]=(0,Ft.useState)(d&&!y),et=(0,Ft.useMemo)(()=>{if(Hr===null||!s||s<=0||!l)return null;let gt=new Date(l).getTime()+s*6e4-Hr;return gt>0?Math.max(1,Math.floor(gt/6e4)):null},[Hr,s,l]),[De,ot]=(0,Ft.useState)(!1),[Lt,ft]=(0,Ft.useState)(!1),[tt,Un]=(0,Ft.useState)((fi=y==null?void 0:y.result)!=null?fi:null);zt.current=tt!==null;let Et=(0,Ft.useMemo)(()=>Mre(y==null?void 0:y.answers),[y]),[Oi,wn]=(0,Ft.useState)(null),[ja,aa]=(0,Ft.useState)(!1),Dr=(0,Ft.useRef)(!1),We=(0,Ft.useMemo)(()=>q7e(e),[e]),ma=(0,Ft.useMemo)(()=>Lt?pI(e,me):[],[Lt,e,me]),di=ma.length,st=(0,Ft.useCallback)(gt=>{var Dn;ft(!1);let Qt=(Dn=ue.current)==null?void 0:Dn.querySelectorAll(`[data-question-id="${CSS.escape(gt)}"]`),vt=Array.from(Qt!=null?Qt:[]).find(fr=>fr.getClientRects().length>0);vt&&requestAnimationFrame(()=>vt.scrollIntoView({block:"start",behavior:"smooth"}))},[]),Ja=(a!=null?a:[]).join(" "),Da=(0,Ft.useMemo)(()=>new Set(Ja?Ja.split(" "):[]),[Ja]),[Nn,Zi]=(0,Ft.useState)(!1),xo=(0,Ft.useMemo)(()=>Nn?hI(e,me,Da).map(gt=>gt.questionId).join(" "):"",[Nn,e,me,Da]),Ho=(0,Ft.useMemo)(()=>new Set(xo?xo.split(" "):[]),[xo]),Tn=(0,Ft.useCallback)(()=>{let gt=hI(e,me,Da);if(gt.length===0){ft(!0);return}Zi(!0),st(gt[0].questionId)},[e,me,Da,st]),Ca=(0,Ft.useMemo)(()=>e.exercises.reduce((gt,Qt)=>gt+wre(Qt),0),[e]),sr=(0,Ft.useMemo)(()=>tt?uw(tt.exerciseFeedback):void 0,[tt]),dn=(0,Ft.useMemo)(()=>{var Qt;let gt=new Map;for(let vt of(Qt=tt==null?void 0:tt.exerciseFeedback)!=null?Qt:[])for(let Dn of vt.questions)Dn.explanation&&gt.set(Dn.questionId,Dn);return gt},[tt]),En=r||(tt==null?void 0:tt.scoreHidden)===!0,Za=(0,Ft.useMemo)(()=>{if(!tt)return{};let gt={};for(let Qt of tt.exerciseFeedback)gt[Qt.exerciseId]=Cre(Qt.questions.flatMap(vt=>vt.nodeResults));return gt},[tt]),Kn=(0,Ft.useMemo)(()=>{if(!tt)return{};let gt={};for(let Qt of tt.exerciseFeedback)for(let vt of Qt.questions)vt.nodeResults.length>0&&(gt[vt.questionId]=Cre(vt.nodeResults));return gt},[tt]),Nr=(0,Ft.useCallback)(async()=>{ot(!0),wn(null);try{let gt=await p(me);Un(gt),typeof window!="undefined"&&window.scrollTo({top:0,behavior:"smooth"})}catch(gt){wn(gt instanceof Error?gt.message==="required_unanswered"?Y("requiredBlocked"):gt.message:Y("confirmCancel"))}finally{ot(!1),ft(!1)}},[me,p,Y]),On=(0,Ft.useCallback)(()=>{!tt||!x||x(tt)},[tt,x]),Ir=(0,Ft.useCallback)(()=>{var gt;Dr.current||De||tt||(Dr.current=!0,aa(!0),ft(!1),typeof document!="undefined"&&((gt=document.activeElement)==null||gt.blur()),setTimeout(()=>{ot(!0),wn(null),p(me).then(Qt=>{Un(Qt),typeof window!="undefined"&&window.scrollTo({top:0,behavior:"smooth"})}).catch(Qt=>{wn(Qt instanceof Error?Qt.message:"submit_error")}).finally(()=>{ot(!1),aa(!1)})},800))},[me,De,p,tt]),A=(0,Ft.useCallback)((gt,Qt,vt)=>{let Dn=wre(gt),fr=Za[gt.id],vo=gt.questions.length>1,gu=(0,Ft.isValidElement)(Qt)?(0,Ft.cloneElement)(Qt,{renderQuestion:(Pi,wo,pi)=>{var bu;let Qi=Pi.id,W0=qe.get(Qi),Qs=te(te(te({},U?{mediaHandler:U}:{}),y?{initialAnswers:(bu=Et.get(Qi))!=null?bu:[],readOnly:!0}:W0?{initialAnswers:W0}:{}),tt!==null?{readOnly:!0}:{}),Sc=Object.keys(Qs).length>0&&(0,Ft.isValidElement)(wo)?(0,Ft.cloneElement)(wo,Qs):wo,X0=Da.has(Qi),yu=Ho.has(Qi)?(0,Le.jsxs)("p",{role:"alert",className:"mt-2 flex items-center gap-1.5 text-sm font-medium text-[#a32b1e]",children:[(0,Le.jsx)(Bu,{size:14,className:"flex-shrink-0"}),Y("requiredMissing")]}):null,ga=dn.get(Qi),Y0=ga!=null&&ga.explanation?(0,Le.jsx)(gre,{content:ga.explanation,nodeResults:ga.nodeResults,label:Y("explanation")}):null;if(!vo)return(0,Le.jsxs)("div",{"data-question-id":Qi,children:[Sc,yu,Y0]},Qi);let Vl=Kn[Qi],Rg=_re(Pi);return(0,Le.jsxs)("div",{"data-question-id":Qi,children:[(0,Le.jsxs)("div",{className:"flex items-center gap-2.5 mb-3",children:[(0,Le.jsxs)("span",{className:"inline-flex items-center rounded-lg border border-[#e7e5e0] bg-[#f1efe9] px-3 py-1 text-xs font-bold tracking-tight text-[#1d2025]",children:[Y("question",{index:pi+1}),X0&&(0,Le.jsx)(kre,{label:Y("required")})]}),(0,Le.jsx)($7e,{hidden:En,score:Vl?{s:Vl.score,m:Vl.maxScore,awaiting:Vl.awaiting,outcome:Vl.outcome}:null,weight:Rg,unit:ye,t:Y})]}),Sc,yu,Y0]},Qi)},renderSeparator:Pi=>(0,Le.jsx)("div",{className:"border-t border-[#e7e5e0] my-1"},`qsep-${Pi}`)}):Qt;return(0,Le.jsxs)("div",{"data-exercise-id":gt.id,className:"bg-white rounded-[14px] border border-[#e7e5e0] shadow-sm overflow-hidden",children:[(0,Le.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-[#f1efe9] border-b border-[#e7e5e0]",style:Re?{backgroundColor:Re}:void 0,children:[(0,Le.jsxs)("span",{dir:"auto",className:"min-w-0 text-sm font-bold text-[#1d2025] [overflow-wrap:anywhere]",children:[Oh(Y,gt.title,vt),!vo&&gt.questions[0]&&Da.has(gt.questions[0].id)&&(0,Le.jsx)(kre,{label:Y("required")})]}),En?null:fr!=null&&fr.awaiting?(0,Le.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-[#8a5a08] bg-[#fbf1dc] border border-[#f2e2bf] rounded-full px-2 py-0.5",children:[(0,Le.jsx)(pl,{size:11}),Y("pendingReview")]}):fr?(0,Le.jsxs)("span",{className:"font-bold leading-none tabular-nums",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',fontSize:"1.15rem",color:fr.maxScore>0&&fr.score>=fr.maxScore?"#1f8a4c":fr.maxScore>0&&fr.score>0?"#c8810e":fr.maxScore>0?"#d23b2b":"#8d93a0"},children:[G0(fr.score)," / ",G0(fr.maxScore)]}):Dn>0?(0,Le.jsxs)("span",{className:"text-xs font-semibold text-[#8d93a0] tabular-nums",children:["/ ",G0(Dn)," ",ye(Dn)]}):null]}),(0,Le.jsx)("div",{className:"p-4",children:gu})]},gt.id)},[Y,ye,Za,Kn,Re,U,y,Et,qe,dn,En,Da,Ho,tt]),I=(0,Ft.useMemo)(()=>fI(e).length>0,[e]),Fe=(0,Ft.useCallback)(gt=>{var Qt;return(0,Le.jsxs)("div",{className:"flex items-center gap-3 py-2",children:[(0,Le.jsx)("div",{className:"flex-1 border-t border-dashed border-[#e7e5e0]"}),(0,Le.jsx)("span",{className:"text-[10px] font-bold text-[#8d93a0] uppercase tracking-widest",children:Oh(Y,(Qt=e.exercises[gt+1])==null?void 0:Qt.title,gt+1)}),(0,Le.jsx)("div",{className:"flex-1 border-t border-dashed border-[#e7e5e0]"})]},`sep-${gt}`)},[Y,e]),q=Oe?(0,Le.jsx)("p",{className:"pt-2 pb-1 text-center text-xs text-[#8d93a0] select-none",children:Y("poweredBy")}):null,Q=tt!==null,yr=n||(tt==null?void 0:tt.isForm)===!0,rt=(tt==null?void 0:tt.showVerdict)!==!1,Gr=rt?tt!=null&&tt.passed?"#1f8a4c":"#d23b2b":"#1d2025";return(0,Le.jsx)(S6,{initial:je,onChange:Yr,children:(0,Le.jsx)("div",{className:"edpire-scope",style:{display:"contents"},children:(0,Le.jsxs)("div",{ref:ue,dir:se,className:ci("flex flex-col [--edp-bar:0px] [&_[data-exercise-id]]:scroll-mt-[calc(var(--edp-bar)+0.75rem)] [&_[data-question-id]]:scroll-mt-[calc(var(--edp-bar)+0.75rem)]",N?"h-full":"min-h-dvh"),style:it?{fontFamily:it}:void 0,children:[(0,Le.jsx)(dre,te({visible:De&&!ja&&!yr,hasAiNodes:We,text:Y("evaluating"),aiText:Y("aiEvaluating"),contained:N},z)),ja&&(0,Le.jsxs)("div",{className:ci("fixed inset-0 z-50 flex flex-col items-center justify-center gap-3 bg-red-950/80 backdrop-blur-sm",N&&"absolute"),children:[(0,Le.jsx)(pl,{size:40,className:"text-red-300"}),(0,Le.jsx)("p",{className:"text-xl font-black text-white tracking-tight",children:Y("timeUp.title")}),(0,Le.jsx)("p",{className:"text-sm text-red-200",children:Y("timeUp.submitting")})]}),(0,Le.jsxs)("div",{ref:Se,className:"sticky top-0 z-10 flex-shrink-0 flex items-center justify-between gap-2 px-4 py-2.5 border-b border-[#e7e5e0] bg-[#fbfaf7]",style:Re?{backgroundColor:Re}:void 0,children:[(0,Le.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,Le.jsx)("img",{src:(bs=(ce=o==null?void 0:o.logoUrl)!=null?ce:K)!=null?bs:F7e,alt:(Zs=o==null?void 0:o.name)!=null?Zs:"Edpire",width:24,height:24,loading:"lazy",className:"flex-none rounded object-contain"}),(0,Le.jsxs)("div",{className:"min-w-0",children:[(0,Le.jsx)("h1",{dir:"auto",title:t.title,className:"line-clamp-2 text-sm font-bold leading-snug text-[#1d2025] [overflow-wrap:anywhere]",children:t.title}),(0,Le.jsx)("p",{className:"text-[11px] text-[#8d93a0]",children:Ca>0&&!En&&(0,Le.jsxs)("span",{className:"ms-2 font-semibold text-[#565b66]",children:["/ ",G0(Ca)," ",ye(Ca)]})})]}),!Q&&Hr!==null&&s&&s>0&&l&&(0,Le.jsx)(j7e,{timeLimitMinutes:s,startedAt:l,onExpire:Ir}),!Q&&(f==="saving"||f==="saved")&&(0,Le.jsxs)("span",{role:"status",className:"hidden sm:inline-flex items-center gap-1 text-[11px] font-medium text-[#8d93a0]",children:[f==="saved"?(0,Le.jsx)(zs,{size:12}):(0,Le.jsx)(Ru,{size:12,className:"animate-spin"}),Y(f==="saved"?"answersSaved":"answersSaving")]})]}),(0,Le.jsxs)("div",{className:"flex flex-none items-center gap-2",children:[T&&(0,Le.jsxs)("button",{onClick:E,className:"flex items-center gap-1.5 px-3 py-2 text-sm font-medium text-[#565b66] hover:text-[#1d2025] hover:bg-[#f1efe9] rounded-lg transition-colors",children:[(0,Le.jsx)(up,{size:13}),Y("reset")]}),(!Q||y)&&w&&(0,Le.jsxs)("button",{onClick:w,className:"flex items-center gap-1.5 px-3 py-2 text-sm font-medium text-[#565b66] hover:text-[#1d2025] hover:bg-[#f1efe9] rounded-lg transition-colors",children:[(0,Le.jsx)(no,{size:13}),S!=null?S:Y("back")]}),H&&(0,Le.jsx)("button",{onClick:H,className:"p-1.5 text-[#8d93a0] hover:text-[#1d2025] hover:bg-[#f1efe9] rounded-lg transition-colors",children:(0,Le.jsx)(no,{size:15})}),!Q&&(0,Le.jsx)("button",{onClick:Tn,disabled:De,style:de?{backgroundColor:de}:void 0,className:"flex flex-shrink-0 items-center gap-2 px-3.5 sm:px-4 py-2 bg-[#1d2025] text-white text-sm font-semibold rounded-lg hover:bg-[#31353c] transition-colors disabled:opacity-50",children:De?(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(Ru,{size:14,className:"animate-spin"}),Y(yr?"formSending":"submitting")]}):(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(j1,{size:14}),(0,Le.jsx)("span",{className:"sm:hidden",children:Y(yr?"formSubmit":"confirmSubmit")}),(0,Le.jsx)("span",{className:"hidden sm:inline",children:Y(yr?"formSubmit":"submit")})]})})]})]}),Oi&&(0,Le.jsx)("div",{className:"flex-shrink-0 bg-[#fdeeec] border-b border-[#f6cfc9] px-4 py-2 text-sm text-[#a32b1e]",children:Oi}),!Q&&f==="failed"&&(0,Le.jsxs)("div",{role:"alert",className:"flex-shrink-0 flex items-center gap-2 bg-[#fbf1dc] border-b border-[#f2e2bf] px-4 py-2 text-sm font-semibold text-[#8a5a08]",children:[(0,Le.jsx)(J4,{size:15,className:"flex-shrink-0"}),Y("answersNotSaved")]}),!Q&&Ut&&(qe.size>0||et!==null)&&(0,Le.jsxs)("div",{role:"status",className:"flex-shrink-0 flex items-center gap-2 bg-[#f5f4f1] border-b border-[#e7e5e0] px-4 py-2 text-sm text-[#1d2025]",children:[et!==null&&(0,Le.jsx)(pl,{size:15,className:"flex-shrink-0 text-[#565b66]"}),(0,Le.jsxs)("span",{className:"flex-1 min-w-0",children:[qe.size>0?Y("resumeRestored"):Y("resumeFresh"),et!==null&&(0,Le.jsxs)(Le.Fragment,{children:[" ",Y("resumeTimeLeft",{minutes:et})]})]}),(0,Le.jsx)("button",{type:"button",onClick:()=>wr(!1),"aria-label":Y("close"),className:"flex-shrink-0 p-1 rounded-md text-[#8d93a0] hover:text-[#1d2025] hover:bg-[#e7e5e0] transition-colors",children:(0,Le.jsx)(no,{size:14})})]}),Q&&(tt!=null&&tt.isForm)?(0,Le.jsx)(yre,{t:Y,rtl:mI(i),showClose:!N,onContinue:x&&tt.returnUrl?On:void 0,continueLabel:k,primaryColor:de}):Q&&tt&&(tt.awaitingManualGrading?(0,Le.jsx)("div",{className:"flex-shrink-0 border-b bg-[#fbf1dc] border-[#f2e2bf]",children:(0,Le.jsx)("div",{className:"mx-auto px-4 py-3 sm:px-6 sm:py-4",style:{maxWidth:Me},children:(0,Le.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2 sm:gap-4",children:[(0,Le.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Le.jsx)(pl,{size:20,className:"text-[#c8810e] flex-shrink-0"}),(0,Le.jsx)("span",{className:"text-sm font-semibold text-[#8a5a08]",children:tt.aiPending?Y("beingMarked"):Y("awaitingReview")})]}),(0,Le.jsx)("div",{className:"hidden sm:block w-px h-8 bg-[#f2e2bf]"}),(0,Le.jsx)("p",{className:"text-sm text-[#8a5a08] flex-1 min-w-0",children:tt.aiPending?Y("beingMarkedDesc"):Y("awaitingReviewDesc")}),x&&(0,Le.jsxs)("button",{onClick:On,style:de?{backgroundColor:de}:void 0,className:"flex-shrink-0 flex items-center gap-2 px-4 py-2 bg-[#1d2025] text-white text-sm font-semibold rounded-lg hover:bg-[#31353c] transition-colors",children:[(0,Le.jsx)(zu,{size:14}),k!=null?k:Y("viewFullReport")]})]})})}):tt.scoreHidden?(0,Le.jsx)("div",{className:"flex-shrink-0 border-b bg-[#f5f4f1] border-[#e7e5e0]",children:(0,Le.jsx)("div",{className:"mx-auto px-4 py-3 sm:px-6 sm:py-4",style:{maxWidth:Me},children:(0,Le.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2 sm:gap-4",children:[(0,Le.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Le.jsx)(Xc,{size:20,className:"text-[#1d2025] flex-shrink-0"}),(0,Le.jsx)("span",{className:"text-sm font-semibold text-[#1d2025]",children:Y("submittedNoScore")})]}),(0,Le.jsx)("div",{className:"hidden sm:block w-px h-8 bg-[#e7e5e0]"}),(0,Le.jsx)("p",{className:"text-sm text-[#565b66] flex-1 min-w-0",children:Y("submittedNoScoreDesc")}),x&&(0,Le.jsxs)("button",{onClick:On,style:de?{backgroundColor:de}:void 0,className:"flex-shrink-0 flex items-center gap-2 px-4 py-2 bg-[#1d2025] text-white text-sm font-semibold rounded-lg hover:bg-[#31353c] transition-colors",children:[(0,Le.jsx)(zu,{size:14}),k!=null?k:Y("viewFullReport")]})]})})}):(0,Le.jsx)("div",{className:ci("flex-shrink-0 border-b",rt?tt.passed?"bg-[#ecf8f0] border-[#c5e8d1]":"bg-[#fdeeec] border-[#f6cfc9]":"bg-[#f5f4f1] border-[#e7e5e0]"),children:(0,Le.jsx)("div",{className:"mx-auto px-4 py-3 sm:px-6 sm:py-4",style:{maxWidth:Me},children:(0,Le.jsxs)("div",{className:"flex flex-wrap sm:flex-nowrap items-center gap-x-4 gap-y-2",children:[(0,Le.jsxs)("div",{className:"flex items-center gap-2",children:[rt?tt.passed?(0,Le.jsx)(Xc,{size:20,className:"text-[#1f8a4c] flex-shrink-0"}):(0,Le.jsx)(Td,{size:20,className:"text-[#d23b2b] flex-shrink-0"}):null,(0,Le.jsx)("span",{className:"text-sm font-semibold",style:{color:Gr},children:rt?tt.passed?Y("assessmentPassed"):Y("assessmentNotPassed"):Y("yourScore")})]}),(0,Le.jsx)("div",{className:"hidden sm:block w-px h-8 bg-[#e7e5e0]"}),(0,Le.jsxs)("div",{className:"flex items-baseline gap-1.5",children:[(0,Le.jsxs)("span",{className:"leading-none tabular-nums text-[1.6rem] sm:text-[2rem]",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',color:Gr},children:[G0(tt.totalScore)," / ",G0(tt.maxScore)]}),(0,Le.jsx)("span",{className:"text-sm text-[#8d93a0] font-medium",children:ye(tt.maxScore)})]}),(0,Le.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-[140px]",children:[(0,Le.jsx)("div",{className:"flex-1 h-2 bg-[#e7e5e0] rounded-full overflow-hidden min-w-[80px]",children:(0,Le.jsx)("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${tt.percentage}%`,backgroundColor:Gr}})}),(0,Le.jsxs)("span",{className:"text-sm font-bold tabular-nums flex-shrink-0",style:{color:Gr},children:[tt.percentage,"%"]})]}),x&&(0,Le.jsxs)("button",{onClick:On,style:de?{backgroundColor:de}:void 0,className:"flex-shrink-0 flex items-center gap-2 px-4 py-2 bg-[#1d2025] text-white text-sm font-semibold rounded-lg hover:bg-[#31353c] transition-colors",children:[(0,Le.jsx)(zu,{size:14}),k!=null?k:Y("viewFullReport")]})]})})})),(0,Le.jsx)("div",{className:ci("flex-1 flex flex-col",N&&"overflow-hidden",ja&&"pointer-events-none opacity-60",(tt==null?void 0:tt.isForm)&&"hidden"),children:e.annex||I?(0,Le.jsx)(pre,{assessment:e,isSubmitted:Q,setAnswers:Ht,validationFeedback:sr,renderExercise:A,renderSeparator:Fe,primaryColor:de,contained:N,locale:i,contentMaxWidth:Me,t:Y,footer:q}):J?(0,Le.jsx)(mre,{assessment:e,isSubmitted:Q,setAnswers:Ht,validationFeedback:sr,renderExercise:A,renderSeparator:Fe,primaryColor:de,contained:N,locale:i,contentMaxWidth:Me,t:Y,onAddAnnex:J,footer:q}):(0,Le.jsx)("div",{className:ci("flex-1",N&&"overflow-y-auto"),children:(0,Le.jsxs)("div",{className:"mx-auto p-6 flex flex-col gap-4",style:{maxWidth:Me},children:[(0,Le.jsx)(Rf,{assessment:e,onAnswersChange:Q?void 0:Ht,validationFeedback:sr,renderExercise:A,renderSeparator:Fe,locale:i}),q]})})}),Lt&&(0,Le.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:(0,Le.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"edpire-submit-confirm-title",className:"bg-white rounded-[14px] shadow-xl p-6 max-w-sm mx-4",children:[(0,Le.jsx)("h3",{id:"edpire-submit-confirm-title",className:"text-base font-bold text-[#1d2025] mb-2",children:Y(yr?"formConfirmTitle":"confirmTitle")}),di>0&&(0,Le.jsxs)("div",{className:"text-sm text-[#8a5a08] bg-[#fbf1dc] border border-[#f2e2bf] rounded-lg px-3 py-2 mb-3",children:[(0,Le.jsxs)("p",{className:"flex items-start gap-2 font-semibold",children:[(0,Le.jsx)(Ed,{size:15,className:"flex-shrink-0 mt-px"}),(0,Le.jsx)("span",{children:di===1?Y("unansweredOne"):Y("unansweredMany",{count:di})})]}),(0,Le.jsxs)("ul",{className:"mt-1 ps-[23px] flex flex-col gap-0.5",children:[ma.slice(0,gI).map(gt=>(0,Le.jsx)("li",{children:(0,Le.jsx)("button",{type:"button",onClick:()=>st(gt.questionId),className:"text-start underline underline-offset-2 hover:text-[#1d2025] cursor-pointer",children:gt.only?Oh(Y,gt.exerciseTitle,gt.exerciseIndex):`${Oh(Y,gt.exerciseTitle,gt.exerciseIndex)} \xB7 ${Y("question",{index:gt.questionIndex+1})}`})},gt.questionId)),di>gI&&(0,Le.jsx)("li",{children:Y("unansweredMore",{count:di-gI})})]})]}),(0,Le.jsx)("p",{className:"text-sm text-[#565b66] mb-5",children:Y(yr?"formConfirmDescription":"confirmDescription")}),(0,Le.jsxs)("div",{className:"flex gap-3 justify-end",children:[(0,Le.jsx)("button",{onClick:()=>ft(!1),className:"px-4 py-2 text-sm font-medium text-[#565b66] hover:bg-[#f1efe9] rounded-lg transition-colors",children:Y("confirmCancel")}),(0,Le.jsxs)("button",{onClick:Nr,disabled:De,style:de?{backgroundColor:de}:void 0,className:"flex items-center gap-2 px-4 py-2 bg-[#1d2025] text-white text-sm font-semibold rounded-lg hover:bg-[#31353c] transition-colors disabled:opacity-50",children:[De?(0,Le.jsx)(Ru,{size:14,className:"animate-spin"}):(0,Le.jsx)(j1,{size:14}),Y(yr?"formSubmit":"confirmSubmit")]})]})]})})]})})})}function dw(e){return(e!=null?e:[]).map(t=>({exerciseId:t.exercise_id,questions:t.questions.map(r=>Ue(te({questionId:r.question_id},r.explanation?{explanation:r.explanation}:{}),{nodeResults:r.node_results.map(n=>te(te(te(te(te(te({nodeId:n.node_id,status:n.status},n.score!==void 0?{score:n.score}:{}),n.max_score!==void 0?{maxScore:n.max_score}:{}),n.feedback!==void 0?{feedback:n.feedback}:{}),n.display_answer!==void 0?{displayAnswer:n.display_answer}:{}),n.detail!==void 0?{detail:n.detail}:{}),n.teacher_feedback!==void 0?{teacherFeedback:n.teacher_feedback}:{}))}))}))}var Tre=Ee($t());function yI(e,t){var n,a,i,o,s,l;let r=dw(e.exercise_feedback);return Ue(te({submissionId:e.submission_id,totalScore:(n=e.score)!=null?n:0,maxScore:(a=e.max_score)!=null?a:0,percentage:(i=e.percentage)!=null?i:0,passed:(o=e.passed)!=null?o:!1},e.score_hidden?{scoreHidden:!0}:{}),{returnUrl:t!=null?t:null,exerciseFeedback:r,awaitingManualGrading:(s=e.awaiting_manual_grading)!=null?s:!1,aiPending:(l=e.ai_pending)!=null?l:!1})}function bI(e){var t;return{annex:(t=e.annex)!=null?t:void 0,exercises:e.exercises.map(r=>Ue(te({id:r.id},r.title?{title:r.title}:{}),{sharedContext:r.sharedContext,questions:r.questions.map(n=>({id:n.id,version:"1.0",content:n.content,answerKeys:[]}))}))}}function Lre({token:e,data:t,baseUrl:r,options:n}){var z,N,O;let{locale:a,branding:i,returnUrl:o,reportLabel:s,backLabel:l,onBack:u,overlayConfig:c,layout:f,mediaHandler:d,onComplete:p,onError:y}=n,x=(z=i!=null?i:t.branding)!=null?z:void 0,k=(N=a!=null?a:t.meta.language)!=null?N:"en",w=(0,Fh.useMemo)(()=>bI(t.assessment),[t]),[S]=(0,Fh.useState)(()=>new Date().toISOString()),T=(0,Fh.useCallback)(async H=>{let U=await fetch(`${r}/api/v1/embed/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e,answers:H})});if(!U.ok){let K=await U.json().catch(()=>({}));if(U.status===422&&K.code==="required_unanswered")throw new Error("required_unanswered");let Y=typeof K.error=="string"?K.error:"Submission failed",ye=U.status===401?"TOKEN_INVALID":U.status===409?"TOKEN_USED":U.status===404?"ASSESSMENT_NOT_FOUND":"UNKNOWN";throw y==null||y({code:ye,message:Y}),new Error(Y)}let J=await U.json();return p==null||p(J),yI(J,o)},[r,e,p,y,o]),E=(0,Fh.useCallback)(H=>{if(o)try{let U=new URL(o);U.searchParams.set("submission_id",H.submissionId),!H.awaitingManualGrading&&!H.scoreHidden&&(U.searchParams.set("score",String(H.totalScore)),U.searchParams.set("max_score",String(H.maxScore))),window.location.href=U.toString()}catch(U){window.location.href=o}},[o]);return(0,Tre.jsx)(cw,{assessment:w,meta:{title:t.meta.title,category:(O=t.meta.category)!=null?O:null},locale:k,branding:x,scoreHidden:t.meta.score_hidden===!0,requiredQuestionIds:t.meta.required_question_ids,timeLimitMinutes:t.meta.settings.time_limit_minutes,startedAt:S,onSubmit:T,onViewReport:o?E:void 0,reportLabel:s,onBack:u,backLabel:l,overlayConfig:c,layout:f,mediaHandler:d})}var xI=Ee(_t());var Dre=Ee($t());function U7e(){return Promise.reject(new Error("A review cannot be submitted"))}function Ere({review:e,locale:t,branding:r,layout:n,onBack:a,backLabel:i}){var u,c,f;let o=(0,xI.useMemo)(()=>bI(e.assessment),[e]),s=(0,xI.useMemo)(()=>({answers:e.answers,result:yI({submission_id:e.submission.id,score:e.submission.score,max_score:e.submission.max_score,percentage:e.submission.percentage,passed:e.submission.passed,awaiting_manual_grading:e.submission.awaiting_manual_grading,ai_pending:e.submission.ai_pending,score_hidden:e.submission.score_hidden,exercise_feedback:e.exercise_feedback})}),[e]),l=(u=t!=null?t:e.meta.language)!=null?u:"en";return(0,Dre.jsx)(cw,{assessment:o,meta:{title:e.meta.title,category:(c=e.meta.category)!=null?c:null},locale:l,branding:(f=r!=null?r:e.branding)!=null?f:void 0,review:s,scoreHidden:e.submission.score_hidden===!0,onSubmit:U7e,onBack:a,backLabel:i,layout:n})}var zre=Ee(_t()),Bre=Ee(EC());var pw=Ee(_t());var fw=Ee($t()),Ire=pw.default.memo(function({content:t,onAnswersChange:r,feedback:n,initialAnswers:a,readOnly:i,className:o,dir:s}){let l=(0,pw.useMemo)(()=>{if(n)return new Map(Object.entries(n))},[n]),u=(0,fw.jsx)(Tg,{content:t,onAnswersChange:r,initialAnswers:a,validationFeedback:l,readOnly:i,className:o});return(0,fw.jsx)("div",{className:"edpire-scope",style:{display:"contents"},children:s?(0,fw.jsx)("div",{dir:s,children:u}):u})});function Rre(e){let{container:t,content:r,onAnswersChange:n,feedback:a,initialAnswers:i,readOnly:o,dir:s}=e,l=typeof t=="string"?document.querySelector(t):t;if(!l)throw new Error(`EdpireSDK.renderQuestion: container not found: ${String(t)}`);let u={content:r,onAnswersChange:n,feedback:a,initialAnswers:i,readOnly:o,dir:s},c=(0,Bre.createRoot)(l);function f(){c.render(zre.default.createElement(Ire,u))}return f(),{setContent(d){u=Ue(te({},u),{content:d,feedback:null}),f()},setFeedback(d){u=Ue(te({},u),{feedback:d}),f()},setInitialAnswers(d){u=Ue(te({},u),{initialAnswers:d}),f()},unmount(){c.unmount()}}}function Nre(e){let t=[],r=0;for(let n of e.exercises)for(let a of n.questions)t.push({exerciseId:n.id,questionId:a.id,content:a.content_ast,points:a.points,sequenceNumber:a.sequence_number,index:r++});return t}function Ore(e){var o,s,l,u,c,f,d;let t=uw(dw(e.exercise_feedback)),r=new Map;for(let p of e.answers.exerciseAnswers)for(let y of p.questionAnswers)r.set(y.questionId,y.answers);let n=e.submission.score_hidden===!0,a=[],i=0;for(let p of e.assessment.exercises){let y=t.get(p.id);for(let x of p.questions){let k=y==null?void 0:y.get(x.id),w=(o=e.exercise_feedback.find(N=>N.exercise_id===p.id))==null?void 0:o.questions.find(N=>N.question_id===x.id),S=(s=w==null?void 0:w.node_results)!=null?s:[],T=0,E=0,z=!1;for(let N of S)T+=(l=N.score)!=null?l:0,E+=(u=N.max_score)!=null?u:0,N.status==="awaiting_review"&&(z=!0);a.push({exerciseId:p.id,questionId:x.id,content:x.content,sharedContext:(c=p.sharedContext)!=null?c:null,explanation:(f=w==null?void 0:w.explanation)!=null?f:null,answers:(d=r.get(x.id))!=null?d:[],feedback:k?Object.fromEntries(k):{},score:T,maxScore:E,scoreHidden:n,status:z?"awaiting_review":n?K7e(S.map(N=>N.status)):E===0?"unscored":T>=E?"correct":T>0?"partial":"incorrect",index:i++})}}return a}function K7e(e){return e.length===0?"unscored":e.every(t=>t==="correct")?"correct":e.every(t=>t==="incorrect")?"incorrect":"partial"}function Pre(e){let t=new Map;for(let r of e)t.has(r.exerciseId)||t.set(r.exerciseId,[]),t.get(r.exerciseId).push({questionId:r.questionId,answers:r.answers});return{exerciseAnswers:Array.from(t.entries()).map(([r,n])=>({exerciseId:r,questionAnswers:n}))}}var V7e="https://edpire.com";function Fre(e,t,r){e.textContent="";let n=document.createElement("div");n.style.cssText="padding:32px;text-align:center;color:#dc2626;font-family:sans-serif";let a=document.createElement("div");if(a.textContent=t,n.appendChild(a),r){let i=document.createElement("div");i.style.cssText="margin-top:8px;font-size:13px;color:#6b7280",i.textContent=r,n.appendChild(i)}e.appendChild(n)}var G7e={mount(e){let{token:t,container:r,baseUrl:n=V7e,onError:a}=e,i=typeof r=="string"?document.querySelector(r):r;if(!i){let u={code:"UNKNOWN",message:`Container not found: ${r}`};return a==null||a(u),{unmount:()=>{}}}let o=null,s=!1;function l(){if(s)return;s=!0;let u=o;o=null,setTimeout(()=>{u==null||u.unmount()},0)}return(async()=>{i.innerHTML='<div style="padding:32px;text-align:center;color:#6b7280;font-family:sans-serif">Loading assessment\u2026</div>';let u;try{let c=await fetch(`${n}/api/v1/embed/assessments?token=${encodeURIComponent(t)}`,{method:"GET"});if(!c.ok){let f=await c.json().catch(()=>({})),d=typeof f.error=="string"?f.error:"Failed to load assessment",p=c.status===401?"TOKEN_INVALID":c.status===403?"ORIGIN_NOT_ALLOWED":c.status===404?"ASSESSMENT_NOT_FOUND":"UNKNOWN";a==null||a({code:p,message:d});let y=p==="ORIGIN_NOT_ALLOWED"?`Add ${typeof location!="undefined"?location.origin:"this origin"} to Allowed Embed Origins in Edpire, under Integrations then Origins.`:"";Fre(i,d,y);return}u=await c.json()}catch(c){a==null||a({code:"NETWORK_ERROR",message:"Failed to connect to Edpire"}),Fre(i,"Failed to connect to Edpire. Please try again.","");return}s||(i.innerHTML="",o=(0,wI.createRoot)(i),o.render(vI.default.createElement(Lre,{token:t,data:u,baseUrl:n,options:e})))})(),{unmount:l}},review(e){let i=e,{container:t}=i,r=Pn(i,["container"]),n=typeof t=="string"?document.querySelector(t):t;if(!n)return{unmount:()=>{}};n.textContent="";let a=(0,wI.createRoot)(n);return a.render(vI.default.createElement(Ere,r)),{unmount(){let o=a;a=null,setTimeout(()=>o==null?void 0:o.unmount(),0)}}}};return Sne(W7e);})();
4129
4129
  /*! Bundled license information:
4130
4130
 
4131
4131
  react/cjs/react.production.js: