@edpire/sdk 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +2 -2
- package/dist/index.mjs +4 -4
- package/dist/react.mjs +5 -5
- package/dist/umd/index.global.js +10 -10
- package/package.json +2 -2
package/dist/umd/index.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var EdpireSDK=(()=>{var Tre=Object.create;var Cg=Object.defineProperty,Ere=Object.defineProperties,Dre=Object.getOwnPropertyDescriptor,Ire=Object.getOwnPropertyDescriptors,zre=Object.getOwnPropertyNames,hb=Object.getOwnPropertySymbols,Bre=Object.getPrototypeOf,Sw=Object.prototype.hasOwnProperty,KI=Object.prototype.propertyIsEnumerable;var kw=(e,t,r)=>t in e?Cg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ie=(e,t)=>{for(var r in t||(t={}))Sw.call(t,r)&&kw(e,r,t[r]);if(hb)for(var r of hb(t))KI.call(t,r)&&kw(e,r,t[r]);return e},Xe=(e,t)=>Ere(e,Ire(t));var VI=e=>typeof e=="symbol"?e:e+"",Vn=(e,t)=>{var r={};for(var n in e)Sw.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hb)for(var n of hb(e))t.indexOf(n)<0&&KI.call(e,n)&&(r[n]=e[n]);return r};var mt=(e,t)=>()=>(e&&(t=e(e=0)),t);var hi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mb=(e,t)=>{for(var r in t)Cg(e,r,{get:t[r],enumerable:!0})},GI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of zre(t))!Sw.call(e,a)&&a!==r&&Cg(e,a,{get:()=>t[a],enumerable:!(n=Dre(t,a))||n.enumerable});return e};var Pe=(e,t,r)=>(r=e!=null?Tre(Bre(e)):{},GI(t||!e||!e.__esModule?Cg(r,"default",{value:e,enumerable:!0}):r,e)),Rre=e=>GI(Cg({},"__esModule",{value:!0}),e);var N0=(e,t,r)=>kw(e,typeof t!="symbol"?t+"":t,r);var az=hi(pr=>{"use strict";var _w=Symbol.for("react.transitional.element"),Nre=Symbol.for("react.portal"),Ore=Symbol.for("react.fragment"),Pre=Symbol.for("react.strict_mode"),Fre=Symbol.for("react.profiler"),qre=Symbol.for("react.consumer"),$re=Symbol.for("react.context"),Hre=Symbol.for("react.forward_ref"),jre=Symbol.for("react.suspense"),Ure=Symbol.for("react.memo"),ZI=Symbol.for("react.lazy"),Kre=Symbol.for("react.activity"),WI=Symbol.iterator;function Vre(e){return e===null||typeof e!="object"?null:(e=WI&&e[WI]||e["@@iterator"],typeof e=="function"?e:null)}var QI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ez=Object.assign,tz={};function Lh(e,t,r){this.props=e,this.context=t,this.refs=tz,this.updater=r||QI}Lh.prototype.isReactComponent={};Lh.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")};Lh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function rz(){}rz.prototype=Lh.prototype;function Aw(e,t,r){this.props=e,this.context=t,this.refs=tz,this.updater=r||QI}var Lw=Aw.prototype=new rz;Lw.constructor=Aw;ez(Lw,Lh.prototype);Lw.isPureReactComponent=!0;var XI=Array.isArray;function Mw(){}var Gn={H:null,A:null,T:null,S:null},nz=Object.prototype.hasOwnProperty;function Tw(e,t,r){var n=r.ref;return{$$typeof:_w,type:e,key:t,ref:n!==void 0?n:null,props:r}}function Gre(e,t){return Tw(e.type,t,e.props)}function Ew(e){return typeof e=="object"&&e!==null&&e.$$typeof===_w}function Wre(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var YI=/\/+/g;function Cw(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Wre(""+e.key):t.toString(36)}function Xre(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Mw,Mw):(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 Ah(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 _w:case Nre:o=!0;break;case ZI:return o=e._init,Ah(o(e._payload),t,r,n,a)}}if(o)return a=a(e),o=n===""?"."+Cw(e,0):n,XI(a)?(r="",o!=null&&(r=o.replace(YI,"$&/")+"/"),Ah(a,t,r,"",function(u){return u})):a!=null&&(Ew(a)&&(a=Gre(a,r+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(YI,"$&/")+"/")+o)),t.push(a)),1;o=0;var s=n===""?".":n+":";if(XI(e))for(var l=0;l<e.length;l++)n=e[l],i=s+Cw(n,l),o+=Ah(n,t,r,i,a);else if(l=Vre(e),typeof l=="function")for(e=l.call(e),l=0;!(n=e.next()).done;)n=n.value,i=s+Cw(n,l++),o+=Ah(n,t,r,i,a);else if(i==="object"){if(typeof e.then=="function")return Ah(Xre(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 gb(e,t,r){if(e==null)return e;var n=[],a=0;return Ah(e,n,"","",function(i){return t.call(r,i,a++)}),n}function Yre(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 JI=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)},Jre={map:gb,forEach:function(e,t,r){gb(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return gb(e,function(){t++}),t},toArray:function(e){return gb(e,function(t){return t})||[]},only:function(e){if(!Ew(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pr.Activity=Kre;pr.Children=Jre;pr.Component=Lh;pr.Fragment=Ore;pr.Profiler=Fre;pr.PureComponent=Aw;pr.StrictMode=Pre;pr.Suspense=jre;pr.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gn;pr.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Gn.H.useMemoCache(e)}};pr.cache=function(e){return function(){return e.apply(null,arguments)}};pr.cacheSignal=function(){return null};pr.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=ez({},e.props),a=e.key;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)!nz.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 Tw(e.type,a,n)};pr.createContext=function(e){return e={$$typeof:$re,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:qre,_context:e},e};pr.createElement=function(e,t,r){var n,a={},i=null;if(t!=null)for(n in t.key!==void 0&&(i=""+t.key),t)nz.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 Tw(e,i,a)};pr.createRef=function(){return{current:null}};pr.forwardRef=function(e){return{$$typeof:Hre,render:e}};pr.isValidElement=Ew;pr.lazy=function(e){return{$$typeof:ZI,_payload:{_status:-1,_result:e},_init:Yre}};pr.memo=function(e,t){return{$$typeof:Ure,type:e,compare:t===void 0?null:t}};pr.startTransition=function(e){var t=Gn.T,r={};Gn.T=r;try{var n=e(),a=Gn.S;a!==null&&a(r,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(Mw,JI)}catch(i){JI(i)}finally{t!==null&&r.types!==null&&(t.types=r.types),Gn.T=t}};pr.unstable_useCacheRefresh=function(){return Gn.H.useCacheRefresh()};pr.use=function(e){return Gn.H.use(e)};pr.useActionState=function(e,t,r){return Gn.H.useActionState(e,t,r)};pr.useCallback=function(e,t){return Gn.H.useCallback(e,t)};pr.useContext=function(e){return Gn.H.useContext(e)};pr.useDebugValue=function(){};pr.useDeferredValue=function(e,t){return Gn.H.useDeferredValue(e,t)};pr.useEffect=function(e,t){return Gn.H.useEffect(e,t)};pr.useEffectEvent=function(e){return Gn.H.useEffectEvent(e)};pr.useId=function(){return Gn.H.useId()};pr.useImperativeHandle=function(e,t,r){return Gn.H.useImperativeHandle(e,t,r)};pr.useInsertionEffect=function(e,t){return Gn.H.useInsertionEffect(e,t)};pr.useLayoutEffect=function(e,t){return Gn.H.useLayoutEffect(e,t)};pr.useMemo=function(e,t){return Gn.H.useMemo(e,t)};pr.useOptimistic=function(e,t){return Gn.H.useOptimistic(e,t)};pr.useReducer=function(e,t,r){return Gn.H.useReducer(e,t,r)};pr.useRef=function(e){return Gn.H.useRef(e)};pr.useState=function(e){return Gn.H.useState(e)};pr.useSyncExternalStore=function(e,t,r){return Gn.H.useSyncExternalStore(e,t,r)};pr.useTransition=function(){return Gn.H.useTransition()};pr.version="19.2.3"});var kt=hi((s7e,iz)=>{"use strict";iz.exports=az()});var mz=hi(oa=>{"use strict";function Bw(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,a=e[n];if(0<yb(a,t))e[n]=t,e[r]=a,r=n;else break e}}function du(e){return e.length===0?null:e[0]}function xb(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>yb(s,r))l<a&&0>yb(u,s)?(e[n]=u,e[l]=r,n=l):(e[n]=s,e[o]=r,n=o);else if(l<a&&0>yb(u,r))e[n]=u,e[l]=r,n=l;else break e}}return t}function yb(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}oa.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(oz=performance,oa.unstable_now=function(){return oz.now()}):(Dw=Date,sz=Dw.now(),oa.unstable_now=function(){return Dw.now()-sz});var oz,Dw,sz,cc=[],O0=[],Zre=1,Us=null,Ui=3,Rw=!1,Mg=!1,_g=!1,Nw=!1,cz=typeof setTimeout=="function"?setTimeout:null,dz=typeof clearTimeout=="function"?clearTimeout:null,lz=typeof setImmediate!="undefined"?setImmediate:null;function bb(e){for(var t=du(O0);t!==null;){if(t.callback===null)xb(O0);else if(t.startTime<=e)xb(O0),t.sortIndex=t.expirationTime,Bw(cc,t);else break;t=du(O0)}}function Ow(e){if(_g=!1,bb(e),!Mg)if(du(cc)!==null)Mg=!0,Eh||(Eh=!0,Th());else{var t=du(O0);t!==null&&Pw(Ow,t.startTime-e)}}var Eh=!1,Ag=-1,fz=5,pz=-1;function hz(){return Nw?!0:!(oa.unstable_now()-pz<fz)}function Iw(){if(Nw=!1,Eh){var e=oa.unstable_now();pz=e;var t=!0;try{e:{Mg=!1,_g&&(_g=!1,dz(Ag),Ag=-1),Rw=!0;var r=Ui;try{t:{for(bb(e),Us=du(cc);Us!==null&&!(Us.expirationTime>e&&hz());){var n=Us.callback;if(typeof n=="function"){Us.callback=null,Ui=Us.priorityLevel;var a=n(Us.expirationTime<=e);if(e=oa.unstable_now(),typeof a=="function"){Us.callback=a,bb(e),t=!0;break t}Us===du(cc)&&xb(cc),bb(e)}else xb(cc);Us=du(cc)}if(Us!==null)t=!0;else{var i=du(O0);i!==null&&Pw(Ow,i.startTime-e),t=!1}}break e}finally{Us=null,Ui=r,Rw=!1}t=void 0}}finally{t?Th():Eh=!1}}}var Th;typeof lz=="function"?Th=function(){lz(Iw)}:typeof MessageChannel!="undefined"?(zw=new MessageChannel,uz=zw.port2,zw.port1.onmessage=Iw,Th=function(){uz.postMessage(null)}):Th=function(){cz(Iw,0)};var zw,uz;function Pw(e,t){Ag=cz(function(){e(oa.unstable_now())},t)}oa.unstable_IdlePriority=5;oa.unstable_ImmediatePriority=1;oa.unstable_LowPriority=4;oa.unstable_NormalPriority=3;oa.unstable_Profiling=null;oa.unstable_UserBlockingPriority=2;oa.unstable_cancelCallback=function(e){e.callback=null};oa.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"):fz=0<e?Math.floor(1e3/e):5};oa.unstable_getCurrentPriorityLevel=function(){return Ui};oa.unstable_next=function(e){switch(Ui){case 1:case 2:case 3:var t=3;break;default:t=Ui}var r=Ui;Ui=t;try{return e()}finally{Ui=r}};oa.unstable_requestPaint=function(){Nw=!0};oa.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=Ui;Ui=e;try{return t()}finally{Ui=r}};oa.unstable_scheduleCallback=function(e,t,r){var n=oa.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:Zre++,callback:t,priorityLevel:e,startTime:r,expirationTime:a,sortIndex:-1},r>n?(e.sortIndex=r,Bw(O0,e),du(cc)===null&&e===du(O0)&&(_g?(dz(Ag),Ag=-1):_g=!0,Pw(Ow,r-n))):(e.sortIndex=a,Bw(cc,e),Mg||Rw||(Mg=!0,Eh||(Eh=!0,Th()))),e};oa.unstable_shouldYield=hz;oa.unstable_wrapCallback=function(e){var t=Ui;return function(){var r=Ui;Ui=t;try{return e.apply(this,arguments)}finally{Ui=r}}}});var yz=hi((u7e,gz)=>{"use strict";gz.exports=mz()});var xz=hi(po=>{"use strict";var Qre=kt();function bz(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 P0(){}var fo={d:{f:P0,r:function(){throw Error(bz(522))},D:P0,C:P0,L:P0,m:P0,X:P0,S:P0,M:P0},p:0,findDOMNode:null},ene=Symbol.for("react.portal");function tne(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ene,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}var Lg=Qre.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function vb(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}po.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=fo;po.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(bz(299));return tne(e,t,null,r)};po.flushSync=function(e){var t=Lg.T,r=fo.p;try{if(Lg.T=null,fo.p=2,e)return e()}finally{Lg.T=t,fo.p=r,fo.d.f()}};po.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,fo.d.C(e,t))};po.prefetchDNS=function(e){typeof e=="string"&&fo.d.D(e)};po.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,n=vb(r,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?fo.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:n,integrity:a,fetchPriority:i}):r==="script"&&fo.d.X(e,{crossOrigin:n,integrity:a,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};po.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=vb(t.as,t.crossOrigin);fo.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&&fo.d.M(e)};po.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,n=vb(r,t.crossOrigin);fo.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})}};po.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=vb(t.as,t.crossOrigin);fo.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 fo.d.m(e)};po.requestFormReset=function(e){fo.d.r(e)};po.unstable_batchedUpdates=function(e,t){return e(t)};po.useFormState=function(e,t,r){return Lg.H.useFormState(e,t,r)};po.useFormStatus=function(){return Lg.H.useHostTransitionStatus()};po.version="19.2.3"});var Tg=hi((d7e,wz)=>{"use strict";function vz(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vz)}catch(e){console.error(e)}}vz(),wz.exports=xz()});var zO=hi(K5=>{"use strict";var ni=yz(),GB=kt(),rne=Tg();function $e(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 WB(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m4(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 XB(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 YB(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 kz(e){if(m4(e)!==e)throw Error($e(188))}function nne(e){var t=e.alternate;if(!t){if(t=m4(e),t===null)throw Error($e(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 kz(a),e;if(i===n)return kz(a),t;i=i.sibling}throw Error($e(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($e(189))}}if(r.alternate!==n)throw Error($e(190))}if(r.tag!==3)throw Error($e(188));return r.stateNode.current===r?e:t}function JB(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=JB(e),t!==null)return t;e=e.sibling}return null}var Yn=Object.assign,ane=Symbol.for("react.element"),wb=Symbol.for("react.transitional.element"),Og=Symbol.for("react.portal"),Nh=Symbol.for("react.fragment"),ZB=Symbol.for("react.strict_mode"),bk=Symbol.for("react.profiler"),QB=Symbol.for("react.consumer"),bc=Symbol.for("react.context"),pS=Symbol.for("react.forward_ref"),xk=Symbol.for("react.suspense"),vk=Symbol.for("react.suspense_list"),hS=Symbol.for("react.memo"),F0=Symbol.for("react.lazy"),wk=Symbol.for("react.activity"),ine=Symbol.for("react.memo_cache_sentinel"),Sz=Symbol.iterator;function Eg(e){return e===null||typeof e!="object"?null:(e=Sz&&e[Sz]||e["@@iterator"],typeof e=="function"?e:null)}var one=Symbol.for("react.client.reference");function kk(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===one?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Nh:return"Fragment";case bk:return"Profiler";case ZB:return"StrictMode";case xk:return"Suspense";case vk:return"SuspenseList";case wk:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Og:return"Portal";case bc:return e.displayName||"Context";case QB:return(e._context.displayName||"Context")+".Consumer";case pS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hS:return t=e.displayName||null,t!==null?t:kk(e.type)||"Memo";case F0:t=e._payload,e=e._init;try{return kk(e(t))}catch(r){}}return null}var Pg=Array.isArray,Zt=GB.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ln=rne.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,If={pending:!1,data:null,method:null,action:null},Sk=[],Oh=-1;function gu(e){return{current:e}}function yi(e){0>Oh||(e.current=Sk[Oh],Sk[Oh]=null,Oh--)}function Fn(e,t){Oh++,Sk[Oh]=e.current,e.current=t}var mu=gu(null),t4=gu(null),Y0=gu(null),e5=gu(null);function t5(e,t){switch(Fn(Y0,t),Fn(t4,e),Fn(mu,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?EB(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=EB(t),e=xO(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}yi(mu),Fn(mu,e)}function t1(){yi(mu),yi(t4),yi(Y0)}function Ck(e){e.memoizedState!==null&&Fn(e5,e);var t=mu.current,r=xO(t,e.type);t!==r&&(Fn(t4,e),Fn(mu,r))}function r5(e){t4.current===e&&(yi(mu),yi(t4)),e5.current===e&&(yi(e5),f4._currentValue=If)}var Fw,Cz;function Lf(e){if(Fw===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Fw=t&&t[1]||"",Cz=-1<r.stack.indexOf(`
|
|
1
|
+
"use strict";var EdpireSDK=(()=>{var Tre=Object.create;var Cg=Object.defineProperty,Ere=Object.defineProperties,Dre=Object.getOwnPropertyDescriptor,Ire=Object.getOwnPropertyDescriptors,zre=Object.getOwnPropertyNames,hb=Object.getOwnPropertySymbols,Bre=Object.getPrototypeOf,Sw=Object.prototype.hasOwnProperty,KI=Object.prototype.propertyIsEnumerable;var kw=(e,t,r)=>t in e?Cg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ie=(e,t)=>{for(var r in t||(t={}))Sw.call(t,r)&&kw(e,r,t[r]);if(hb)for(var r of hb(t))KI.call(t,r)&&kw(e,r,t[r]);return e},Xe=(e,t)=>Ere(e,Ire(t));var VI=e=>typeof e=="symbol"?e:e+"",Vn=(e,t)=>{var r={};for(var n in e)Sw.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hb)for(var n of hb(e))t.indexOf(n)<0&&KI.call(e,n)&&(r[n]=e[n]);return r};var mt=(e,t)=>()=>(e&&(t=e(e=0)),t);var hi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mb=(e,t)=>{for(var r in t)Cg(e,r,{get:t[r],enumerable:!0})},GI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of zre(t))!Sw.call(e,a)&&a!==r&&Cg(e,a,{get:()=>t[a],enumerable:!(n=Dre(t,a))||n.enumerable});return e};var Pe=(e,t,r)=>(r=e!=null?Tre(Bre(e)):{},GI(t||!e||!e.__esModule?Cg(r,"default",{value:e,enumerable:!0}):r,e)),Rre=e=>GI(Cg({},"__esModule",{value:!0}),e);var N0=(e,t,r)=>kw(e,typeof t!="symbol"?t+"":t,r);var az=hi(pr=>{"use strict";var _w=Symbol.for("react.transitional.element"),Nre=Symbol.for("react.portal"),Ore=Symbol.for("react.fragment"),Pre=Symbol.for("react.strict_mode"),Fre=Symbol.for("react.profiler"),qre=Symbol.for("react.consumer"),$re=Symbol.for("react.context"),Hre=Symbol.for("react.forward_ref"),jre=Symbol.for("react.suspense"),Ure=Symbol.for("react.memo"),ZI=Symbol.for("react.lazy"),Kre=Symbol.for("react.activity"),WI=Symbol.iterator;function Vre(e){return e===null||typeof e!="object"?null:(e=WI&&e[WI]||e["@@iterator"],typeof e=="function"?e:null)}var QI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ez=Object.assign,tz={};function Lh(e,t,r){this.props=e,this.context=t,this.refs=tz,this.updater=r||QI}Lh.prototype.isReactComponent={};Lh.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")};Lh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function rz(){}rz.prototype=Lh.prototype;function Aw(e,t,r){this.props=e,this.context=t,this.refs=tz,this.updater=r||QI}var Lw=Aw.prototype=new rz;Lw.constructor=Aw;ez(Lw,Lh.prototype);Lw.isPureReactComponent=!0;var XI=Array.isArray;function Mw(){}var Gn={H:null,A:null,T:null,S:null},nz=Object.prototype.hasOwnProperty;function Tw(e,t,r){var n=r.ref;return{$$typeof:_w,type:e,key:t,ref:n!==void 0?n:null,props:r}}function Gre(e,t){return Tw(e.type,t,e.props)}function Ew(e){return typeof e=="object"&&e!==null&&e.$$typeof===_w}function Wre(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var YI=/\/+/g;function Cw(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Wre(""+e.key):t.toString(36)}function Xre(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Mw,Mw):(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 Ah(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 _w:case Nre:o=!0;break;case ZI:return o=e._init,Ah(o(e._payload),t,r,n,a)}}if(o)return a=a(e),o=n===""?"."+Cw(e,0):n,XI(a)?(r="",o!=null&&(r=o.replace(YI,"$&/")+"/"),Ah(a,t,r,"",function(u){return u})):a!=null&&(Ew(a)&&(a=Gre(a,r+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(YI,"$&/")+"/")+o)),t.push(a)),1;o=0;var s=n===""?".":n+":";if(XI(e))for(var l=0;l<e.length;l++)n=e[l],i=s+Cw(n,l),o+=Ah(n,t,r,i,a);else if(l=Vre(e),typeof l=="function")for(e=l.call(e),l=0;!(n=e.next()).done;)n=n.value,i=s+Cw(n,l++),o+=Ah(n,t,r,i,a);else if(i==="object"){if(typeof e.then=="function")return Ah(Xre(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 gb(e,t,r){if(e==null)return e;var n=[],a=0;return Ah(e,n,"","",function(i){return t.call(r,i,a++)}),n}function Yre(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 JI=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)},Jre={map:gb,forEach:function(e,t,r){gb(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return gb(e,function(){t++}),t},toArray:function(e){return gb(e,function(t){return t})||[]},only:function(e){if(!Ew(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pr.Activity=Kre;pr.Children=Jre;pr.Component=Lh;pr.Fragment=Ore;pr.Profiler=Fre;pr.PureComponent=Aw;pr.StrictMode=Pre;pr.Suspense=jre;pr.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gn;pr.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Gn.H.useMemoCache(e)}};pr.cache=function(e){return function(){return e.apply(null,arguments)}};pr.cacheSignal=function(){return null};pr.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=ez({},e.props),a=e.key;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)!nz.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 Tw(e.type,a,n)};pr.createContext=function(e){return e={$$typeof:$re,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:qre,_context:e},e};pr.createElement=function(e,t,r){var n,a={},i=null;if(t!=null)for(n in t.key!==void 0&&(i=""+t.key),t)nz.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 Tw(e,i,a)};pr.createRef=function(){return{current:null}};pr.forwardRef=function(e){return{$$typeof:Hre,render:e}};pr.isValidElement=Ew;pr.lazy=function(e){return{$$typeof:ZI,_payload:{_status:-1,_result:e},_init:Yre}};pr.memo=function(e,t){return{$$typeof:Ure,type:e,compare:t===void 0?null:t}};pr.startTransition=function(e){var t=Gn.T,r={};Gn.T=r;try{var n=e(),a=Gn.S;a!==null&&a(r,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(Mw,JI)}catch(i){JI(i)}finally{t!==null&&r.types!==null&&(t.types=r.types),Gn.T=t}};pr.unstable_useCacheRefresh=function(){return Gn.H.useCacheRefresh()};pr.use=function(e){return Gn.H.use(e)};pr.useActionState=function(e,t,r){return Gn.H.useActionState(e,t,r)};pr.useCallback=function(e,t){return Gn.H.useCallback(e,t)};pr.useContext=function(e){return Gn.H.useContext(e)};pr.useDebugValue=function(){};pr.useDeferredValue=function(e,t){return Gn.H.useDeferredValue(e,t)};pr.useEffect=function(e,t){return Gn.H.useEffect(e,t)};pr.useEffectEvent=function(e){return Gn.H.useEffectEvent(e)};pr.useId=function(){return Gn.H.useId()};pr.useImperativeHandle=function(e,t,r){return Gn.H.useImperativeHandle(e,t,r)};pr.useInsertionEffect=function(e,t){return Gn.H.useInsertionEffect(e,t)};pr.useLayoutEffect=function(e,t){return Gn.H.useLayoutEffect(e,t)};pr.useMemo=function(e,t){return Gn.H.useMemo(e,t)};pr.useOptimistic=function(e,t){return Gn.H.useOptimistic(e,t)};pr.useReducer=function(e,t,r){return Gn.H.useReducer(e,t,r)};pr.useRef=function(e){return Gn.H.useRef(e)};pr.useState=function(e){return Gn.H.useState(e)};pr.useSyncExternalStore=function(e,t,r){return Gn.H.useSyncExternalStore(e,t,r)};pr.useTransition=function(){return Gn.H.useTransition()};pr.version="19.2.3"});var kt=hi((l7e,iz)=>{"use strict";iz.exports=az()});var mz=hi(oa=>{"use strict";function Bw(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,a=e[n];if(0<yb(a,t))e[n]=t,e[r]=a,r=n;else break e}}function du(e){return e.length===0?null:e[0]}function xb(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>yb(s,r))l<a&&0>yb(u,s)?(e[n]=u,e[l]=r,n=l):(e[n]=s,e[o]=r,n=o);else if(l<a&&0>yb(u,r))e[n]=u,e[l]=r,n=l;else break e}}return t}function yb(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}oa.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(oz=performance,oa.unstable_now=function(){return oz.now()}):(Dw=Date,sz=Dw.now(),oa.unstable_now=function(){return Dw.now()-sz});var oz,Dw,sz,cc=[],O0=[],Zre=1,Us=null,Ui=3,Rw=!1,Mg=!1,_g=!1,Nw=!1,cz=typeof setTimeout=="function"?setTimeout:null,dz=typeof clearTimeout=="function"?clearTimeout:null,lz=typeof setImmediate!="undefined"?setImmediate:null;function bb(e){for(var t=du(O0);t!==null;){if(t.callback===null)xb(O0);else if(t.startTime<=e)xb(O0),t.sortIndex=t.expirationTime,Bw(cc,t);else break;t=du(O0)}}function Ow(e){if(_g=!1,bb(e),!Mg)if(du(cc)!==null)Mg=!0,Eh||(Eh=!0,Th());else{var t=du(O0);t!==null&&Pw(Ow,t.startTime-e)}}var Eh=!1,Ag=-1,fz=5,pz=-1;function hz(){return Nw?!0:!(oa.unstable_now()-pz<fz)}function Iw(){if(Nw=!1,Eh){var e=oa.unstable_now();pz=e;var t=!0;try{e:{Mg=!1,_g&&(_g=!1,dz(Ag),Ag=-1),Rw=!0;var r=Ui;try{t:{for(bb(e),Us=du(cc);Us!==null&&!(Us.expirationTime>e&&hz());){var n=Us.callback;if(typeof n=="function"){Us.callback=null,Ui=Us.priorityLevel;var a=n(Us.expirationTime<=e);if(e=oa.unstable_now(),typeof a=="function"){Us.callback=a,bb(e),t=!0;break t}Us===du(cc)&&xb(cc),bb(e)}else xb(cc);Us=du(cc)}if(Us!==null)t=!0;else{var i=du(O0);i!==null&&Pw(Ow,i.startTime-e),t=!1}}break e}finally{Us=null,Ui=r,Rw=!1}t=void 0}}finally{t?Th():Eh=!1}}}var Th;typeof lz=="function"?Th=function(){lz(Iw)}:typeof MessageChannel!="undefined"?(zw=new MessageChannel,uz=zw.port2,zw.port1.onmessage=Iw,Th=function(){uz.postMessage(null)}):Th=function(){cz(Iw,0)};var zw,uz;function Pw(e,t){Ag=cz(function(){e(oa.unstable_now())},t)}oa.unstable_IdlePriority=5;oa.unstable_ImmediatePriority=1;oa.unstable_LowPriority=4;oa.unstable_NormalPriority=3;oa.unstable_Profiling=null;oa.unstable_UserBlockingPriority=2;oa.unstable_cancelCallback=function(e){e.callback=null};oa.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"):fz=0<e?Math.floor(1e3/e):5};oa.unstable_getCurrentPriorityLevel=function(){return Ui};oa.unstable_next=function(e){switch(Ui){case 1:case 2:case 3:var t=3;break;default:t=Ui}var r=Ui;Ui=t;try{return e()}finally{Ui=r}};oa.unstable_requestPaint=function(){Nw=!0};oa.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=Ui;Ui=e;try{return t()}finally{Ui=r}};oa.unstable_scheduleCallback=function(e,t,r){var n=oa.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:Zre++,callback:t,priorityLevel:e,startTime:r,expirationTime:a,sortIndex:-1},r>n?(e.sortIndex=r,Bw(O0,e),du(cc)===null&&e===du(O0)&&(_g?(dz(Ag),Ag=-1):_g=!0,Pw(Ow,r-n))):(e.sortIndex=a,Bw(cc,e),Mg||Rw||(Mg=!0,Eh||(Eh=!0,Th()))),e};oa.unstable_shouldYield=hz;oa.unstable_wrapCallback=function(e){var t=Ui;return function(){var r=Ui;Ui=t;try{return e.apply(this,arguments)}finally{Ui=r}}}});var yz=hi((c7e,gz)=>{"use strict";gz.exports=mz()});var xz=hi(po=>{"use strict";var Qre=kt();function bz(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 P0(){}var fo={d:{f:P0,r:function(){throw Error(bz(522))},D:P0,C:P0,L:P0,m:P0,X:P0,S:P0,M:P0},p:0,findDOMNode:null},ene=Symbol.for("react.portal");function tne(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ene,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}var Lg=Qre.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function vb(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}po.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=fo;po.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(bz(299));return tne(e,t,null,r)};po.flushSync=function(e){var t=Lg.T,r=fo.p;try{if(Lg.T=null,fo.p=2,e)return e()}finally{Lg.T=t,fo.p=r,fo.d.f()}};po.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,fo.d.C(e,t))};po.prefetchDNS=function(e){typeof e=="string"&&fo.d.D(e)};po.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,n=vb(r,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?fo.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:n,integrity:a,fetchPriority:i}):r==="script"&&fo.d.X(e,{crossOrigin:n,integrity:a,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};po.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=vb(t.as,t.crossOrigin);fo.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&&fo.d.M(e)};po.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,n=vb(r,t.crossOrigin);fo.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})}};po.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=vb(t.as,t.crossOrigin);fo.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 fo.d.m(e)};po.requestFormReset=function(e){fo.d.r(e)};po.unstable_batchedUpdates=function(e,t){return e(t)};po.useFormState=function(e,t,r){return Lg.H.useFormState(e,t,r)};po.useFormStatus=function(){return Lg.H.useHostTransitionStatus()};po.version="19.2.3"});var Tg=hi((f7e,wz)=>{"use strict";function vz(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vz)}catch(e){console.error(e)}}vz(),wz.exports=xz()});var zO=hi(K5=>{"use strict";var ni=yz(),GB=kt(),rne=Tg();function $e(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 WB(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m4(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 XB(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 YB(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 kz(e){if(m4(e)!==e)throw Error($e(188))}function nne(e){var t=e.alternate;if(!t){if(t=m4(e),t===null)throw Error($e(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 kz(a),e;if(i===n)return kz(a),t;i=i.sibling}throw Error($e(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($e(189))}}if(r.alternate!==n)throw Error($e(190))}if(r.tag!==3)throw Error($e(188));return r.stateNode.current===r?e:t}function JB(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=JB(e),t!==null)return t;e=e.sibling}return null}var Yn=Object.assign,ane=Symbol.for("react.element"),wb=Symbol.for("react.transitional.element"),Og=Symbol.for("react.portal"),Nh=Symbol.for("react.fragment"),ZB=Symbol.for("react.strict_mode"),bk=Symbol.for("react.profiler"),QB=Symbol.for("react.consumer"),bc=Symbol.for("react.context"),pS=Symbol.for("react.forward_ref"),xk=Symbol.for("react.suspense"),vk=Symbol.for("react.suspense_list"),hS=Symbol.for("react.memo"),F0=Symbol.for("react.lazy"),wk=Symbol.for("react.activity"),ine=Symbol.for("react.memo_cache_sentinel"),Sz=Symbol.iterator;function Eg(e){return e===null||typeof e!="object"?null:(e=Sz&&e[Sz]||e["@@iterator"],typeof e=="function"?e:null)}var one=Symbol.for("react.client.reference");function kk(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===one?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Nh:return"Fragment";case bk:return"Profiler";case ZB:return"StrictMode";case xk:return"Suspense";case vk:return"SuspenseList";case wk:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Og:return"Portal";case bc:return e.displayName||"Context";case QB:return(e._context.displayName||"Context")+".Consumer";case pS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hS:return t=e.displayName||null,t!==null?t:kk(e.type)||"Memo";case F0:t=e._payload,e=e._init;try{return kk(e(t))}catch(r){}}return null}var Pg=Array.isArray,Zt=GB.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ln=rne.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,If={pending:!1,data:null,method:null,action:null},Sk=[],Oh=-1;function gu(e){return{current:e}}function yi(e){0>Oh||(e.current=Sk[Oh],Sk[Oh]=null,Oh--)}function Fn(e,t){Oh++,Sk[Oh]=e.current,e.current=t}var mu=gu(null),t4=gu(null),Y0=gu(null),e5=gu(null);function t5(e,t){switch(Fn(Y0,t),Fn(t4,e),Fn(mu,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?EB(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=EB(t),e=xO(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}yi(mu),Fn(mu,e)}function t1(){yi(mu),yi(t4),yi(Y0)}function Ck(e){e.memoizedState!==null&&Fn(e5,e);var t=mu.current,r=xO(t,e.type);t!==r&&(Fn(t4,e),Fn(mu,r))}function r5(e){t4.current===e&&(yi(mu),yi(t4)),e5.current===e&&(yi(e5),f4._currentValue=If)}var Fw,Cz;function Lf(e){if(Fw===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Fw=t&&t[1]||"",Cz=-1<r.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
3
|
`+Fw+e+Cz}var qw=!1;function $w(e,t){if(!e||qw)return"";qw=!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{qw=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?Lf(r):""}function sne(e,t){switch(e.tag){case 26:case 27:case 5:return Lf(e.type);case 16:return Lf("Lazy");case 13:return e.child!==t&&t!==null?Lf("Suspense Fallback"):Lf("Suspense");case 19:return Lf("SuspenseList");case 0:case 15:return $w(e.type,!1);case 11:return $w(e.type.render,!1);case 1:return $w(e.type,!0);case 31:return Lf("Activity");default:return""}}function Mz(e){try{var t="",r=null;do t+=sne(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 Mk=Object.prototype.hasOwnProperty,mS=ni.unstable_scheduleCallback,Hw=ni.unstable_cancelCallback,lne=ni.unstable_shouldYield,une=ni.unstable_requestPaint,ys=ni.unstable_now,cne=ni.unstable_getCurrentPriorityLevel,eR=ni.unstable_ImmediatePriority,tR=ni.unstable_UserBlockingPriority,n5=ni.unstable_NormalPriority,dne=ni.unstable_LowPriority,rR=ni.unstable_IdlePriority,fne=ni.log,pne=ni.unstable_setDisableYieldValue,g4=null,bs=null;function K0(e){if(typeof fne=="function"&&pne(e),bs&&typeof bs.setStrictMode=="function")try{bs.setStrictMode(g4,e)}catch(t){}}var xs=Math.clz32?Math.clz32:gne,hne=Math.log,mne=Math.LN2;function gne(e){return e>>>=0,e===0?32:31-(hne(e)/mne|0)|0}var kb=256,Sb=262144,Cb=4194304;function Tf(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 T5(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=Tf(n):(o&=s,o!==0?a=Tf(o):r||(r=s&~e,r!==0&&(a=Tf(r))))):(s=n&~i,s!==0?a=Tf(s):o!==0?a=Tf(o):r||(r=n&~e,r!==0&&(a=Tf(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 y4(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function yne(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 nR(){var e=Cb;return Cb<<=1,(Cb&62914560)===0&&(Cb=4194304),e}function jw(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function b4(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bne(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-xs(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&&aR(e,n,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function aR(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-xs(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|r&261930}function iR(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-xs(r),a=1<<n;a&t|e[n]&t&&(e[n]|=t),r&=~a}}function oR(e,t){var r=t&-t;return r=(r&42)!==0?1:gS(r),(r&(e.suspendedLanes|t))!==0?0:r}function gS(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 yS(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function sR(){var e=ln.p;return e!==0?e:(e=window.event,e===void 0?32:EO(e.type))}function _z(e,t){var r=ln.p;try{return ln.p=e,t()}finally{ln.p=r}}var ud=Math.random().toString(36).slice(2),Ti="__reactFiber$"+ud,jo="__reactProps$"+ud,f1="__reactContainer$"+ud,_k="__reactEvents$"+ud,xne="__reactListeners$"+ud,vne="__reactHandles$"+ud,Az="__reactResources$"+ud,x4="__reactMarker$"+ud;function bS(e){delete e[Ti],delete e[jo],delete e[_k],delete e[xne],delete e[vne]}function Ph(e){var t=e[Ti];if(t)return t;for(var r=e.parentNode;r;){if(t=r[f1]||r[Ti]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=RB(e);e!==null;){if(r=e[Ti])return r;e=RB(e)}return t}e=r,r=e.parentNode}return null}function p1(e){if(e=e[Ti]||e[f1]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Fg(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error($e(33))}function Wh(e){var t=e[Az];return t||(t=e[Az]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gi(e){e[x4]=!0}var lR=new Set,uR={};function Hf(e,t){r1(e,t),r1(e+"Capture",t)}function r1(e,t){for(uR[e]=t,e=0;e<t.length;e++)lR.add(t[e])}var wne=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]*$"),Lz={},Tz={};function kne(e){return Mk.call(Tz,e)?!0:Mk.call(Lz,e)?!1:wne.test(e)?Tz[e]=!0:(Lz[e]=!0,!1)}function Fb(e,t,r){if(kne(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 Mb(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 dc(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 Vs(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function cR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Sne(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 Ak(e){if(!e._valueTracker){var t=cR(e)?"checked":"value";e._valueTracker=Sne(e,t,""+e[t])}}function dR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=cR(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 Cne=/[\n"\\]/g;function Xs(e){return e.replace(Cne,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Lk(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=""+Vs(t)):e.value!==""+Vs(t)&&(e.value=""+Vs(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Tk(e,o,Vs(t)):r!=null?Tk(e,o,Vs(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=""+Vs(s):e.removeAttribute("name")}function fR(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)){Ak(e);return}r=r!=null?""+Vs(r):"",t=t!=null?""+Vs(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),Ak(e)}function Tk(e,t,r){t==="number"&&a5(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Xh(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=""+Vs(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 pR(e,t,r){if(t!=null&&(t=""+Vs(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+Vs(r):""}function hR(e,t,r,n){if(t==null){if(n!=null){if(r!=null)throw Error($e(92));if(Pg(n)){if(1<n.length)throw Error($e(93));n=n[0]}r=n}r==null&&(r=""),t=r}r=Vs(t),e.defaultValue=r,n=e.textContent,n===r&&n!==""&&n!==null&&(e.value=n),Ak(e)}function n1(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Mne=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 Ez(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||Mne.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function mR(e,t,r){if(t!=null&&typeof t!="object")throw Error($e(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&&Ez(e,a,n)}else for(var i in t)t.hasOwnProperty(i)&&Ez(e,i,t[i])}function xS(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 _ne=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"]]),Ane=/^[\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 qb(e){return Ane.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function xc(){}var Ek=null;function vS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fh=null,Yh=null;function Dz(e){var t=p1(e);if(t&&(e=t.stateNode)){var r=e[jo]||null;e:switch(e=t.stateNode,t.type){case"input":if(Lk(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="'+Xs(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var a=n[jo]||null;if(!a)throw Error($e(90));Lk(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&&dR(n)}break e;case"textarea":pR(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&Xh(e,!!r.multiple,t,!1)}}}var Uw=!1;function gR(e,t,r){if(Uw)return e(t,r);Uw=!0;try{var n=e(t);return n}finally{if(Uw=!1,(Fh!==null||Yh!==null)&&($5(),Fh&&(t=Fh,e=Yh,Yh=Fh=null,Dz(t),e)))for(t=0;t<e.length;t++)Dz(e[t])}}function r4(e,t){var r=e.stateNode;if(r===null)return null;var n=r[jo]||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($e(231,t,typeof r));return r}var Cc=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),Dk=!1;if(Cc)try{Dh={},Object.defineProperty(Dh,"passive",{get:function(){Dk=!0}}),window.addEventListener("test",Dh,Dh),window.removeEventListener("test",Dh,Dh)}catch(e){Dk=!1}var Dh,V0=null,wS=null,$b=null;function yR(){if($b)return $b;var e,t=wS,r=t.length,n,a="value"in V0?V0.value:V0.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 $b=a.slice(e,1<n?1-n:void 0)}function Hb(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 _b(){return!0}function Iz(){return!1}function Uo(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)?_b:Iz,this.isPropagationStopped=Iz,this}return Yn(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=_b)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=_b)},persist:function(){},isPersistent:_b}),t}var jf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},E5=Uo(jf),v4=Yn({},jf,{view:0,detail:0}),Lne=Uo(v4),Kw,Vw,Dg,D5=Yn({},v4,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kS,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!==Dg&&(Dg&&e.type==="mousemove"?(Kw=e.screenX-Dg.screenX,Vw=e.screenY-Dg.screenY):Vw=Kw=0,Dg=e),Kw)},movementY:function(e){return"movementY"in e?e.movementY:Vw}}),zz=Uo(D5),Tne=Yn({},D5,{dataTransfer:0}),Ene=Uo(Tne),Dne=Yn({},v4,{relatedTarget:0}),Gw=Uo(Dne),Ine=Yn({},jf,{animationName:0,elapsedTime:0,pseudoElement:0}),zne=Uo(Ine),Bne=Yn({},jf,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Rne=Uo(Bne),Nne=Yn({},jf,{data:0}),Bz=Uo(Nne),One={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pne={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"},Fne={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qne(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fne[e])?!!t[e]:!1}function kS(){return qne}var $ne=Yn({},v4,{key:function(e){if(e.key){var t=One[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hb(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Pne[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kS,charCode:function(e){return e.type==="keypress"?Hb(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hb(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Hne=Uo($ne),jne=Yn({},D5,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rz=Uo(jne),Une=Yn({},v4,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kS}),Kne=Uo(Une),Vne=Yn({},jf,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gne=Uo(Vne),Wne=Yn({},D5,{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}),Xne=Uo(Wne),Yne=Yn({},jf,{newState:0,oldState:0}),Jne=Uo(Yne),Zne=[9,13,27,32],SS=Cc&&"CompositionEvent"in window,Hg=null;Cc&&"documentMode"in document&&(Hg=document.documentMode);var Qne=Cc&&"TextEvent"in window&&!Hg,bR=Cc&&(!SS||Hg&&8<Hg&&11>=Hg),Nz=" ",Oz=!1;function xR(e,t){switch(e){case"keyup":return Zne.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qh=!1;function eae(e,t){switch(e){case"compositionend":return vR(t);case"keypress":return t.which!==32?null:(Oz=!0,Nz);case"textInput":return e=t.data,e===Nz&&Oz?null:e;default:return null}}function tae(e,t){if(qh)return e==="compositionend"||!SS&&xR(e,t)?(e=yR(),$b=wS=V0=null,qh=!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 bR&&t.locale!=="ko"?null:t.data;default:return null}}var rae={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 Pz(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rae[e.type]:t==="textarea"}function wR(e,t,r,n){Fh?Yh?Yh.push(n):Yh=[n]:Fh=n,t=k5(t,"onChange"),0<t.length&&(r=new E5("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var jg=null,n4=null;function nae(e){gO(e,0)}function I5(e){var t=Fg(e);if(dR(t))return e}function Fz(e,t){if(e==="change")return t}var kR=!1;Cc&&(Cc?(Lb="oninput"in document,Lb||(Ww=document.createElement("div"),Ww.setAttribute("oninput","return;"),Lb=typeof Ww.oninput=="function"),Ab=Lb):Ab=!1,kR=Ab&&(!document.documentMode||9<document.documentMode));var Ab,Lb,Ww;function qz(){jg&&(jg.detachEvent("onpropertychange",SR),n4=jg=null)}function SR(e){if(e.propertyName==="value"&&I5(n4)){var t=[];wR(t,n4,e,vS(e)),gR(nae,t)}}function aae(e,t,r){e==="focusin"?(qz(),jg=t,n4=r,jg.attachEvent("onpropertychange",SR)):e==="focusout"&&qz()}function iae(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return I5(n4)}function oae(e,t){if(e==="click")return I5(t)}function sae(e,t){if(e==="input"||e==="change")return I5(t)}function lae(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ws=typeof Object.is=="function"?Object.is:lae;function a4(e,t){if(ws(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(!Mk.call(t,a)||!ws(e[a],t[a]))return!1}return!0}function $z(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hz(e,t){var r=$z(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=$z(r)}}function CR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?CR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function MR(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 CS(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 uae=Cc&&"documentMode"in document&&11>=document.documentMode,$h=null,Ik=null,Ug=null,zk=!1;function jz(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;zk||$h==null||$h!==a5(n)||(n=$h,"selectionStart"in n&&CS(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}),Ug&&a4(Ug,n)||(Ug=n,n=k5(Ik,"onSelect"),0<n.length&&(t=new E5("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=$h)))}function Af(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Hh={animationend:Af("Animation","AnimationEnd"),animationiteration:Af("Animation","AnimationIteration"),animationstart:Af("Animation","AnimationStart"),transitionrun:Af("Transition","TransitionRun"),transitionstart:Af("Transition","TransitionStart"),transitioncancel:Af("Transition","TransitionCancel"),transitionend:Af("Transition","TransitionEnd")},Xw={},_R={};Cc&&(_R=document.createElement("div").style,"AnimationEvent"in window||(delete Hh.animationend.animation,delete Hh.animationiteration.animation,delete Hh.animationstart.animation),"TransitionEvent"in window||delete Hh.transitionend.transition);function Uf(e){if(Xw[e])return Xw[e];if(!Hh[e])return e;var t=Hh[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in _R)return Xw[e]=t[r];return e}var AR=Uf("animationend"),LR=Uf("animationiteration"),TR=Uf("animationstart"),cae=Uf("transitionrun"),dae=Uf("transitionstart"),fae=Uf("transitioncancel"),ER=Uf("transitionend"),DR=new Map,Bk="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(" ");Bk.push("scrollEnd");function ql(e,t){DR.set(e,t),Hf(t,[e])}var i5=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)},Ks=[],jh=0,MS=0;function z5(){for(var e=jh,t=MS=jh=0;t<e;){var r=Ks[t];Ks[t++]=null;var n=Ks[t];Ks[t++]=null;var a=Ks[t];Ks[t++]=null;var i=Ks[t];if(Ks[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&&IR(r,a,i)}}function B5(e,t,r,n){Ks[jh++]=e,Ks[jh++]=t,Ks[jh++]=r,Ks[jh++]=n,MS|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function _S(e,t,r,n){return B5(e,t,r,n),o5(e)}function Kf(e,t){return B5(e,null,null,t),o5(e)}function IR(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-xs(r),e=i.hiddenUpdates,n=e[a],n===null?e[a]=[t]:n.push(t),t.lane=r|536870912),i):null}function o5(e){if(50<Qg)throw Qg=0,tS=null,Error($e(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Uh={};function pae(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 pae(e,t,r,n)}function AS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wc(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 zR(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 jb(e,t,r,n,a,i){var o=0;if(n=e,typeof e=="function")AS(e)&&(o=1);else if(typeof e=="string")o=gie(e,r,mu.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case wk:return e=ms(31,r,t,a),e.elementType=wk,e.lanes=i,e;case Nh:return zf(r.children,a,i,t);case ZB:o=8,a|=24;break;case bk:return e=ms(12,r,t,a|2),e.elementType=bk,e.lanes=i,e;case xk:return e=ms(13,r,t,a),e.elementType=xk,e.lanes=i,e;case vk:return e=ms(19,r,t,a),e.elementType=vk,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case bc:o=10;break e;case QB:o=9;break e;case pS:o=11;break e;case hS:o=14;break e;case F0:o=16,n=null;break e}o=29,r=Error($e(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 zf(e,t,r,n){return e=ms(7,e,n,t),e.lanes=r,e}function Yw(e,t,r){return e=ms(6,e,null,t),e.lanes=r,e}function BR(e){var t=ms(18,null,null,0);return t.stateNode=e,t}function Jw(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 Uz=new WeakMap;function Ys(e,t){if(typeof e=="object"&&e!==null){var r=Uz.get(e);return r!==void 0?r:(t={value:e,source:t,stack:Mz(t)},Uz.set(e,t),t)}return{value:e,source:t,stack:Mz(t)}}var Kh=[],Vh=0,s5=null,i4=0,Gs=[],Ws=0,id=null,fu=1,pu="";function gc(e,t){Kh[Vh++]=i4,Kh[Vh++]=s5,s5=e,i4=t}function RR(e,t,r){Gs[Ws++]=fu,Gs[Ws++]=pu,Gs[Ws++]=id,id=e;var n=fu;e=pu;var a=32-xs(n)-1;n&=~(1<<a),r+=1;var i=32-xs(t)+a;if(30<i){var o=a-a%5;i=(n&(1<<o)-1).toString(32),n>>=o,a-=o,fu=1<<32-xs(t)+a|r<<a|n,pu=i+e}else fu=1<<i|r<<a|n,pu=e}function LS(e){e.return!==null&&(gc(e,1),RR(e,1,0))}function TS(e){for(;e===s5;)s5=Kh[--Vh],Kh[Vh]=null,i4=Kh[--Vh],Kh[Vh]=null;for(;e===id;)id=Gs[--Ws],Gs[Ws]=null,pu=Gs[--Ws],Gs[Ws]=null,fu=Gs[--Ws],Gs[Ws]=null}function NR(e,t){Gs[Ws++]=fu,Gs[Ws++]=pu,Gs[Ws++]=id,fu=t.id,pu=t.overflow,id=e}var Ei=null,Xn=null,$r=!1,J0=null,Js=!1,Rk=Error($e(519));function od(e){var t=Error($e(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw o4(Ys(t,e)),Rk}function Kz(e){var t=e.stateNode,r=e.type,n=e.memoizedProps;switch(t[Ti]=e,t[jo]=n,r){case"dialog":Er("cancel",t),Er("close",t);break;case"iframe":case"object":case"embed":Er("load",t);break;case"video":case"audio":for(r=0;r<c4.length;r++)Er(c4[r],t);break;case"source":Er("error",t);break;case"img":case"image":case"link":Er("error",t),Er("load",t);break;case"details":Er("toggle",t);break;case"input":Er("invalid",t),fR(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Er("invalid",t);break;case"textarea":Er("invalid",t),hR(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||bO(t.textContent,r)?(n.popover!=null&&(Er("beforetoggle",t),Er("toggle",t)),n.onScroll!=null&&Er("scroll",t),n.onScrollEnd!=null&&Er("scrollend",t),n.onClick!=null&&(t.onclick=xc),t=!0):t=!1,t||od(e,!0)}function Vz(e){for(Ei=e.return;Ei;)switch(Ei.tag){case 5:case 31:case 13:Js=!1;return;case 27:case 3:Js=!0;return;default:Ei=Ei.return}}function Ih(e){if(e!==Ei)return!1;if(!$r)return Vz(e),$r=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||oS(e.type,e.memoizedProps)),r=!r),r&&Xn&&od(e),Vz(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($e(317));Xn=BB(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($e(317));Xn=BB(e)}else t===27?(t=Xn,cd(e.type)?(e=cS,cS=null,Xn=e):Xn=t):Xn=Ei?Qs(e.stateNode.nextSibling):null;return!0}function Of(){Xn=Ei=null,$r=!1}function Zw(){var e=J0;return e!==null&&($o===null?$o=e:$o.push.apply($o,e),J0=null),e}function o4(e){J0===null?J0=[e]:J0.push(e)}var Nk=gu(null),Vf=null,vc=null;function $0(e,t,r){Fn(Nk,t._currentValue),t._currentValue=r}function kc(e){e._currentValue=Nk.current,yi(Nk)}function Ok(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 Pk(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),Ok(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($e(341));o.lanes|=r,i=o.alternate,i!==null&&(i.lanes|=r),Ok(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 h1(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($e(387));if(o=o.memoizedProps,o!==null){var s=a.type;ws(a.pendingProps.value,o.value)||(e!==null?e.push(s):e=[s])}}else if(a===e5.current){if(o=a.alternate,o===null)throw Error($e(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(f4):e=[f4])}a=a.return}e!==null&&Pk(t,e,r,n),t.flags|=262144}function l5(e){for(e=e.firstContext;e!==null;){if(!ws(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Pf(e){Vf=e,vc=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Di(e){return OR(Vf,e)}function Tb(e,t){return Vf===null&&Pf(e),OR(e,t)}function OR(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},vc===null){if(e===null)throw Error($e(308));vc=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else vc=vc.next=t;return r}var hae=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()})}},mae=ni.unstable_scheduleCallback,gae=ni.unstable_NormalPriority,Ka={$$typeof:bc,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ES(){return{controller:new hae,data:new Map,refCount:0}}function w4(e){e.refCount--,e.refCount===0&&mae(gae,function(){e.controller.abort()})}var Kg=null,Fk=0,a1=0,Jh=null;function yae(e,t){if(Kg===null){var r=Kg=[];Fk=0,a1=tC(),Jh={status:"pending",value:void 0,then:function(n){r.push(n)}}}return Fk++,t.then(Gz,Gz),t}function Gz(){if(--Fk===0&&Kg!==null){Jh!==null&&(Jh.status="fulfilled");var e=Kg;Kg=null,a1=0,Jh=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function bae(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 Wz=Zt.S;Zt.S=function(e,t){JN=ys(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&yae(e,t),Wz!==null&&Wz(e,t)};var Bf=gu(null);function DS(){var e=Bf.current;return e!==null?e:Ln.pooledCache}function Ub(e,t){t===null?Fn(Bf,Bf.current):Fn(Bf,t.pool)}function PR(){var e=DS();return e===null?null:{parent:Ka._currentValue,pool:e}}var m1=Error($e(460)),IS=Error($e(474)),R5=Error($e(542)),u5={then:function(){}};function Xz(e){return e=e.status,e==="fulfilled"||e==="rejected"}function FR(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(xc,xc),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Jz(e),e;default:if(typeof t.status=="string")t.then(xc,xc);else{if(e=Ln,e!==null&&100<e.shellSuspendCounter)throw Error($e(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,Jz(e),e}throw Rf=t,m1}}function Ef(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Rf=r,m1):r}}var Rf=null;function Yz(){if(Rf===null)throw Error($e(459));var e=Rf;return Rf=null,e}function Jz(e){if(e===m1||e===R5)throw Error($e(483))}var Zh=null,s4=0;function Eb(e){var t=s4;return s4+=1,Zh===null&&(Zh=[]),FR(Zh,e,t)}function Ig(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Db(e,t){throw t.$$typeof===ane?Error($e(525)):(e=Object.prototype.toString.call(t),Error($e(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qR(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=wc(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,I){return S===null||S.tag!==6?(S=Yw(T,w.mode,I),S.return=w,S):(S=a(S,T),S.return=w,S)}function l(w,S,T,I){var B=T.type;return B===Nh?c(w,S,T.props.children,I,T.key):S!==null&&(S.elementType===B||typeof B=="object"&&B!==null&&B.$$typeof===F0&&Ef(B)===S.type)?(S=a(S,T.props),Ig(S,T),S.return=w,S):(S=jb(T.type,T.key,T.props,null,w.mode,I),Ig(S,T),S.return=w,S)}function u(w,S,T,I){return S===null||S.tag!==4||S.stateNode.containerInfo!==T.containerInfo||S.stateNode.implementation!==T.implementation?(S=Jw(T,w.mode,I),S.return=w,S):(S=a(S,T.children||[]),S.return=w,S)}function c(w,S,T,I,B){return S===null||S.tag!==7?(S=zf(T,w.mode,I,B),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=Yw(""+S,w.mode,T),S.return=w,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case wb:return T=jb(S.type,S.key,S.props,null,w.mode,T),Ig(T,S),T.return=w,T;case Og:return S=Jw(S,w.mode,T),S.return=w,S;case F0:return S=Ef(S),f(w,S,T)}if(Pg(S)||Eg(S))return S=zf(S,w.mode,T,null),S.return=w,S;if(typeof S.then=="function")return f(w,Eb(S),T);if(S.$$typeof===bc)return f(w,Tb(w,S),T);Db(w,S)}return null}function d(w,S,T,I){var B=S!==null?S.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return B!==null?null:s(w,S,""+T,I);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case wb:return T.key===B?l(w,S,T,I):null;case Og:return T.key===B?u(w,S,T,I):null;case F0:return T=Ef(T),d(w,S,T,I)}if(Pg(T)||Eg(T))return B!==null?null:c(w,S,T,I,null);if(typeof T.then=="function")return d(w,S,Eb(T),I);if(T.$$typeof===bc)return d(w,S,Tb(w,T),I);Db(w,T)}return null}function p(w,S,T,I,B){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return w=w.get(T)||null,s(S,w,""+I,B);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case wb:return w=w.get(I.key===null?T:I.key)||null,l(S,w,I,B);case Og:return w=w.get(I.key===null?T:I.key)||null,u(S,w,I,B);case F0:return I=Ef(I),p(w,S,T,I,B)}if(Pg(I)||Eg(I))return w=w.get(T)||null,c(S,w,I,B,null);if(typeof I.then=="function")return p(w,S,T,Eb(I),B);if(I.$$typeof===bc)return p(w,S,T,Tb(S,I),B);Db(S,I)}return null}function b(w,S,T,I){for(var B=null,O=null,N=S,j=S=0,H=null;N!==null&&j<T.length;j++){N.index>j?(H=N,N=null):H=N.sibling;var Y=d(w,N,T[j],I);if(Y===null){N===null&&(N=H);break}e&&N&&Y.alternate===null&&t(w,N),S=i(Y,S,j),O===null?B=Y:O.sibling=Y,O=Y,N=H}if(j===T.length)return r(w,N),$r&&gc(w,j),B;if(N===null){for(;j<T.length;j++)N=f(w,T[j],I),N!==null&&(S=i(N,S,j),O===null?B=N:O.sibling=N,O=N);return $r&&gc(w,j),B}for(N=n(N);j<T.length;j++)H=p(N,w,j,T[j],I),H!==null&&(e&&H.alternate!==null&&N.delete(H.key===null?j:H.key),S=i(H,S,j),O===null?B=H:O.sibling=H,O=H);return e&&N.forEach(function(V){return t(w,V)}),$r&&gc(w,j),B}function v(w,S,T,I){if(T==null)throw Error($e(151));for(var B=null,O=null,N=S,j=S=0,H=null,Y=T.next();N!==null&&!Y.done;j++,Y=T.next()){N.index>j?(H=N,N=null):H=N.sibling;var V=d(w,N,Y.value,I);if(V===null){N===null&&(N=H);break}e&&N&&V.alternate===null&&t(w,N),S=i(V,S,j),O===null?B=V:O.sibling=V,O=V,N=H}if(Y.done)return r(w,N),$r&&gc(w,j),B;if(N===null){for(;!Y.done;j++,Y=T.next())Y=f(w,Y.value,I),Y!==null&&(S=i(Y,S,j),O===null?B=Y:O.sibling=Y,O=Y);return $r&&gc(w,j),B}for(N=n(N);!Y.done;j++,Y=T.next())Y=p(N,w,j,Y.value,I),Y!==null&&(e&&Y.alternate!==null&&N.delete(Y.key===null?j:Y.key),S=i(Y,S,j),O===null?B=Y:O.sibling=Y,O=Y);return e&&N.forEach(function(re){return t(w,re)}),$r&&gc(w,j),B}function k(w,S,T,I){if(typeof T=="object"&&T!==null&&T.type===Nh&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case wb:e:{for(var B=T.key;S!==null;){if(S.key===B){if(B=T.type,B===Nh){if(S.tag===7){r(w,S.sibling),I=a(S,T.props.children),I.return=w,w=I;break e}}else if(S.elementType===B||typeof B=="object"&&B!==null&&B.$$typeof===F0&&Ef(B)===S.type){r(w,S.sibling),I=a(S,T.props),Ig(I,T),I.return=w,w=I;break e}r(w,S);break}else t(w,S);S=S.sibling}T.type===Nh?(I=zf(T.props.children,w.mode,I,T.key),I.return=w,w=I):(I=jb(T.type,T.key,T.props,null,w.mode,I),Ig(I,T),I.return=w,w=I)}return o(w);case Og:e:{for(B=T.key;S!==null;){if(S.key===B)if(S.tag===4&&S.stateNode.containerInfo===T.containerInfo&&S.stateNode.implementation===T.implementation){r(w,S.sibling),I=a(S,T.children||[]),I.return=w,w=I;break e}else{r(w,S);break}else t(w,S);S=S.sibling}I=Jw(T,w.mode,I),I.return=w,w=I}return o(w);case F0:return T=Ef(T),k(w,S,T,I)}if(Pg(T))return b(w,S,T,I);if(Eg(T)){if(B=Eg(T),typeof B!="function")throw Error($e(150));return T=B.call(T),v(w,S,T,I)}if(typeof T.then=="function")return k(w,S,Eb(T),I);if(T.$$typeof===bc)return k(w,S,Tb(w,T),I);Db(w,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,S!==null&&S.tag===6?(r(w,S.sibling),I=a(S,T),I.return=w,w=I):(r(w,S),I=Yw(T,w.mode,I),I.return=w,w=I),o(w)):r(w,S)}return function(w,S,T,I){try{s4=0;var B=k(w,S,T,I);return Zh=null,B}catch(N){if(N===m1||N===R5)throw N;var O=ms(29,N,null,w.mode);return O.lanes=I,O.return=w,O}}}var Ff=qR(!0),$R=qR(!1),q0=!1;function zS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qk(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 Z0(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Q0(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(sn&2)!==0){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,t=o5(e),IR(e,null,r),t}return B5(e,n,t,r),o5(e)}function Vg(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,iR(e,r)}}function Qw(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 $k=!1;function Gg(){if($k){var e=Jh;if(e!==null)throw e}}function Wg(e,t,r,n){$k=!1;var a=e.updateQueue;q0=!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?(Pr&d)===d:(n&d)===d){d!==0&&d===a1&&($k=!0),c!==null&&(c=c.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var b=e,v=s;d=t;var k=r;switch(v.tag){case 1:if(b=v.payload,typeof b=="function"){f=b.call(k,f,d);break e}f=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=v.payload,d=typeof b=="function"?b.call(k,f,d):b,d==null)break e;f=Yn({},f,d);break e;case 2:q0=!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),ld|=o,e.lanes=o,e.memoizedState=f}}function HR(e,t){if(typeof e!="function")throw Error($e(191,e));e.call(t)}function jR(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)HR(r[e],t)}var i1=gu(null),c5=gu(0);function Zz(e,t){e=Lc,Fn(c5,e),Fn(i1,t),Lc=e|t.baseLanes}function Hk(){Fn(c5,Lc),Fn(i1,i1.current)}function BS(){Lc=c5.current,yi(i1),yi(c5)}var ks=gu(null),Zs=null;function H0(e){var t=e.alternate;Fn(Oa,Oa.current&1),Fn(ks,e),Zs===null&&(t===null||i1.current!==null||t.memoizedState!==null)&&(Zs=e)}function jk(e){Fn(Oa,Oa.current),Fn(ks,e),Zs===null&&(Zs=e)}function UR(e){e.tag===22?(Fn(Oa,Oa.current),Fn(ks,e),Zs===null&&(Zs=e)):j0(e)}function j0(){Fn(Oa,Oa.current),Fn(ks,ks.current)}function hs(e){yi(ks),Zs===e&&(Zs=null),yi(Oa)}var Oa=gu(0);function d5(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||lS(r)||uS(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 Mc=0,hr=null,Mn=null,ja=null,f5=!1,Qh=!1,qf=!1,p5=0,l4=0,e1=null,xae=0;function Ma(){throw Error($e(321))}function RS(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!ws(e[r],t[r]))return!1;return!0}function NS(e,t,r,n,a,i){return Mc=i,hr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zt.H=e===null||e.memoizedState===null?wN:GS,qf=!1,i=r(n,a),qf=!1,Qh&&(i=VR(t,r,n,a)),KR(e),i}function KR(e){Zt.H=u4;var t=Mn!==null&&Mn.next!==null;if(Mc=0,ja=Mn=hr=null,f5=!1,l4=0,e1=null,t)throw Error($e(300));e===null||Va||(e=e.dependencies,e!==null&&l5(e)&&(Va=!0))}function VR(e,t,r,n){hr=e;var a=0;do{if(Qh&&(e1=null),l4=0,Qh=!1,25<=a)throw Error($e(301));if(a+=1,ja=Mn=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}Zt.H=kN,i=t(r,n)}while(Qh);return i}function vae(){var e=Zt.H,t=e.useState()[0];return t=typeof t.then=="function"?k4(t):t,e=e.useState()[0],(Mn!==null?Mn.memoizedState:null)!==e&&(hr.flags|=1024),t}function OS(){var e=p5!==0;return p5=0,e}function PS(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function FS(e){if(f5){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}f5=!1}Mc=0,ja=Mn=hr=null,Qh=!1,l4=p5=0,e1=null}function ho(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ja===null?hr.memoizedState=ja=e:ja=ja.next=e,ja}function Pa(){if(Mn===null){var e=hr.alternate;e=e!==null?e.memoizedState:null}else e=Mn.next;var t=ja===null?hr.memoizedState:ja.next;if(t!==null)ja=t,Mn=e;else{if(e===null)throw hr.alternate===null?Error($e(467)):Error($e(310));Mn=e,e={memoizedState:Mn.memoizedState,baseState:Mn.baseState,baseQueue:Mn.baseQueue,queue:Mn.queue,next:null},ja===null?hr.memoizedState=ja=e:ja=ja.next=e}return ja}function N5(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function k4(e){var t=l4;return l4+=1,e1===null&&(e1=[]),e=FR(e1,e,t),t=hr,(ja===null?t.memoizedState:ja.next)===null&&(t=t.alternate,Zt.H=t===null||t.memoizedState===null?wN:GS),e}function O5(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return k4(e);if(e.$$typeof===bc)return Di(e)}throw Error($e(438,String(e)))}function qS(e){var t=null,r=hr.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var n=hr.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=N5(),hr.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]=ine;return t.index++,r}function _c(e,t){return typeof t=="function"?t(e):t}function Kb(e){var t=Pa();return $S(t,Mn,e)}function $S(e,t,r){var n=e.queue;if(n===null)throw Error($e(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?(Pr&f)===f:(Mc&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((Mc&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,hr.lanes|=d,ld|=d;f=u.action,qf&&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,hr.lanes|=f,ld|=f;u=u.next}while(u!==null&&u!==t);if(l===null?o=i:l.next=s,!ws(i,e.memoizedState)&&(Va=!0,c&&(r=Jh,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 ek(e){var t=Pa(),r=t.queue;if(r===null)throw Error($e(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);ws(i,t.memoizedState)||(Va=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function GR(e,t,r){var n=hr,a=Pa(),i=$r;if(i){if(r===void 0)throw Error($e(407));r=r()}else r=t();var o=!ws((Mn||a).memoizedState,r);if(o&&(a.memoizedState=r,Va=!0),a=a.queue,HS(YR.bind(null,n,a,e),[e]),a.getSnapshot!==t||o||ja!==null&&ja.memoizedState.tag&1){if(n.flags|=2048,o1(9,{destroy:void 0},XR.bind(null,n,a,r,t),null),Ln===null)throw Error($e(349));i||(Mc&127)!==0||WR(n,t,r)}return r}function WR(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=hr.updateQueue,t===null?(t=N5(),hr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function XR(e,t,r,n){t.value=r,t.getSnapshot=n,JR(t)&&ZR(e)}function YR(e,t,r){return r(function(){JR(t)&&ZR(e)})}function JR(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ws(e,r)}catch(n){return!0}}function ZR(e){var t=Kf(e,2);t!==null&&Ho(t,e,2)}function Uk(e){var t=ho();if(typeof e=="function"){var r=e;if(e=r(),qf){K0(!0);try{r()}finally{K0(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_c,lastRenderedState:e},t}function QR(e,t,r,n){return e.baseState=r,$S(e,Mn,typeof n=="function"?n:_c)}function wae(e,t,r,n,a){if(F5(e))throw Error($e(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)}};Zt.T!==null?r(!0):i.isTransition=!1,n(i),r=t.pending,r===null?(i.next=t.pending=i,eN(t,i)):(i.next=r.next,t.pending=r.next=i)}}function eN(e,t){var r=t.action,n=t.payload,a=e.state;if(t.isTransition){var i=Zt.T,o={};Zt.T=o;try{var s=r(a,n),l=Zt.S;l!==null&&l(o,s),Qz(e,t,s)}catch(u){Kk(e,t,u)}finally{i!==null&&o.types!==null&&(i.types=o.types),Zt.T=i}}else try{i=r(a,n),Qz(e,t,i)}catch(u){Kk(e,t,u)}}function Qz(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(n){eB(e,t,n)},function(n){return Kk(e,t,n)}):eB(e,t,r)}function eB(e,t,r){t.status="fulfilled",t.value=r,tN(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,eN(e,r)))}function Kk(e,t,r){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=r,tN(t),t=t.next;while(t!==n)}e.action=null}function tN(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rN(e,t){return t}function tB(e,t){if($r){var r=Ln.formState;if(r!==null){e:{var n=hr;if($r){if(Xn){t:{for(var a=Xn,i=Js;a.nodeType!==8;){if(!i){a=null;break t}if(a=Qs(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){Xn=Qs(a.nextSibling),n=a.data==="F!";break e}}od(n)}n=!1}n&&(t=r[0])}}return r=ho(),r.memoizedState=r.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rN,lastRenderedState:t},r.queue=n,r=bN.bind(null,hr,n),n.dispatch=r,n=Uk(!1),i=VS.bind(null,hr,!1,n.queue),n=ho(),a={state:t,dispatch:null,action:e,pending:null},n.queue=a,r=wae.bind(null,hr,a,i,r),a.dispatch=r,n.memoizedState=e,[t,r,!1]}function rB(e){var t=Pa();return nN(t,Mn,e)}function nN(e,t,r){if(t=$S(e,t,rN)[0],e=Kb(_c)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=k4(t)}catch(o){throw o===m1?R5:o}else n=t;t=Pa();var a=t.queue,i=a.dispatch;return r!==t.memoizedState&&(hr.flags|=2048,o1(9,{destroy:void 0},kae.bind(null,a,r),null)),[n,i,e]}function kae(e,t){e.action=t}function nB(e){var t=Pa(),r=Mn;if(r!==null)return nN(t,r,e);Pa(),t=t.memoizedState,r=Pa();var n=r.queue.dispatch;return r.memoizedState=e,[t,n,!1]}function o1(e,t,r,n){return e={tag:e,create:r,deps:n,inst:t,next:null},t=hr.updateQueue,t===null&&(t=N5(),hr.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 aN(){return Pa().memoizedState}function Vb(e,t,r,n){var a=ho();hr.flags|=e,a.memoizedState=o1(1|t,{destroy:void 0},r,n===void 0?null:n)}function P5(e,t,r,n){var a=Pa();n=n===void 0?null:n;var i=a.memoizedState.inst;Mn!==null&&n!==null&&RS(n,Mn.memoizedState.deps)?a.memoizedState=o1(t,i,r,n):(hr.flags|=e,a.memoizedState=o1(1|t,i,r,n))}function aB(e,t){Vb(8390656,8,e,t)}function HS(e,t){P5(2048,8,e,t)}function Sae(e){hr.flags|=4;var t=hr.updateQueue;if(t===null)t=N5(),hr.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function iN(e){var t=Pa().memoizedState;return Sae({ref:t,nextImpl:e}),function(){if((sn&2)!==0)throw Error($e(440));return t.impl.apply(void 0,arguments)}}function oN(e,t){return P5(4,2,e,t)}function sN(e,t){return P5(4,4,e,t)}function lN(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 uN(e,t,r){r=r!=null?r.concat([e]):null,P5(4,4,lN.bind(null,t,e),r)}function jS(){}function cN(e,t){var r=Pa();t=t===void 0?null:t;var n=r.memoizedState;return t!==null&&RS(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function dN(e,t){var r=Pa();t=t===void 0?null:t;var n=r.memoizedState;if(t!==null&&RS(t,n[1]))return n[0];if(n=e(),qf){K0(!0);try{e()}finally{K0(!1)}}return r.memoizedState=[n,t],n}function US(e,t,r){return r===void 0||(Mc&1073741824)!==0&&(Pr&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=QN(),hr.lanes|=e,ld|=e,r)}function fN(e,t,r,n){return ws(r,t)?r:i1.current!==null?(e=US(e,r,n),ws(e,t)||(Va=!0),e):(Mc&42)===0||(Mc&1073741824)!==0&&(Pr&261930)===0?(Va=!0,e.memoizedState=r):(e=QN(),hr.lanes|=e,ld|=e,t)}function pN(e,t,r,n,a){var i=ln.p;ln.p=i!==0&&8>i?i:8;var o=Zt.T,s={};Zt.T=s,VS(e,!1,t,r);try{var l=a(),u=Zt.S;if(u!==null&&u(s,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=bae(l,n);Xg(e,t,c,vs(e))}else Xg(e,t,n,vs(e))}catch(f){Xg(e,t,{then:function(){},status:"rejected",reason:f},vs())}finally{ln.p=i,o!==null&&s.types!==null&&(o.types=s.types),Zt.T=o}}function Cae(){}function Vk(e,t,r,n){if(e.tag!==5)throw Error($e(476));var a=hN(e).queue;pN(e,a,t,If,r===null?Cae:function(){return mN(e),r(n)})}function hN(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:If,baseState:If,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_c,lastRenderedState:If},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_c,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function mN(e){var t=hN(e);t.next===null&&(t=e.alternate.memoizedState),Xg(e,t.next.queue,{},vs())}function KS(){return Di(f4)}function gN(){return Pa().memoizedState}function yN(){return Pa().memoizedState}function Mae(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=vs();e=Z0(r);var n=Q0(t,e,r);n!==null&&(Ho(n,t,r),Vg(n,t,r)),t={cache:ES()},e.payload=t;return}t=t.return}}function _ae(e,t,r){var n=vs();r={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},F5(e)?xN(t,r):(r=_S(e,t,r,n),r!==null&&(Ho(r,e,n),vN(r,t,n)))}function bN(e,t,r){var n=vs();Xg(e,t,r,n)}function Xg(e,t,r,n){var a={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(F5(e))xN(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,ws(s,o))return B5(e,t,a,0),Ln===null&&z5(),!1}catch(l){}if(r=_S(e,t,a,n),r!==null)return Ho(r,e,n),vN(r,t,n),!0}return!1}function VS(e,t,r,n){if(n={lane:2,revertLane:tC(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},F5(e)){if(t)throw Error($e(479))}else t=_S(e,r,n,2),t!==null&&Ho(t,e,2)}function F5(e){var t=e.alternate;return e===hr||t!==null&&t===hr}function xN(e,t){Qh=f5=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function vN(e,t,r){if((r&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,iR(e,r)}}var u4={readContext:Di,use:O5,useCallback:Ma,useContext:Ma,useEffect:Ma,useImperativeHandle:Ma,useLayoutEffect:Ma,useInsertionEffect:Ma,useMemo:Ma,useReducer:Ma,useRef:Ma,useState:Ma,useDebugValue:Ma,useDeferredValue:Ma,useTransition:Ma,useSyncExternalStore:Ma,useId:Ma,useHostTransitionStatus:Ma,useFormState:Ma,useActionState:Ma,useOptimistic:Ma,useMemoCache:Ma,useCacheRefresh:Ma};u4.useEffectEvent=Ma;var wN={readContext:Di,use:O5,useCallback:function(e,t){return ho().memoizedState=[e,t===void 0?null:t],e},useContext:Di,useEffect:aB,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Vb(4194308,4,lN.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Vb(4194308,4,e,t)},useInsertionEffect:function(e,t){Vb(4,2,e,t)},useMemo:function(e,t){var r=ho();t=t===void 0?null:t;var n=e();if(qf){K0(!0);try{e()}finally{K0(!1)}}return r.memoizedState=[n,t],n},useReducer:function(e,t,r){var n=ho();if(r!==void 0){var a=r(t);if(qf){K0(!0);try{r(t)}finally{K0(!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=_ae.bind(null,hr,e),[n.memoizedState,e]},useRef:function(e){var t=ho();return e={current:e},t.memoizedState=e},useState:function(e){e=Uk(e);var t=e.queue,r=bN.bind(null,hr,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:jS,useDeferredValue:function(e,t){var r=ho();return US(r,e,t)},useTransition:function(){var e=Uk(!1);return e=pN.bind(null,hr,e.queue,!0,!1),ho().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var n=hr,a=ho();if($r){if(r===void 0)throw Error($e(407));r=r()}else{if(r=t(),Ln===null)throw Error($e(349));(Pr&127)!==0||WR(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,aB(YR.bind(null,n,i,e),[e]),n.flags|=2048,o1(9,{destroy:void 0},XR.bind(null,n,i,r,t),null),r},useId:function(){var e=ho(),t=Ln.identifierPrefix;if($r){var r=pu,n=fu;r=(n&~(1<<32-xs(n)-1)).toString(32)+r,t="_"+t+"R_"+r,r=p5++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=xae++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:KS,useFormState:tB,useActionState:tB,useOptimistic:function(e){var t=ho();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=VS.bind(null,hr,!0,r),r.dispatch=t,[e,t]},useMemoCache:qS,useCacheRefresh:function(){return ho().memoizedState=Mae.bind(null,hr)},useEffectEvent:function(e){var t=ho(),r={impl:e};return t.memoizedState=r,function(){if((sn&2)!==0)throw Error($e(440));return r.impl.apply(void 0,arguments)}}},GS={readContext:Di,use:O5,useCallback:cN,useContext:Di,useEffect:HS,useImperativeHandle:uN,useInsertionEffect:oN,useLayoutEffect:sN,useMemo:dN,useReducer:Kb,useRef:aN,useState:function(){return Kb(_c)},useDebugValue:jS,useDeferredValue:function(e,t){var r=Pa();return fN(r,Mn.memoizedState,e,t)},useTransition:function(){var e=Kb(_c)[0],t=Pa().memoizedState;return[typeof e=="boolean"?e:k4(e),t]},useSyncExternalStore:GR,useId:gN,useHostTransitionStatus:KS,useFormState:rB,useActionState:rB,useOptimistic:function(e,t){var r=Pa();return QR(r,Mn,e,t)},useMemoCache:qS,useCacheRefresh:yN};GS.useEffectEvent=iN;var kN={readContext:Di,use:O5,useCallback:cN,useContext:Di,useEffect:HS,useImperativeHandle:uN,useInsertionEffect:oN,useLayoutEffect:sN,useMemo:dN,useReducer:ek,useRef:aN,useState:function(){return ek(_c)},useDebugValue:jS,useDeferredValue:function(e,t){var r=Pa();return Mn===null?US(r,e,t):fN(r,Mn.memoizedState,e,t)},useTransition:function(){var e=ek(_c)[0],t=Pa().memoizedState;return[typeof e=="boolean"?e:k4(e),t]},useSyncExternalStore:GR,useId:gN,useHostTransitionStatus:KS,useFormState:nB,useActionState:nB,useOptimistic:function(e,t){var r=Pa();return Mn!==null?QR(r,Mn,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:qS,useCacheRefresh:yN};kN.useEffectEvent=iN;function tk(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Yn({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Gk={enqueueSetState:function(e,t,r){e=e._reactInternals;var n=vs(),a=Z0(n);a.payload=t,r!=null&&(a.callback=r),t=Q0(e,a,n),t!==null&&(Ho(t,e,n),Vg(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=vs(),a=Z0(n);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Q0(e,a,n),t!==null&&(Ho(t,e,n),Vg(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=vs(),n=Z0(r);n.tag=2,t!=null&&(n.callback=t),t=Q0(e,n,r),t!==null&&(Ho(t,e,r),Vg(t,e,r))}};function iB(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 oB(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&&Gk.enqueueReplaceState(t,t.state,null)}function $f(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=Yn({},r));for(var a in e)r[a]===void 0&&(r[a]=e[a])}return r}function SN(e){i5(e)}function CN(e){console.error(e)}function MN(e){i5(e)}function h5(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function sB(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 Wk(e,t,r){return r=Z0(r),r.tag=3,r.payload={element:null},r.callback=function(){h5(e,t)},r}function _N(e){return e=Z0(e),e.tag=3,e}function AN(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(){sB(t,r,n)}}var o=r.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){sB(t,r,n),typeof a!="function"&&(ed===null?ed=new Set([this]):ed.add(this));var s=n.stack;this.componentDidCatch(n.value,{componentStack:s!==null?s:""})})}function Aae(e,t,r,n,a){if(r.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=r.alternate,t!==null&&h1(t,r,a,!0),r=ks.current,r!==null){switch(r.tag){case 31:case 13:return Zs===null?x5():r.alternate===null&&_a===0&&(_a=3),r.flags&=-257,r.flags|=65536,r.lanes=a,n===u5?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([n]):t.add(n),fk(e,n,a)),!1;case 22:return r.flags|=65536,n===u5?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)),fk(e,n,a)),!1}throw Error($e(435,r.tag))}return fk(e,n,a),x5(),!1}if($r)return t=ks.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,n!==Rk&&(e=Error($e(422),{cause:n}),o4(Ys(e,r)))):(n!==Rk&&(t=Error($e(423),{cause:n}),o4(Ys(t,r))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,n=Ys(n,r),a=Wk(e.stateNode,n,a),Qw(e,a),_a!==4&&(_a=2)),!1;var i=Error($e(520),{cause:n});if(i=Ys(i,r),Zg===null?Zg=[i]:Zg.push(i),_a!==4&&(_a=2),t===null)return!0;n=Ys(n,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=a&-a,r.lanes|=e,e=Wk(r.stateNode,n,e),Qw(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"&&(ed===null||!ed.has(i))))return r.flags|=65536,a&=-a,r.lanes|=a,a=_N(a),AN(a,e,r,n),Qw(r,a),!1}r=r.return}while(r!==null);return!1}var WS=Error($e(461)),Va=!1;function Li(e,t,r,n){t.child=e===null?$R(t,null,r,n):Ff(t,e.child,r,n)}function lB(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 Pf(t),n=NS(e,t,r,o,i,a),s=OS(),e!==null&&!Va?(PS(e,t,a),Ac(e,t,a)):($r&&s&&LS(t),t.flags|=1,Li(e,t,n,a),t.child)}function uB(e,t,r,n,a){if(e===null){var i=r.type;return typeof i=="function"&&!AS(i)&&i.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=i,LN(e,t,i,n,a)):(e=jb(r.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!XS(e,a)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:a4,r(o,n)&&e.ref===t.ref)return Ac(e,t,a)}return t.flags|=1,e=wc(i,n),e.ref=t.ref,e.return=t,t.child=e}function LN(e,t,r,n,a){if(e!==null){var i=e.memoizedProps;if(a4(i,n)&&e.ref===t.ref)if(Va=!1,t.pendingProps=n=i,XS(e,a))(e.flags&131072)!==0&&(Va=!0);else return t.lanes=e.lanes,Ac(e,t,a)}return Xk(e,t,r,n,a)}function TN(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 cB(e,t,i,r,n)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ub(t,i!==null?i.cachePool:null),i!==null?Zz(t,i):Hk(),UR(t);else return n=t.lanes=536870912,cB(e,t,i!==null?i.baseLanes|r:r,r,n)}else i!==null?(Ub(t,i.cachePool),Zz(t,i),j0(t),t.memoizedState=null):(e!==null&&Ub(t,null),Hk(),j0(t));return Li(e,t,a,r),t.child}function qg(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cB(e,t,r,n,a){var i=DS();return i=i===null?null:{parent:Ka._currentValue,pool:i},t.memoizedState={baseLanes:r,cachePool:i},e!==null&&Ub(t,null),Hk(),UR(t),e!==null&&h1(e,t,n,!0),t.childLanes=a,null}function Gb(e,t){return t=m5({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function dB(e,t,r){return Ff(t,e.child,null,r),e=Gb(t,t.pendingProps),e.flags|=2,hs(t),t.memoizedState=null,e}function Lae(e,t,r){var n=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if($r){if(n.mode==="hidden")return e=Gb(t,n),t.lanes=536870912,qg(null,e);if(jk(t),(e=Xn)?(e=wO(e,Js),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:id!==null?{id:fu,overflow:pu}:null,retryLane:536870912,hydrationErrors:null},r=BR(e),r.return=t,t.child=r,Ei=t,Xn=null)):e=null,e===null)throw od(t);return t.lanes=536870912,null}return Gb(t,n)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(jk(t),a)if(t.flags&256)t.flags&=-257,t=dB(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error($e(558));else if(Va||h1(e,t,r,!1),a=(r&e.childLanes)!==0,Va||a){if(n=Ln,n!==null&&(o=oR(n,r),o!==0&&o!==i.retryLane))throw i.retryLane=o,Kf(e,o),Ho(n,e,o),WS;x5(),t=dB(e,t,r)}else e=i.treeContext,Xn=Qs(o.nextSibling),Ei=t,$r=!0,J0=null,Js=!1,e!==null&&NR(t,e),t=Gb(t,n),t.flags|=4096;return t}return e=wc(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wb(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($e(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function Xk(e,t,r,n,a){return Pf(t),r=NS(e,t,r,n,void 0,a),n=OS(),e!==null&&!Va?(PS(e,t,a),Ac(e,t,a)):($r&&n&&LS(t),t.flags|=1,Li(e,t,r,a),t.child)}function fB(e,t,r,n,a,i){return Pf(t),t.updateQueue=null,r=VR(t,n,r,a),KR(e),n=OS(),e!==null&&!Va?(PS(e,t,i),Ac(e,t,i)):($r&&n&&LS(t),t.flags|=1,Li(e,t,r,i),t.child)}function pB(e,t,r,n,a){if(Pf(t),t.stateNode===null){var i=Uh,o=r.contextType;typeof o=="object"&&o!==null&&(i=Di(o)),i=new r(n,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Gk,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=n,i.state=t.memoizedState,i.refs={},zS(t),o=r.contextType,i.context=typeof o=="object"&&o!==null?Di(o):Uh,i.state=t.memoizedState,o=r.getDerivedStateFromProps,typeof o=="function"&&(tk(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&&Gk.enqueueReplaceState(i,i.state,null),Wg(t,n,i,a),Gg(),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=$f(r,s);i.props=l;var u=i.context,c=r.contextType;o=Uh,typeof c=="object"&&c!==null&&(o=Di(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)&&oB(t,i,n,o),q0=!1;var d=t.memoizedState;i.state=d,Wg(t,n,i,a),Gg(),u=t.memoizedState,s||d!==u||q0?(typeof f=="function"&&(tk(t,r,f,n),u=t.memoizedState),(l=q0||iB(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,qk(e,t),o=t.memoizedProps,c=$f(r,o),i.props=c,f=t.pendingProps,d=i.context,u=r.contextType,l=Uh,typeof u=="object"&&u!==null&&(l=Di(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)&&oB(t,i,n,l),q0=!1,d=t.memoizedState,i.state=d,Wg(t,n,i,a),Gg();var p=t.memoizedState;o!==f||d!==p||q0||e!==null&&e.dependencies!==null&&l5(e.dependencies)?(typeof s=="function"&&(tk(t,r,s,n),p=t.memoizedState),(c=q0||iB(t,r,c,n,d,p,l)||e!==null&&e.dependencies!==null&&l5(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,Wb(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=Ff(t,e.child,null,a),t.child=Ff(t,null,r,a)):Li(e,t,r,a),t.memoizedState=i.state,e=t.child):e=Ac(e,t,a),e}function hB(e,t,r,n){return Of(),t.flags|=256,Li(e,t,r,n),t.child}var rk={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function nk(e){return{baseLanes:e,cachePool:PR()}}function ak(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=gs),e}function EN(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:(Oa.current&2)!==0),o&&(a=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if($r){if(a?H0(t):j0(t),(e=Xn)?(e=wO(e,Js),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:id!==null?{id:fu,overflow:pu}:null,retryLane:536870912,hydrationErrors:null},r=BR(e),r.return=t,t.child=r,Ei=t,Xn=null)):e=null,e===null)throw od(t);return uS(e)?t.lanes=32:t.lanes=536870912,null}var s=n.children;return n=n.fallback,a?(j0(t),a=t.mode,s=m5({mode:"hidden",children:s},a),n=zf(n,a,r,null),s.return=t,n.return=t,s.sibling=n,t.child=s,n=t.child,n.memoizedState=nk(r),n.childLanes=ak(e,o,r),t.memoizedState=rk,qg(null,n)):(H0(t),Yk(t,s))}var l=e.memoizedState;if(l!==null&&(s=l.dehydrated,s!==null)){if(i)t.flags&256?(H0(t),t.flags&=-257,t=ik(e,t,r)):t.memoizedState!==null?(j0(t),t.child=e.child,t.flags|=128,t=null):(j0(t),s=n.fallback,a=t.mode,n=m5({mode:"visible",children:n.children},a),s=zf(s,a,r,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,Ff(t,e.child,null,r),n=t.child,n.memoizedState=nk(r),n.childLanes=ak(e,o,r),t.memoizedState=rk,t=qg(null,n));else if(H0(t),uS(s)){if(o=s.nextSibling&&s.nextSibling.dataset,o)var u=o.dgst;o=u,n=Error($e(419)),n.stack="",n.digest=o,o4({value:n,source:null,stack:null}),t=ik(e,t,r)}else if(Va||h1(e,t,r,!1),o=(r&e.childLanes)!==0,Va||o){if(o=Ln,o!==null&&(n=oR(o,r),n!==0&&n!==l.retryLane))throw l.retryLane=n,Kf(e,n),Ho(o,e,n),WS;lS(s)||x5(),t=ik(e,t,r)}else lS(s)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Xn=Qs(s.nextSibling),Ei=t,$r=!0,J0=null,Js=!1,e!==null&&NR(t,e),t=Yk(t,n.children),t.flags|=4096);return t}return a?(j0(t),s=n.fallback,a=t.mode,l=e.child,u=l.sibling,n=wc(l,{mode:"hidden",children:n.children}),n.subtreeFlags=l.subtreeFlags&65011712,u!==null?s=wc(u,s):(s=zf(s,a,r,null),s.flags|=2),s.return=t,n.return=t,n.sibling=s,t.child=n,qg(null,n),n=t.child,s=e.child.memoizedState,s===null?s=nk(r):(a=s.cachePool,a!==null?(l=Ka._currentValue,a=a.parent!==l?{parent:l,pool:l}:a):a=PR(),s={baseLanes:s.baseLanes|r,cachePool:a}),n.memoizedState=s,n.childLanes=ak(e,o,r),t.memoizedState=rk,qg(e.child,n)):(H0(t),r=e.child,e=r.sibling,r=wc(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 Yk(e,t){return t=m5({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function m5(e,t){return e=ms(22,e,null,t),e.lanes=0,e}function ik(e,t,r){return Ff(t,e.child,null,r),e=Yk(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mB(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ok(e.return,t,r)}function ok(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 DN(e,t,r){var n=t.pendingProps,a=n.revealOrder,i=n.tail;n=n.children;var o=Oa.current,s=(o&2)!==0;if(s?(o=o&1|2,t.flags|=128):o&=1,Fn(Oa,o),Li(e,t,n,r),n=$r?i4:0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mB(e,r,t);else if(e.tag===19)mB(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&&d5(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),ok(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&&d5(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}ok(t,!0,r,null,i,n);break;case"together":ok(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Ac(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ld|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(h1(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error($e(153));if(t.child!==null){for(e=t.child,r=wc(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=wc(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function XS(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&l5(e)))}function Tae(e,t,r){switch(t.tag){case 3:t5(t,t.stateNode.containerInfo),$0(t,Ka,e.memoizedState.cache),Of();break;case 27:case 5:Ck(t);break;case 4:t5(t,t.stateNode.containerInfo);break;case 10:$0(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,jk(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(H0(t),t.flags|=128,null):(r&t.child.childLanes)!==0?EN(e,t,r):(H0(t),e=Ac(e,t,r),e!==null?e.sibling:null);H0(t);break;case 19:var a=(e.flags&128)!==0;if(n=(r&t.childLanes)!==0,n||(h1(e,t,r,!1),n=(r&t.childLanes)!==0),a){if(n)return DN(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Fn(Oa,Oa.current),n)break;return null;case 22:return t.lanes=0,TN(e,t,r,t.pendingProps);case 24:$0(t,Ka,e.memoizedState.cache)}return Ac(e,t,r)}function IN(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Va=!0;else{if(!XS(e,r)&&(t.flags&128)===0)return Va=!1,Tae(e,t,r);Va=(e.flags&131072)!==0}else Va=!1,$r&&(t.flags&1048576)!==0&&RR(t,i4,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Ef(t.elementType),t.type=e,typeof e=="function")AS(e)?(n=$f(e,n),t.tag=1,t=pB(null,t,e,n,r)):(t.tag=0,t=Xk(null,t,e,n,r));else{if(e!=null){var a=e.$$typeof;if(a===pS){t.tag=11,t=lB(null,t,e,n,r);break e}else if(a===hS){t.tag=14,t=uB(null,t,e,n,r);break e}}throw t=kk(e)||e,Error($e(306,t,""))}}return t;case 0:return Xk(e,t,t.type,t.pendingProps,r);case 1:return n=t.type,a=$f(n,t.pendingProps),pB(e,t,n,a,r);case 3:e:{if(t5(t,t.stateNode.containerInfo),e===null)throw Error($e(387));n=t.pendingProps;var i=t.memoizedState;a=i.element,qk(e,t),Wg(t,n,null,r);var o=t.memoizedState;if(n=o.cache,$0(t,Ka,n),n!==i.cache&&Pk(t,[Ka],r,!0),Gg(),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=hB(e,t,n,r);break e}else if(n!==a){a=Ys(Error($e(424)),t),o4(a),t=hB(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,Xn=Qs(e.firstChild),Ei=t,$r=!0,J0=null,Js=!0,r=$R(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Of(),n===a){t=Ac(e,t,r);break e}Li(e,t,n,r)}t=t.child}return t;case 26:return Wb(e,t),e===null?(r=OB(t.type,null,t.pendingProps,null))?t.memoizedState=r:$r||(r=t.type,e=t.pendingProps,n=S5(Y0.current).createElement(r),n[Ti]=t,n[jo]=e,Ii(n,r,e),gi(n),t.stateNode=n):t.memoizedState=OB(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ck(t),e===null&&$r&&(n=t.stateNode=kO(t.type,t.pendingProps,Y0.current),Ei=t,Js=!0,a=Xn,cd(t.type)?(cS=a,Xn=Qs(n.firstChild)):Xn=a),Li(e,t,t.pendingProps.children,r),Wb(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&$r&&((a=n=Xn)&&(n=nie(n,t.type,t.pendingProps,Js),n!==null?(t.stateNode=n,Ei=t,Xn=Qs(n.firstChild),Js=!1,a=!0):a=!1),a||od(t)),Ck(t),a=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,n=i.children,oS(a,i)?n=null:o!==null&&oS(a,o)&&(t.flags|=32),t.memoizedState!==null&&(a=NS(e,t,vae,null,null,r),f4._currentValue=a),Wb(e,t),Li(e,t,n,r),t.child;case 6:return e===null&&$r&&((e=r=Xn)&&(r=aie(r,t.pendingProps,Js),r!==null?(t.stateNode=r,Ei=t,Xn=null,e=!0):e=!1),e||od(t)),null;case 13:return EN(e,t,r);case 4:return t5(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ff(t,null,n,r):Li(e,t,n,r),t.child;case 11:return lB(e,t,t.type,t.pendingProps,r);case 7:return Li(e,t,t.pendingProps,r),t.child;case 8:return Li(e,t,t.pendingProps.children,r),t.child;case 12:return Li(e,t,t.pendingProps.children,r),t.child;case 10:return n=t.pendingProps,$0(t,t.type,n.value),Li(e,t,n.children,r),t.child;case 9:return a=t.type._context,n=t.pendingProps.children,Pf(t),a=Di(a),n=n(a),t.flags|=1,Li(e,t,n,r),t.child;case 14:return uB(e,t,t.type,t.pendingProps,r);case 15:return LN(e,t,t.type,t.pendingProps,r);case 19:return DN(e,t,r);case 31:return Lae(e,t,r);case 22:return TN(e,t,r,t.pendingProps);case 24:return Pf(t),n=Di(Ka),e===null?(a=DS(),a===null&&(a=Ln,i=ES(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=r),a=i),t.memoizedState={parent:n,cache:a},zS(t),$0(t,Ka,a)):((e.lanes&r)!==0&&(qk(e,t),Wg(t,null,null,r),Gg()),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),$0(t,Ka,n)):(n=i.cache,$0(t,Ka,n),n!==a.cache&&Pk(t,[Ka],r,!0))),Li(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error($e(156,t.tag))}function fc(e){e.flags|=4}function sk(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(rO())e.flags|=8192;else throw Rf=u5,IS}else e.flags&=-16777217}function gB(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!MO(t))if(rO())e.flags|=8192;else throw Rf=u5,IS}function Ib(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nR():536870912,e.lanes|=t,s1|=t)}function zg(e,t){if(!$r)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 Wn(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 Eae(e,t,r){var n=t.pendingProps;switch(TS(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wn(t),null;case 1:return Wn(t),null;case 3:return r=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),kc(Ka),t1(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ih(t)?fc(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Zw())),Wn(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(fc(t),i!==null?(Wn(t),gB(t,i)):(Wn(t),sk(t,a,null,n,r))):i?i!==e.memoizedState?(fc(t),Wn(t),gB(t,i)):(Wn(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&fc(t),Wn(t),sk(t,a,e,n,r)),null;case 27:if(r5(t),r=Y0.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&fc(t);else{if(!n){if(t.stateNode===null)throw Error($e(166));return Wn(t),null}e=mu.current,Ih(t)?Kz(t,e):(e=kO(a,n,r),t.stateNode=e,fc(t))}return Wn(t),null;case 5:if(r5(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&fc(t);else{if(!n){if(t.stateNode===null)throw Error($e(166));return Wn(t),null}if(i=mu.current,Ih(t))Kz(t,i);else{var o=S5(Y0.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[Ti]=t,i[jo]=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(Ii(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&&fc(t)}}return Wn(t),sk(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&fc(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error($e(166));if(e=Y0.current,Ih(t)){if(e=t.stateNode,r=t.memoizedProps,n=null,a=Ei,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}e[Ti]=t,e=!!(e.nodeValue===r||n!==null&&n.suppressHydrationWarning===!0||bO(e.nodeValue,r)),e||od(t,!0)}else e=S5(e).createTextNode(n),e[Ti]=t,t.stateNode=e}return Wn(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(n=Ih(t),r!==null){if(e===null){if(!n)throw Error($e(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($e(557));e[Ti]=t}else Of(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Wn(t),e=!1}else r=Zw(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(hs(t),t):(hs(t),null);if((t.flags&128)!==0)throw Error($e(558))}return Wn(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ih(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error($e(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error($e(317));a[Ti]=t}else Of(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Wn(t),a=!1}else a=Zw(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(hs(t),t):(hs(t),null)}return hs(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),Ib(t,t.updateQueue),Wn(t),null);case 4:return t1(),e===null&&rC(t.stateNode.containerInfo),Wn(t),null;case 10:return kc(t.type),Wn(t),null;case 19:if(yi(Oa),n=t.memoizedState,n===null)return Wn(t),null;if(a=(t.flags&128)!==0,i=n.rendering,i===null)if(a)zg(n,!1);else{if(_a!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=d5(e),i!==null){for(t.flags|=128,zg(n,!1),e=i.updateQueue,t.updateQueue=e,Ib(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)zR(r,e),r=r.sibling;return Fn(Oa,Oa.current&1|2),$r&&gc(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&ys()>y5&&(t.flags|=128,a=!0,zg(n,!1),t.lanes=4194304)}else{if(!a)if(e=d5(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ib(t,e),zg(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!$r)return Wn(t),null}else 2*ys()-n.renderingStartTime>y5&&r!==536870912&&(t.flags|=128,a=!0,zg(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=ys(),e.sibling=null,r=Oa.current,Fn(Oa,a?r&1|2:r&1),$r&&gc(t,n.treeForkCount),e):(Wn(t),null);case 22:case 23:return hs(t),BS(),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&&(Wn(t),t.subtreeFlags&6&&(t.flags|=8192)):Wn(t),r=t.updateQueue,r!==null&&Ib(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&&yi(Bf),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),kc(Ka),Wn(t),null;case 25:return null;case 30:return null}throw Error($e(156,t.tag))}function Dae(e,t){switch(TS(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return kc(Ka),t1(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return r5(t),null;case 31:if(t.memoizedState!==null){if(hs(t),t.alternate===null)throw Error($e(340));Of()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(hs(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($e(340));Of()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return yi(Oa),null;case 4:return t1(),null;case 10:return kc(t.type),null;case 22:case 23:return hs(t),BS(),e!==null&&yi(Bf),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return kc(Ka),null;case 25:return null;default:return null}}function zN(e,t){switch(TS(t),t.tag){case 3:kc(Ka),t1();break;case 26:case 27:case 5:r5(t);break;case 4:t1();break;case 31:t.memoizedState!==null&&hs(t);break;case 13:hs(t);break;case 19:yi(Oa);break;case 10:kc(t.type);break;case 22:case 23:hs(t),BS(),e!==null&&yi(Bf);break;case 24:kc(Ka)}}function S4(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){xn(t,t.return,s)}}function sd(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){xn(a,l,c)}}}n=n.next}while(n!==i)}}catch(c){xn(t,t.return,c)}}function BN(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{jR(t,r)}catch(n){xn(e,e.return,n)}}}function RN(e,t,r){r.props=$f(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(n){xn(e,t,n)}}function Yg(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){xn(e,t,a)}}function hu(e,t){var r=e.ref,n=e.refCleanup;if(r!==null)if(typeof n=="function")try{n()}catch(a){xn(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){xn(e,t,a)}else r.current=null}function NN(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){xn(e,e.return,a)}}function lk(e,t,r){try{var n=e.stateNode;Jae(n,e.type,r,t),n[jo]=t}catch(a){xn(e,e.return,a)}}function ON(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&cd(e.type)||e.tag===4}function uk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ON(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&&cd(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 Jk(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=xc));else if(n!==4&&(n===27&&cd(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(Jk(e,t,r),e=e.sibling;e!==null;)Jk(e,t,r),e=e.sibling}function g5(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&&cd(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(g5(e,t,r),e=e.sibling;e!==null;)g5(e,t,r),e=e.sibling}function PN(e){var t=e.stateNode,r=e.memoizedProps;try{for(var n=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Ii(t,n,r),t[Ti]=e,t[jo]=r}catch(i){xn(e,e.return,i)}}var yc=!1,Ua=!1,ck=!1,yB=typeof WeakSet=="function"?WeakSet:Set,mi=null;function Iae(e,t){if(e=e.containerInfo,aS=A5,e=MR(e),CS(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(v){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(iS={focusedElem:e,selectionRange:r},A5=!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 b=$f(r.type,a);e=n.getSnapshotBeforeUpdate(b,i),n.__reactInternalSnapshotBeforeUpdate=e}catch(v){xn(r,r.return,v)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)sS(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":sS(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($e(163))}if(e=t.sibling,e!==null){e.return=t.return,mi=e;break}mi=t.return}}function FN(e,t,r){var n=r.flags;switch(r.tag){case 0:case 11:case 15:hc(e,r),n&4&&S4(5,r);break;case 1:if(hc(e,r),n&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(o){xn(r,r.return,o)}else{var a=$f(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){xn(r,r.return,o)}}n&64&&BN(r),n&512&&Yg(r,r.return);break;case 3:if(hc(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{jR(e,t)}catch(o){xn(r,r.return,o)}}break;case 27:t===null&&n&4&&PN(r);case 26:case 5:hc(e,r),t===null&&n&4&&NN(r),n&512&&Yg(r,r.return);break;case 12:hc(e,r);break;case 31:hc(e,r),n&4&&HN(e,r);break;case 13:hc(e,r),n&4&&jN(e,r),n&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=$ae.bind(null,r),iie(e,r))));break;case 22:if(n=r.memoizedState!==null||yc,!n){t=t!==null&&t.memoizedState!==null||Ua,a=yc;var i=Ua;yc=n,(Ua=t)&&!i?mc(e,r,(r.subtreeFlags&8772)!==0):hc(e,r),yc=a,Ua=i}break;case 30:break;default:hc(e,r)}}function qN(e){var t=e.alternate;t!==null&&(e.alternate=null,qN(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bS(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 sa=null,qo=!1;function pc(e,t,r){for(r=r.child;r!==null;)$N(e,t,r),r=r.sibling}function $N(e,t,r){if(bs&&typeof bs.onCommitFiberUnmount=="function")try{bs.onCommitFiberUnmount(g4,r)}catch(i){}switch(r.tag){case 26:Ua||hu(r,t),pc(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Ua||hu(r,t);var n=sa,a=qo;cd(r.type)&&(sa=r.stateNode,qo=!1),pc(e,t,r),e4(r.stateNode),sa=n,qo=a;break;case 5:Ua||hu(r,t);case 6:if(n=sa,a=qo,sa=null,pc(e,t,r),sa=n,qo=a,sa!==null)if(qo)try{(sa.nodeType===9?sa.body:sa.nodeName==="HTML"?sa.ownerDocument.body:sa).removeChild(r.stateNode)}catch(i){xn(r,t,i)}else try{sa.removeChild(r.stateNode)}catch(i){xn(r,t,i)}break;case 18:sa!==null&&(qo?(e=sa,IB(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),d1(e)):IB(sa,r.stateNode));break;case 4:n=sa,a=qo,sa=r.stateNode.containerInfo,qo=!0,pc(e,t,r),sa=n,qo=a;break;case 0:case 11:case 14:case 15:sd(2,r,t),Ua||sd(4,r,t),pc(e,t,r);break;case 1:Ua||(hu(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"&&RN(r,t,n)),pc(e,t,r);break;case 21:pc(e,t,r);break;case 22:Ua=(n=Ua)||r.memoizedState!==null,pc(e,t,r),Ua=n;break;default:pc(e,t,r)}}function HN(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{d1(e)}catch(r){xn(t,t.return,r)}}}function jN(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{d1(e)}catch(r){xn(t,t.return,r)}}function zae(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new yB),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new yB),t;default:throw Error($e(435,e.tag))}}function zb(e,t){var r=zae(e);t.forEach(function(n){if(!r.has(n)){r.add(n);var a=Hae.bind(null,e,n);n.then(a,a)}})}function Po(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(cd(s.type)){sa=s.stateNode,qo=!1;break e}break;case 5:sa=s.stateNode,qo=!1;break e;case 3:case 4:sa=s.stateNode.containerInfo,qo=!0;break e}s=s.return}if(sa===null)throw Error($e(160));$N(i,o,a),sa=null,qo=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)UN(t,e),t=t.sibling}var Fl=null;function UN(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Po(t,e),Fo(e),n&4&&(sd(3,e,e.return),S4(3,e),sd(5,e,e.return));break;case 1:Po(t,e),Fo(e),n&512&&(Ua||r===null||hu(r,r.return)),n&64&&yc&&(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=Fl;if(Po(t,e),Fo(e),n&512&&(Ua||r===null||hu(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[x4]||i[Ti]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(n),a.head.insertBefore(i,a.querySelector("head > title"))),Ii(i,n,r),i[Ti]=e,gi(i),n=i;break e;case"link":var o=FB("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),Ii(i,n,r),a.head.appendChild(i);break;case"meta":if(o=FB("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),Ii(i,n,r),a.head.appendChild(i);break;default:throw Error($e(468,n))}i[Ti]=e,gi(i),n=i}e.stateNode=n}else qB(a,e.type,e.stateNode);else e.stateNode=PB(a,n,e.memoizedProps);else i!==n?(i===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):i.count--,n===null?qB(a,e.type,e.stateNode):PB(a,n,e.memoizedProps)):n===null&&e.stateNode!==null&&lk(e,e.memoizedProps,r.memoizedProps)}break;case 27:Po(t,e),Fo(e),n&512&&(Ua||r===null||hu(r,r.return)),r!==null&&n&4&&lk(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Po(t,e),Fo(e),n&512&&(Ua||r===null||hu(r,r.return)),e.flags&32){a=e.stateNode;try{n1(a,"")}catch(b){xn(e,e.return,b)}}n&4&&e.stateNode!=null&&(a=e.memoizedProps,lk(e,a,r!==null?r.memoizedProps:a)),n&1024&&(ck=!0);break;case 6:if(Po(t,e),Fo(e),n&4){if(e.stateNode===null)throw Error($e(162));n=e.memoizedProps,r=e.stateNode;try{r.nodeValue=n}catch(b){xn(e,e.return,b)}}break;case 3:if(Jb=null,a=Fl,Fl=C5(t.containerInfo),Po(t,e),Fl=a,Fo(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{d1(t.containerInfo)}catch(b){xn(e,e.return,b)}ck&&(ck=!1,KN(e));break;case 4:n=Fl,Fl=C5(e.stateNode.containerInfo),Po(t,e),Fo(e),Fl=n;break;case 12:Po(t,e),Fo(e);break;case 31:Po(t,e),Fo(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,zb(e,n)));break;case 13:Po(t,e),Fo(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(q5=ys()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,zb(e,n)));break;case 22:a=e.memoizedState!==null;var l=r!==null&&r.memoizedState!==null,u=yc,c=Ua;if(yc=u||a,Ua=c||l,Po(t,e),Ua=c,yc=u,Fo(e),n&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(r===null||l||yc||Ua||Df(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(b){xn(l,l.return,b)}}}else if(t.tag===6){if(r===null){l=t;try{l.stateNode.nodeValue=a?"":l.memoizedProps}catch(b){xn(l,l.return,b)}}}else if(t.tag===18){if(r===null){l=t;try{var p=l.stateNode;a?zB(p,!0):zB(l.stateNode,!1)}catch(b){xn(l,l.return,b)}}}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,zb(e,r))));break;case 19:Po(t,e),Fo(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,zb(e,n)));break;case 30:break;case 21:break;default:Po(t,e),Fo(e)}}function Fo(e){var t=e.flags;if(t&2){try{for(var r,n=e.return;n!==null;){if(ON(n)){r=n;break}n=n.return}if(r==null)throw Error($e(160));switch(r.tag){case 27:var a=r.stateNode,i=uk(e);g5(e,i,a);break;case 5:var o=r.stateNode;r.flags&32&&(n1(o,""),r.flags&=-33);var s=uk(e);g5(e,s,o);break;case 3:case 4:var l=r.stateNode.containerInfo,u=uk(e);Jk(e,u,l);break;default:throw Error($e(161))}}catch(c){xn(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function KN(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;KN(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hc(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)FN(e,t.alternate,t),t=t.sibling}function Df(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:sd(4,t,t.return),Df(t);break;case 1:hu(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&RN(t,t.return,r),Df(t);break;case 27:e4(t.stateNode);case 26:case 5:hu(t,t.return),Df(t);break;case 22:t.memoizedState===null&&Df(t);break;case 30:Df(t);break;default:Df(t)}e=e.sibling}}function mc(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:mc(a,i,r),S4(4,i);break;case 1:if(mc(a,i,r),n=i,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(u){xn(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++)HR(l[a],s)}catch(u){xn(n,n.return,u)}}r&&o&64&&BN(i),Yg(i,i.return);break;case 27:PN(i);case 26:case 5:mc(a,i,r),r&&n===null&&o&4&&NN(i),Yg(i,i.return);break;case 12:mc(a,i,r);break;case 31:mc(a,i,r),r&&o&4&&HN(a,i);break;case 13:mc(a,i,r),r&&o&4&&jN(a,i);break;case 22:i.memoizedState===null&&mc(a,i,r),Yg(i,i.return);break;case 30:break;default:mc(a,i,r)}t=t.sibling}}function YS(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&&w4(r))}function JS(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&w4(e))}function Pl(e,t,r,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)VN(e,t,r,n),t=t.sibling}function VN(e,t,r,n){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Pl(e,t,r,n),a&2048&&S4(9,t);break;case 1:Pl(e,t,r,n);break;case 3:Pl(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&&w4(e)));break;case 12:if(a&2048){Pl(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){xn(t,t.return,l)}}else Pl(e,t,r,n);break;case 31:Pl(e,t,r,n);break;case 13:Pl(e,t,r,n);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?Pl(e,t,r,n):Jg(e,t):i._visibility&2?Pl(e,t,r,n):(i._visibility|=2,Bh(e,t,r,n,(t.subtreeFlags&10256)!==0||!1)),a&2048&&YS(o,t);break;case 24:Pl(e,t,r,n),a&2048&&JS(t.alternate,t);break;default:Pl(e,t,r,n)}}function Bh(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:Bh(i,o,s,l,a),S4(8,o);break;case 23:break;case 22:var c=o.stateNode;o.memoizedState!==null?c._visibility&2?Bh(i,o,s,l,a):Jg(i,o):(c._visibility|=2,Bh(i,o,s,l,a)),a&&u&2048&&YS(o.alternate,o);break;case 24:Bh(i,o,s,l,a),a&&u&2048&&JS(o.alternate,o);break;default:Bh(i,o,s,l,a)}t=t.sibling}}function Jg(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:Jg(r,n),a&2048&&YS(n.alternate,n);break;case 24:Jg(r,n),a&2048&&JS(n.alternate,n);break;default:Jg(r,n)}t=t.sibling}}var $g=8192;function zh(e,t,r){if(e.subtreeFlags&$g)for(e=e.child;e!==null;)GN(e,t,r),e=e.sibling}function GN(e,t,r){switch(e.tag){case 26:zh(e,t,r),e.flags&$g&&e.memoizedState!==null&&yie(r,Fl,e.memoizedState,e.memoizedProps);break;case 5:zh(e,t,r);break;case 3:case 4:var n=Fl;Fl=C5(e.stateNode.containerInfo),zh(e,t,r),Fl=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=$g,$g=16777216,zh(e,t,r),$g=n):zh(e,t,r));break;default:zh(e,t,r)}}function WN(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 Bg(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,YN(n,e)}WN(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)XN(e),e=e.sibling}function XN(e){switch(e.tag){case 0:case 11:case 15:Bg(e),e.flags&2048&&sd(9,e,e.return);break;case 3:Bg(e);break;case 12:Bg(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xb(e)):Bg(e);break;default:Bg(e)}}function Xb(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,YN(n,e)}WN(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:sd(8,t,t.return),Xb(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,Xb(t));break;default:Xb(t)}e=e.sibling}}function YN(e,t){for(;mi!==null;){var r=mi;switch(r.tag){case 0:case 11:case 15:sd(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:w4(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(qN(n),n===r){mi=null;break e}if(a!==null){a.return=i,mi=a;break e}mi=i}}}var Bae={getCacheForType:function(e){var t=Di(Ka),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return Di(Ka).controller.signal}},Rae=typeof WeakMap=="function"?WeakMap:Map,sn=0,Ln=null,Dr=null,Pr=0,bn=0,ps=null,G0=!1,g1=!1,ZS=!1,Lc=0,_a=0,ld=0,Nf=0,QS=0,gs=0,s1=0,Zg=null,$o=null,Zk=!1,q5=0,JN=0,y5=1/0,b5=null,ed=null,ri=0,td=null,l1=null,Sc=0,Qk=0,eS=null,ZN=null,Qg=0,tS=null;function vs(){return(sn&2)!==0&&Pr!==0?Pr&-Pr:Zt.T!==null?tC():sR()}function QN(){if(gs===0)if((Pr&536870912)===0||$r){var e=Sb;Sb<<=1,(Sb&3932160)===0&&(Sb=262144),gs=e}else gs=536870912;return e=ks.current,e!==null&&(e.flags|=32),gs}function Ho(e,t,r){(e===Ln&&(bn===2||bn===9)||e.cancelPendingCommit!==null)&&(u1(e,0),W0(e,Pr,gs,!1)),b4(e,r),((sn&2)===0||e!==Ln)&&(e===Ln&&((sn&2)===0&&(Nf|=r),_a===4&&W0(e,Pr,gs,!1)),yu(e))}function eO(e,t,r){if((sn&6)!==0)throw Error($e(327));var n=!r&&(t&127)===0&&(t&e.expiredLanes)===0||y4(e,t),a=n?Pae(e,t):dk(e,t,!0),i=n;do{if(a===0){g1&&!n&&W0(e,t,0,!1);break}else{if(r=e.current.alternate,i&&!Nae(r)){a=dk(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=Zg;var l=s.current.memoizedState.isDehydrated;if(l&&(u1(s,o).flags|=256),o=dk(s,o,!1),o!==2){if(ZS&&!l){s.errorRecoveryDisabledLanes|=i,Nf|=i,a=4;break e}i=$o,$o=a,i!==null&&($o===null?$o=i:$o.push.apply($o,i))}a=o}if(i=!1,a!==2)continue}}if(a===1){u1(e,0),W0(e,t,0,!0);break}e:{switch(n=e,i=a,i){case 0:case 1:throw Error($e(345));case 4:if((t&4194048)!==t)break;case 6:W0(n,t,gs,!G0);break e;case 2:$o=null;break;case 3:case 5:break;default:throw Error($e(329))}if((t&62914560)===t&&(a=q5+300-ys(),10<a)){if(W0(n,t,gs,!G0),T5(n,0,!0)!==0)break e;Sc=t,n.timeoutHandle=vO(bB.bind(null,n,r,$o,b5,Zk,t,gs,Nf,s1,G0,i,"Throttled",-0,0),a);break e}bB(n,r,$o,b5,Zk,t,gs,Nf,s1,G0,i,null,-0,0)}}break}while(!0);yu(e)}function bB(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:xc},GN(t,i,f);var b=(i&62914560)===i?q5-ys():(i&4194048)===i?JN-ys():0;if(b=bie(f,b),b!==null){Sc=i,e.cancelPendingCommit=b(vB.bind(null,e,t,i,r,n,a,o,s,l,c,f,null,d,p)),W0(e,i,o,!u);return}}vB(e,t,i,r,n,a,o,s,l)}function Nae(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(!ws(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 W0(e,t,r,n){t&=~QS,t&=~Nf,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var a=t;0<a;){var i=31-xs(a),o=1<<i;n[i]=-1,a&=~o}r!==0&&aR(e,r,t)}function $5(){return(sn&6)===0?(C4(0,!1),!1):!0}function eC(){if(Dr!==null){if(bn===0)var e=Dr.return;else e=Dr,vc=Vf=null,FS(e),Zh=null,s4=0,e=Dr;for(;e!==null;)zN(e.alternate,e),e=e.return;Dr=null}}function u1(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,eie(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Sc=0,eC(),Ln=e,Dr=r=wc(e.current,null),Pr=t,bn=0,ps=null,G0=!1,g1=y4(e,t),ZS=!1,s1=gs=QS=Nf=ld=_a=0,$o=Zg=null,Zk=!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-xs(n),i=1<<a;t|=e[a],n&=~i}return Lc=t,z5(),r}function tO(e,t){hr=null,Zt.H=u4,t===m1||t===R5?(t=Yz(),bn=3):t===IS?(t=Yz(),bn=4):bn=t===WS?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ps=t,Dr===null&&(_a=1,h5(e,Ys(t,e.current)))}function rO(){var e=ks.current;return e===null?!0:(Pr&4194048)===Pr?Zs===null:(Pr&62914560)===Pr||(Pr&536870912)!==0?e===Zs:!1}function nO(){var e=Zt.H;return Zt.H=u4,e===null?u4:e}function aO(){var e=Zt.A;return Zt.A=Bae,e}function x5(){_a=4,G0||(Pr&4194048)!==Pr&&ks.current!==null||(g1=!0),(ld&134217727)===0&&(Nf&134217727)===0||Ln===null||W0(Ln,Pr,gs,!1)}function dk(e,t,r){var n=sn;sn|=2;var a=nO(),i=aO();(Ln!==e||Pr!==t)&&(b5=null,u1(e,t)),t=!1;var o=_a;e:do try{if(bn!==0&&Dr!==null){var s=Dr,l=ps;switch(bn){case 8:eC(),o=6;break e;case 3:case 2:case 9:case 6:ks.current===null&&(t=!0);var u=bn;if(bn=0,ps=null,Gh(e,s,l,u),r&&g1){o=0;break e}break;default:u=bn,bn=0,ps=null,Gh(e,s,l,u)}}Oae(),o=_a;break}catch(c){tO(e,c)}while(!0);return t&&e.shellSuspendCounter++,vc=Vf=null,sn=n,Zt.H=a,Zt.A=i,Dr===null&&(Ln=null,Pr=0,z5()),o}function Oae(){for(;Dr!==null;)iO(Dr)}function Pae(e,t){var r=sn;sn|=2;var n=nO(),a=aO();Ln!==e||Pr!==t?(b5=null,y5=ys()+500,u1(e,t)):g1=y4(e,t);e:do try{if(bn!==0&&Dr!==null){t=Dr;var i=ps;t:switch(bn){case 1:bn=0,ps=null,Gh(e,t,i,1);break;case 2:case 9:if(Xz(i)){bn=0,ps=null,xB(t);break}t=function(){bn!==2&&bn!==9||Ln!==e||(bn=7),yu(e)},i.then(t,t);break e;case 3:bn=7;break e;case 4:bn=5;break e;case 7:Xz(i)?(bn=0,ps=null,xB(t)):(bn=0,ps=null,Gh(e,t,i,7));break;case 5:var o=null;switch(Dr.tag){case 26:o=Dr.memoizedState;case 5:case 27:var s=Dr;if(o?MO(o):s.stateNode.complete){bn=0,ps=null;var l=s.sibling;if(l!==null)Dr=l;else{var u=s.return;u!==null?(Dr=u,H5(u)):Dr=null}break t}}bn=0,ps=null,Gh(e,t,i,5);break;case 6:bn=0,ps=null,Gh(e,t,i,6);break;case 8:eC(),_a=6;break e;default:throw Error($e(462))}}Fae();break}catch(c){tO(e,c)}while(!0);return vc=Vf=null,Zt.H=n,Zt.A=a,sn=r,Dr!==null?0:(Ln=null,Pr=0,z5(),_a)}function Fae(){for(;Dr!==null&&!lne();)iO(Dr)}function iO(e){var t=IN(e.alternate,e,Lc);e.memoizedProps=e.pendingProps,t===null?H5(e):Dr=t}function xB(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=fB(r,t,t.pendingProps,t.type,void 0,Pr);break;case 11:t=fB(r,t,t.pendingProps,t.type.render,t.ref,Pr);break;case 5:FS(t);default:zN(r,t),t=Dr=zR(t,Lc),t=IN(r,t,Lc)}e.memoizedProps=e.pendingProps,t===null?H5(e):Dr=t}function Gh(e,t,r,n){vc=Vf=null,FS(t),Zh=null,s4=0;var a=t.return;try{if(Aae(e,a,t,r,Pr)){_a=1,h5(e,Ys(r,e.current)),Dr=null;return}}catch(i){if(a!==null)throw Dr=a,i;_a=1,h5(e,Ys(r,e.current)),Dr=null;return}t.flags&32768?($r||n===1?e=!0:g1||(Pr&536870912)!==0?e=!1:(G0=e=!0,(n===2||n===9||n===3||n===6)&&(n=ks.current,n!==null&&n.tag===13&&(n.flags|=16384))),oO(t,e)):H5(t)}function H5(e){var t=e;do{if((t.flags&32768)!==0){oO(t,G0);return}e=t.return;var r=Eae(t.alternate,t,Lc);if(r!==null){Dr=r;return}if(t=t.sibling,t!==null){Dr=t;return}Dr=t=e}while(t!==null);_a===0&&(_a=5)}function oO(e,t){do{var r=Dae(e.alternate,e);if(r!==null){r.flags&=32767,Dr=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Dr=e;return}Dr=e=r}while(e!==null);_a=6,Dr=null}function vB(e,t,r,n,a,i,o,s,l){e.cancelPendingCommit=null;do j5();while(ri!==0);if((sn&6)!==0)throw Error($e(327));if(t!==null){if(t===e.current)throw Error($e(177));if(i=t.lanes|t.childLanes,i|=MS,bne(e,r,i,o,s,l),e===Ln&&(Dr=Ln=null,Pr=0),l1=t,td=e,Sc=r,Qk=i,eS=a,ZN=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,jae(n5,function(){return dO(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=Zt.T,Zt.T=null,a=ln.p,ln.p=2,o=sn,sn|=4;try{Iae(e,t,r)}finally{sn=o,ln.p=a,Zt.T=n}}ri=1,sO(),lO(),uO()}}function sO(){if(ri===1){ri=0;var e=td,t=l1,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=Zt.T,Zt.T=null;var n=ln.p;ln.p=2;var a=sn;sn|=4;try{UN(t,e);var i=iS,o=MR(e.containerInfo),s=i.focusedElem,l=i.selectionRange;if(o!==s&&s&&s.ownerDocument&&CR(s.ownerDocument.documentElement,s)){if(l!==null&&CS(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(),b=s.textContent.length,v=Math.min(l.start,b),k=l.end===void 0?v:Math.min(l.end,b);!p.extend&&v>k&&(o=k,k=v,v=o);var w=Hz(s,v),S=Hz(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(),v>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 I=f[s];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}A5=!!aS,iS=aS=null}finally{sn=a,ln.p=n,Zt.T=r}}e.current=t,ri=2}}function lO(){if(ri===2){ri=0;var e=td,t=l1,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=Zt.T,Zt.T=null;var n=ln.p;ln.p=2;var a=sn;sn|=4;try{FN(e,t.alternate,t)}finally{sn=a,ln.p=n,Zt.T=r}}ri=3}}function uO(){if(ri===4||ri===3){ri=0,une();var e=td,t=l1,r=Sc,n=ZN;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ri=5:(ri=0,l1=td=null,cO(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(ed=null),yS(r),t=t.stateNode,bs&&typeof bs.onCommitFiberRoot=="function")try{bs.onCommitFiberRoot(g4,t,void 0,(t.current.flags&128)===128)}catch(l){}if(n!==null){t=Zt.T,a=ln.p,ln.p=2,Zt.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{Zt.T=t,ln.p=a}}(Sc&3)!==0&&j5(),yu(e),a=e.pendingLanes,(r&261930)!==0&&(a&42)!==0?e===tS?Qg++:(Qg=0,tS=e):Qg=0,C4(0,!1)}}function cO(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,w4(t)))}function j5(){return sO(),lO(),uO(),dO()}function dO(){if(ri!==5)return!1;var e=td,t=Qk;Qk=0;var r=yS(Sc),n=Zt.T,a=ln.p;try{ln.p=32>r?32:r,Zt.T=null,r=eS,eS=null;var i=td,o=Sc;if(ri=0,l1=td=null,Sc=0,(sn&6)!==0)throw Error($e(331));var s=sn;if(sn|=4,XN(i.current),VN(i,i.current,o,r),sn=s,C4(0,!1),bs&&typeof bs.onPostCommitFiberRoot=="function")try{bs.onPostCommitFiberRoot(g4,i)}catch(l){}return!0}finally{ln.p=a,Zt.T=n,cO(e,t)}}function wB(e,t,r){t=Ys(r,t),t=Wk(e.stateNode,t,2),e=Q0(e,t,2),e!==null&&(b4(e,2),yu(e))}function xn(e,t,r){if(e.tag===3)wB(e,e,r);else for(;t!==null;){if(t.tag===3){wB(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ed===null||!ed.has(n))){e=Ys(r,e),r=_N(2),n=Q0(t,r,2),n!==null&&(AN(r,n,t,e),b4(n,2),yu(n));break}}t=t.return}}function fk(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Rae;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)||(ZS=!0,a.add(r),e=qae.bind(null,e,t,r),t.then(e,e))}function qae(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,Ln===e&&(Pr&r)===r&&(_a===4||_a===3&&(Pr&62914560)===Pr&&300>ys()-q5?(sn&2)===0&&u1(e,0):QS|=r,s1===Pr&&(s1=0)),yu(e)}function fO(e,t){t===0&&(t=nR()),e=Kf(e,t),e!==null&&(b4(e,t),yu(e))}function $ae(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),fO(e,r)}function Hae(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($e(314))}n!==null&&n.delete(t),fO(e,r)}function jae(e,t){return mS(e,t)}var v5=null,Rh=null,rS=!1,w5=!1,pk=!1,X0=0;function yu(e){e!==Rh&&e.next===null&&(Rh===null?v5=Rh=e:Rh=Rh.next=e),w5=!0,rS||(rS=!0,Kae())}function C4(e,t){if(!pk&&w5){pk=!0;do for(var r=!1,n=v5;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-xs(42|e)+1)-1,i&=a&~(o&~s),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(r=!0,kB(n,i))}else i=Pr,i=T5(n,n===Ln?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||y4(n,i)||(r=!0,kB(n,i));n=n.next}while(r);pk=!1}}function Uae(){pO()}function pO(){w5=rS=!1;var e=0;X0!==0&&Qae()&&(e=X0);for(var t=ys(),r=null,n=v5;n!==null;){var a=n.next,i=hO(n,t);i===0?(n.next=null,r===null?v5=a:r.next=a,a===null&&(Rh=r)):(r=n,(e!==0||(i&3)!==0)&&(w5=!0)),n=a}ri!==0&&ri!==5||C4(e,!1),X0!==0&&(X0=0)}function hO(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-xs(i),s=1<<o,l=a[o];l===-1?((s&r)===0||(s&n)!==0)&&(a[o]=yne(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}if(t=Ln,r=Pr,r=T5(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,r===0||e===t&&(bn===2||bn===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Hw(n),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||y4(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(n!==null&&Hw(n),yS(r)){case 2:case 8:r=tR;break;case 32:r=n5;break;case 268435456:r=rR;break;default:r=n5}return n=mO.bind(null,e),r=mS(r,n),e.callbackPriority=t,e.callbackNode=r,t}return n!==null&&n!==null&&Hw(n),e.callbackPriority=2,e.callbackNode=null,2}function mO(e,t){if(ri!==0&&ri!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(j5()&&e.callbackNode!==r)return null;var n=Pr;return n=T5(e,e===Ln?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(eO(e,n,t),hO(e,ys()),e.callbackNode!=null&&e.callbackNode===r?mO.bind(null,e):null)}function kB(e,t){if(j5())return null;eO(e,t,!0)}function Kae(){tie(function(){(sn&6)!==0?mS(eR,Uae):pO()})}function tC(){if(X0===0){var e=a1;e===0&&(e=kb,kb<<=1,(kb&261888)===0&&(kb=256)),X0=e}return X0}function SB(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:qb(""+e)}function CB(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 Vae(e,t,r,n,a){if(t==="submit"&&r&&r.stateNode===a){var i=SB((a[jo]||null).action),o=n.submitter;o&&(t=(t=o[jo]||null)?SB(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var s=new E5("action","action",null,n,a);e.push({event:s,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(X0!==0){var l=o?CB(a,o):new FormData(a);Vk(r,{pending:!0,data:l,method:a.method,action:i},null,l)}}else typeof i=="function"&&(s.preventDefault(),l=o?CB(a,o):new FormData(a),Vk(r,{pending:!0,data:l,method:a.method,action:i},i,l))},currentTarget:a}]})}}for(Bb=0;Bb<Bk.length;Bb++)Rb=Bk[Bb],MB=Rb.toLowerCase(),_B=Rb[0].toUpperCase()+Rb.slice(1),ql(MB,"on"+_B);var Rb,MB,_B,Bb;ql(AR,"onAnimationEnd");ql(LR,"onAnimationIteration");ql(TR,"onAnimationStart");ql("dblclick","onDoubleClick");ql("focusin","onFocus");ql("focusout","onBlur");ql(cae,"onTransitionRun");ql(dae,"onTransitionStart");ql(fae,"onTransitionCancel");ql(ER,"onTransitionEnd");r1("onMouseEnter",["mouseout","mouseover"]);r1("onMouseLeave",["mouseout","mouseover"]);r1("onPointerEnter",["pointerout","pointerover"]);r1("onPointerLeave",["pointerout","pointerover"]);Hf("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Hf("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Hf("onBeforeInput",["compositionend","keypress","textInput","paste"]);Hf("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Hf("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Hf("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var c4="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(" "),Gae=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(c4));function gO(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){i5(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){i5(c)}a.currentTarget=null,i=l}}}}function Er(e,t){var r=t[_k];r===void 0&&(r=t[_k]=new Set);var n=e+"__bubble";r.has(n)||(yO(t,e,2,!1),r.add(n))}function hk(e,t,r){var n=0;t&&(n|=4),yO(r,e,n,t)}var Nb="_reactListening"+Math.random().toString(36).slice(2);function rC(e){if(!e[Nb]){e[Nb]=!0,lR.forEach(function(r){r!=="selectionchange"&&(Gae.has(r)||hk(r,!1,e),hk(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nb]||(t[Nb]=!0,hk("selectionchange",!1,t))}}function yO(e,t,r,n){switch(EO(t)){case 2:var a=wie;break;case 8:a=kie;break;default:a=oC}r=a.bind(null,t,r,e),a=void 0,!Dk||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 mk(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=Ph(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}gR(function(){var u=i,c=vS(r),f=[];e:{var d=DR.get(e);if(d!==void 0){var p=E5,b=e;switch(e){case"keypress":if(Hb(r)===0)break e;case"keydown":case"keyup":p=Hne;break;case"focusin":b="focus",p=Gw;break;case"focusout":b="blur",p=Gw;break;case"beforeblur":case"afterblur":p=Gw;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=zz;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Ene;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=Kne;break;case AR:case LR:case TR:p=zne;break;case ER:p=Gne;break;case"scroll":case"scrollend":p=Lne;break;case"wheel":p=Xne;break;case"copy":case"cut":case"paste":p=Rne;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Rz;break;case"toggle":case"beforetoggle":p=Jne}var v=(t&4)!==0,k=!v&&(e==="scroll"||e==="scrollend"),w=v?d!==null?d+"Capture":null:d;v=[];for(var S=u,T;S!==null;){var I=S;if(T=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||T===null||w===null||(I=r4(S,w),I!=null&&v.push(d4(S,I,T))),k)break;S=S.return}0<v.length&&(d=new p(d,b,null,r,c),f.push({event:d,listeners:v}))}}if((t&7)===0){e:{if(d=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",d&&r!==Ek&&(b=r.relatedTarget||r.fromElement)&&(Ph(b)||b[f1]))break e;if((p||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,p?(b=r.relatedTarget||r.toElement,p=u,b=b?Ph(b):null,b!==null&&(k=m4(b),v=b.tag,b!==k||v!==5&&v!==27&&v!==6)&&(b=null)):(p=null,b=u),p!==b)){if(v=zz,I="onMouseLeave",w="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(v=Rz,I="onPointerLeave",w="onPointerEnter",S="pointer"),k=p==null?d:Fg(p),T=b==null?d:Fg(b),d=new v(I,S+"leave",p,r,c),d.target=k,d.relatedTarget=T,I=null,Ph(c)===u&&(v=new v(w,S+"enter",b,r,c),v.target=T,v.relatedTarget=k,I=v),k=I,p&&b)t:{for(v=Wae,w=p,S=b,T=0,I=w;I;I=v(I))T++;I=0;for(var B=S;B;B=v(B))I++;for(;0<T-I;)w=v(w),T--;for(;0<I-T;)S=v(S),I--;for(;T--;){if(w===S||S!==null&&w===S.alternate){v=w;break t}w=v(w),S=v(S)}v=null}else v=null;p!==null&&AB(f,d,p,v,!1),b!==null&&k!==null&&AB(f,k,b,v,!0)}}e:{if(d=u?Fg(u):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var O=Fz;else if(Pz(d))if(kR)O=sae;else{O=iae;var N=aae}else p=d.nodeName,!p||p.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?u&&xS(u.elementType)&&(O=Fz):O=oae;if(O&&(O=O(e,u))){wR(f,O,r,c);break e}N&&N(e,d,u),e==="focusout"&&u&&d.type==="number"&&u.memoizedProps.value!=null&&Tk(d,"number",d.value)}switch(N=u?Fg(u):window,e){case"focusin":(Pz(N)||N.contentEditable==="true")&&($h=N,Ik=u,Ug=null);break;case"focusout":Ug=Ik=$h=null;break;case"mousedown":zk=!0;break;case"contextmenu":case"mouseup":case"dragend":zk=!1,jz(f,r,c);break;case"selectionchange":if(uae)break;case"keydown":case"keyup":jz(f,r,c)}var j;if(SS)e:{switch(e){case"compositionstart":var H="onCompositionStart";break e;case"compositionend":H="onCompositionEnd";break e;case"compositionupdate":H="onCompositionUpdate";break e}H=void 0}else qh?xR(e,r)&&(H="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(H="onCompositionStart");H&&(bR&&r.locale!=="ko"&&(qh||H!=="onCompositionStart"?H==="onCompositionEnd"&&qh&&(j=yR()):(V0=c,wS="value"in V0?V0.value:V0.textContent,qh=!0)),N=k5(u,H),0<N.length&&(H=new Bz(H,e,null,r,c),f.push({event:H,listeners:N}),j?H.data=j:(j=vR(r),j!==null&&(H.data=j)))),(j=Qne?eae(e,r):tae(e,r))&&(H=k5(u,"onBeforeInput"),0<H.length&&(N=new Bz("onBeforeInput","beforeinput",null,r,c),f.push({event:N,listeners:H}),N.data=j)),Vae(f,e,u,r,c)}gO(f,t)})}function d4(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=r4(e,r),a!=null&&n.unshift(d4(e,a,i)),a=r4(e,t),a!=null&&n.push(d4(e,a,i))),e.tag===3)return n;e=e.return}return[]}function Wae(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function AB(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=r4(r,i),u!=null&&o.unshift(d4(r,u,l))):a||(u=r4(r,i),u!=null&&o.push(d4(r,u,l)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var Xae=/\r\n?/g,Yae=/\u0000|\uFFFD/g;function LB(e){return(typeof e=="string"?e:""+e).replace(Xae,`
|
|
9
|
-
`).replace(Yae,"")}function bO(e,t){return t=LB(t),LB(e)===t}function Cn(e,t,r,n,a,i){switch(r){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||n1(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&n1(e,""+n);break;case"className":Mb(e,"class",n);break;case"tabIndex":Mb(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Mb(e,r,n);break;case"style":mR(e,n,i);break;case"data":if(t!=="object"){Mb(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=qb(""+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"&&Cn(e,t,"name",a.name,a,null),Cn(e,t,"formEncType",a.formEncType,a,null),Cn(e,t,"formMethod",a.formMethod,a,null),Cn(e,t,"formTarget",a.formTarget,a,null)):(Cn(e,t,"encType",a.encType,a,null),Cn(e,t,"method",a.method,a,null),Cn(e,t,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=qb(""+n),e.setAttribute(r,n);break;case"onClick":n!=null&&(e.onclick=xc);break;case"onScroll":n!=null&&Er("scroll",e);break;case"onScrollEnd":n!=null&&Er("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error($e(61));if(r=n.__html,r!=null){if(a.children!=null)throw Error($e(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=qb(""+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":Er("beforetoggle",e),Er("toggle",e),Fb(e,"popover",n);break;case"xlinkActuate":dc(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":dc(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":dc(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":dc(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":dc(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":dc(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":dc(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":dc(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":dc(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Fb(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=_ne.get(r)||r,Fb(e,r,n))}}function nS(e,t,r,n,a,i){switch(r){case"style":mR(e,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error($e(61));if(r=n.__html,r!=null){if(a.children!=null)throw Error($e(60));e.innerHTML=r}}break;case"children":typeof n=="string"?n1(e,n):(typeof n=="number"||typeof n=="bigint")&&n1(e,""+n);break;case"onScroll":n!=null&&Er("scroll",e);break;case"onScrollEnd":n!=null&&Er("scrollend",e);break;case"onClick":n!=null&&(e.onclick=xc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!uR.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[jo]||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,""):Fb(e,r,n)}}}function Ii(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Er("error",e),Er("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($e(137,t));default:Cn(e,t,i,o,r,null)}}a&&Cn(e,t,"srcSet",r.srcSet,r,null),n&&Cn(e,t,"src",r.src,r,null);return;case"input":Er("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($e(137,t));break;default:Cn(e,t,n,c,r,null)}}fR(e,i,s,l,u,o,a,!1);return;case"select":Er("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:Cn(e,t,a,s,r,null)}t=i,r=o,e.multiple=!!n,t!=null?Xh(e,!!n,t,!1):r!=null&&Xh(e,!!n,r,!0);return;case"textarea":Er("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($e(91));break;default:Cn(e,t,o,s,r,null)}hR(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":Cn(e,t,l,n,r,null));return;case"dialog":Er("beforetoggle",e),Er("toggle",e),Er("cancel",e),Er("close",e);break;case"iframe":case"object":Er("load",e);break;case"video":case"audio":for(n=0;n<c4.length;n++)Er(c4[n],e);break;case"image":Er("error",e),Er("load",e);break;case"details":Er("toggle",e);break;case"embed":case"source":case"link":Er("error",e),Er("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($e(137,t));default:Cn(e,t,u,n,r,null)}return;default:if(xS(t)){for(c in r)r.hasOwnProperty(c)&&(n=r[c],n!==void 0&&nS(e,t,c,n,r,void 0));return}}for(s in r)r.hasOwnProperty(s)&&(n=r[s],n!=null&&Cn(e,t,s,n,r,null))}function Jae(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)||Cn(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($e(137,t));break;default:p!==f&&Cn(e,t,d,p,n,f)}}Lk(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)||Cn(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&&Cn(e,t,a,i,n,l)}t=s,r=o,n=p,d!=null?Xh(e,!!r,d,!1):!!n!=!!r&&(t!=null?Xh(e,!!r,t,!0):Xh(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:Cn(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($e(91));break;default:a!==i&&Cn(e,t,o,a,n,i)}pR(e,d,p);return;case"option":for(var b in r)d=r[b],r.hasOwnProperty(b)&&d!=null&&!n.hasOwnProperty(b)&&(b==="selected"?e.selected=!1:Cn(e,t,b,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":Cn(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 v in r)d=r[v],r.hasOwnProperty(v)&&d!=null&&!n.hasOwnProperty(v)&&Cn(e,t,v,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($e(137,t));break;default:Cn(e,t,u,d,n,p)}return;default:if(xS(t)){for(var k in r)d=r[k],r.hasOwnProperty(k)&&d!==void 0&&!n.hasOwnProperty(k)&&nS(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||nS(e,t,c,d,n,p);return}}for(var w in r)d=r[w],r.hasOwnProperty(w)&&d!=null&&!n.hasOwnProperty(w)&&Cn(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||Cn(e,t,f,d,n,p)}function TB(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zae(){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&&TB(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&&TB(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 aS=null,iS=null;function S5(e){return e.nodeType===9?e:e.ownerDocument}function EB(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 xO(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 oS(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 gk=null;function Qae(){var e=window.event;return e&&e.type==="popstate"?e===gk?!1:(gk=e,!0):(gk=null,!1)}var vO=typeof setTimeout=="function"?setTimeout:void 0,eie=typeof clearTimeout=="function"?clearTimeout:void 0,DB=typeof Promise=="function"?Promise:void 0,tie=typeof queueMicrotask=="function"?queueMicrotask:typeof DB!="undefined"?function(e){return DB.resolve(null).then(e).catch(rie)}:vO;function rie(e){setTimeout(function(){throw e})}function cd(e){return e==="head"}function IB(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),d1(t);return}n--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")n++;else if(r==="html")e4(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,e4(r);for(var i=r.firstChild;i;){var o=i.nextSibling,s=i.nodeName;i[x4]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&i.rel.toLowerCase()==="stylesheet"||r.removeChild(i),i=o}}else r==="body"&&e4(e.ownerDocument.body);r=a}while(r);d1(t)}function zB(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 sS(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":sS(r),bS(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function nie(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[x4])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=Qs(e.nextSibling),e===null)break}return null}function aie(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Qs(e.nextSibling),e===null))return null;return e}function wO(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qs(e.nextSibling),e===null))return null;return e}function lS(e){return e.data==="$?"||e.data==="$~"}function uS(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function iie(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 Qs(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 cS=null;function BB(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return Qs(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function RB(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 kO(e,t,r){switch(t=S5(r),e){case"html":if(e=t.documentElement,!e)throw Error($e(452));return e;case"head":if(e=t.head,!e)throw Error($e(453));return e;case"body":if(e=t.body,!e)throw Error($e(454));return e;default:throw Error($e(451))}}function e4(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bS(e)}var el=new Map,NB=new Set;function C5(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Tc=ln.d;ln.d={f:oie,r:sie,D:lie,C:uie,L:cie,m:die,X:pie,S:fie,M:hie};function oie(){var e=Tc.f(),t=$5();return e||t}function sie(e){var t=p1(e);t!==null&&t.tag===5&&t.type==="form"?mN(t):Tc.r(e)}var y1=typeof document=="undefined"?null:document;function SO(e,t,r){var n=y1;if(n&&typeof t=="string"&&t){var a=Xs(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof r=="string"&&(a+='[crossorigin="'+r+'"]'),NB.has(a)||(NB.add(a),e={rel:e,crossOrigin:r,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),Ii(t,"link",e),gi(t),n.head.appendChild(t)))}}function lie(e){Tc.D(e),SO("dns-prefetch",e,null)}function uie(e,t){Tc.C(e,t),SO("preconnect",e,t)}function cie(e,t,r){Tc.L(e,t,r);var n=y1;if(n&&e&&t){var a='link[rel="preload"][as="'+Xs(t)+'"]';t==="image"&&r&&r.imageSrcSet?(a+='[imagesrcset="'+Xs(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(a+='[imagesizes="'+Xs(r.imageSizes)+'"]')):a+='[href="'+Xs(e)+'"]';var i=a;switch(t){case"style":i=c1(e);break;case"script":i=b1(e)}el.has(i)||(e=Yn({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),el.set(i,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(M4(i))||t==="script"&&n.querySelector(_4(i))||(t=n.createElement("link"),Ii(t,"link",e),gi(t),n.head.appendChild(t)))}}function die(e,t){Tc.m(e,t);var r=y1;if(r&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Xs(n)+'"][href="'+Xs(e)+'"]',i=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=b1(e)}if(!el.has(i)&&(e=Yn({rel:"modulepreload",href:e},t),el.set(i,e),r.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(_4(i)))return}n=r.createElement("link"),Ii(n,"link",e),gi(n),r.head.appendChild(n)}}}function fie(e,t,r){Tc.S(e,t,r);var n=y1;if(n&&e){var a=Wh(n).hoistableStyles,i=c1(e);t=t||"default";var o=a.get(i);if(!o){var s={loading:0,preload:null};if(o=n.querySelector(M4(i)))s.loading=5;else{e=Yn({rel:"stylesheet",href:e,"data-precedence":t},r),(r=el.get(i))&&nC(e,r);var l=o=n.createElement("link");gi(l),Ii(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,Yb(o,t,n)}o={type:"stylesheet",instance:o,count:1,state:s},a.set(i,o)}}}function pie(e,t){Tc.X(e,t);var r=y1;if(r&&e){var n=Wh(r).hoistableScripts,a=b1(e),i=n.get(a);i||(i=r.querySelector(_4(a)),i||(e=Yn({src:e,async:!0},t),(t=el.get(a))&&aC(e,t),i=r.createElement("script"),gi(i),Ii(i,"link",e),r.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function hie(e,t){Tc.M(e,t);var r=y1;if(r&&e){var n=Wh(r).hoistableScripts,a=b1(e),i=n.get(a);i||(i=r.querySelector(_4(a)),i||(e=Yn({src:e,async:!0,type:"module"},t),(t=el.get(a))&&aC(e,t),i=r.createElement("script"),gi(i),Ii(i,"link",e),r.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function OB(e,t,r,n){var a=(a=Y0.current)?C5(a):null;if(!a)throw Error($e(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=c1(r.href),r=Wh(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=c1(r.href);var i=Wh(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(M4(e)))&&!i._p&&(o.instance=i,o.state.loading=5),el.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},el.set(e,r),i||mie(a,e,r,o.state))),t&&n===null)throw Error($e(528,""));return o}if(t&&n!==null)throw Error($e(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=b1(r),r=Wh(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($e(444,e))}}function c1(e){return'href="'+Xs(e)+'"'}function M4(e){return'link[rel="stylesheet"]['+e+"]"}function CO(e){return Yn({},e,{"data-precedence":e.precedence,precedence:null})}function mie(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}),Ii(t,"link",r),gi(t),e.head.appendChild(t))}function b1(e){return'[src="'+Xs(e)+'"]'}function _4(e){return"script[async]"+e}function PB(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Xs(r.href)+'"]');if(n)return t.instance=n,gi(n),n;var a=Yn({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),gi(n),Ii(n,"style",a),Yb(n,r.precedence,e),t.instance=n;case"stylesheet":a=c1(r.href);var i=e.querySelector(M4(a));if(i)return t.state.loading|=4,t.instance=i,gi(i),i;n=CO(r),(a=el.get(a))&&nC(n,a),i=(e.ownerDocument||e).createElement("link"),gi(i);var o=i;return o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),Ii(i,"link",n),t.state.loading|=4,Yb(i,r.precedence,e),t.instance=i;case"script":return i=b1(r.src),(a=e.querySelector(_4(i)))?(t.instance=a,gi(a),a):(n=r,(a=el.get(i))&&(n=Yn({},r),aC(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),gi(a),Ii(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error($e(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Yb(n,r.precedence,e));return t.instance}function Yb(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 nC(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function aC(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Jb=null;function FB(e,t,r){if(Jb===null){var n=new Map,a=Jb=new Map;a.set(r,n)}else a=Jb,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[x4]||i[Ti]||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 qB(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function gie(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 MO(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function yie(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=c1(n.href),i=t.querySelector(M4(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=M5.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=i,gi(i);return}i=t.ownerDocument||t,n=CO(n),(a=el.get(a))&&nC(n,a),i=i.createElement("link"),gi(i);var o=i;o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),Ii(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=M5.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var yk=0;function bie(e,t){return e.stylesheets&&e.count===0&&Zb(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var n=setTimeout(function(){if(e.stylesheets&&Zb(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&yk===0&&(yk=62500*Zae());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zb(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>yk?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function M5(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zb(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _5=null;function Zb(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_5=new Map,t.forEach(xie,e),_5=null,M5.call(e))}function xie(e,t){if(!(t.state.loading&4)){var r=_5.get(e);if(r)var n=r.get(null);else{r=new Map,_5.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=M5.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 f4={$$typeof:bc,Provider:null,Consumer:null,_currentValue:If,_currentValue2:If,_threadCount:0};function vie(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=jw(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jw(0),this.hiddenUpdates=jw(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 _O(e,t,r,n,a,i,o,s,l,u,c,f){return e=new vie(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=ES(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:n,isDehydrated:r,cache:t},zS(i),e}function AO(e){return e?(e=Uh,e):Uh}function LO(e,t,r,n,a,i){a=AO(a),n.context===null?n.context=a:n.pendingContext=a,n=Z0(t),n.payload={element:r},i=i===void 0?null:i,i!==null&&(n.callback=i),r=Q0(e,n,t),r!==null&&(Ho(r,e,t),Vg(r,e,t))}function $B(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function iC(e,t){$B(e,t),(e=e.alternate)&&$B(e,t)}function TO(e){if(e.tag===13||e.tag===31){var t=Kf(e,67108864);t!==null&&Ho(t,e,67108864),iC(e,67108864)}}function HB(e){if(e.tag===13||e.tag===31){var t=vs();t=gS(t);var r=Kf(e,t);r!==null&&Ho(r,e,t),iC(e,t)}}var A5=!0;function wie(e,t,r,n){var a=Zt.T;Zt.T=null;var i=ln.p;try{ln.p=2,oC(e,t,r,n)}finally{ln.p=i,Zt.T=a}}function kie(e,t,r,n){var a=Zt.T;Zt.T=null;var i=ln.p;try{ln.p=8,oC(e,t,r,n)}finally{ln.p=i,Zt.T=a}}function oC(e,t,r,n){if(A5){var a=dS(n);if(a===null)mk(e,t,n,L5,r),jB(e,n);else if(Cie(a,e,t,r,n))n.stopPropagation();else if(jB(e,n),t&4&&-1<Sie.indexOf(e)){for(;a!==null;){var i=p1(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Tf(i.pendingLanes);if(o!==0){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var l=1<<31-xs(o);s.entanglements[1]|=l,o&=~l}yu(i),(sn&6)===0&&(y5=ys()+500,C4(0,!1))}}break;case 31:case 13:s=Kf(i,2),s!==null&&Ho(s,i,2),$5(),iC(i,2)}if(i=dS(n),i===null&&mk(e,t,n,L5,r),i===a)break;a=i}a!==null&&n.stopPropagation()}else mk(e,t,n,null,r)}}function dS(e){return e=vS(e),sC(e)}var L5=null;function sC(e){if(L5=null,e=Ph(e),e!==null){var t=m4(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=XB(t),e!==null)return e;e=null}else if(r===31){if(e=YB(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 L5=e,null}function EO(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(cne()){case eR:return 2;case tR:return 8;case n5:case dne:return 32;case rR:return 268435456;default:return 32}default:return 32}}var fS=!1,rd=null,nd=null,ad=null,p4=new Map,h4=new Map,U0=[],Sie="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 jB(e,t){switch(e){case"focusin":case"focusout":rd=null;break;case"dragenter":case"dragleave":nd=null;break;case"mouseover":case"mouseout":ad=null;break;case"pointerover":case"pointerout":p4.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":h4.delete(t.pointerId)}}function Rg(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=p1(t),t!==null&&TO(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Cie(e,t,r,n,a){switch(t){case"focusin":return rd=Rg(rd,e,t,r,n,a),!0;case"dragenter":return nd=Rg(nd,e,t,r,n,a),!0;case"mouseover":return ad=Rg(ad,e,t,r,n,a),!0;case"pointerover":var i=a.pointerId;return p4.set(i,Rg(p4.get(i)||null,e,t,r,n,a)),!0;case"gotpointercapture":return i=a.pointerId,h4.set(i,Rg(h4.get(i)||null,e,t,r,n,a)),!0}return!1}function DO(e){var t=Ph(e.target);if(t!==null){var r=m4(t);if(r!==null){if(t=r.tag,t===13){if(t=XB(r),t!==null){e.blockedOn=t,_z(e.priority,function(){HB(r)});return}}else if(t===31){if(t=YB(r),t!==null){e.blockedOn=t,_z(e.priority,function(){HB(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 Qb(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=dS(e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Ek=n,r.target.dispatchEvent(n),Ek=null}else return t=p1(r),t!==null&&TO(t),e.blockedOn=r,!1;t.shift()}return!0}function UB(e,t,r){Qb(e)&&r.delete(t)}function Mie(){fS=!1,rd!==null&&Qb(rd)&&(rd=null),nd!==null&&Qb(nd)&&(nd=null),ad!==null&&Qb(ad)&&(ad=null),p4.forEach(UB),h4.forEach(UB)}function Ob(e,t){e.blockedOn===t&&(e.blockedOn=null,fS||(fS=!0,ni.unstable_scheduleCallback(ni.unstable_NormalPriority,Mie)))}var Pb=null;function KB(e){Pb!==e&&(Pb=e,ni.unstable_scheduleCallback(ni.unstable_NormalPriority,function(){Pb===e&&(Pb=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(sC(n||r)===null)continue;break}var i=p1(r);i!==null&&(e.splice(t,3),t-=3,Vk(i,{pending:!0,data:a,method:r.method,action:n},n,a))}}))}function d1(e){function t(l){return Ob(l,e)}rd!==null&&Ob(rd,e),nd!==null&&Ob(nd,e),ad!==null&&Ob(ad,e),p4.forEach(t),h4.forEach(t);for(var r=0;r<U0.length;r++){var n=U0[r];n.blockedOn===e&&(n.blockedOn=null)}for(;0<U0.length&&(r=U0[0],r.blockedOn===null);)DO(r),r.blockedOn===null&&U0.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[jo]||null;if(typeof i=="function")o||KB(r);else if(o){var s=null;if(i&&i.hasAttribute("formAction")){if(a=i,o=i[jo]||null)s=o.formAction;else if(sC(a)!==null)continue}else s=o.action;typeof s=="function"?r[n+1]=s:(r.splice(n,3),n-=3),KB(r)}}}function IO(){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 lC(e){this._internalRoot=e}U5.prototype.render=lC.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($e(409));var r=t.current,n=vs();LO(r,n,e,t,null,null)};U5.prototype.unmount=lC.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;LO(e.current,2,null,e,null,null),$5(),t[f1]=null}};function U5(e){this._internalRoot=e}U5.prototype.unstable_scheduleHydration=function(e){if(e){var t=sR();e={blockedOn:null,target:e,priority:t};for(var r=0;r<U0.length&&t!==0&&t<U0[r].priority;r++);U0.splice(r,0,e),r===0&&DO(e)}};var VB=GB.version;if(VB!=="19.2.3")throw Error($e(527,VB,"19.2.3"));ln.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error($e(188)):(e=Object.keys(e).join(","),Error($e(268,e)));return e=nne(t),e=e!==null?JB(e):null,e=e===null?null:e.stateNode,e};var _ie={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:Zt,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(Ng=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ng.isDisabled&&Ng.supportsFiber))try{g4=Ng.inject(_ie),bs=Ng}catch(e){}var Ng;K5.createRoot=function(e,t){if(!WB(e))throw Error($e(299));var r=!1,n="",a=SN,i=CN,o=MN;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=_O(e,1,!1,null,null,r,n,null,a,i,o,IO),e[f1]=t.current,rC(e),new lC(t)};K5.hydrateRoot=function(e,t,r){if(!WB(e))throw Error($e(299));var n=!1,a="",i=SN,o=CN,s=MN,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=_O(e,1,!0,t,r!=null?r:null,n,a,l,i,o,s,IO),t.context=AO(null),r=t.current,n=vs(),n=gS(n),a=Z0(n),a.callback=null,Q0(r,a,n),r=n,t.current.lanes=r,b4(t,r),yu(t),e[f1]=t.current,rC(e),new U5(t)};K5.version="19.2.3"});var uC=hi((p7e,RO)=>{"use strict";function BO(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(BO)}catch(e){console.error(e)}}BO(),RO.exports=zO()});var OO=hi(V5=>{"use strict";var Aie=Symbol.for("react.transitional.element"),Lie=Symbol.for("react.fragment");function NO(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:Aie,type:e,key:n,ref:t!==void 0?t:null,props:r}}V5.Fragment=Lie;V5.jsx=NO;V5.jsxs=NO});var $t=hi((m7e,PO)=>{"use strict";PO.exports=OO()});var tM=hi((O4,eM)=>{"use strict";(function(t,r){typeof O4=="object"&&typeof eM=="object"?eM.exports=r():typeof define=="function"&&define.amd?define([],r):typeof O4=="object"?O4.katex=r():t.katex=r()})(typeof self!="undefined"?self:O4,function(){return(function(){"use strict";var e={};(function(){e.d=function(g,h){for(var y in h)e.o(h,y)&&!e.o(g,y)&&Object.defineProperty(g,y,{enumerable:!0,get:h[y]})}})(),(function(){e.o=function(g,h){return Object.prototype.hasOwnProperty.call(g,h)}})();var t={};e.d(t,{default:function(){return _re}});class r{constructor(h,y){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let x="KaTeX parse error: "+h,_,z,P=y&&y.loc;if(P&&P.start<=P.end){let J=P.lexer.input;_=P.start,z=P.end,_===J.length?x+=" at end of input: ":x+=" at position "+(_+1)+": ";let se=J.slice(_,z).replace(/[^]/g,"$&\u0332"),ge;_>15?ge="\u2026"+J.slice(_-15,_):ge=J.slice(0,_);let be;z+15<J.length?be=J.slice(z,z+15)+"\u2026":be=J.slice(z),x+=ge+se+be}let K=new Error(x);return K.name="ParseError",K.__proto__=r.prototype,K.position=_,_!=null&&z!=null&&(K.length=z-_),K.rawMessage=h,K}}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={"&":"&",">":">","<":"<",'"':""","'":"'"},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 b={deflt:a,escape:u,hyphenate:o,getBaseElem:c,isCharacterBox:f,protocolFromUrl:function(g){let h=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*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 v={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,y=Array.isArray(h)?h[0]:h;if(typeof y!="string")return y.enum[0];switch(y){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 y in v)if(v.hasOwnProperty(y)){let x=v[y];this[y]=h[y]!==void 0?x.processor?x.processor(h[y]):h[y]:k(x)}}reportNonstrict(h,y,x){let _=this.strict;if(typeof _=="function"&&(_=_(h,y,x)),!(!_||_==="ignore")){if(_===!0||_==="error")throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+(y+" ["+h+"]"),x);_==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(y+" ["+h+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+_+"': "+y+" ["+h+"]"))}}useStrictBehavior(h,y,x){let _=this.strict;if(typeof _=="function")try{_=_(h,y,x)}catch(z){_="error"}return!_||_==="ignore"?!1:_===!0||_==="error"?!0:_==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(y+" ["+h+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+_+"': "+y+" ["+h+"]")),!1)}isTrusted(h){if(h.url&&!h.protocol){let x=b.protocolFromUrl(h.url);if(x==null)return!1;h.protocol=x}return!!(typeof this.trust=="function"?this.trust(h):this.trust)}}class S{constructor(h,y,x){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=h,this.size=y,this.cramped=x}sup(){return V[re[this.id]]}sub(){return V[xe[this.id]]}fracNum(){return V[oe[this.id]]}fracDen(){return V[le[this.id]]}cramp(){return V[Se[this.id]]}text(){return V[_e[this.id]]}isTight(){return this.size>=2}}let T=0,I=1,B=2,O=3,N=4,j=5,H=6,Y=7,V=[new S(T,0,!1),new S(I,0,!0),new S(B,1,!1),new S(O,1,!0),new S(N,2,!1),new S(j,2,!0),new S(H,3,!1),new S(Y,3,!0)],re=[N,j,N,j,H,Y,H,Y],xe=[j,j,j,j,Y,Y,Y,Y],oe=[B,O,N,j,H,Y,H,Y],le=[O,O,j,j,Y,Y,Y,Y],Se=[I,I,O,O,j,j,Y,Y],_e=[T,I,B,O,B,O,B,O];var de={DISPLAY:V[T],TEXT:V[B],SCRIPT:V[N],SCRIPTSCRIPT:V[H]};let me=[{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 Ue(g){for(let h=0;h<me.length;h++){let y=me[h];for(let x=0;x<y.blocks.length;x++){let _=y.blocks[x];if(g>=_[0]&&g<=_[1])return y.name}}return null}let Le=[];me.forEach(g=>g.blocks.forEach(h=>Le.push(...h)));function Ie(g){for(let h=0;h<Le.length;h+=2)if(g>=Le[h]&&g<=Le[h+1])return!0;return!1}let ye=80,Me=function(g,h){return"M95,"+(622+g+h)+`
|
|
9
|
+
`).replace(Yae,"")}function bO(e,t){return t=LB(t),LB(e)===t}function Cn(e,t,r,n,a,i){switch(r){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||n1(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&n1(e,""+n);break;case"className":Mb(e,"class",n);break;case"tabIndex":Mb(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Mb(e,r,n);break;case"style":mR(e,n,i);break;case"data":if(t!=="object"){Mb(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=qb(""+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"&&Cn(e,t,"name",a.name,a,null),Cn(e,t,"formEncType",a.formEncType,a,null),Cn(e,t,"formMethod",a.formMethod,a,null),Cn(e,t,"formTarget",a.formTarget,a,null)):(Cn(e,t,"encType",a.encType,a,null),Cn(e,t,"method",a.method,a,null),Cn(e,t,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=qb(""+n),e.setAttribute(r,n);break;case"onClick":n!=null&&(e.onclick=xc);break;case"onScroll":n!=null&&Er("scroll",e);break;case"onScrollEnd":n!=null&&Er("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error($e(61));if(r=n.__html,r!=null){if(a.children!=null)throw Error($e(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=qb(""+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":Er("beforetoggle",e),Er("toggle",e),Fb(e,"popover",n);break;case"xlinkActuate":dc(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":dc(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":dc(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":dc(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":dc(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":dc(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":dc(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":dc(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":dc(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Fb(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=_ne.get(r)||r,Fb(e,r,n))}}function nS(e,t,r,n,a,i){switch(r){case"style":mR(e,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error($e(61));if(r=n.__html,r!=null){if(a.children!=null)throw Error($e(60));e.innerHTML=r}}break;case"children":typeof n=="string"?n1(e,n):(typeof n=="number"||typeof n=="bigint")&&n1(e,""+n);break;case"onScroll":n!=null&&Er("scroll",e);break;case"onScrollEnd":n!=null&&Er("scrollend",e);break;case"onClick":n!=null&&(e.onclick=xc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!uR.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[jo]||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,""):Fb(e,r,n)}}}function Ii(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Er("error",e),Er("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($e(137,t));default:Cn(e,t,i,o,r,null)}}a&&Cn(e,t,"srcSet",r.srcSet,r,null),n&&Cn(e,t,"src",r.src,r,null);return;case"input":Er("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($e(137,t));break;default:Cn(e,t,n,c,r,null)}}fR(e,i,s,l,u,o,a,!1);return;case"select":Er("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:Cn(e,t,a,s,r,null)}t=i,r=o,e.multiple=!!n,t!=null?Xh(e,!!n,t,!1):r!=null&&Xh(e,!!n,r,!0);return;case"textarea":Er("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($e(91));break;default:Cn(e,t,o,s,r,null)}hR(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":Cn(e,t,l,n,r,null));return;case"dialog":Er("beforetoggle",e),Er("toggle",e),Er("cancel",e),Er("close",e);break;case"iframe":case"object":Er("load",e);break;case"video":case"audio":for(n=0;n<c4.length;n++)Er(c4[n],e);break;case"image":Er("error",e),Er("load",e);break;case"details":Er("toggle",e);break;case"embed":case"source":case"link":Er("error",e),Er("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($e(137,t));default:Cn(e,t,u,n,r,null)}return;default:if(xS(t)){for(c in r)r.hasOwnProperty(c)&&(n=r[c],n!==void 0&&nS(e,t,c,n,r,void 0));return}}for(s in r)r.hasOwnProperty(s)&&(n=r[s],n!=null&&Cn(e,t,s,n,r,null))}function Jae(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)||Cn(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($e(137,t));break;default:p!==f&&Cn(e,t,d,p,n,f)}}Lk(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)||Cn(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&&Cn(e,t,a,i,n,l)}t=s,r=o,n=p,d!=null?Xh(e,!!r,d,!1):!!n!=!!r&&(t!=null?Xh(e,!!r,t,!0):Xh(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:Cn(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($e(91));break;default:a!==i&&Cn(e,t,o,a,n,i)}pR(e,d,p);return;case"option":for(var b in r)d=r[b],r.hasOwnProperty(b)&&d!=null&&!n.hasOwnProperty(b)&&(b==="selected"?e.selected=!1:Cn(e,t,b,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":Cn(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 v in r)d=r[v],r.hasOwnProperty(v)&&d!=null&&!n.hasOwnProperty(v)&&Cn(e,t,v,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($e(137,t));break;default:Cn(e,t,u,d,n,p)}return;default:if(xS(t)){for(var k in r)d=r[k],r.hasOwnProperty(k)&&d!==void 0&&!n.hasOwnProperty(k)&&nS(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||nS(e,t,c,d,n,p);return}}for(var w in r)d=r[w],r.hasOwnProperty(w)&&d!=null&&!n.hasOwnProperty(w)&&Cn(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||Cn(e,t,f,d,n,p)}function TB(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zae(){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&&TB(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&&TB(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 aS=null,iS=null;function S5(e){return e.nodeType===9?e:e.ownerDocument}function EB(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 xO(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 oS(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 gk=null;function Qae(){var e=window.event;return e&&e.type==="popstate"?e===gk?!1:(gk=e,!0):(gk=null,!1)}var vO=typeof setTimeout=="function"?setTimeout:void 0,eie=typeof clearTimeout=="function"?clearTimeout:void 0,DB=typeof Promise=="function"?Promise:void 0,tie=typeof queueMicrotask=="function"?queueMicrotask:typeof DB!="undefined"?function(e){return DB.resolve(null).then(e).catch(rie)}:vO;function rie(e){setTimeout(function(){throw e})}function cd(e){return e==="head"}function IB(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),d1(t);return}n--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")n++;else if(r==="html")e4(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,e4(r);for(var i=r.firstChild;i;){var o=i.nextSibling,s=i.nodeName;i[x4]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&i.rel.toLowerCase()==="stylesheet"||r.removeChild(i),i=o}}else r==="body"&&e4(e.ownerDocument.body);r=a}while(r);d1(t)}function zB(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 sS(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":sS(r),bS(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function nie(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[x4])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=Qs(e.nextSibling),e===null)break}return null}function aie(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Qs(e.nextSibling),e===null))return null;return e}function wO(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qs(e.nextSibling),e===null))return null;return e}function lS(e){return e.data==="$?"||e.data==="$~"}function uS(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function iie(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 Qs(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 cS=null;function BB(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return Qs(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function RB(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 kO(e,t,r){switch(t=S5(r),e){case"html":if(e=t.documentElement,!e)throw Error($e(452));return e;case"head":if(e=t.head,!e)throw Error($e(453));return e;case"body":if(e=t.body,!e)throw Error($e(454));return e;default:throw Error($e(451))}}function e4(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bS(e)}var el=new Map,NB=new Set;function C5(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Tc=ln.d;ln.d={f:oie,r:sie,D:lie,C:uie,L:cie,m:die,X:pie,S:fie,M:hie};function oie(){var e=Tc.f(),t=$5();return e||t}function sie(e){var t=p1(e);t!==null&&t.tag===5&&t.type==="form"?mN(t):Tc.r(e)}var y1=typeof document=="undefined"?null:document;function SO(e,t,r){var n=y1;if(n&&typeof t=="string"&&t){var a=Xs(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof r=="string"&&(a+='[crossorigin="'+r+'"]'),NB.has(a)||(NB.add(a),e={rel:e,crossOrigin:r,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),Ii(t,"link",e),gi(t),n.head.appendChild(t)))}}function lie(e){Tc.D(e),SO("dns-prefetch",e,null)}function uie(e,t){Tc.C(e,t),SO("preconnect",e,t)}function cie(e,t,r){Tc.L(e,t,r);var n=y1;if(n&&e&&t){var a='link[rel="preload"][as="'+Xs(t)+'"]';t==="image"&&r&&r.imageSrcSet?(a+='[imagesrcset="'+Xs(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(a+='[imagesizes="'+Xs(r.imageSizes)+'"]')):a+='[href="'+Xs(e)+'"]';var i=a;switch(t){case"style":i=c1(e);break;case"script":i=b1(e)}el.has(i)||(e=Yn({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),el.set(i,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(M4(i))||t==="script"&&n.querySelector(_4(i))||(t=n.createElement("link"),Ii(t,"link",e),gi(t),n.head.appendChild(t)))}}function die(e,t){Tc.m(e,t);var r=y1;if(r&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Xs(n)+'"][href="'+Xs(e)+'"]',i=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=b1(e)}if(!el.has(i)&&(e=Yn({rel:"modulepreload",href:e},t),el.set(i,e),r.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(_4(i)))return}n=r.createElement("link"),Ii(n,"link",e),gi(n),r.head.appendChild(n)}}}function fie(e,t,r){Tc.S(e,t,r);var n=y1;if(n&&e){var a=Wh(n).hoistableStyles,i=c1(e);t=t||"default";var o=a.get(i);if(!o){var s={loading:0,preload:null};if(o=n.querySelector(M4(i)))s.loading=5;else{e=Yn({rel:"stylesheet",href:e,"data-precedence":t},r),(r=el.get(i))&&nC(e,r);var l=o=n.createElement("link");gi(l),Ii(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,Yb(o,t,n)}o={type:"stylesheet",instance:o,count:1,state:s},a.set(i,o)}}}function pie(e,t){Tc.X(e,t);var r=y1;if(r&&e){var n=Wh(r).hoistableScripts,a=b1(e),i=n.get(a);i||(i=r.querySelector(_4(a)),i||(e=Yn({src:e,async:!0},t),(t=el.get(a))&&aC(e,t),i=r.createElement("script"),gi(i),Ii(i,"link",e),r.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function hie(e,t){Tc.M(e,t);var r=y1;if(r&&e){var n=Wh(r).hoistableScripts,a=b1(e),i=n.get(a);i||(i=r.querySelector(_4(a)),i||(e=Yn({src:e,async:!0,type:"module"},t),(t=el.get(a))&&aC(e,t),i=r.createElement("script"),gi(i),Ii(i,"link",e),r.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function OB(e,t,r,n){var a=(a=Y0.current)?C5(a):null;if(!a)throw Error($e(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=c1(r.href),r=Wh(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=c1(r.href);var i=Wh(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(M4(e)))&&!i._p&&(o.instance=i,o.state.loading=5),el.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},el.set(e,r),i||mie(a,e,r,o.state))),t&&n===null)throw Error($e(528,""));return o}if(t&&n!==null)throw Error($e(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=b1(r),r=Wh(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($e(444,e))}}function c1(e){return'href="'+Xs(e)+'"'}function M4(e){return'link[rel="stylesheet"]['+e+"]"}function CO(e){return Yn({},e,{"data-precedence":e.precedence,precedence:null})}function mie(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}),Ii(t,"link",r),gi(t),e.head.appendChild(t))}function b1(e){return'[src="'+Xs(e)+'"]'}function _4(e){return"script[async]"+e}function PB(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Xs(r.href)+'"]');if(n)return t.instance=n,gi(n),n;var a=Yn({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),gi(n),Ii(n,"style",a),Yb(n,r.precedence,e),t.instance=n;case"stylesheet":a=c1(r.href);var i=e.querySelector(M4(a));if(i)return t.state.loading|=4,t.instance=i,gi(i),i;n=CO(r),(a=el.get(a))&&nC(n,a),i=(e.ownerDocument||e).createElement("link"),gi(i);var o=i;return o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),Ii(i,"link",n),t.state.loading|=4,Yb(i,r.precedence,e),t.instance=i;case"script":return i=b1(r.src),(a=e.querySelector(_4(i)))?(t.instance=a,gi(a),a):(n=r,(a=el.get(i))&&(n=Yn({},r),aC(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),gi(a),Ii(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error($e(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Yb(n,r.precedence,e));return t.instance}function Yb(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 nC(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function aC(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Jb=null;function FB(e,t,r){if(Jb===null){var n=new Map,a=Jb=new Map;a.set(r,n)}else a=Jb,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[x4]||i[Ti]||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 qB(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function gie(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 MO(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function yie(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=c1(n.href),i=t.querySelector(M4(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=M5.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=i,gi(i);return}i=t.ownerDocument||t,n=CO(n),(a=el.get(a))&&nC(n,a),i=i.createElement("link"),gi(i);var o=i;o._p=new Promise(function(s,l){o.onload=s,o.onerror=l}),Ii(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=M5.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var yk=0;function bie(e,t){return e.stylesheets&&e.count===0&&Zb(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var n=setTimeout(function(){if(e.stylesheets&&Zb(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&yk===0&&(yk=62500*Zae());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zb(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>yk?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function M5(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zb(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _5=null;function Zb(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_5=new Map,t.forEach(xie,e),_5=null,M5.call(e))}function xie(e,t){if(!(t.state.loading&4)){var r=_5.get(e);if(r)var n=r.get(null);else{r=new Map,_5.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=M5.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 f4={$$typeof:bc,Provider:null,Consumer:null,_currentValue:If,_currentValue2:If,_threadCount:0};function vie(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=jw(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jw(0),this.hiddenUpdates=jw(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 _O(e,t,r,n,a,i,o,s,l,u,c,f){return e=new vie(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=ES(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:n,isDehydrated:r,cache:t},zS(i),e}function AO(e){return e?(e=Uh,e):Uh}function LO(e,t,r,n,a,i){a=AO(a),n.context===null?n.context=a:n.pendingContext=a,n=Z0(t),n.payload={element:r},i=i===void 0?null:i,i!==null&&(n.callback=i),r=Q0(e,n,t),r!==null&&(Ho(r,e,t),Vg(r,e,t))}function $B(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function iC(e,t){$B(e,t),(e=e.alternate)&&$B(e,t)}function TO(e){if(e.tag===13||e.tag===31){var t=Kf(e,67108864);t!==null&&Ho(t,e,67108864),iC(e,67108864)}}function HB(e){if(e.tag===13||e.tag===31){var t=vs();t=gS(t);var r=Kf(e,t);r!==null&&Ho(r,e,t),iC(e,t)}}var A5=!0;function wie(e,t,r,n){var a=Zt.T;Zt.T=null;var i=ln.p;try{ln.p=2,oC(e,t,r,n)}finally{ln.p=i,Zt.T=a}}function kie(e,t,r,n){var a=Zt.T;Zt.T=null;var i=ln.p;try{ln.p=8,oC(e,t,r,n)}finally{ln.p=i,Zt.T=a}}function oC(e,t,r,n){if(A5){var a=dS(n);if(a===null)mk(e,t,n,L5,r),jB(e,n);else if(Cie(a,e,t,r,n))n.stopPropagation();else if(jB(e,n),t&4&&-1<Sie.indexOf(e)){for(;a!==null;){var i=p1(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Tf(i.pendingLanes);if(o!==0){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var l=1<<31-xs(o);s.entanglements[1]|=l,o&=~l}yu(i),(sn&6)===0&&(y5=ys()+500,C4(0,!1))}}break;case 31:case 13:s=Kf(i,2),s!==null&&Ho(s,i,2),$5(),iC(i,2)}if(i=dS(n),i===null&&mk(e,t,n,L5,r),i===a)break;a=i}a!==null&&n.stopPropagation()}else mk(e,t,n,null,r)}}function dS(e){return e=vS(e),sC(e)}var L5=null;function sC(e){if(L5=null,e=Ph(e),e!==null){var t=m4(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=XB(t),e!==null)return e;e=null}else if(r===31){if(e=YB(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 L5=e,null}function EO(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(cne()){case eR:return 2;case tR:return 8;case n5:case dne:return 32;case rR:return 268435456;default:return 32}default:return 32}}var fS=!1,rd=null,nd=null,ad=null,p4=new Map,h4=new Map,U0=[],Sie="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 jB(e,t){switch(e){case"focusin":case"focusout":rd=null;break;case"dragenter":case"dragleave":nd=null;break;case"mouseover":case"mouseout":ad=null;break;case"pointerover":case"pointerout":p4.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":h4.delete(t.pointerId)}}function Rg(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=p1(t),t!==null&&TO(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Cie(e,t,r,n,a){switch(t){case"focusin":return rd=Rg(rd,e,t,r,n,a),!0;case"dragenter":return nd=Rg(nd,e,t,r,n,a),!0;case"mouseover":return ad=Rg(ad,e,t,r,n,a),!0;case"pointerover":var i=a.pointerId;return p4.set(i,Rg(p4.get(i)||null,e,t,r,n,a)),!0;case"gotpointercapture":return i=a.pointerId,h4.set(i,Rg(h4.get(i)||null,e,t,r,n,a)),!0}return!1}function DO(e){var t=Ph(e.target);if(t!==null){var r=m4(t);if(r!==null){if(t=r.tag,t===13){if(t=XB(r),t!==null){e.blockedOn=t,_z(e.priority,function(){HB(r)});return}}else if(t===31){if(t=YB(r),t!==null){e.blockedOn=t,_z(e.priority,function(){HB(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 Qb(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=dS(e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Ek=n,r.target.dispatchEvent(n),Ek=null}else return t=p1(r),t!==null&&TO(t),e.blockedOn=r,!1;t.shift()}return!0}function UB(e,t,r){Qb(e)&&r.delete(t)}function Mie(){fS=!1,rd!==null&&Qb(rd)&&(rd=null),nd!==null&&Qb(nd)&&(nd=null),ad!==null&&Qb(ad)&&(ad=null),p4.forEach(UB),h4.forEach(UB)}function Ob(e,t){e.blockedOn===t&&(e.blockedOn=null,fS||(fS=!0,ni.unstable_scheduleCallback(ni.unstable_NormalPriority,Mie)))}var Pb=null;function KB(e){Pb!==e&&(Pb=e,ni.unstable_scheduleCallback(ni.unstable_NormalPriority,function(){Pb===e&&(Pb=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(sC(n||r)===null)continue;break}var i=p1(r);i!==null&&(e.splice(t,3),t-=3,Vk(i,{pending:!0,data:a,method:r.method,action:n},n,a))}}))}function d1(e){function t(l){return Ob(l,e)}rd!==null&&Ob(rd,e),nd!==null&&Ob(nd,e),ad!==null&&Ob(ad,e),p4.forEach(t),h4.forEach(t);for(var r=0;r<U0.length;r++){var n=U0[r];n.blockedOn===e&&(n.blockedOn=null)}for(;0<U0.length&&(r=U0[0],r.blockedOn===null);)DO(r),r.blockedOn===null&&U0.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[jo]||null;if(typeof i=="function")o||KB(r);else if(o){var s=null;if(i&&i.hasAttribute("formAction")){if(a=i,o=i[jo]||null)s=o.formAction;else if(sC(a)!==null)continue}else s=o.action;typeof s=="function"?r[n+1]=s:(r.splice(n,3),n-=3),KB(r)}}}function IO(){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 lC(e){this._internalRoot=e}U5.prototype.render=lC.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($e(409));var r=t.current,n=vs();LO(r,n,e,t,null,null)};U5.prototype.unmount=lC.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;LO(e.current,2,null,e,null,null),$5(),t[f1]=null}};function U5(e){this._internalRoot=e}U5.prototype.unstable_scheduleHydration=function(e){if(e){var t=sR();e={blockedOn:null,target:e,priority:t};for(var r=0;r<U0.length&&t!==0&&t<U0[r].priority;r++);U0.splice(r,0,e),r===0&&DO(e)}};var VB=GB.version;if(VB!=="19.2.3")throw Error($e(527,VB,"19.2.3"));ln.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error($e(188)):(e=Object.keys(e).join(","),Error($e(268,e)));return e=nne(t),e=e!==null?JB(e):null,e=e===null?null:e.stateNode,e};var _ie={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:Zt,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(Ng=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ng.isDisabled&&Ng.supportsFiber))try{g4=Ng.inject(_ie),bs=Ng}catch(e){}var Ng;K5.createRoot=function(e,t){if(!WB(e))throw Error($e(299));var r=!1,n="",a=SN,i=CN,o=MN;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=_O(e,1,!1,null,null,r,n,null,a,i,o,IO),e[f1]=t.current,rC(e),new lC(t)};K5.hydrateRoot=function(e,t,r){if(!WB(e))throw Error($e(299));var n=!1,a="",i=SN,o=CN,s=MN,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=_O(e,1,!0,t,r!=null?r:null,n,a,l,i,o,s,IO),t.context=AO(null),r=t.current,n=vs(),n=gS(n),a=Z0(n),a.callback=null,Q0(r,a,n),r=n,t.current.lanes=r,b4(t,r),yu(t),e[f1]=t.current,rC(e),new U5(t)};K5.version="19.2.3"});var uC=hi((h7e,RO)=>{"use strict";function BO(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(BO)}catch(e){console.error(e)}}BO(),RO.exports=zO()});var OO=hi(V5=>{"use strict";var Aie=Symbol.for("react.transitional.element"),Lie=Symbol.for("react.fragment");function NO(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:Aie,type:e,key:n,ref:t!==void 0?t:null,props:r}}V5.Fragment=Lie;V5.jsx=NO;V5.jsxs=NO});var $t=hi((g7e,PO)=>{"use strict";PO.exports=OO()});var tM=hi((O4,eM)=>{"use strict";(function(t,r){typeof O4=="object"&&typeof eM=="object"?eM.exports=r():typeof define=="function"&&define.amd?define([],r):typeof O4=="object"?O4.katex=r():t.katex=r()})(typeof self!="undefined"?self:O4,function(){return(function(){"use strict";var e={};(function(){e.d=function(g,h){for(var y in h)e.o(h,y)&&!e.o(g,y)&&Object.defineProperty(g,y,{enumerable:!0,get:h[y]})}})(),(function(){e.o=function(g,h){return Object.prototype.hasOwnProperty.call(g,h)}})();var t={};e.d(t,{default:function(){return _re}});class r{constructor(h,y){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let x="KaTeX parse error: "+h,_,z,P=y&&y.loc;if(P&&P.start<=P.end){let J=P.lexer.input;_=P.start,z=P.end,_===J.length?x+=" at end of input: ":x+=" at position "+(_+1)+": ";let se=J.slice(_,z).replace(/[^]/g,"$&\u0332"),ge;_>15?ge="\u2026"+J.slice(_-15,_):ge=J.slice(0,_);let be;z+15<J.length?be=J.slice(z,z+15)+"\u2026":be=J.slice(z),x+=ge+se+be}let K=new Error(x);return K.name="ParseError",K.__proto__=r.prototype,K.position=_,_!=null&&z!=null&&(K.length=z-_),K.rawMessage=h,K}}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={"&":"&",">":">","<":"<",'"':""","'":"'"},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 b={deflt:a,escape:u,hyphenate:o,getBaseElem:c,isCharacterBox:f,protocolFromUrl:function(g){let h=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*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 v={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,y=Array.isArray(h)?h[0]:h;if(typeof y!="string")return y.enum[0];switch(y){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 y in v)if(v.hasOwnProperty(y)){let x=v[y];this[y]=h[y]!==void 0?x.processor?x.processor(h[y]):h[y]:k(x)}}reportNonstrict(h,y,x){let _=this.strict;if(typeof _=="function"&&(_=_(h,y,x)),!(!_||_==="ignore")){if(_===!0||_==="error")throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+(y+" ["+h+"]"),x);_==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(y+" ["+h+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+_+"': "+y+" ["+h+"]"))}}useStrictBehavior(h,y,x){let _=this.strict;if(typeof _=="function")try{_=_(h,y,x)}catch(z){_="error"}return!_||_==="ignore"?!1:_===!0||_==="error"?!0:_==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(y+" ["+h+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+_+"': "+y+" ["+h+"]")),!1)}isTrusted(h){if(h.url&&!h.protocol){let x=b.protocolFromUrl(h.url);if(x==null)return!1;h.protocol=x}return!!(typeof this.trust=="function"?this.trust(h):this.trust)}}class S{constructor(h,y,x){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=h,this.size=y,this.cramped=x}sup(){return V[re[this.id]]}sub(){return V[xe[this.id]]}fracNum(){return V[oe[this.id]]}fracDen(){return V[le[this.id]]}cramp(){return V[Se[this.id]]}text(){return V[_e[this.id]]}isTight(){return this.size>=2}}let T=0,I=1,B=2,O=3,N=4,j=5,H=6,Y=7,V=[new S(T,0,!1),new S(I,0,!0),new S(B,1,!1),new S(O,1,!0),new S(N,2,!1),new S(j,2,!0),new S(H,3,!1),new S(Y,3,!0)],re=[N,j,N,j,H,Y,H,Y],xe=[j,j,j,j,Y,Y,Y,Y],oe=[B,O,N,j,H,Y,H,Y],le=[O,O,j,j,Y,Y,Y,Y],Se=[I,I,O,O,j,j,Y,Y],_e=[T,I,B,O,B,O,B,O];var de={DISPLAY:V[T],TEXT:V[B],SCRIPT:V[N],SCRIPTSCRIPT:V[H]};let me=[{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 Ue(g){for(let h=0;h<me.length;h++){let y=me[h];for(let x=0;x<y.blocks.length;x++){let _=y.blocks[x];if(g>=_[0]&&g<=_[1])return y.name}}return null}let Le=[];me.forEach(g=>g.blocks.forEach(h=>Le.push(...h)));function Ie(g){for(let h=0;h<Le.length;h+=2)if(g>=Le[h]&&g<=Le[h+1])return!0;return!1}let ye=80,Me=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
|
-
`},$ee=Oee(rxe)(Hee),jee={config:exe}});var Kee,Vee=mt(()=>{"use strict";Kee=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 LD(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],LD(e[r],t[r]))}),_D(_D({},e),t)}var Gee=mt(()=>{"use strict";AD()});function _9(e){var t=!1,r=new Promise(function(n,a){e.then(function(i){return t?a(nxe):n(i)}),e.catch(a)});return r.cancel=function(){return t=!0},r}var nxe,Wee=mt(()=>{"use strict";nxe={type:"cancelation",msg:"operation is manually canceled"}});function oxe(e){var t=jee.config(e),r=t.monaco,n=Tee(t,axe);A9(function(a){return{config:LD(a.config,n),monaco:r}})}function sxe(){var e=Wy(function(t){var r=t.monaco,n=t.isInitialized,a=t.resolve;return{monaco:r,isInitialized:n,resolve:a}});if(!e.isInitialized){if(A9({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),_9(TD);if(window.monaco&&window.monaco.editor)return Yee(window.monaco),e.resolve(window.monaco),_9(TD);Kee(lxe,cxe)(dxe)}return _9(TD)}function lxe(e){return document.body.appendChild(e)}function uxe(e){var t=document.createElement("script");return e&&(t.src=e),t}function cxe(e){var t=Wy(function(n){var a=n.config,i=n.reject;return{config:a,reject:i}}),r=uxe("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function dxe(){var e=Wy(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;Yee(n),e.resolve(n)},function(r){e.reject(r)})}function Yee(e){Wy().monaco||A9({monaco:e})}function fxe(){return Wy(function(e){var t=e.monaco;return t})}var axe,ixe,Xee,Wy,A9,TD,tc,Jee=mt(()=>{"use strict";AD();Bee();Nee();Uee();Vee();Gee();Wee();axe=["monaco"],ixe=zee.create({config:Ree,isInitialized:!1,resolve:null,reject:null,monaco:null}),Xee=Eee(ixe,2),Wy=Xee[0],A9=Xee[1];TD=new Promise(function(e,t){return A9({resolve:e,reject:t})}),tc={config:oxe,init:sxe,__getMonacoInstance:fxe}});var Xy=mt(()=>{"use strict";Jee()});var ste={};mb(ste,{DiffEditor:()=>Axe,Editor:()=>ote,default:()=>Bxe,loader:()=>tc,useMonaco:()=>Txe});function gxe({children:e}){return ete.default.createElement("div",{style:mxe.container},e)}function xxe({width:e,height:t,isEditorReady:r,loading:n,_ref:a,className:i,wrapperProps:o}){return T9.default.createElement("section",ie({style:Xe(ie({},ED.wrapper),{width:e,height:t})},o),!r&&T9.default.createElement(bxe,null,n),T9.default.createElement("div",{ref:a,style:ie(ie({},ED.fullWidth),!r&&ED.hide),className:i}))}function wxe(e){(0,rte.useEffect)(e,[])}function kxe(e,t,r=!0){let n=(0,E9.useRef)(!0);(0,E9.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)}function Yy(){}function rg(e,t,r,n){return Sxe(e,n)||Cxe(e,t,r,n)}function Sxe(e,t){return e.editor.getModel(nte(e,t))}function Cxe(e,t,r,n){return e.editor.createModel(t,r,n?nte(e,n):void 0)}function nte(e,t){return e.Uri.parse(t)}function Mxe({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:b,wrapperProps:v={},beforeMount:k=Yy,onMount:w=Yy}){let[S,T]=(0,Mi.useState)(!1),[I,B]=(0,Mi.useState)(!0),O=(0,Mi.useRef)(null),N=(0,Mi.useRef)(null),j=(0,Mi.useRef)(null),H=(0,Mi.useRef)(w),Y=(0,Mi.useRef)(k),V=(0,Mi.useRef)(!1);DD(()=>{let le=tc.init();return le.then(Se=>(N.current=Se)&&B(!1)).catch(Se=>(Se==null?void 0:Se.type)!=="cancelation"&&console.error("Monaco initialization: error:",Se)),()=>O.current?oe():le.cancel()}),Fs(()=>{if(O.current&&N.current){let le=O.current.getOriginalEditor(),Se=rg(N.current,e||"",n||r||"text",i||"");Se!==le.getModel()&&le.setModel(Se)}},[i],S),Fs(()=>{if(O.current&&N.current){let le=O.current.getModifiedEditor(),Se=rg(N.current,t||"",a||r||"text",o||"");Se!==le.getModel()&&le.setModel(Se)}},[o],S),Fs(()=>{let le=O.current.getModifiedEditor();le.getOption(N.current.editor.EditorOption.readOnly)?le.setValue(t||""):t!==le.getValue()&&(le.executeEdits("",[{range:le.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),le.pushUndoStop())},[t],S),Fs(()=>{var le,Se;(Se=(le=O.current)==null?void 0:le.getModel())==null||Se.original.setValue(e||"")},[e],S),Fs(()=>{let{original:le,modified:Se}=O.current.getModel();N.current.editor.setModelLanguage(le,n||r||"text"),N.current.editor.setModelLanguage(Se,a||r||"text")},[r,n,a],S),Fs(()=>{var le;(le=N.current)==null||le.editor.setTheme(u)},[u],S),Fs(()=>{var le;(le=O.current)==null||le.updateOptions(f)},[f],S);let re=(0,Mi.useCallback)(()=>{var _e;if(!N.current)return;Y.current(N.current);let le=rg(N.current,e||"",n||r||"text",i||""),Se=rg(N.current,t||"",a||r||"text",o||"");(_e=O.current)==null||_e.setModel({original:le,modified:Se})},[r,t,a,e,n,i,o]),xe=(0,Mi.useCallback)(()=>{var le;!V.current&&j.current&&(O.current=N.current.editor.createDiffEditor(j.current,ie({automaticLayout:!0},f)),re(),(le=N.current)==null||le.editor.setTheme(u),T(!0),V.current=!0)},[f,u,re]);(0,Mi.useEffect)(()=>{S&&H.current(O.current,N.current)},[S]),(0,Mi.useEffect)(()=>{!I&&!S&&xe()},[I,S,xe]);function oe(){var Se,_e,de,me;let le=(Se=O.current)==null?void 0:Se.getModel();s||((_e=le==null?void 0:le.original)==null||_e.dispose()),l||((de=le==null?void 0:le.modified)==null||de.dispose()),(me=O.current)==null||me.dispose()}return Mi.default.createElement(tte,{width:p,height:d,isEditorReady:S,loading:c,_ref:j,className:b,wrapperProps:v})}function Lxe(){let[e,t]=(0,ate.useState)(tc.__getMonacoInstance());return DD(()=>{let r;return e||(r=tc.init(),r.then(n=>{t(n)})),()=>r==null?void 0:r.cancel()}),e}function Exe(e){let t=(0,D9.useRef)();return(0,D9.useEffect)(()=>{t.current=e},[e]),t.current}function Ixe({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:b="100%",className:v,wrapperProps:k={},beforeMount:w=Yy,onMount:S=Yy,onChange:T,onValidate:I=Yy}){let[B,O]=(0,Ba.useState)(!1),[N,j]=(0,Ba.useState)(!0),H=(0,Ba.useRef)(null),Y=(0,Ba.useRef)(null),V=(0,Ba.useRef)(null),re=(0,Ba.useRef)(S),xe=(0,Ba.useRef)(w),oe=(0,Ba.useRef)(),le=(0,Ba.useRef)(n),Se=Dxe(i),_e=(0,Ba.useRef)(!1),de=(0,Ba.useRef)(!1);DD(()=>{let Le=tc.init();return Le.then(Ie=>(H.current=Ie)&&j(!1)).catch(Ie=>(Ie==null?void 0:Ie.type)!=="cancelation"&&console.error("Monaco initialization: error:",Ie)),()=>Y.current?Ue():Le.cancel()}),Fs(()=>{var Ie,ye,Me,He;let Le=rg(H.current,e||n||"",t||a||"",i||r||"");Le!==((Ie=Y.current)==null?void 0:Ie.getModel())&&(f&&L9.set(Se,(ye=Y.current)==null?void 0:ye.saveViewState()),(Me=Y.current)==null||Me.setModel(Le),f&&((He=Y.current)==null||He.restoreViewState(L9.get(i))))},[i],B),Fs(()=>{var Le;(Le=Y.current)==null||Le.updateOptions(u)},[u],B),Fs(()=>{!Y.current||n===void 0||(Y.current.getOption(H.current.editor.EditorOption.readOnly)?Y.current.setValue(n):n!==Y.current.getValue()&&(de.current=!0,Y.current.executeEdits("",[{range:Y.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),Y.current.pushUndoStop(),de.current=!1))},[n],B),Fs(()=>{var Ie,ye;let Le=(Ie=Y.current)==null?void 0:Ie.getModel();Le&&a&&((ye=H.current)==null||ye.editor.setModelLanguage(Le,a))},[a],B),Fs(()=>{var Le;s!==void 0&&((Le=Y.current)==null||Le.revealLine(s))},[s],B),Fs(()=>{var Le;(Le=H.current)==null||Le.editor.setTheme(o)},[o],B);let me=(0,Ba.useCallback)(()=>{var Le;if(!(!V.current||!H.current)&&!_e.current){xe.current(H.current);let Ie=i||r,ye=rg(H.current,n||e||"",t||a||"",Ie||"");Y.current=(Le=H.current)==null?void 0:Le.editor.create(V.current,ie({model:ye,automaticLayout:!0},u),c),f&&Y.current.restoreViewState(L9.get(Ie)),H.current.editor.setTheme(o),s!==void 0&&Y.current.revealLine(s),O(!0),_e.current=!0}},[e,t,r,n,a,i,u,c,f,o,s]);(0,Ba.useEffect)(()=>{B&&re.current(Y.current,H.current)},[B]),(0,Ba.useEffect)(()=>{!N&&!B&&me()},[N,B,me]),le.current=n,(0,Ba.useEffect)(()=>{var Le,Ie;B&&T&&((Le=oe.current)==null||Le.dispose(),oe.current=(Ie=Y.current)==null?void 0:Ie.onDidChangeModelContent(ye=>{de.current||T(Y.current.getValue(),ye)}))},[B,T]),(0,Ba.useEffect)(()=>{if(B){let Le=H.current.editor.onDidChangeMarkers(Ie=>{var Me;let ye=(Me=Y.current.getModel())==null?void 0:Me.uri;if(ye&&Ie.find(He=>He.path===ye.path)){let He=H.current.editor.getModelMarkers({resource:ye});I==null||I(He)}});return()=>{Le==null||Le.dispose()}}return()=>{}},[B,I]);function Ue(){var Le,Ie;(Le=oe.current)==null||Le.dispose(),d?f&&L9.set(i,Y.current.saveViewState()):(Ie=Y.current.getModel())==null||Ie.dispose(),Y.current.dispose()}return Ba.default.createElement(tte,{width:p,height:b,isEditorReady:B,loading:l,_ref:V,className:v,wrapperProps:k})}var Zee,Mi,Qee,T9,ete,rte,E9,ate,ite,Ba,D9,pxe,ED,hxe,mxe,yxe,bxe,vxe,tte,DD,Fs,_xe,Axe,Txe,Dxe,L9,zxe,ote,Bxe,lte=mt(()=>{"use strict";Xy();Zee=Pe(kt(),1),Mi=Pe(kt(),1);Xy();Qee=Pe(kt(),1),T9=Pe(kt(),1),ete=Pe(kt(),1),rte=Pe(kt(),1),E9=Pe(kt(),1),ate=Pe(kt(),1);Xy();ite=Pe(kt(),1),Ba=Pe(kt(),1);Xy();D9=Pe(kt(),1),pxe={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ED=pxe,hxe={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},mxe=hxe;yxe=gxe,bxe=yxe;vxe=xxe,tte=(0,Qee.memo)(vxe);DD=wxe;Fs=kxe;_xe=Mxe,Axe=(0,Zee.memo)(_xe);Txe=Lxe;Dxe=Exe,L9=new Map;zxe=Ixe,ote=(0,ite.memo)(zxe),Bxe=ote});var Gve={};mb(Gve,{EdpireAssessment:()=>Vve,buildSubmitPayload:()=>Yte,flattenAssessment:()=>Wte,flattenReview:()=>Xte,renderQuestion:()=>Gte});var KD=Pe(kt()),VD=Pe(uC());var mh=Pe(kt());var cr=Pe(kt());var hh=Pe($t(),1),A0=Pe(kt(),1);function FO(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 Ec=class{constructor(){this.emitter=FO(),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()})}},qO="__edpireGlobalAnswerBus",$O=globalThis,HO,G5=(HO=$O[qO])!=null?HO:$O[qO]=new Ec;var VO=Pe($t(),1),W5=Pe(kt(),1);var jO="__edpireAnswerBusContext",UO=globalThis,KO,GO=(KO=UO[jO])!=null?KO:UO[jO]=(0,W5.createContext)(G5);function bi(){return(0,W5.useContext)(GO)}function X5({children:e,bus:t=new Ec}){return(0,VO.jsx)(GO.Provider,{value:t,children:e})}var er=Pe($t(),1),Vi=Pe(kt(),1);function WO(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=WO(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function cC(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=WO(e))&&(n&&(n+=" "),n+=t);return n}var ar=cC;var ir=Pe($t(),1);var Vo=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}},Ss=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,Vo.range(this,t))}},nt=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}};nt.prototype.__proto__=Error.prototype;var Tie=function(t,r){return t===void 0?r:t},Eie=/([A-Z])/g,Die=function(t){return t.replace(Eie,"-$1").toLowerCase()},Iie={"&":"&",">":">","<":"<",'"':""","'":"'"},zie=/[&><"']/g;function Bie(e){return String(e).replace(zie,t=>Iie[t])}var _P=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},Rie=function(t){var r=_P(t);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},Nie=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},Oie=function(t){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},Jr={deflt:Tie,escape:Bie,hyphenate:Die,getBaseElem:_P,isCharacterBox:Rie,protocolFromUrl:Oie},s6={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 Pie(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 D4=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 s6)if(s6.hasOwnProperty(r)){var n=s6[r];this[r]=t[r]!==void 0?n.processor?n.processor(t[r]):t[r]:Pie(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 nt("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=Jr.protocolFromUrl(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}},bu=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 xu[Fie[this.id]]}sub(){return xu[qie[this.id]]}fracNum(){return xu[$ie[this.id]]}fracDen(){return xu[Hie[this.id]]}cramp(){return xu[jie[this.id]]}text(){return xu[Uie[this.id]]}isTight(){return this.size>=2}},NC=0,u6=1,v1=2,zc=3,I4=4,tl=5,w1=6,go=7,xu=[new bu(NC,0,!1),new bu(u6,0,!0),new bu(v1,1,!1),new bu(zc,1,!0),new bu(I4,2,!1),new bu(tl,2,!0),new bu(w1,3,!1),new bu(go,3,!0)],Fie=[I4,tl,I4,tl,w1,go,w1,go],qie=[tl,tl,tl,tl,go,go,go,go],$ie=[v1,zc,I4,tl,w1,go,w1,go],Hie=[zc,zc,tl,tl,go,go,go,go],jie=[u6,u6,zc,zc,tl,tl,go,go],Uie=[NC,u6,v1,zc,v1,zc,v1,zc],jt={DISPLAY:xu[NC],TEXT:xu[v1],SCRIPT:xu[I4],SCRIPTSCRIPT:xu[w1]},CC=[{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 Kie(e){for(var t=0;t<CC.length;t++)for(var r=CC[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 l6=[];CC.forEach(e=>e.blocks.forEach(t=>l6.push(...t)));function AP(e){for(var t=0;t<l6.length;t+=2)if(e>=l6[t]&&e<=l6[t+1])return!0;return!1}var x1=80,Vie=function(t,r){return"M95,"+(622+t+r)+`
|
|
3646
|
+
`},$ee=Oee(rxe)(Hee),jee={config:exe}});var Kee,Vee=mt(()=>{"use strict";Kee=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 LD(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],LD(e[r],t[r]))}),_D(_D({},e),t)}var Gee=mt(()=>{"use strict";AD()});function _9(e){var t=!1,r=new Promise(function(n,a){e.then(function(i){return t?a(nxe):n(i)}),e.catch(a)});return r.cancel=function(){return t=!0},r}var nxe,Wee=mt(()=>{"use strict";nxe={type:"cancelation",msg:"operation is manually canceled"}});function oxe(e){var t=jee.config(e),r=t.monaco,n=Tee(t,axe);A9(function(a){return{config:LD(a.config,n),monaco:r}})}function sxe(){var e=Wy(function(t){var r=t.monaco,n=t.isInitialized,a=t.resolve;return{monaco:r,isInitialized:n,resolve:a}});if(!e.isInitialized){if(A9({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),_9(TD);if(window.monaco&&window.monaco.editor)return Yee(window.monaco),e.resolve(window.monaco),_9(TD);Kee(lxe,cxe)(dxe)}return _9(TD)}function lxe(e){return document.body.appendChild(e)}function uxe(e){var t=document.createElement("script");return e&&(t.src=e),t}function cxe(e){var t=Wy(function(n){var a=n.config,i=n.reject;return{config:a,reject:i}}),r=uxe("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function dxe(){var e=Wy(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;Yee(n),e.resolve(n)},function(r){e.reject(r)})}function Yee(e){Wy().monaco||A9({monaco:e})}function fxe(){return Wy(function(e){var t=e.monaco;return t})}var axe,ixe,Xee,Wy,A9,TD,tc,Jee=mt(()=>{"use strict";AD();Bee();Nee();Uee();Vee();Gee();Wee();axe=["monaco"],ixe=zee.create({config:Ree,isInitialized:!1,resolve:null,reject:null,monaco:null}),Xee=Eee(ixe,2),Wy=Xee[0],A9=Xee[1];TD=new Promise(function(e,t){return A9({resolve:e,reject:t})}),tc={config:oxe,init:sxe,__getMonacoInstance:fxe}});var Xy=mt(()=>{"use strict";Jee()});var ste={};mb(ste,{DiffEditor:()=>Axe,Editor:()=>ote,default:()=>Bxe,loader:()=>tc,useMonaco:()=>Txe});function gxe({children:e}){return ete.default.createElement("div",{style:mxe.container},e)}function xxe({width:e,height:t,isEditorReady:r,loading:n,_ref:a,className:i,wrapperProps:o}){return T9.default.createElement("section",ie({style:Xe(ie({},ED.wrapper),{width:e,height:t})},o),!r&&T9.default.createElement(bxe,null,n),T9.default.createElement("div",{ref:a,style:ie(ie({},ED.fullWidth),!r&&ED.hide),className:i}))}function wxe(e){(0,rte.useEffect)(e,[])}function kxe(e,t,r=!0){let n=(0,E9.useRef)(!0);(0,E9.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)}function Yy(){}function rg(e,t,r,n){return Sxe(e,n)||Cxe(e,t,r,n)}function Sxe(e,t){return e.editor.getModel(nte(e,t))}function Cxe(e,t,r,n){return e.editor.createModel(t,r,n?nte(e,n):void 0)}function nte(e,t){return e.Uri.parse(t)}function Mxe({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:b,wrapperProps:v={},beforeMount:k=Yy,onMount:w=Yy}){let[S,T]=(0,Mi.useState)(!1),[I,B]=(0,Mi.useState)(!0),O=(0,Mi.useRef)(null),N=(0,Mi.useRef)(null),j=(0,Mi.useRef)(null),H=(0,Mi.useRef)(w),Y=(0,Mi.useRef)(k),V=(0,Mi.useRef)(!1);DD(()=>{let le=tc.init();return le.then(Se=>(N.current=Se)&&B(!1)).catch(Se=>(Se==null?void 0:Se.type)!=="cancelation"&&console.error("Monaco initialization: error:",Se)),()=>O.current?oe():le.cancel()}),Fs(()=>{if(O.current&&N.current){let le=O.current.getOriginalEditor(),Se=rg(N.current,e||"",n||r||"text",i||"");Se!==le.getModel()&&le.setModel(Se)}},[i],S),Fs(()=>{if(O.current&&N.current){let le=O.current.getModifiedEditor(),Se=rg(N.current,t||"",a||r||"text",o||"");Se!==le.getModel()&&le.setModel(Se)}},[o],S),Fs(()=>{let le=O.current.getModifiedEditor();le.getOption(N.current.editor.EditorOption.readOnly)?le.setValue(t||""):t!==le.getValue()&&(le.executeEdits("",[{range:le.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),le.pushUndoStop())},[t],S),Fs(()=>{var le,Se;(Se=(le=O.current)==null?void 0:le.getModel())==null||Se.original.setValue(e||"")},[e],S),Fs(()=>{let{original:le,modified:Se}=O.current.getModel();N.current.editor.setModelLanguage(le,n||r||"text"),N.current.editor.setModelLanguage(Se,a||r||"text")},[r,n,a],S),Fs(()=>{var le;(le=N.current)==null||le.editor.setTheme(u)},[u],S),Fs(()=>{var le;(le=O.current)==null||le.updateOptions(f)},[f],S);let re=(0,Mi.useCallback)(()=>{var _e;if(!N.current)return;Y.current(N.current);let le=rg(N.current,e||"",n||r||"text",i||""),Se=rg(N.current,t||"",a||r||"text",o||"");(_e=O.current)==null||_e.setModel({original:le,modified:Se})},[r,t,a,e,n,i,o]),xe=(0,Mi.useCallback)(()=>{var le;!V.current&&j.current&&(O.current=N.current.editor.createDiffEditor(j.current,ie({automaticLayout:!0},f)),re(),(le=N.current)==null||le.editor.setTheme(u),T(!0),V.current=!0)},[f,u,re]);(0,Mi.useEffect)(()=>{S&&H.current(O.current,N.current)},[S]),(0,Mi.useEffect)(()=>{!I&&!S&&xe()},[I,S,xe]);function oe(){var Se,_e,de,me;let le=(Se=O.current)==null?void 0:Se.getModel();s||((_e=le==null?void 0:le.original)==null||_e.dispose()),l||((de=le==null?void 0:le.modified)==null||de.dispose()),(me=O.current)==null||me.dispose()}return Mi.default.createElement(tte,{width:p,height:d,isEditorReady:S,loading:c,_ref:j,className:b,wrapperProps:v})}function Lxe(){let[e,t]=(0,ate.useState)(tc.__getMonacoInstance());return DD(()=>{let r;return e||(r=tc.init(),r.then(n=>{t(n)})),()=>r==null?void 0:r.cancel()}),e}function Exe(e){let t=(0,D9.useRef)();return(0,D9.useEffect)(()=>{t.current=e},[e]),t.current}function Ixe({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:b="100%",className:v,wrapperProps:k={},beforeMount:w=Yy,onMount:S=Yy,onChange:T,onValidate:I=Yy}){let[B,O]=(0,Ba.useState)(!1),[N,j]=(0,Ba.useState)(!0),H=(0,Ba.useRef)(null),Y=(0,Ba.useRef)(null),V=(0,Ba.useRef)(null),re=(0,Ba.useRef)(S),xe=(0,Ba.useRef)(w),oe=(0,Ba.useRef)(),le=(0,Ba.useRef)(n),Se=Dxe(i),_e=(0,Ba.useRef)(!1),de=(0,Ba.useRef)(!1);DD(()=>{let Le=tc.init();return Le.then(Ie=>(H.current=Ie)&&j(!1)).catch(Ie=>(Ie==null?void 0:Ie.type)!=="cancelation"&&console.error("Monaco initialization: error:",Ie)),()=>Y.current?Ue():Le.cancel()}),Fs(()=>{var Ie,ye,Me,He;let Le=rg(H.current,e||n||"",t||a||"",i||r||"");Le!==((Ie=Y.current)==null?void 0:Ie.getModel())&&(f&&L9.set(Se,(ye=Y.current)==null?void 0:ye.saveViewState()),(Me=Y.current)==null||Me.setModel(Le),f&&((He=Y.current)==null||He.restoreViewState(L9.get(i))))},[i],B),Fs(()=>{var Le;(Le=Y.current)==null||Le.updateOptions(u)},[u],B),Fs(()=>{!Y.current||n===void 0||(Y.current.getOption(H.current.editor.EditorOption.readOnly)?Y.current.setValue(n):n!==Y.current.getValue()&&(de.current=!0,Y.current.executeEdits("",[{range:Y.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),Y.current.pushUndoStop(),de.current=!1))},[n],B),Fs(()=>{var Ie,ye;let Le=(Ie=Y.current)==null?void 0:Ie.getModel();Le&&a&&((ye=H.current)==null||ye.editor.setModelLanguage(Le,a))},[a],B),Fs(()=>{var Le;s!==void 0&&((Le=Y.current)==null||Le.revealLine(s))},[s],B),Fs(()=>{var Le;(Le=H.current)==null||Le.editor.setTheme(o)},[o],B);let me=(0,Ba.useCallback)(()=>{var Le;if(!(!V.current||!H.current)&&!_e.current){xe.current(H.current);let Ie=i||r,ye=rg(H.current,n||e||"",t||a||"",Ie||"");Y.current=(Le=H.current)==null?void 0:Le.editor.create(V.current,ie({model:ye,automaticLayout:!0},u),c),f&&Y.current.restoreViewState(L9.get(Ie)),H.current.editor.setTheme(o),s!==void 0&&Y.current.revealLine(s),O(!0),_e.current=!0}},[e,t,r,n,a,i,u,c,f,o,s]);(0,Ba.useEffect)(()=>{B&&re.current(Y.current,H.current)},[B]),(0,Ba.useEffect)(()=>{!N&&!B&&me()},[N,B,me]),le.current=n,(0,Ba.useEffect)(()=>{var Le,Ie;B&&T&&((Le=oe.current)==null||Le.dispose(),oe.current=(Ie=Y.current)==null?void 0:Ie.onDidChangeModelContent(ye=>{de.current||T(Y.current.getValue(),ye)}))},[B,T]),(0,Ba.useEffect)(()=>{if(B){let Le=H.current.editor.onDidChangeMarkers(Ie=>{var Me;let ye=(Me=Y.current.getModel())==null?void 0:Me.uri;if(ye&&Ie.find(He=>He.path===ye.path)){let He=H.current.editor.getModelMarkers({resource:ye});I==null||I(He)}});return()=>{Le==null||Le.dispose()}}return()=>{}},[B,I]);function Ue(){var Le,Ie;(Le=oe.current)==null||Le.dispose(),d?f&&L9.set(i,Y.current.saveViewState()):(Ie=Y.current.getModel())==null||Ie.dispose(),Y.current.dispose()}return Ba.default.createElement(tte,{width:p,height:b,isEditorReady:B,loading:l,_ref:V,className:v,wrapperProps:k})}var Zee,Mi,Qee,T9,ete,rte,E9,ate,ite,Ba,D9,pxe,ED,hxe,mxe,yxe,bxe,vxe,tte,DD,Fs,_xe,Axe,Txe,Dxe,L9,zxe,ote,Bxe,lte=mt(()=>{"use strict";Xy();Zee=Pe(kt(),1),Mi=Pe(kt(),1);Xy();Qee=Pe(kt(),1),T9=Pe(kt(),1),ete=Pe(kt(),1),rte=Pe(kt(),1),E9=Pe(kt(),1),ate=Pe(kt(),1);Xy();ite=Pe(kt(),1),Ba=Pe(kt(),1);Xy();D9=Pe(kt(),1),pxe={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ED=pxe,hxe={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},mxe=hxe;yxe=gxe,bxe=yxe;vxe=xxe,tte=(0,Qee.memo)(vxe);DD=wxe;Fs=kxe;_xe=Mxe,Axe=(0,Zee.memo)(_xe);Txe=Lxe;Dxe=Exe,L9=new Map;zxe=Ixe,ote=(0,ite.memo)(zxe),Bxe=ote});var Wve={};mb(Wve,{EdpireAssessment:()=>Gve,buildSubmitPayload:()=>Yte,flattenAssessment:()=>Wte,flattenReview:()=>Xte,renderQuestion:()=>Gte});var KD=Pe(kt()),VD=Pe(uC());var mh=Pe(kt());var cr=Pe(kt());var hh=Pe($t(),1),A0=Pe(kt(),1);function FO(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 Ec=class{constructor(){this.emitter=FO(),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()})}},qO="__edpireGlobalAnswerBus",$O=globalThis,HO,G5=(HO=$O[qO])!=null?HO:$O[qO]=new Ec;var VO=Pe($t(),1),W5=Pe(kt(),1);var jO="__edpireAnswerBusContext",UO=globalThis,KO,GO=(KO=UO[jO])!=null?KO:UO[jO]=(0,W5.createContext)(G5);function bi(){return(0,W5.useContext)(GO)}function X5({children:e,bus:t=new Ec}){return(0,VO.jsx)(GO.Provider,{value:t,children:e})}var er=Pe($t(),1),Vi=Pe(kt(),1);function WO(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=WO(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function cC(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=WO(e))&&(n&&(n+=" "),n+=t);return n}var ar=cC;var ir=Pe($t(),1);var Vo=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}},Ss=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,Vo.range(this,t))}},nt=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}};nt.prototype.__proto__=Error.prototype;var Tie=function(t,r){return t===void 0?r:t},Eie=/([A-Z])/g,Die=function(t){return t.replace(Eie,"-$1").toLowerCase()},Iie={"&":"&",">":">","<":"<",'"':""","'":"'"},zie=/[&><"']/g;function Bie(e){return String(e).replace(zie,t=>Iie[t])}var _P=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},Rie=function(t){var r=_P(t);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},Nie=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},Oie=function(t){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},Jr={deflt:Tie,escape:Bie,hyphenate:Die,getBaseElem:_P,isCharacterBox:Rie,protocolFromUrl:Oie},s6={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 Pie(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 D4=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 s6)if(s6.hasOwnProperty(r)){var n=s6[r];this[r]=t[r]!==void 0?n.processor?n.processor(t[r]):t[r]:Pie(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 nt("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=Jr.protocolFromUrl(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}},bu=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 xu[Fie[this.id]]}sub(){return xu[qie[this.id]]}fracNum(){return xu[$ie[this.id]]}fracDen(){return xu[Hie[this.id]]}cramp(){return xu[jie[this.id]]}text(){return xu[Uie[this.id]]}isTight(){return this.size>=2}},NC=0,u6=1,v1=2,zc=3,I4=4,tl=5,w1=6,go=7,xu=[new bu(NC,0,!1),new bu(u6,0,!0),new bu(v1,1,!1),new bu(zc,1,!0),new bu(I4,2,!1),new bu(tl,2,!0),new bu(w1,3,!1),new bu(go,3,!0)],Fie=[I4,tl,I4,tl,w1,go,w1,go],qie=[tl,tl,tl,tl,go,go,go,go],$ie=[v1,zc,I4,tl,w1,go,w1,go],Hie=[zc,zc,tl,tl,go,go,go,go],jie=[u6,u6,zc,zc,tl,tl,go,go],Uie=[NC,u6,v1,zc,v1,zc,v1,zc],jt={DISPLAY:xu[NC],TEXT:xu[v1],SCRIPT:xu[I4],SCRIPTSCRIPT:xu[w1]},CC=[{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 Kie(e){for(var t=0;t<CC.length;t++)for(var r=CC[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 l6=[];CC.forEach(e=>e.blocks.forEach(t=>l6.push(...t)));function AP(e){for(var t=0;t<l6.length;t+=2)if(e>=l6[t]&&e<=l6[t+1])return!0;return!1}var x1=80,Vie=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 ]*`,zC="[\u0300-\u036F]",gse=new RegExp(zC+"+$"),yse="("+mF+"+)|"+(mse+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(zC+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(zC+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+hse)+("|"+pse+")"),m6=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(yse,"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 Ss("EOF",new Vo(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new nt("Unexpected character: '"+t[r]+"'",new Ss(t[r],new Vo(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 Ss(a,new Vo(this,r,this.tokenRegex.lastIndex))}},BC=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 nt("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}},bse=aF;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 kP={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 nt("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=kP[t.text],n==null||n>=r)throw new nt("Invalid base-"+r+" digit "+t.text);for(var a;(a=kP[e.future().text])!=null&&a<r;)n*=r,n+=a,e.popToken()}return"\\@char{"+n+"}"});var YC=(e,t,r,n)=>{var a=e.consumeArg().tokens;if(a.length!==1)throw new nt("\\newcommand's first argument must be a macro name");var i=a[0].text,o=e.isDefined(i);if(o&&!t)throw new nt("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!o&&!r)throw new nt("\\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 nt("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=>YC(e,!1,!0,!1));W("\\renewcommand",e=>YC(e,!0,!1,!1));W("\\providecommand",e=>YC(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),fd[r],qn.math[r],qn.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 SP={",":"\\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 SP?t=SP[r]:(r.slice(0,4)==="\\not"||r in qn.math&&["bin","rel"].includes(qn.math[r].group))&&(t="\\dotsb"),t});var JC={")":!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 JC?"\\ldots\\,":"\\ldots"});W("\\dotsc",function(e){var t=e.future().text;return t in JC&&t!==","?"\\ldots\\,":"\\ldots"});W("\\cdots",function(e){var t=e.future().text;return t in JC?"\\@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 nt("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 gF=lt(vu["Main-Regular"][84][1]-.7*vu["Main-Regular"][65][1]);W("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+gF+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");W("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+gF+"}{\\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 yF=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 b=d.future();b.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",yF(!1));W("\\bra@set",yF(!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 bF={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},RC=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 BC(bse,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new m6(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 Ss("EOF",n.loc)),this.pushTokens(a),new Ss("",Vo.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 nt("Extra }",i)}else if(i.text==="EOF")throw new nt("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 nt("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 nt("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 nt("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 nt("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 nt("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 nt("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 Ss(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 m6(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)||fd.hasOwnProperty(t)||qn.math.hasOwnProperty(t)||qn.text.hasOwnProperty(t)||bF.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:fd.hasOwnProperty(t)&&!fd[t].primitive}},CP=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,o6=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"}),SC={"\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"}},MP={\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"},g6=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 RC(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 nt("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 Ss("}")),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&&fd[a.text]&&fd[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 nt("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 nt("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 nt("Limit controls must follow a math operator",i);this.consume()}else if(i.text==="^"){if(n)throw new nt("Double superscript",i);n=this.handleSupSubscript("superscript")}else if(i.text==="_"){if(a)throw new nt("Double subscript",i);a=this.handleSupSubscript("subscript")}else if(i.text==="'"){if(n)throw new nt("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(o6[i.text]){var u=CP.test(i.text),c=[];for(c.push(new Ss(o6[i.text])),this.consume();;){var f=this.fetch().text;if(!o6[f]||CP.test(f)!==u)break;c.unshift(new Ss(o6[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=fd[a];if(!i)return null;if(this.consume(),r&&r!=="atom"&&!i.allowedInArgument)throw new nt("Got function '"+a+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!i.allowedInText)throw new nt("Can't use function '"+a+"' in text mode",n);if(this.mode==="math"&&i.allowedInMath===!1)throw new nt("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=fd[t];if(s&&s.handler)return s.handler(o,r,n);throw new nt("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 nt("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 nt("A primitive argument cannot be optional");var o=this.parseGroup(t);if(o==null)throw new nt("Expected group as "+t,this.fetch());return o}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new nt("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 nt("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 nt("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 nt("Invalid size: '"+r.text+"'",r);var i={number:+(a[1]+a[2]),unit:a[3]};if(!LP(i))throw new nt("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:Vo.range(n,l),body:s,semisimple:a==="\\begingroup"||void 0}}else if(i=this.parseFunction(r,t)||this.parseSymbol(),i==null&&a[0]==="\\"&&!bF.hasOwnProperty(a)){if(this.settings.throwOnError)throw new nt("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:Vo.range(a,t[n+2]),text:"---"}),r-=2):(t.splice(n,2,{type:"textord",mode:"text",loc:Vo.range(a,t[n+1]),text:"--"}),r-=1)),(i==="'"||i==="`")&&t[n+1].text===i&&(t.splice(n,2,{type:"textord",mode:"text",loc:Vo.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 nt(`\\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}}MP.hasOwnProperty(r[0])&&!qn[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=MP[r[0]]+r.slice(1));var i=gse.exec(r);i&&(r=r.substring(0,i.index),r==="i"?r="\u0131":r==="j"&&(r="\u0237"));var o;if(qn[this.mode][r]){this.settings.strict&&this.mode==="math"&&AC.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var s=qn[this.mode][r].group,l=Vo.range(t),u;if(uoe.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&&(AP(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:Vo.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(!SC[d])throw new nt("Unknown accent ' "+d+"'",t);var p=SC[d][this.mode]||SC[d].text;if(!p)throw new nt("Accent "+d+" unsupported in "+this.mode+" mode",t);o={type:"accent",mode:this.mode,loc:Vo.range(t),label:p,isStretchy:!1,isShifty:!0,base:o}}return o}};g6.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var ZC=function(t,r){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new g6(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 nt("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:n.subparse([new Ss("\\df@tag")])}]}return a},xF=function(t,r,n){r.textContent="";var a=QC(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."),xF=function(){throw new nt("KaTeX doesn't work in quirks mode.")});var xse=function(t,r){var n=QC(t,r).toMarkup();return n},vse=function(t,r){var n=new D4(r);return ZC(t,n)},vF=function(t,r,n){if(n.throwOnError||!(t instanceof nt))throw t;var a=Ce.makeSpan(["katex-error"],[new Go(r)]);return a.setAttribute("title",t.toString()),a.setAttribute("style","color:"+n.errorColor),a},QC=function(t,r){var n=new D4(r);try{var a=ZC(t,n);return Doe(a,t,n)}catch(i){return vF(i,t,n)}},wse=function(t,r){var n=new D4(r);try{var a=ZC(t,n);return Ioe(a,t,n)}catch(i){return vF(i,t,n)}},kse="0.16.28",Sse={Span:Xf,Anchor:z4,SymbolNode:Go,SvgNode:Hl,PathNode:wu,LineNode:B4},wF={version:kse,render:xF,renderToString:xse,ParseError:nt,SETTINGS_SCHEMA:s6,__parse:vse,__renderToDomTree:QC,__renderToHTMLTree:wse,__setFontMetrics:roe,__defineSymbol:L,__defineFunction:gt,__defineMacro:W,__domTree:Sse};var A7e=Pe(kF(),1),Cse={"\\d":"\\mathrm{d}","\\R":"\\mathbb{R}","\\N":"\\mathbb{N}","\\Z":"\\mathbb{Z}","\\Q":"\\mathbb{Q}","\\C":"\\mathbb{C}"};function P4(e,t,r=!0){try{return wF.renderToString(e,{displayMode:t,output:r?"htmlAndMathml":"html",throwOnError:!1,errorColor:"#cc0000",macros:Cse,strict:!1})}catch(n){return`<span class="katex-error" style="color:#cc0000" title="${String(n)}">${e}</span>`}}function ht(e){return`calc(${typeof e=="number"?`${e}px`:e} * var(--edp-scale, 1))`}function ma(e){return{width:ht(e),height:ht(e)}}function jl(e){if(e==null||e==="")return;if(typeof e=="number")return ht(e);let t=String(e).trim();return/^\d+(\.\d+)?px$/.test(t)?ht(t):t}var SF={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"}},CF={border:"#2563eb",background:"#e0f2fe"},MF={border:"#dc2626",background:"#fee2e2"};function Mse(e){return{display:"inline-block",verticalAlign:"middle",border:`2px solid ${(e==null?void 0:e.border)||CF.border}`,background:(e==null?void 0:e.background)||CF.background,borderRadius:ht("4px"),padding:"0.17em 0.37em"}}var C6=`${ht("6px")} ${ht("8px")}`;function _se(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)||MF.border}`,background:(e==null?void 0:e.background)||MF.background,borderRadius:t,padding:"0.15em 0.45em"}}function al(e,t,r){return(0,ir.jsx)("div",{className:"exercise-content",children:e.content.map((n,a)=>bo(n,`node-${a}`,t,r))})}var Ase=/^[\u00a0\u202f ]?[.,;:!?\u2026)\]}\u00bb\u201d\u2019%\u060c\u061b\u061f]+/,Lse=new Set(["blank","inlineChoiceSet"]);function _F(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=Lse.has(c.type)&&(f==null?void 0:f.type)==="text"?(s=Ase.exec((o=f.text)!=null?o:""))==null?void 0:s[0]:void 0;if(!d||!f){a.push(bo(c,`${t}-${u}`,r,n));continue}let p=((l=f.text)!=null?l:"").slice(d.length);a.push((0,ir.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[(0,ir.jsx)("span",{style:{whiteSpace:"normal"},children:bo(c,`${t}-${u}-a`,r,n)}),bo(Xe(ie({},f),{text:d}),`${t}-${u}-p`,r,n)]},`${t}-${u}`)),p&&a.push(bo(Xe(ie({},f),{text:p}),`${t}-${u+1}`,r,n)),u++}return a}function bo(e,t,r,n){var a,i,o,s,l,u,c,f,d,p,b,v,k,w,S,T,I,B,O,N,j,H,Y,V,re,xe,oe,le,Se,_e,de,me,Ue,Le,Ie,ye,Me,He,st,_t,ct,Ut,Bt;switch(e.type){case"choiceSet":case"inlineChoiceSet":return(0,ir.jsx)(M6,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"blank":return e.attrs.mode==="typed"?(0,ir.jsx)(_6,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t):(0,ir.jsx)(A6,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"blankPool":return(0,ir.jsx)(L6,{node:e},t);case"inlinePool":return(0,ir.jsx)(T6,{node:e},t);case"matchingSet":return(0,ir.jsx)(E6,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"aiAnswerInput":return(0,ir.jsx)(D6,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"openResponseNode":return(0,ir.jsx)(I6,{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,ir.jsx)(z6,{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,ir.jsx)(B6,{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 rt=e.attrs,ft=rt==null?void 0:rt.textAlign,ot=(rt==null?void 0:rt.dir)||void 0;return(0,ir.jsx)("p",{dir:ot,style:ft?{textAlign:ft}:void 0,children:_F(e.content,t,r,n)},t)}case"heading":{let rt=(o=e.attrs.level)!=null?o:1,ft=`h${rt}`,ot=e.attrs,Tr=ot==null?void 0:ot.textAlign,Rt=(ot==null?void 0:ot.dir)||void 0,gr=(s=SF[rt])!=null?s:SF[3];return(0,ir.jsx)(ft,{dir:Rt,style:ie(ie({},gr),Tr?{textAlign:Tr}:{}),children:_F(e.content,t,r,n)},t)}case"blockquote":{let rt=e.attrs,ft=(rt==null?void 0:rt.dir)||void 0,ot=rt==null?void 0:rt.textAlign;return(0,ir.jsx)("blockquote",{dir:ft,style:ie({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((Tr,Rt)=>bo(Tr,`${t}-${Rt}`,r,n))},t)}case"text":{let rt=e,ft=(u=rt.text)!=null?u:"",ot=(c=rt.marks)!=null?c:[];if(ot.length===0)return(0,ir.jsx)("span",{children:ft},t);let Tr={};for(let gr of ot)gr.type==="textStyle"&&((f=gr.attrs)!=null&&f.color&&(Tr.color=gr.attrs.color),(d=gr.attrs)!=null&&d.fontSize&&(Tr.fontSize=gr.attrs.fontSize),(p=gr.attrs)!=null&&p.fontFamily&&(Tr.fontFamily=gr.attrs.fontFamily));let Rt=ft;for(let gr of ot)switch(gr.type){case"bold":Rt=(0,ir.jsx)("strong",{children:Rt});break;case"italic":Rt=(0,ir.jsx)("em",{children:Rt});break;case"underline":Rt=(0,ir.jsx)("u",{children:Rt});break;case"strike":Rt=(0,ir.jsx)("s",{children:Rt});break;case"code":Rt=(0,ir.jsx)("code",{children:Rt});break;case"subscript":Rt=(0,ir.jsx)("sub",{children:Rt});break;case"superscript":Rt=(0,ir.jsx)("sup",{children:Rt});break;case"boxedText":Rt=(0,ir.jsx)("span",{style:Mse(gr.attrs),children:Rt});break;case"circleText":Rt=(0,ir.jsx)("span",{style:_se(gr.attrs),children:Rt});break}return(0,ir.jsx)("span",{style:Object.keys(Tr).length>0?Tr:void 0,children:Rt},t)}case"hardBreak":return(0,ir.jsx)("br",{},t);case"resizableImage":return(0,ir.jsx)("img",{src:((b=e.attrs)==null?void 0:b.src)||void 0,alt:((v=e.attrs)==null?void 0:v.alt)||"",style:{display:"inline-block",verticalAlign:"middle",width:(w=jl(((k=e.attrs)==null?void 0:k.width)||void 0))!=null?w:"auto",height:(T=jl(((S=e.attrs)==null?void 0:S.height)||void 0))!=null?T:"auto",maxWidth:"100%"}},t);case"resizableAudio":return(0,ir.jsx)("span",{style:{display:"inline-flex",verticalAlign:"middle",alignItems:"center",background:"#f1f5f9",borderRadius:ht("8px"),padding:`${ht("4px")} ${ht("8px")}`,maxWidth:"100%"},children:(0,ir.jsx)("audio",{controls:!0,src:((I=e.attrs)==null?void 0:I.src)||void 0,style:{display:"block",width:ht("320px"),maxWidth:"100%"}})},t);case"resizableVideo":return(0,ir.jsx)("video",{src:((B=e.attrs)==null?void 0:B.src)||void 0,controls:!0,style:{display:"inline-block",verticalAlign:"middle",width:(N=jl(((O=e.attrs)==null?void 0:O.width)||void 0))!=null?N:"auto",height:(H=jl(((j=e.attrs)==null?void 0:j.height)||void 0))!=null?H:"auto",maxWidth:"100%"}},t);case"youtubeEmbed":return(0,ir.jsx)("iframe",{src:`https://www.youtube.com/embed/${((Y=e.attrs)==null?void 0:Y.videoId)||""}`,width:((V=e.attrs)==null?void 0:V.width)||480,height:((re=e.attrs)==null?void 0:re.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:jl(((xe=e.attrs)==null?void 0:xe.width)||480),height:jl(((oe=e.attrs)==null?void 0:oe.height)||270)}},t);case"inlineMath":return(0,ir.jsx)("span",{dir:"ltr",style:{unicodeBidi:"isolate",display:"inline-block"},className:"math-inline",dangerouslySetInnerHTML:{__html:P4((Se=(le=e.attrs)==null?void 0:le.latex)!=null?Se:"",!1,!0)}},t);case"blockMath":return(0,ir.jsx)("div",{dir:"ltr",style:{unicodeBidi:"isolate",textAlign:"center",margin:"1em 0"},className:"math-block",dangerouslySetInnerHTML:{__html:P4((de=(_e=e.attrs)==null?void 0:_e.latex)!=null?de:"",!0,!0)}},t);case"variable":return(0,ir.jsx)("span",{className:"variable",children:`{${(me=e.attrs)==null?void 0:me.name}}`},t);default:{let rt=e;return rt.type==="bulletList"?(0,ir.jsx)("ul",{style:{listStyleType:"disc",paddingLeft:"1.5em",margin:"0.5em 0"},children:(Ue=rt.content)==null?void 0:Ue.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))},t):rt.type==="orderedList"?(0,ir.jsx)("ol",{style:{listStyleType:"decimal",paddingLeft:"1.5em",margin:"0.5em 0"},children:(Le=rt.content)==null?void 0:Le.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))},t):rt.type==="listItem"?(0,ir.jsx)("li",{children:(Ie=rt.content)==null?void 0:Ie.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))},t):rt.type==="table"?(0,ir.jsx)("div",{style:{overflowX:"auto",margin:`${ht("1.25rem")} 0`},children:(0,ir.jsx)("table",{style:{borderCollapse:"collapse",width:"100%",tableLayout:"fixed"},children:(0,ir.jsx)("tbody",{children:(ye=rt.content)==null?void 0:ye.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))})})},t):rt.type==="tableRow"?(0,ir.jsx)("tr",{children:(Me=rt.content)==null?void 0:Me.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))},t):rt.type==="tableCell"?(0,ir.jsx)("td",{colSpan:(He=rt.attrs)==null?void 0:He.colspan,rowSpan:(st=rt.attrs)==null?void 0:st.rowspan,style:{border:"1px solid #d1d5db",padding:C6,verticalAlign:"top"},children:(_t=rt.content)==null?void 0:_t.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))},t):rt.type==="tableHeader"?(0,ir.jsx)("th",{colSpan:(ct=rt.attrs)==null?void 0:ct.colspan,rowSpan:(Ut=rt.attrs)==null?void 0:Ut.rowspan,style:{border:"1px solid #d1d5db",padding:C6,verticalAlign:"top",background:"#f3f4f6",fontWeight:600},children:(Bt=rt.content)==null?void 0:Bt.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))},t):(console.warn(`Unknown node type during interpretation: ${e.type}`),null)}}}function Aa(e,t){return e.map(r=>{var n,a,i,o,s,l,u,c,f,d,p,b,v,k,w,S,T,I,B,O,N,j,H,Y,V,re,xe,oe,le,Se,_e,de;if(r.type==="text"){let me=Jf((n=r.text)!=null?n:""),Ue=(a=r.marks)!=null?a:[],Le=[];for(let Ie of Ue)Ie.type==="textStyle"&&((i=Ie.attrs)!=null&&i.color&&Le.push(`color:${Ie.attrs.color}`),(o=Ie.attrs)!=null&&o.fontSize&&Le.push(`font-size:${Ie.attrs.fontSize}`),(s=Ie.attrs)!=null&&s.fontFamily&&Le.push(`font-family:${Ie.attrs.fontFamily}`));Le.length>0&&(me=`<span style="${Le.join(";")}">${me}</span>`);for(let Ie of Ue)switch(Ie.type){case"bold":me=`<strong>${me}</strong>`;break;case"italic":me=`<em>${me}</em>`;break;case"underline":me=`<u>${me}</u>`;break;case"strike":me=`<s>${me}</s>`;break;case"code":me=`<code>${me}</code>`;break;case"subscript":me=`<sub>${me}</sub>`;break;case"superscript":me=`<sup>${me}</sup>`;break;case"boxedText":{let ye=((l=Ie.attrs)==null?void 0:l.border)||"#2563eb",Me=((u=Ie.attrs)==null?void 0:u.background)||"#e0f2fe";me=`<span style="display:inline-block;vertical-align:middle;border:2px solid ${ye};background:${Me};border-radius:${ht("4px")};padding:0.17em 0.37em">${me}</span>`;break}case"circleText":{let ye=((c=Ie.attrs)==null?void 0:c.border)||"#dc2626",Me=((f=Ie.attrs)==null?void 0:f.background)||"#fee2e2",He=((d=Ie.attrs)==null?void 0:d.shape)==="circle"?"50%":"9999px";me=`<span style="display:inline-block;vertical-align:middle;border:2px solid ${ye};background:${Me};border-radius:${He};padding:0.15em 0.45em">${me}</span>`;break}}return me}if(r.type==="paragraph"){let me=r.content?Aa(r.content,t):"",Ue=(p=r.attrs)==null?void 0:p.dir,Le=(b=r.attrs)==null?void 0:b.textAlign,Ie=Ue?` dir="${Ue}"`:"",ye=Le?` style="text-align:${Le}"`:"";return t!=null&&t.stripParagraphs?me:`<p${Ie}${ye}>${me}</p>`}if(r.type==="hardBreak")return"<br/>";if(r.type==="table"){let me=r.content?Aa(r.content,t):"";return`<div style="overflow-x:auto;margin:${ht("1.25rem")} 0"><table style="border-collapse:collapse;width:100%;table-layout:fixed"><tbody>${me}</tbody></table></div>`}if(r.type==="tableRow")return`<tr>${r.content?Aa(r.content,t):""}</tr>`;if(r.type==="tableCell"){let me=r.content?Aa(r.content,t):"",Ue=(v=r.attrs)!=null&&v.colspan?` colspan="${r.attrs.colspan}"`:"",Le=(k=r.attrs)!=null&&k.rowspan?` rowspan="${r.attrs.rowspan}"`:"";return`<td${Ue}${Le} style="border:1px solid #d1d5db;padding:${C6};vertical-align:top">${me}</td>`}if(r.type==="tableHeader"){let me=r.content?Aa(r.content,t):"",Ue=(w=r.attrs)!=null&&w.colspan?` colspan="${r.attrs.colspan}"`:"",Le=(S=r.attrs)!=null&&S.rowspan?` rowspan="${r.attrs.rowspan}"`:"";return`<th${Ue}${Le} style="border:1px solid #d1d5db;padding:${C6};vertical-align:top;background:#f3f4f6;font-weight:600">${me}</th>`}if(r.type==="bulletList")return`<ul style="list-style-type:disc;padding-left:1.5em">${r.content?Aa(r.content,t):""}</ul>`;if(r.type==="orderedList")return`<ol style="list-style-type:decimal;padding-left:1.5em">${r.content?Aa(r.content,t):""}</ol>`;if(r.type==="listItem")return`<li>${r.content?Aa(r.content,t):""}</li>`;if(r.type==="blockquote"){let me=r.content?Aa(r.content,t):"";return`<blockquote${(T=r.attrs)!=null&&T.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">${me}</blockquote>`}if(r.type==="resizableImage"){let me=(I=r.attrs)!=null?I:{},Ue=S6(me.width),Le=S6(me.height);return`<img src="${Jf((B=me.src)!=null?B:"")}" alt="${Jf((O=me.alt)!=null?O:"")}" style="display:inline-block;vertical-align:middle;max-width:100%;${Ue?`width:${Ue};`:""}${Le?`height:${Le};`:""}"/>`}if(r.type==="resizableAudio"){let me=(N=r.attrs)!=null?N:{};return`<span style="display:inline-flex;vertical-align:middle;align-items:center;background:#f1f5f9;border-radius:${ht("8px")};padding:${ht("4px")} ${ht("8px")};max-width:100%"><audio controls src="${Jf((j=me.src)!=null?j:"")}" style="display:block;width:${ht("320px")};max-width:100%"></audio></span>`}if(r.type==="resizableVideo"){let me=(H=r.attrs)!=null?H:{},Ue=S6(me.width),Le=S6(me.height);return`<video src="${Jf((Y=me.src)!=null?Y:"")}" controls style="display:inline-block;vertical-align:middle;max-width:100%;${Ue?`width:${Ue};`:""}${Le?`height:${Le};`:""}"></video>`}if(r.type==="youtubeEmbed"){let me=(V=r.attrs)!=null?V:{};return`<iframe src="https://www.youtube.com/embed/${Jf((re=me.videoId)!=null?re:"")}" width="${me.width||480}" height="${me.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:${jl(me.width||480)};height:${jl(me.height||270)}"></iframe>`}return r.type==="inlineMath"?`<span dir="ltr" class="math-inline" style="unicode-bidi:isolate;display:inline-block">${P4((oe=(xe=r.attrs)==null?void 0:xe.latex)!=null?oe:"",!1,!0)}</span>`:r.type==="blockMath"?`<div dir="ltr" class="math-block" style="unicode-bidi:isolate;text-align:center;margin:1em 0">${P4((Se=(le=r.attrs)==null?void 0:le.latex)!=null?Se:"",!0,!0)}</div>`:r.type==="variable"?`<span class="variable">{${Jf((de=(_e=r.attrs)==null?void 0:_e.name)!=null?de:"")}}</span>`:""}).join("")}function S6(e){var t;return e==null||e===""?null:(t=jl(e))!=null?t:null}function Jf(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}var AF=Pe($t(),1),F4=Pe(kt(),1);var M1={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(""),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"};var R6={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(""),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/cam\xE9ra refus\xE9. Autorise l'acc\xE8s dans les param\xE8tres 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"};var N6={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"],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"};var Tse={en:M1,fr:R6,ar:N6},nM=(0,F4.createContext)(null);function ga(){var e;return(e=(0,F4.useContext)(nM))!=null?e:M1}function q4(e){let t=(0,F4.useContext)(nM);return e&&Tse[e]||t||M1}function $4({locale:e,children:t}){let r=q4(e);return(0,AF.jsx)(nM.Provider,{value:r,children:t})}var LF=Pe($t(),1),gd=Pe(kt(),1);var Ese={sm:.875,md:1,lg:1.25,xl:1.5},aM=(0,gd.createContext)(null);function Dse(e,t){let r=ie({},e!=null?e:{});if(t)for(let[n,a]of Object.entries(t))a!==void 0&&(r[n]=a);return r}function Ise(e){var t;return typeof e=="number"?Number.isFinite(e)&&e>0?e:1:e&&(t=Ese[e])!=null?t:1}function il(e){var r,n,a;let t=e!=null?e:{};return{scale:Ise(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 Ms(e){let t=(0,gd.useContext)(aM);return(0,gd.useMemo)(()=>Dse(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 Ul(){let e=(0,gd.useContext)(aM);return(0,gd.useMemo)(()=>il(e),[e])}function _s({display:e,children:t}){let r=Ms(e);return(0,LF.jsx)(aM.Provider,{value:r,children:t})}function ol(e){if(e.sizeSet)return{"--edp-scale":String(e.scale)}}function Zf(){let{motion:e}=Ul();return{hop:e==="none"?"":"animate-hop",shake:e==="full"?"animate-shake":"",wobble:e==="full"?"animate-wobble":""}}function zse(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 Bse(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 H4(e,t){let r=[...e],n=Bse(zse(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}function iM({node:e}){var t,r,n;if(e.type==="text"){if(!e.marks||e.marks.length===0)return(0,er.jsx)(er.Fragment,{children:e.text});let a=e.text||"";for(let i of e.marks)i.type==="bold"?a=(0,er.jsx)("strong",{children:a}):i.type==="italic"?a=(0,er.jsx)("em",{children:a}):i.type==="underline"?a=(0,er.jsx)("u",{children:a}):i.type==="strike"?a=(0,er.jsx)("s",{children:a}):i.type==="textStyle"&&((t=i.attrs)!=null&&t.color)&&(a=(0,er.jsx)("span",{style:{color:i.attrs.color},children:a}));return(0,er.jsx)(er.Fragment,{children:a})}return e.type==="paragraph"?(0,er.jsx)("span",{className:"block",children:(n=(r=e.content)==null?void 0:r.map((a,i)=>(0,er.jsx)(iM,{node:a},i)))!=null?n:(0,er.jsx)("br",{})}):e.type==="hardBreak"?(0,er.jsx)("br",{}):e.content?(0,er.jsx)("span",{className:"block",children:e.content.map((a,i)=>(0,er.jsx)(iM,{node:a},i))}):null}function Rse({nodes:e}){return(0,er.jsx)("span",{className:"block space-y-1",style:{color:"var(--ink, #1d2025)"},children:e.map((t,r)=>(0,er.jsx)(iM,{node:t},r))})}function TF({hint:e}){let t=ga(),[r,n]=(0,Vi.useState)(!1),[a,i]=(0,Vi.useState)(!1),o=(0,Vi.useRef)(null);return(0,Vi.useEffect)(()=>{if(!a)return;let c=f=>{o.current&&!o.current.contains(f.target)&&(i(!1),n(!1))};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[a]),(0,er.jsxs)("span",{ref:o,className:"relative inline-flex items-center align-middle",onMouseEnter:()=>n(!0),onMouseLeave:()=>{a||n(!1)},children:[(0,er.jsx)("button",{type:"button",onClick:c=>{c.stopPropagation(),a?(i(!1),n(!1)):(i(!0),n(!0))},className:ar("player-blank-hint-btn select-none",a&&"player-blank-hint-btn--pinned"),"aria-label":t.showHint,children:"?"}),r&&(0,er.jsx)("span",{className:"player-blank-hint-pop",onClick:c=>c.stopPropagation(),children:(0,er.jsx)(Rse,{nodes:e})})]})}function Nse(e){return[...e].map(t=>({v:t,r:Math.random()})).sort((t,r)=>t.r-r.r).map(t=>t.v)}var Ose=e=>e.replace(/ {2,}/g,t=>" ".repeat(t.length-1)+" "),Pse=new Set(["image","resizableImage","resizableVideo","youtubeEmbed"]);function IF(e){return(e!=null?e:[]).some(t=>Pse.has(t==null?void 0:t.type)||IF(t==null?void 0:t.content))}var EF=()=>(0,er.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,children:(0,er.jsx)("path",{d:"M5 13l4 4L19 7"})}),DF=()=>(0,er.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,children:(0,er.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})});function M6({node:e,validationFeedback:t}){var Ue,Le,Ie,ye;let r=bi(),n=ga(),a=Ul(),i=Zf(),{id:o,content:s,attrs:l}=e,u=(Ue=l.shuffle)!=null?Ue:!1,c="prompt"in l?l.prompt:void 0,f="separator"in l&&(Le=l.separator)!=null?Le:"/",d="pickLimit"in l&&l.pickLimit?l.pickLimit:1,p="layout"in l&&(Ie=l.layout)!=null?Ie:"row",b=e.type==="inlineChoiceSet",v=JSON.stringify(s),k=u&&a.shuffleSeed!==void 0,w=(0,Vi.useMemo)(()=>k?H4(s,`${a.shuffleSeed}:${o}`):null,[k,a.shuffleSeed,o,v]),[S,T]=(0,Vi.useState)(s);(0,Vi.useEffect)(()=>{k||T(u?Nse(s):s)},[u,k,v]);let I=w!=null?w:S,[B,O]=(0,Vi.useState)(new Set),N=(ye=t==null?void 0:t.showFeedback)!=null?ye:!1,j=(t==null?void 0:t.correctChoiceIds)||[];(0,Vi.useEffect)(()=>{let Me=He=>{let _t=He.answers.find(ct=>ct.nodeId===o&&ct.type==="choiceSet");_t&&"selectedIds"in _t.answer&&O(new Set(_t.answer.selectedIds))};return r.on("answers:prefill",Me),()=>r.off("answers:prefill",Me)},[o,r]),(0,Vi.useEffect)(()=>{r.emit({type:"answer:changed",answer:{nodeId:o,type:"choiceSet",timestamp:Date.now(),answer:{selectedIds:Array.from(B)}}})},[B,o,r]);let H=Me=>{N||O(He=>{let st=new Set(He);return d===1?st.has(Me)?st.delete(Me):(st.clear(),st.add(Me)):st.has(Me)?st.delete(Me):st.size<d&&st.add(Me),st})},Y=Me=>Ose(Aa(Me.content)),V=Me=>{let He=B.has(Me),st=j.includes(Me);return N?st&&He?"correct":st&&!He?"correct-unchosen":!st&&He?"incorrect":"muted":He?"selected":"idle"},re={idle:"",selected:"player-choice--selected",correct:ar("player-choice--correct",i.hop),"correct-unchosen":"player-choice--correct-unchosen",incorrect:ar("player-choice--incorrect",i.shake),muted:"player-choice--muted"},xe={idle:"",selected:"player-inline-choice--selected",correct:ar("player-inline-choice--correct",i.hop),"correct-unchosen":"player-inline-choice--correct-unchosen",incorrect:ar("player-inline-choice--incorrect",i.shake),muted:"player-inline-choice--muted"};if(b)return(0,er.jsxs)("span",{className:"inline-choice",children:[c&&(0,er.jsxs)("span",{className:"mr-2 font-medium",children:[c,d>1?(0,er.jsx)("span",{className:"ml-1 opacity-60",children:n.chooseN(d)}):null]}),I.map((Me,He)=>(0,er.jsxs)(Vi.Fragment,{children:[(0,er.jsx)("button",{type:"button",disabled:N,onClick:()=>H(Me.id),className:ar("player-inline-choice",xe[V(Me.id)]),"aria-pressed":B.has(Me.id),dangerouslySetInnerHTML:{__html:Y(Me)}}),He<I.length-1&&(0,er.jsx)("span",{className:"mx-1",children:f})]},Me.id)),l.hint&&l.hint.length>0&&(0,er.jsx)(TF,{hint:l.hint})]});let oe=a.layoutBy==="box",le=a.choiceColumns?Math.min(a.choiceColumns,I.length):0,Se=le?{gridAutoRows:"1fr",gridTemplateColumns:`repeat(${le}, minmax(0, 1fr))`}:{gridAutoRows:"1fr"},_e=I.some(Me=>IF(Me.content)),de=a.choiceLabels==="letters",me=Me=>{var He;return(He=n.choiceLetters[Me])!=null?He:String(Me+1)};return(0,er.jsxs)("div",{className:ar("cs-player my-4 space-y-3",oe&&"cs-player--box"),children:[c&&(0,er.jsxs)("p",{className:"font-medium",children:[c,d>1?(0,er.jsxs)("span",{className:"ml-2 text-sm opacity-70",children:["(choose ",d,")"]}):null]}),l.hint&&l.hint.length>0&&(0,er.jsx)(TF,{hint:l.hint}),(0,er.jsx)("div",{className:ar("cs-player__grid",p==="row"&&"cs-player__grid--row"),style:Se,children:I.map((Me,He)=>{let st=V(Me.id),_t=st==="incorrect"?"incorrect":st==="correct"||st==="correct-unchosen"?"correct":null;return(0,er.jsxs)("button",{type:"button",disabled:N,onClick:()=>H(Me.id),className:ar("player-choice",_e&&"player-choice--tile",re[st]),"aria-pressed":B.has(Me.id),children:[(0,er.jsx)("span",{className:ar("player-choice__mark",d>1?"player-choice__mark--box":"player-choice__mark--radio",de&&"player-choice__mark--letter"),children:de?me(He):st==="incorrect"?(0,er.jsx)(DF,{}):(0,er.jsx)(EF,{})}),(0,er.jsx)("span",{className:"player-choice__text",dangerouslySetInnerHTML:{__html:Y(Me)}}),de&&_t&&(0,er.jsx)("span",{className:`player-choice__verdict player-choice__verdict--${_t}`,"aria-hidden":"true",children:_t==="incorrect"?(0,er.jsx)(DF,{}):(0,er.jsx)(EF,{})})]},Me.id)})})]})}var Ir=Pe($t(),1),Xo=Pe(kt(),1);function oM({node:e}){var t,r,n;if(e.type==="text"){if(!e.marks||e.marks.length===0)return(0,Ir.jsx)(Ir.Fragment,{children:e.text});let a=e.text||"";for(let i of e.marks)i.type==="bold"?a=(0,Ir.jsx)("strong",{children:a}):i.type==="italic"?a=(0,Ir.jsx)("em",{children:a}):i.type==="underline"?a=(0,Ir.jsx)("u",{children:a}):i.type==="strike"?a=(0,Ir.jsx)("s",{children:a}):i.type==="textStyle"&&((t=i.attrs)!=null&&t.color)&&(a=(0,Ir.jsx)("span",{style:{color:i.attrs.color},children:a}));return(0,Ir.jsx)(Ir.Fragment,{children:a})}return e.type==="paragraph"?(0,Ir.jsx)("span",{className:"block",children:(n=(r=e.content)==null?void 0:r.map((a,i)=>(0,Ir.jsx)(oM,{node:a},i)))!=null?n:(0,Ir.jsx)("br",{})}):e.type==="hardBreak"?(0,Ir.jsx)("br",{}):e.content?(0,Ir.jsx)("span",{className:"block",children:e.content.map((a,i)=>(0,Ir.jsx)(oM,{node:a},i))}):null}function Fse({nodes:e}){return(0,Ir.jsx)("span",{className:"block space-y-1",children:e.map((t,r)=>(0,Ir.jsx)(oM,{node:t},r))})}function qse({hint:e}){let t=ga(),[r,n]=(0,Xo.useState)(!1),[a,i]=(0,Xo.useState)(!1),o=(0,Xo.useRef)(null);return(0,Xo.useEffect)(()=>{if(!a)return;let c=f=>{o.current&&!o.current.contains(f.target)&&(i(!1),n(!1))};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[a]),(0,Ir.jsxs)("span",{ref:o,className:"relative inline-flex items-center align-middle",onMouseEnter:()=>n(!0),onMouseLeave:()=>{a||n(!1)},children:[(0,Ir.jsx)("button",{type:"button",onClick:c=>{c.stopPropagation(),a?(i(!1),n(!1)):(i(!0),n(!0))},className:ar("player-blank-hint-btn select-none",a&&"player-blank-hint-btn--pinned"),"aria-label":t.showHint,children:"?"}),r&&(0,Ir.jsx)("span",{className:"player-blank-hint-pop",onClick:c=>c.stopPropagation(),children:(0,Ir.jsx)(Fse,{nodes:e})})]})}function _6({node:e,validationFeedback:t}){var N;let r=bi(),n=ga(),a=Zf(),{id:i,attrs:o}=e,{placeholder:s="___",width:l="auto",hint:u}=o,c=(0,Xo.useRef)(null),f=s.trim().split(/\s+/).filter(Boolean).length,d=l==="auto"&&f>=4,[p,b]=(0,Xo.useState)(""),v=(N=t==null?void 0:t.showFeedback)!=null?N:!1,k=t==null?void 0:t.state,w=k==="validating",S=t==null?void 0:t.displayAnswer,T=t==null?void 0:t.message;(0,Xo.useEffect)(()=>{let j=H=>{let V=H.answers.find(re=>re.nodeId===i&&re.type==="blank");V&&"mode"in V.answer&&V.answer.mode==="typed"&&"text"in V.answer&&b(V.answer.text)};return r.on("answers:prefill",j),()=>r.off("answers:prefill",j)},[i,r]),(0,Xo.useEffect)(()=>{r.emit({type:"answer:changed",answer:{nodeId:i,type:"blank",timestamp:Date.now(),answer:{mode:"typed",text:p}}})},[p,i,r]);let I=j=>{b(j.target.value)},B=(0,Xo.useCallback)(()=>{let j=c.current;j&&(j.style.height="auto",j.style.height=`${j.scrollHeight}px`)},[]);(0,Xo.useEffect)(()=>{B()},[p,B]);let O=v&&!w;return(0,Ir.jsxs)("span",{className:ar("inline-flex flex-wrap items-center gap-x-1 gap-y-0.5 align-middle max-w-full",d&&"w-full"),children:[(0,Ir.jsx)("span",{className:ar("relative inline-block shrink-0 min-w-0 max-w-full",d&&"w-full flex-1"),children:O?(0,Ir.jsx)("span",{className:ar("player-typed-blank-feedback",d&&"w-full",k==="correct"&&ar("player-typed-blank-feedback--correct",a.hop),k==="partial"&&"player-typed-blank-feedback--partial",k==="incorrect"&&ar("player-typed-blank-feedback--incorrect",a.wobble)),children:p||(0,Ir.jsx)("span",{className:"opacity-40",children:s})}):(0,Ir.jsxs)(Ir.Fragment,{children:[(0,Ir.jsx)("textarea",{ref:c,"aria-label":n.blankAnswerAria,placeholder:s,value:p,onChange:I,disabled:v,rows:1,className:ar("player-typed-blank",d&&"w-full",w&&"player-typed-blank--pending"),style:l!=="auto"?{width:l}:d?{width:"100%"}:{width:`${Math.max(7,p.length+1)}ch`,maxWidth:"100%"}}),!p&&!w&&(0,Ir.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"}),w&&(0,Ir.jsx)("span",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,Ir.jsx)("span",{className:"player-typed-blank-spinner","aria-label":n.aiEvaluationInProgressAria})})]})}),v&&k==="incorrect"&&S&&(0,Ir.jsxs)("span",{className:"player-blank-reveal",children:["(",S,")"]}),v&&T&&(0,Ir.jsx)("span",{className:ar("player-blank-feedback",k==="correct"&&"player-blank-feedback--correct",k==="partial"&&"player-blank-feedback--partial",k==="incorrect"&&"player-blank-feedback--incorrect"),children:T}),u&&u.length>0&&(0,Ir.jsx)(qse,{hint:u})]})}var ul=Pe($t(),1),xM=Pe(kt(),1);var Ne=Pe(kt()),np=Pe(Tg());var Wa=Pe(kt());var j4=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function Qf(e){let t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function O6(e){return"nodeType"in e}function Gi(e){var t,r;return e?Qf(e)?e:O6(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function P6(e){let{Document:t}=Gi(e);return e instanceof t}function A1(e){return Qf(e)?!1:e instanceof Gi(e).HTMLElement}function lM(e){return e instanceof Gi(e).SVGElement}function ep(e){return e?Qf(e)?e.document:O6(e)?P6(e)?e:A1(e)||lM(e)?e.ownerDocument:document:document:document}var Mu=j4?Wa.useLayoutEffect:Wa.useEffect;function U4(e){let t=(0,Wa.useRef)(e);return Mu(()=>{t.current=e}),(0,Wa.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 BF(){let e=(0,Wa.useRef)(null),t=(0,Wa.useCallback)((n,a)=>{e.current=setInterval(n,a)},[]),r=(0,Wa.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function L1(e,t){t===void 0&&(t=[e]);let r=(0,Wa.useRef)(e);return Mu(()=>{r.current!==e&&(r.current=e)},t),r}function T1(e,t){let r=(0,Wa.useRef)();return(0,Wa.useMemo)(()=>{let n=e(r.current);return r.current=n,n},[...t])}function K4(e){let t=U4(e),r=(0,Wa.useRef)(null),n=(0,Wa.useCallback)(a=>{a!==r.current&&(t==null||t(a,r.current)),r.current=a},[]);return[r,n]}function V4(e){let t=(0,Wa.useRef)();return(0,Wa.useEffect)(()=>{t.current=e},[e]),t.current}var sM={};function G4(e,t){return(0,Wa.useMemo)(()=>{if(t)return t;let r=sM[e]==null?0:sM[e]+1;return sM[e]=r,e+"-"+r},[e,t])}function RF(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},ie({},t))}}var tp=RF(1),W4=RF(-1);function $se(e){return"clientX"in e&&"clientY"in e}function F6(e){if(!e)return!1;let{KeyboardEvent:t}=Gi(e.target);return t&&e instanceof t}function Hse(e){if(!e)return!1;let{TouchEvent:t}=Gi(e.target);return t&&e instanceof t}function X4(e){if(Hse(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 $se(e)?{x:e.clientX,y:e.clientY}:null}var _1=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[_1.Translate.toString(e),_1.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),zF="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function NF(e){return e.matches(zF)?e:e.querySelector(zF)}var rp=Pe(kt()),jse={display:"none"};function OF(e){let{id:t,value:r}=e;return rp.default.createElement("div",{id:t,style:jse},r)}function PF(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 rp.default.createElement("div",{id:t,style:a,role:"status","aria-live":n,"aria-atomic":!0},r)}function FF(){let[e,t]=(0,rp.useState)("");return{announce:(0,rp.useCallback)(n=>{n!=null&&t(n)},[]),announcement:e}}var JF=(0,Ne.createContext)(null);function mM(e){let t=(0,Ne.useContext)(JF);(0,Ne.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Use(){let[e]=(0,Ne.useState)(()=>new Set),t=(0,Ne.useCallback)(n=>(e.add(n),()=>e.delete(n)),[e]);return[(0,Ne.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 Kse={draggable:`
|
|
3906
|
+
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:a}}MP.hasOwnProperty(r[0])&&!qn[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=MP[r[0]]+r.slice(1));var i=gse.exec(r);i&&(r=r.substring(0,i.index),r==="i"?r="\u0131":r==="j"&&(r="\u0237"));var o;if(qn[this.mode][r]){this.settings.strict&&this.mode==="math"&&AC.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var s=qn[this.mode][r].group,l=Vo.range(t),u;if(uoe.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&&(AP(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:Vo.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(!SC[d])throw new nt("Unknown accent ' "+d+"'",t);var p=SC[d][this.mode]||SC[d].text;if(!p)throw new nt("Accent "+d+" unsupported in "+this.mode+" mode",t);o={type:"accent",mode:this.mode,loc:Vo.range(t),label:p,isStretchy:!1,isShifty:!0,base:o}}return o}};g6.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var ZC=function(t,r){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new g6(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 nt("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:n.subparse([new Ss("\\df@tag")])}]}return a},xF=function(t,r,n){r.textContent="";var a=QC(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."),xF=function(){throw new nt("KaTeX doesn't work in quirks mode.")});var xse=function(t,r){var n=QC(t,r).toMarkup();return n},vse=function(t,r){var n=new D4(r);return ZC(t,n)},vF=function(t,r,n){if(n.throwOnError||!(t instanceof nt))throw t;var a=Ce.makeSpan(["katex-error"],[new Go(r)]);return a.setAttribute("title",t.toString()),a.setAttribute("style","color:"+n.errorColor),a},QC=function(t,r){var n=new D4(r);try{var a=ZC(t,n);return Doe(a,t,n)}catch(i){return vF(i,t,n)}},wse=function(t,r){var n=new D4(r);try{var a=ZC(t,n);return Ioe(a,t,n)}catch(i){return vF(i,t,n)}},kse="0.16.28",Sse={Span:Xf,Anchor:z4,SymbolNode:Go,SvgNode:Hl,PathNode:wu,LineNode:B4},wF={version:kse,render:xF,renderToString:xse,ParseError:nt,SETTINGS_SCHEMA:s6,__parse:vse,__renderToDomTree:QC,__renderToHTMLTree:wse,__setFontMetrics:roe,__defineSymbol:L,__defineFunction:gt,__defineMacro:W,__domTree:Sse};var L7e=Pe(kF(),1),Cse={"\\d":"\\mathrm{d}","\\R":"\\mathbb{R}","\\N":"\\mathbb{N}","\\Z":"\\mathbb{Z}","\\Q":"\\mathbb{Q}","\\C":"\\mathbb{C}"};function P4(e,t,r=!0){try{return wF.renderToString(e,{displayMode:t,output:r?"htmlAndMathml":"html",throwOnError:!1,errorColor:"#cc0000",macros:Cse,strict:!1})}catch(n){return`<span class="katex-error" style="color:#cc0000" title="${String(n)}">${e}</span>`}}function ht(e){return`calc(${typeof e=="number"?`${e}px`:e} * var(--edp-scale, 1))`}function ma(e){return{width:ht(e),height:ht(e)}}function jl(e){if(e==null||e==="")return;if(typeof e=="number")return ht(e);let t=String(e).trim();return/^\d+(\.\d+)?px$/.test(t)?ht(t):t}var SF={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"}},CF={border:"#2563eb",background:"#e0f2fe"},MF={border:"#dc2626",background:"#fee2e2"};function Mse(e){return{display:"inline-block",verticalAlign:"middle",border:`2px solid ${(e==null?void 0:e.border)||CF.border}`,background:(e==null?void 0:e.background)||CF.background,borderRadius:ht("4px"),padding:"0.17em 0.37em"}}var C6=`${ht("6px")} ${ht("8px")}`;function _se(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)||MF.border}`,background:(e==null?void 0:e.background)||MF.background,borderRadius:t,padding:"0.15em 0.45em"}}function al(e,t,r){return(0,ir.jsx)("div",{className:"exercise-content",children:e.content.map((n,a)=>bo(n,`node-${a}`,t,r))})}var Ase=/^[\u00a0\u202f ]?[.,;:!?\u2026)\]}\u00bb\u201d\u2019%\u060c\u061b\u061f]+/,Lse=new Set(["blank","inlineChoiceSet"]);function _F(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=Lse.has(c.type)&&(f==null?void 0:f.type)==="text"?(s=Ase.exec((o=f.text)!=null?o:""))==null?void 0:s[0]:void 0;if(!d||!f){a.push(bo(c,`${t}-${u}`,r,n));continue}let p=((l=f.text)!=null?l:"").slice(d.length);a.push((0,ir.jsxs)("span",{style:{whiteSpace:"nowrap"},children:[(0,ir.jsx)("span",{style:{whiteSpace:"normal"},children:bo(c,`${t}-${u}-a`,r,n)}),bo(Xe(ie({},f),{text:d}),`${t}-${u}-p`,r,n)]},`${t}-${u}`)),p&&a.push(bo(Xe(ie({},f),{text:p}),`${t}-${u+1}`,r,n)),u++}return a}function bo(e,t,r,n){var a,i,o,s,l,u,c,f,d,p,b,v,k,w,S,T,I,B,O,N,j,H,Y,V,re,xe,oe,le,Se,_e,de,me,Ue,Le,Ie,ye,Me,He,st,_t,ct,Ut,Bt;switch(e.type){case"choiceSet":case"inlineChoiceSet":return(0,ir.jsx)(M6,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"blank":return e.attrs.mode==="typed"?(0,ir.jsx)(_6,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t):(0,ir.jsx)(A6,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"blankPool":return(0,ir.jsx)(L6,{node:e},t);case"inlinePool":return(0,ir.jsx)(T6,{node:e},t);case"matchingSet":return(0,ir.jsx)(E6,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"aiAnswerInput":return(0,ir.jsx)(D6,{node:e,validationFeedback:r==null?void 0:r.get(e.id)},t);case"openResponseNode":return(0,ir.jsx)(I6,{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,ir.jsx)(z6,{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,ir.jsx)(B6,{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 rt=e.attrs,ft=rt==null?void 0:rt.textAlign,ot=(rt==null?void 0:rt.dir)||void 0;return(0,ir.jsx)("p",{dir:ot,style:ft?{textAlign:ft}:void 0,children:_F(e.content,t,r,n)},t)}case"heading":{let rt=(o=e.attrs.level)!=null?o:1,ft=`h${rt}`,ot=e.attrs,Tr=ot==null?void 0:ot.textAlign,Rt=(ot==null?void 0:ot.dir)||void 0,gr=(s=SF[rt])!=null?s:SF[3];return(0,ir.jsx)(ft,{dir:Rt,style:ie(ie({},gr),Tr?{textAlign:Tr}:{}),children:_F(e.content,t,r,n)},t)}case"blockquote":{let rt=e.attrs,ft=(rt==null?void 0:rt.dir)||void 0,ot=rt==null?void 0:rt.textAlign;return(0,ir.jsx)("blockquote",{dir:ft,style:ie({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((Tr,Rt)=>bo(Tr,`${t}-${Rt}`,r,n))},t)}case"text":{let rt=e,ft=(u=rt.text)!=null?u:"",ot=(c=rt.marks)!=null?c:[];if(ot.length===0)return(0,ir.jsx)("span",{children:ft},t);let Tr={};for(let gr of ot)gr.type==="textStyle"&&((f=gr.attrs)!=null&&f.color&&(Tr.color=gr.attrs.color),(d=gr.attrs)!=null&&d.fontSize&&(Tr.fontSize=gr.attrs.fontSize),(p=gr.attrs)!=null&&p.fontFamily&&(Tr.fontFamily=gr.attrs.fontFamily));let Rt=ft;for(let gr of ot)switch(gr.type){case"bold":Rt=(0,ir.jsx)("strong",{children:Rt});break;case"italic":Rt=(0,ir.jsx)("em",{children:Rt});break;case"underline":Rt=(0,ir.jsx)("u",{children:Rt});break;case"strike":Rt=(0,ir.jsx)("s",{children:Rt});break;case"code":Rt=(0,ir.jsx)("code",{children:Rt});break;case"subscript":Rt=(0,ir.jsx)("sub",{children:Rt});break;case"superscript":Rt=(0,ir.jsx)("sup",{children:Rt});break;case"boxedText":Rt=(0,ir.jsx)("span",{style:Mse(gr.attrs),children:Rt});break;case"circleText":Rt=(0,ir.jsx)("span",{style:_se(gr.attrs),children:Rt});break}return(0,ir.jsx)("span",{style:Object.keys(Tr).length>0?Tr:void 0,children:Rt},t)}case"hardBreak":return(0,ir.jsx)("br",{},t);case"resizableImage":return(0,ir.jsx)("img",{src:((b=e.attrs)==null?void 0:b.src)||void 0,alt:((v=e.attrs)==null?void 0:v.alt)||"",style:{display:"inline-block",verticalAlign:"middle",width:(w=jl(((k=e.attrs)==null?void 0:k.width)||void 0))!=null?w:"auto",height:(T=jl(((S=e.attrs)==null?void 0:S.height)||void 0))!=null?T:"auto",maxWidth:"100%"}},t);case"resizableAudio":return(0,ir.jsx)("span",{style:{display:"inline-flex",verticalAlign:"middle",alignItems:"center",background:"#f1f5f9",borderRadius:ht("8px"),padding:`${ht("4px")} ${ht("8px")}`,maxWidth:"100%"},children:(0,ir.jsx)("audio",{controls:!0,src:((I=e.attrs)==null?void 0:I.src)||void 0,style:{display:"block",width:ht("320px"),maxWidth:"100%"}})},t);case"resizableVideo":return(0,ir.jsx)("video",{src:((B=e.attrs)==null?void 0:B.src)||void 0,controls:!0,style:{display:"inline-block",verticalAlign:"middle",width:(N=jl(((O=e.attrs)==null?void 0:O.width)||void 0))!=null?N:"auto",height:(H=jl(((j=e.attrs)==null?void 0:j.height)||void 0))!=null?H:"auto",maxWidth:"100%"}},t);case"youtubeEmbed":return(0,ir.jsx)("iframe",{src:`https://www.youtube.com/embed/${((Y=e.attrs)==null?void 0:Y.videoId)||""}`,width:((V=e.attrs)==null?void 0:V.width)||480,height:((re=e.attrs)==null?void 0:re.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:jl(((xe=e.attrs)==null?void 0:xe.width)||480),height:jl(((oe=e.attrs)==null?void 0:oe.height)||270)}},t);case"inlineMath":return(0,ir.jsx)("span",{dir:"ltr",style:{unicodeBidi:"isolate",display:"inline-block"},className:"math-inline",dangerouslySetInnerHTML:{__html:P4((Se=(le=e.attrs)==null?void 0:le.latex)!=null?Se:"",!1,!0)}},t);case"blockMath":return(0,ir.jsx)("div",{dir:"ltr",style:{unicodeBidi:"isolate",textAlign:"center",margin:"1em 0"},className:"math-block",dangerouslySetInnerHTML:{__html:P4((de=(_e=e.attrs)==null?void 0:_e.latex)!=null?de:"",!0,!0)}},t);case"variable":return(0,ir.jsx)("span",{className:"variable",children:`{${(me=e.attrs)==null?void 0:me.name}}`},t);default:{let rt=e;return rt.type==="bulletList"?(0,ir.jsx)("ul",{style:{listStyleType:"disc",paddingLeft:"1.5em",margin:"0.5em 0"},children:(Ue=rt.content)==null?void 0:Ue.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))},t):rt.type==="orderedList"?(0,ir.jsx)("ol",{style:{listStyleType:"decimal",paddingLeft:"1.5em",margin:"0.5em 0"},children:(Le=rt.content)==null?void 0:Le.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))},t):rt.type==="listItem"?(0,ir.jsx)("li",{children:(Ie=rt.content)==null?void 0:Ie.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))},t):rt.type==="table"?(0,ir.jsx)("div",{style:{overflowX:"auto",margin:`${ht("1.25rem")} 0`},children:(0,ir.jsx)("table",{style:{borderCollapse:"collapse",width:"100%",tableLayout:"fixed"},children:(0,ir.jsx)("tbody",{children:(ye=rt.content)==null?void 0:ye.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))})})},t):rt.type==="tableRow"?(0,ir.jsx)("tr",{children:(Me=rt.content)==null?void 0:Me.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))},t):rt.type==="tableCell"?(0,ir.jsx)("td",{colSpan:(He=rt.attrs)==null?void 0:He.colspan,rowSpan:(st=rt.attrs)==null?void 0:st.rowspan,style:{border:"1px solid #d1d5db",padding:C6,verticalAlign:"top"},children:(_t=rt.content)==null?void 0:_t.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))},t):rt.type==="tableHeader"?(0,ir.jsx)("th",{colSpan:(ct=rt.attrs)==null?void 0:ct.colspan,rowSpan:(Ut=rt.attrs)==null?void 0:Ut.rowspan,style:{border:"1px solid #d1d5db",padding:C6,verticalAlign:"top",background:"#f3f4f6",fontWeight:600},children:(Bt=rt.content)==null?void 0:Bt.map((ft,ot)=>bo(ft,`${t}-${ot}`,r,n))},t):(console.warn(`Unknown node type during interpretation: ${e.type}`),null)}}}function Aa(e,t){return e.map(r=>{var n,a,i,o,s,l,u,c,f,d,p,b,v,k,w,S,T,I,B,O,N,j,H,Y,V,re,xe,oe,le,Se,_e,de;if(r.type==="text"){let me=Jf((n=r.text)!=null?n:""),Ue=(a=r.marks)!=null?a:[],Le=[];for(let Ie of Ue)Ie.type==="textStyle"&&((i=Ie.attrs)!=null&&i.color&&Le.push(`color:${Ie.attrs.color}`),(o=Ie.attrs)!=null&&o.fontSize&&Le.push(`font-size:${Ie.attrs.fontSize}`),(s=Ie.attrs)!=null&&s.fontFamily&&Le.push(`font-family:${Ie.attrs.fontFamily}`));Le.length>0&&(me=`<span style="${Le.join(";")}">${me}</span>`);for(let Ie of Ue)switch(Ie.type){case"bold":me=`<strong>${me}</strong>`;break;case"italic":me=`<em>${me}</em>`;break;case"underline":me=`<u>${me}</u>`;break;case"strike":me=`<s>${me}</s>`;break;case"code":me=`<code>${me}</code>`;break;case"subscript":me=`<sub>${me}</sub>`;break;case"superscript":me=`<sup>${me}</sup>`;break;case"boxedText":{let ye=((l=Ie.attrs)==null?void 0:l.border)||"#2563eb",Me=((u=Ie.attrs)==null?void 0:u.background)||"#e0f2fe";me=`<span style="display:inline-block;vertical-align:middle;border:2px solid ${ye};background:${Me};border-radius:${ht("4px")};padding:0.17em 0.37em">${me}</span>`;break}case"circleText":{let ye=((c=Ie.attrs)==null?void 0:c.border)||"#dc2626",Me=((f=Ie.attrs)==null?void 0:f.background)||"#fee2e2",He=((d=Ie.attrs)==null?void 0:d.shape)==="circle"?"50%":"9999px";me=`<span style="display:inline-block;vertical-align:middle;border:2px solid ${ye};background:${Me};border-radius:${He};padding:0.15em 0.45em">${me}</span>`;break}}return me}if(r.type==="paragraph"){let me=r.content?Aa(r.content,t):"",Ue=(p=r.attrs)==null?void 0:p.dir,Le=(b=r.attrs)==null?void 0:b.textAlign,Ie=Ue?` dir="${Ue}"`:"",ye=Le?` style="text-align:${Le}"`:"";return t!=null&&t.stripParagraphs?me:`<p${Ie}${ye}>${me}</p>`}if(r.type==="hardBreak")return"<br/>";if(r.type==="table"){let me=r.content?Aa(r.content,t):"";return`<div style="overflow-x:auto;margin:${ht("1.25rem")} 0"><table style="border-collapse:collapse;width:100%;table-layout:fixed"><tbody>${me}</tbody></table></div>`}if(r.type==="tableRow")return`<tr>${r.content?Aa(r.content,t):""}</tr>`;if(r.type==="tableCell"){let me=r.content?Aa(r.content,t):"",Ue=(v=r.attrs)!=null&&v.colspan?` colspan="${r.attrs.colspan}"`:"",Le=(k=r.attrs)!=null&&k.rowspan?` rowspan="${r.attrs.rowspan}"`:"";return`<td${Ue}${Le} style="border:1px solid #d1d5db;padding:${C6};vertical-align:top">${me}</td>`}if(r.type==="tableHeader"){let me=r.content?Aa(r.content,t):"",Ue=(w=r.attrs)!=null&&w.colspan?` colspan="${r.attrs.colspan}"`:"",Le=(S=r.attrs)!=null&&S.rowspan?` rowspan="${r.attrs.rowspan}"`:"";return`<th${Ue}${Le} style="border:1px solid #d1d5db;padding:${C6};vertical-align:top;background:#f3f4f6;font-weight:600">${me}</th>`}if(r.type==="bulletList")return`<ul style="list-style-type:disc;padding-left:1.5em">${r.content?Aa(r.content,t):""}</ul>`;if(r.type==="orderedList")return`<ol style="list-style-type:decimal;padding-left:1.5em">${r.content?Aa(r.content,t):""}</ol>`;if(r.type==="listItem")return`<li>${r.content?Aa(r.content,t):""}</li>`;if(r.type==="blockquote"){let me=r.content?Aa(r.content,t):"";return`<blockquote${(T=r.attrs)!=null&&T.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">${me}</blockquote>`}if(r.type==="resizableImage"){let me=(I=r.attrs)!=null?I:{},Ue=S6(me.width),Le=S6(me.height);return`<img src="${Jf((B=me.src)!=null?B:"")}" alt="${Jf((O=me.alt)!=null?O:"")}" style="display:inline-block;vertical-align:middle;max-width:100%;${Ue?`width:${Ue};`:""}${Le?`height:${Le};`:""}"/>`}if(r.type==="resizableAudio"){let me=(N=r.attrs)!=null?N:{};return`<span style="display:inline-flex;vertical-align:middle;align-items:center;background:#f1f5f9;border-radius:${ht("8px")};padding:${ht("4px")} ${ht("8px")};max-width:100%"><audio controls src="${Jf((j=me.src)!=null?j:"")}" style="display:block;width:${ht("320px")};max-width:100%"></audio></span>`}if(r.type==="resizableVideo"){let me=(H=r.attrs)!=null?H:{},Ue=S6(me.width),Le=S6(me.height);return`<video src="${Jf((Y=me.src)!=null?Y:"")}" controls style="display:inline-block;vertical-align:middle;max-width:100%;${Ue?`width:${Ue};`:""}${Le?`height:${Le};`:""}"></video>`}if(r.type==="youtubeEmbed"){let me=(V=r.attrs)!=null?V:{};return`<iframe src="https://www.youtube.com/embed/${Jf((re=me.videoId)!=null?re:"")}" width="${me.width||480}" height="${me.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:${jl(me.width||480)};height:${jl(me.height||270)}"></iframe>`}return r.type==="inlineMath"?`<span dir="ltr" class="math-inline" style="unicode-bidi:isolate;display:inline-block">${P4((oe=(xe=r.attrs)==null?void 0:xe.latex)!=null?oe:"",!1,!0)}</span>`:r.type==="blockMath"?`<div dir="ltr" class="math-block" style="unicode-bidi:isolate;text-align:center;margin:1em 0">${P4((Se=(le=r.attrs)==null?void 0:le.latex)!=null?Se:"",!0,!0)}</div>`:r.type==="variable"?`<span class="variable">{${Jf((de=(_e=r.attrs)==null?void 0:_e.name)!=null?de:"")}}</span>`:""}).join("")}function S6(e){var t;return e==null||e===""?null:(t=jl(e))!=null?t:null}function Jf(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}var AF=Pe($t(),1),F4=Pe(kt(),1);var M1={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(""),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"};var R6={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(""),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/cam\xE9ra refus\xE9. Autorise l'acc\xE8s dans les param\xE8tres 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"};var N6={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"],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"};var Tse={en:M1,fr:R6,ar:N6},nM=(0,F4.createContext)(null);function ga(){var e;return(e=(0,F4.useContext)(nM))!=null?e:M1}function q4(e){let t=(0,F4.useContext)(nM);return e&&Tse[e]||t||M1}function $4({locale:e,children:t}){let r=q4(e);return(0,AF.jsx)(nM.Provider,{value:r,children:t})}var LF=Pe($t(),1),gd=Pe(kt(),1);var Ese={sm:.875,md:1,lg:1.25,xl:1.5},aM=(0,gd.createContext)(null);function Dse(e,t){let r=ie({},e!=null?e:{});if(t)for(let[n,a]of Object.entries(t))a!==void 0&&(r[n]=a);return r}function Ise(e){var t;return typeof e=="number"?Number.isFinite(e)&&e>0?e:1:e&&(t=Ese[e])!=null?t:1}function il(e){var r,n,a;let t=e!=null?e:{};return{scale:Ise(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 Ms(e){let t=(0,gd.useContext)(aM);return(0,gd.useMemo)(()=>Dse(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 Ul(){let e=(0,gd.useContext)(aM);return(0,gd.useMemo)(()=>il(e),[e])}function _s({display:e,children:t}){let r=Ms(e);return(0,LF.jsx)(aM.Provider,{value:r,children:t})}function ol(e){if(e.sizeSet)return{"--edp-scale":String(e.scale)}}function Zf(){let{motion:e}=Ul();return{hop:e==="none"?"":"animate-hop",shake:e==="full"?"animate-shake":"",wobble:e==="full"?"animate-wobble":""}}function zse(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 Bse(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 H4(e,t){let r=[...e],n=Bse(zse(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}function iM({node:e}){var t,r,n;if(e.type==="text"){if(!e.marks||e.marks.length===0)return(0,er.jsx)(er.Fragment,{children:e.text});let a=e.text||"";for(let i of e.marks)i.type==="bold"?a=(0,er.jsx)("strong",{children:a}):i.type==="italic"?a=(0,er.jsx)("em",{children:a}):i.type==="underline"?a=(0,er.jsx)("u",{children:a}):i.type==="strike"?a=(0,er.jsx)("s",{children:a}):i.type==="textStyle"&&((t=i.attrs)!=null&&t.color)&&(a=(0,er.jsx)("span",{style:{color:i.attrs.color},children:a}));return(0,er.jsx)(er.Fragment,{children:a})}return e.type==="paragraph"?(0,er.jsx)("span",{className:"block",children:(n=(r=e.content)==null?void 0:r.map((a,i)=>(0,er.jsx)(iM,{node:a},i)))!=null?n:(0,er.jsx)("br",{})}):e.type==="hardBreak"?(0,er.jsx)("br",{}):e.content?(0,er.jsx)("span",{className:"block",children:e.content.map((a,i)=>(0,er.jsx)(iM,{node:a},i))}):null}function Rse({nodes:e}){return(0,er.jsx)("span",{className:"block space-y-1",style:{color:"var(--ink, #1d2025)"},children:e.map((t,r)=>(0,er.jsx)(iM,{node:t},r))})}function TF({hint:e}){let t=ga(),[r,n]=(0,Vi.useState)(!1),[a,i]=(0,Vi.useState)(!1),o=(0,Vi.useRef)(null);return(0,Vi.useEffect)(()=>{if(!a)return;let c=f=>{o.current&&!o.current.contains(f.target)&&(i(!1),n(!1))};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[a]),(0,er.jsxs)("span",{ref:o,className:"relative inline-flex items-center align-middle",onMouseEnter:()=>n(!0),onMouseLeave:()=>{a||n(!1)},children:[(0,er.jsx)("button",{type:"button",onClick:c=>{c.stopPropagation(),a?(i(!1),n(!1)):(i(!0),n(!0))},className:ar("player-blank-hint-btn select-none",a&&"player-blank-hint-btn--pinned"),"aria-label":t.showHint,children:"?"}),r&&(0,er.jsx)("span",{className:"player-blank-hint-pop",onClick:c=>c.stopPropagation(),children:(0,er.jsx)(Rse,{nodes:e})})]})}function Nse(e){return[...e].map(t=>({v:t,r:Math.random()})).sort((t,r)=>t.r-r.r).map(t=>t.v)}var Ose=e=>e.replace(/ {2,}/g,t=>" ".repeat(t.length-1)+" "),Pse=new Set(["image","resizableImage","resizableVideo","youtubeEmbed"]);function IF(e){return(e!=null?e:[]).some(t=>Pse.has(t==null?void 0:t.type)||IF(t==null?void 0:t.content))}var EF=()=>(0,er.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,children:(0,er.jsx)("path",{d:"M5 13l4 4L19 7"})}),DF=()=>(0,er.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,children:(0,er.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})});function M6({node:e,validationFeedback:t}){var Ue,Le,Ie,ye;let r=bi(),n=ga(),a=Ul(),i=Zf(),{id:o,content:s,attrs:l}=e,u=(Ue=l.shuffle)!=null?Ue:!1,c="prompt"in l?l.prompt:void 0,f="separator"in l&&(Le=l.separator)!=null?Le:"/",d="pickLimit"in l&&l.pickLimit?l.pickLimit:1,p="layout"in l&&(Ie=l.layout)!=null?Ie:"row",b=e.type==="inlineChoiceSet",v=JSON.stringify(s),k=u&&a.shuffleSeed!==void 0,w=(0,Vi.useMemo)(()=>k?H4(s,`${a.shuffleSeed}:${o}`):null,[k,a.shuffleSeed,o,v]),[S,T]=(0,Vi.useState)(s);(0,Vi.useEffect)(()=>{k||T(u?Nse(s):s)},[u,k,v]);let I=w!=null?w:S,[B,O]=(0,Vi.useState)(new Set),N=(ye=t==null?void 0:t.showFeedback)!=null?ye:!1,j=(t==null?void 0:t.correctChoiceIds)||[];(0,Vi.useEffect)(()=>{let Me=He=>{let _t=He.answers.find(ct=>ct.nodeId===o&&ct.type==="choiceSet");_t&&"selectedIds"in _t.answer&&O(new Set(_t.answer.selectedIds))};return r.on("answers:prefill",Me),()=>r.off("answers:prefill",Me)},[o,r]),(0,Vi.useEffect)(()=>{r.emit({type:"answer:changed",answer:{nodeId:o,type:"choiceSet",timestamp:Date.now(),answer:{selectedIds:Array.from(B)}}})},[B,o,r]);let H=Me=>{N||O(He=>{let st=new Set(He);return d===1?st.has(Me)?st.delete(Me):(st.clear(),st.add(Me)):st.has(Me)?st.delete(Me):st.size<d&&st.add(Me),st})},Y=Me=>Ose(Aa(Me.content)),V=Me=>{let He=B.has(Me),st=j.includes(Me);return N?st&&He?"correct":st&&!He?"correct-unchosen":!st&&He?"incorrect":"muted":He?"selected":"idle"},re={idle:"",selected:"player-choice--selected",correct:ar("player-choice--correct",i.hop),"correct-unchosen":"player-choice--correct-unchosen",incorrect:ar("player-choice--incorrect",i.shake),muted:"player-choice--muted"},xe={idle:"",selected:"player-inline-choice--selected",correct:ar("player-inline-choice--correct",i.hop),"correct-unchosen":"player-inline-choice--correct-unchosen",incorrect:ar("player-inline-choice--incorrect",i.shake),muted:"player-inline-choice--muted"};if(b)return(0,er.jsxs)("span",{className:"inline-choice",children:[c&&(0,er.jsxs)("span",{className:"mr-2 font-medium",children:[c,d>1?(0,er.jsx)("span",{className:"ml-1 opacity-60",children:n.chooseN(d)}):null]}),I.map((Me,He)=>(0,er.jsxs)(Vi.Fragment,{children:[(0,er.jsx)("button",{type:"button",disabled:N,onClick:()=>H(Me.id),className:ar("player-inline-choice",xe[V(Me.id)]),"aria-pressed":B.has(Me.id),dangerouslySetInnerHTML:{__html:Y(Me)}}),He<I.length-1&&(0,er.jsx)("span",{className:"mx-1",children:f})]},Me.id)),l.hint&&l.hint.length>0&&(0,er.jsx)(TF,{hint:l.hint})]});let oe=a.layoutBy==="box",le=a.choiceColumns?Math.min(a.choiceColumns,I.length):0,Se=le?{gridAutoRows:"1fr",gridTemplateColumns:`repeat(${le}, minmax(0, 1fr))`}:{gridAutoRows:"1fr"},_e=I.some(Me=>IF(Me.content)),de=a.choiceLabels==="letters",me=Me=>{var He;return(He=n.choiceLetters[Me])!=null?He:String(Me+1)};return(0,er.jsxs)("div",{className:ar("cs-player my-4 space-y-3",oe&&"cs-player--box"),children:[c&&(0,er.jsxs)("p",{className:"font-medium",children:[c,d>1?(0,er.jsxs)("span",{className:"ml-2 text-sm opacity-70",children:["(choose ",d,")"]}):null]}),l.hint&&l.hint.length>0&&(0,er.jsx)(TF,{hint:l.hint}),(0,er.jsx)("div",{className:ar("cs-player__grid",p==="row"&&"cs-player__grid--row"),style:Se,children:I.map((Me,He)=>{let st=V(Me.id),_t=st==="incorrect"?"incorrect":st==="correct"||st==="correct-unchosen"?"correct":null;return(0,er.jsxs)("button",{type:"button",disabled:N,onClick:()=>H(Me.id),className:ar("player-choice",_e&&"player-choice--tile",re[st]),"aria-pressed":B.has(Me.id),children:[(0,er.jsx)("span",{className:ar("player-choice__mark",d>1?"player-choice__mark--box":"player-choice__mark--radio",de&&"player-choice__mark--letter"),children:de?me(He):st==="incorrect"?(0,er.jsx)(DF,{}):(0,er.jsx)(EF,{})}),(0,er.jsx)("span",{className:"player-choice__text",dangerouslySetInnerHTML:{__html:Y(Me)}}),de&&_t&&(0,er.jsx)("span",{className:`player-choice__verdict player-choice__verdict--${_t}`,"aria-hidden":"true",children:_t==="incorrect"?(0,er.jsx)(DF,{}):(0,er.jsx)(EF,{})})]},Me.id)})})]})}var Ir=Pe($t(),1),Xo=Pe(kt(),1);function oM({node:e}){var t,r,n;if(e.type==="text"){if(!e.marks||e.marks.length===0)return(0,Ir.jsx)(Ir.Fragment,{children:e.text});let a=e.text||"";for(let i of e.marks)i.type==="bold"?a=(0,Ir.jsx)("strong",{children:a}):i.type==="italic"?a=(0,Ir.jsx)("em",{children:a}):i.type==="underline"?a=(0,Ir.jsx)("u",{children:a}):i.type==="strike"?a=(0,Ir.jsx)("s",{children:a}):i.type==="textStyle"&&((t=i.attrs)!=null&&t.color)&&(a=(0,Ir.jsx)("span",{style:{color:i.attrs.color},children:a}));return(0,Ir.jsx)(Ir.Fragment,{children:a})}return e.type==="paragraph"?(0,Ir.jsx)("span",{className:"block",children:(n=(r=e.content)==null?void 0:r.map((a,i)=>(0,Ir.jsx)(oM,{node:a},i)))!=null?n:(0,Ir.jsx)("br",{})}):e.type==="hardBreak"?(0,Ir.jsx)("br",{}):e.content?(0,Ir.jsx)("span",{className:"block",children:e.content.map((a,i)=>(0,Ir.jsx)(oM,{node:a},i))}):null}function Fse({nodes:e}){return(0,Ir.jsx)("span",{className:"block space-y-1",children:e.map((t,r)=>(0,Ir.jsx)(oM,{node:t},r))})}function qse({hint:e}){let t=ga(),[r,n]=(0,Xo.useState)(!1),[a,i]=(0,Xo.useState)(!1),o=(0,Xo.useRef)(null);return(0,Xo.useEffect)(()=>{if(!a)return;let c=f=>{o.current&&!o.current.contains(f.target)&&(i(!1),n(!1))};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[a]),(0,Ir.jsxs)("span",{ref:o,className:"relative inline-flex items-center align-middle",onMouseEnter:()=>n(!0),onMouseLeave:()=>{a||n(!1)},children:[(0,Ir.jsx)("button",{type:"button",onClick:c=>{c.stopPropagation(),a?(i(!1),n(!1)):(i(!0),n(!0))},className:ar("player-blank-hint-btn select-none",a&&"player-blank-hint-btn--pinned"),"aria-label":t.showHint,children:"?"}),r&&(0,Ir.jsx)("span",{className:"player-blank-hint-pop",onClick:c=>c.stopPropagation(),children:(0,Ir.jsx)(Fse,{nodes:e})})]})}function _6({node:e,validationFeedback:t}){var N;let r=bi(),n=ga(),a=Zf(),{id:i,attrs:o}=e,{placeholder:s="___",width:l="auto",hint:u}=o,c=(0,Xo.useRef)(null),f=s.trim().split(/\s+/).filter(Boolean).length,d=l==="auto"&&f>=4,[p,b]=(0,Xo.useState)(""),v=(N=t==null?void 0:t.showFeedback)!=null?N:!1,k=t==null?void 0:t.state,w=k==="validating",S=t==null?void 0:t.displayAnswer,T=t==null?void 0:t.message;(0,Xo.useEffect)(()=>{let j=H=>{let V=H.answers.find(re=>re.nodeId===i&&re.type==="blank");V&&"mode"in V.answer&&V.answer.mode==="typed"&&"text"in V.answer&&b(V.answer.text)};return r.on("answers:prefill",j),()=>r.off("answers:prefill",j)},[i,r]),(0,Xo.useEffect)(()=>{r.emit({type:"answer:changed",answer:{nodeId:i,type:"blank",timestamp:Date.now(),answer:{mode:"typed",text:p}}})},[p,i,r]);let I=j=>{b(j.target.value)},B=(0,Xo.useCallback)(()=>{let j=c.current;j&&(j.style.height="auto",j.style.height=`${j.scrollHeight}px`)},[]);(0,Xo.useEffect)(()=>{B()},[p,B]);let O=v&&!w;return(0,Ir.jsxs)("span",{className:ar("inline-flex flex-wrap items-center gap-x-1 gap-y-0.5 align-middle max-w-full",d&&"w-full"),children:[(0,Ir.jsx)("span",{className:ar("relative inline-block shrink-0 min-w-0 max-w-full",d&&"w-full flex-1"),children:O?(0,Ir.jsx)("span",{className:ar("player-typed-blank-feedback",d&&"w-full",k==="correct"&&ar("player-typed-blank-feedback--correct",a.hop),k==="partial"&&"player-typed-blank-feedback--partial",k==="incorrect"&&ar("player-typed-blank-feedback--incorrect",a.wobble)),children:p||(0,Ir.jsx)("span",{className:"opacity-40",children:s})}):(0,Ir.jsxs)(Ir.Fragment,{children:[(0,Ir.jsx)("textarea",{ref:c,"aria-label":n.blankAnswerAria,placeholder:s,value:p,onChange:I,disabled:v,rows:1,className:ar("player-typed-blank",d&&"w-full",w&&"player-typed-blank--pending"),style:l!=="auto"?{width:l}:d?{width:"100%"}:{width:`${Math.max(7,p.length+1)}ch`,maxWidth:"100%"}}),!p&&!w&&(0,Ir.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"}),w&&(0,Ir.jsx)("span",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,Ir.jsx)("span",{className:"player-typed-blank-spinner","aria-label":n.aiEvaluationInProgressAria})})]})}),v&&k==="incorrect"&&S&&(0,Ir.jsxs)("span",{className:"player-blank-reveal",children:["(",S,")"]}),v&&T&&(0,Ir.jsx)("span",{className:ar("player-blank-feedback",k==="correct"&&"player-blank-feedback--correct",k==="partial"&&"player-blank-feedback--partial",k==="incorrect"&&"player-blank-feedback--incorrect"),children:T}),u&&u.length>0&&(0,Ir.jsx)(qse,{hint:u})]})}var ul=Pe($t(),1),xM=Pe(kt(),1);var Ne=Pe(kt()),np=Pe(Tg());var Wa=Pe(kt());var j4=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function Qf(e){let t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function O6(e){return"nodeType"in e}function Gi(e){var t,r;return e?Qf(e)?e:O6(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function P6(e){let{Document:t}=Gi(e);return e instanceof t}function A1(e){return Qf(e)?!1:e instanceof Gi(e).HTMLElement}function lM(e){return e instanceof Gi(e).SVGElement}function ep(e){return e?Qf(e)?e.document:O6(e)?P6(e)?e:A1(e)||lM(e)?e.ownerDocument:document:document:document}var Mu=j4?Wa.useLayoutEffect:Wa.useEffect;function U4(e){let t=(0,Wa.useRef)(e);return Mu(()=>{t.current=e}),(0,Wa.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 BF(){let e=(0,Wa.useRef)(null),t=(0,Wa.useCallback)((n,a)=>{e.current=setInterval(n,a)},[]),r=(0,Wa.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function L1(e,t){t===void 0&&(t=[e]);let r=(0,Wa.useRef)(e);return Mu(()=>{r.current!==e&&(r.current=e)},t),r}function T1(e,t){let r=(0,Wa.useRef)();return(0,Wa.useMemo)(()=>{let n=e(r.current);return r.current=n,n},[...t])}function K4(e){let t=U4(e),r=(0,Wa.useRef)(null),n=(0,Wa.useCallback)(a=>{a!==r.current&&(t==null||t(a,r.current)),r.current=a},[]);return[r,n]}function V4(e){let t=(0,Wa.useRef)();return(0,Wa.useEffect)(()=>{t.current=e},[e]),t.current}var sM={};function G4(e,t){return(0,Wa.useMemo)(()=>{if(t)return t;let r=sM[e]==null?0:sM[e]+1;return sM[e]=r,e+"-"+r},[e,t])}function RF(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},ie({},t))}}var tp=RF(1),W4=RF(-1);function $se(e){return"clientX"in e&&"clientY"in e}function F6(e){if(!e)return!1;let{KeyboardEvent:t}=Gi(e.target);return t&&e instanceof t}function Hse(e){if(!e)return!1;let{TouchEvent:t}=Gi(e.target);return t&&e instanceof t}function X4(e){if(Hse(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 $se(e)?{x:e.clientX,y:e.clientY}:null}var _1=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[_1.Translate.toString(e),_1.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),zF="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function NF(e){return e.matches(zF)?e:e.querySelector(zF)}var rp=Pe(kt()),jse={display:"none"};function OF(e){let{id:t,value:r}=e;return rp.default.createElement("div",{id:t,style:jse},r)}function PF(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 rp.default.createElement("div",{id:t,style:a,role:"status","aria-live":n,"aria-atomic":!0},r)}function FF(){let[e,t]=(0,rp.useState)("");return{announce:(0,rp.useCallback)(n=>{n!=null&&t(n)},[]),announcement:e}}var JF=(0,Ne.createContext)(null);function mM(e){let t=(0,Ne.useContext)(JF);(0,Ne.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Use(){let[e]=(0,Ne.useState)(()=>new Set),t=(0,Ne.useCallback)(n=>(e.add(n),()=>e.delete(n)),[e]);return[(0,Ne.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 Kse={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;t$.hasOwnProperty(o)&&this.parser.normalizeLists&&Cue(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,n));e:if(l?l.ignore:Sue.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(e$.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=Zr.none;for(let s of a.concat(t.marks))(i.type?i.type.allowsMarkType(s.type):Oq(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=Rq(t,i,o.options);o.options&w2&&o.content.length==0&&(s|=w2);let l=Zr.none;return n=n.filter(u=>(o.type?o.type.allowsMarkType(u.type):Oq(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new O1(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|=S2)}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 Cue(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let n=t.nodeType==1?t.nodeName.toLowerCase():null;n&&t$.hasOwnProperty(n)&&r?(r.appendChild(t),t=r):n=="li"?r=t:n&&(r=null)}}function Mue(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Nq(e){let t={};for(let r in e)t[r]=e[r];return t}function Oq(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 qc=class e{constructor(t,r){this.nodes=t,this.marks=r}serializeFragment(t,r={},n){n||(n=SM(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}=J6(SM(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&&J6(SM(n),a(t,r),null,t.attrs)}static renderSpec(t,r,n=null,a){return J6(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=Pq(t.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(t){return Pq(t.marks)}};function Pq(e){let t={};for(let r in e){let n=e[r].spec.toDOM;n&&(t[r]=n)}return t}function SM(e){return e.document||window.document}var Fq=new WeakMap;function _ue(e){let t=Fq.get(e);return t===void 0&&Fq.set(e,t=Aue(e)),t}function Aue(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 J6(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=_ue(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:b}=J6(e,d,r,n);if(l.appendChild(p),b){if(s)throw new RangeError("Multiple content holes");s=b}}}return{dom:l,contentDOM:s}}var a$=65535,i$=Math.pow(2,16);function Lue(e,t){return e+t*i$}function r$(e){return e&a$}function Tue(e){return(e-(e&a$))/i$}var o$=1,s$=2,nx=4,l$=8,_2=class{constructor(t,r,n){this.pos=t,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&l$)>0}get deletedBefore(){return(this.delInfo&(o$|nx))>0}get deletedAfter(){return(this.delInfo&(s$|nx))>0}get deletedAcross(){return(this.delInfo&nx)>0}},$c=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=r$(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+Tue(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 b=t==(r<0?l:f)?null:Lue(s/3,t-l),v=t==l?s$:t==f?o$:nx;return(r<0?t!=l:t!=f)&&(v|=l$),new _2(p,v,b)}a+=c-u}return n?t+a:new _2(t+a,0,null)}touches(t,r){let n=0,a=r$(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])}};$c.empty=new $c([]);var A2=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 _2(t,a,null)}},EM=Object.create(null),vi=class{getMap(){return $c.empty}merge(t){return null}static fromJSON(t,r){if(!r||!r.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=EM[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 EM)throw new RangeError("Duplicate use of step JSON ID "+t);return EM[t]=r,r.prototype.jsonID=t,r}},Bi=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 lp)return e.fail(i.message);throw i}}};function RM(e,t,r){let n=[];for(let a=0;a<e.childCount;a++){let i=e.child(a);i.content.size&&(i=i.copy(RM(i.content,t,i))),i.isInline&&(i=t(i,r,a)),n.push(i)}return Ze.fromArray(n)}var L2=class e extends vi{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 yt(RM(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 Bi.fromReplace(t,this.from,this.to,i)}invert(){return new Hc(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))}};vi.jsonID("addMark",L2);var Hc=class e extends vi{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 yt(RM(r.content,a=>a.mark(this.mark.removeFromSet(a.marks)),t),r.openStart,r.openEnd);return Bi.fromReplace(t,this.from,this.to,n)}invert(){return new L2(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))}};vi.jsonID("removeMark",Hc);var T2=class e extends vi{constructor(t,r){super(),this.pos=t,this.mark=r}apply(t){let r=t.nodeAt(this.pos);if(!r)return Bi.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return Bi.fromReplace(t,this.pos,this.pos+1,new yt(Ze.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 F1(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))}};vi.jsonID("addNodeMark",T2);var F1=class e extends vi{constructor(t,r){super(),this.pos=t,this.mark=r}apply(t){let r=t.nodeAt(this.pos);if(!r)return Bi.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.removeFromSet(r.marks));return Bi.fromReplace(t,this.pos,this.pos+1,new yt(Ze.from(n),0,r.isLeaf?0:1))}invert(t){let r=t.nodeAt(this.pos);return!r||!this.mark.isInSet(r.marks)?this:new T2(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))}};vi.jsonID("removeNodeMark",F1);var Yi=class e extends vi{constructor(t,r,n,a=!1){super(),this.from=t,this.to=r,this.slice=n,this.structure=a}apply(t){return this.structure&&zM(t,this.from,this.to)?Bi.fail("Structure replace would overwrite content"):Bi.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new $c([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?yt.empty:new yt(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?yt.empty:new yt(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,yt.fromJSON(t,r.slice),!!r.structure)}};vi.jsonID("replace",Yi);var Ya=class e extends vi{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&&(zM(t,this.from,this.gapFrom)||zM(t,this.gapTo,this.to)))return Bi.fail("Structure gap-replace would overwrite content");let r=t.slice(this.gapFrom,this.gapTo);if(r.openStart||r.openEnd)return Bi.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,r.content);return n?Bi.fromReplace(t,this.from,this.to,n):Bi.fail("Content does not fit in gap")}getMap(){return new $c([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,yt.fromJSON(t,r.slice),r.insert,!!r.structure)}};vi.jsonID("replaceAround",Ya);function zM(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 Eue(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),b=n.addToSet(f);for(let v=0;v<f.length;v++)f[v].isInSet(b)||(o&&o.to==d&&o.mark.eq(f[v])?o.to=p:a.push(o=new Hc(d,p,f[v])));s&&s.to==d?s.to=p:i.push(s=new L2(d,p,n))}}),a.forEach(l=>e.step(l)),i.forEach(l=>e.step(l))}function Due(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 b=a[p];b.step==i-1&&f.eq(a[p].style)&&(d=b)}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 Hc(o.from,o.to,o.style)))}function NM(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 Yi(s,c,yt.empty));else{n=f;for(let d=0;d<u.marks.length;d++)r.allowsMarkType(u.marks[d].type)||e.step(new Hc(s,c,u.marks[d]));if(a&&u.isText&&r.whitespace!="pre"){let d,p=/\r?\n|\r/g,b;for(;d=p.exec(u.text);)b||(b=new yt(Ze.from(r.schema.text(" ",r.allowedMarks(u.marks))),0,0)),o.push(new Yi(s+d.index,s+d.index+d[0].length,b))}}s=c}if(!n.validEnd){let l=n.fillBefore(Ze.empty,!0);e.replace(s,s,new yt(l,0,0))}for(let l=o.length-1;l>=0;l--)e.step(o[l])}function Iue(e,t,r){return(t==0||e.canReplace(t,e.childCount))&&(r==e.childCount||e.canReplace(0,r))}function jc(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||!Iue(o,s,l))break;s&&(a=1),l<o.childCount&&(i=1)}return null}function zue(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=Ze.empty,f=0;for(let b=i,v=!1;b>r;b--)v||n.index(b)>0?(v=!0,c=Ze.from(n.node(b).copy(c)),f++):l--;let d=Ze.empty,p=0;for(let b=i,v=!1;b>r;b--)v||a.after(b+1)<a.end(b)?(v=!0,d=Ze.from(a.node(b).copy(d)),p++):u++;e.step(new Ya(l,u,o,s,new yt(c.append(d),f,p),c.size-f,!0))}function H1(e,t,r=null,n=e){let a=Bue(e,t),i=a&&Rue(n,t);return i?a.map(n$).concat({type:t,attrs:r}).concat(i.map(n$)):null}function n$(e){return{type:e,attrs:null}}function Bue(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 Rue(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 Nue(e,t,r){let n=Ze.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=Ze.from(r[o].type.create(r[o].attrs,n))}let a=t.start,i=t.end;e.step(new Ya(a,i,a,i,new yt(n,0,0),r.length,!0))}function Oue(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)&&Pue(e.doc,e.mapping.slice(i).map(s),n)){let u=null;if(n.schema.linebreakReplacement){let p=n.whitespace=="pre",b=!!n.contentMatch.matchType(n.schema.linebreakReplacement);p&&!b?u=!1:!p&&b&&(u=!0)}u===!1&&c$(e,o,s,i),NM(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 Ya(f,d,f+1,d-1,new yt(Ze.from(n.create(l,null,o.marks)),0,0),1,!0)),u===!0&&u$(e,o,s,i),!1}})}function u$(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 c$(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 Pue(e,t,r){let n=e.resolve(t),a=n.index();return n.parent.canReplaceWith(a,a+1,r)}function Fue(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 Ya(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new yt(Ze.from(o),0,0),1,!0))}function As(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),b=n&&n[c+1];b&&(p=p.replaceChild(0,b.type.create(b.attrs)));let v=n&&n[c]||f;if(!f.canReplace(d+1,f.childCount)||!v.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 que(e,t,r=1,n){let a=e.doc.resolve(t),i=Ze.empty,o=Ze.empty;for(let s=a.depth,l=a.depth-r,u=r-1;s>l;s--,u--){i=Ze.from(a.node(s).copy(i));let c=n&&n[u];o=Ze.from(c?c.type.create(c.attrs,o):a.node(s).copy(o))}e.step(new Yi(t,t,new yt(i.append(o),r,r),!0))}function fl(e,t){let r=e.resolve(t),n=r.index();return d$(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function $ue(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 d$(e,t){return!!(e&&t&&!e.isLeaf&&$ue(e,t))}function dp(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&&d$(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 Hue(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);c$(e,c.node(),c.before(),s)}o.inlineContent&&NM(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 Yi(u,l.map(t+r,-1),yt.empty,!0)),n===!0){let c=e.doc.resolve(u);u$(e,c.node(),c.before(),e.steps.length)}return e}function jue(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 ox(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 E2(e,t,r=t,n=yt.empty){if(t==r&&!n.size)return null;let a=e.resolve(t),i=e.resolve(r);return f$(a,i,n)?new Yi(t,r,n):new BM(a,i,n).fit()}function f$(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}var BM=class{constructor(t,r,n){this.$from=t,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=Ze.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=Ze.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 yt(i,o,s);return t>-1?new Ya(n.pos,t,this.$to.pos,this.$to.end(),l,r):l.size||n.pos!=this.$to.pos?new Yi(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=DM(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(Ze.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=DM(t,r);return!a.childCount||a.firstChild.isLeaf?!1:(this.unplaced=new yt(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=DM(t,r);if(a.childCount<=1&&r>0){let i=t.size-r<=r+a.size;this.unplaced=new yt(C2(t,r-1,1),r-1,i?r-1:n)}else this.unplaced=new yt(C2(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 v=0;v<i.length;v++)this.openFrontierNode(i[v]);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 v=0;v<a.childCount;v++)c.push(a.child(v));f=f.matchFragment(a)}let p=s.size+t-(o.content.size-o.openEnd);for(;u<s.childCount;){let v=s.child(u),k=f.matchType(v.type);if(!k)break;u++,(u>1||l==0||v.content.size)&&(f=k,c.push(p$(v.mark(d.allowedMarks(v.marks)),u==1?l:0,u==s.childCount?p:-1)))}let b=u==s.childCount;b||(p=-1),this.placed=M2(this.placed,r,Ze.from(c)),this.frontier[r].match=f,b&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,k=s;v<p;v++){let w=k.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),k=w.content}this.unplaced=b?t==0?yt.empty:new yt(C2(o.content,t-1,1),t-1,p<0?o.openEnd:t-1):new yt(C2(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||!IM(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=IM(t,r,a,n,i);if(o){for(let s=r-1;s>=0;s--){let{match:l,type:u}=this.frontier[s],c=IM(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=M2(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=M2(this.placed,this.depth,Ze.from(t.create(r,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(Ze.empty,!0);r.childCount&&(this.placed=M2(this.placed,this.frontier.length,r))}};function C2(e,t,r){return t==0?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy(C2(e.firstChild.content,t-1,r)))}function M2(e,t,r){return t==0?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(M2(e.lastChild.content,t-1,r)))}function DM(e,t){for(let r=0;r<t;r++)e=e.firstChild.content;return e}function p$(e,t,r){if(t<=0)return e;let n=e.content;return t>1&&(n=n.replaceChild(0,p$(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(Ze.empty,!0)))),e.copy(n)}function IM(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&&!Uue(r,i.content,o)?s:null}function Uue(e,t,r){for(let n=r;n<t.childCount;n++)if(!e.allowsMarks(t.child(n).marks))return!0;return!1}function Kue(e){return e.spec.defining||e.spec.definingForContent}function Vue(e,t,r,n){if(!n.size)return e.deleteRange(t,r);let a=e.doc.resolve(t),i=e.doc.resolve(r);if(f$(a,i,n))return e.step(new Yi(t,r,n));let o=m$(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 b=a.node(d).type.spec;if(b.defining||b.definingAsContext||b.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 b=d.firstChild;if(u.push(b),p==n.openStart)break;d=b.content}for(let d=c-1;d>=0;d--){let p=u[d],b=Kue(p.type);if(b&&!p.sameMarkup(a.node(Math.abs(s)-1)))c=d;else if(b||!p.type.isTextblock)break}for(let d=n.openStart;d>=0;d--){let p=(d+c+1)%(n.openStart+1),b=u[p];if(b)for(let v=0;v<o.length;v++){let k=o[(v+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,b.type,b.marks))return e.replace(a.before(k),w?i.after(k):r,new yt(h$(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 h$(e,t,r,n,a){if(t<r){let i=e.firstChild;e=e.replaceChild(0,i.copy(h$(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(Ze.empty,!0))}return e}function Gue(e,t,r,n){if(!n.isInline&&t==r&&e.doc.resolve(t).parent.content.size){let a=jue(e.doc,t,n.type);a!=null&&(t=r=a)}e.replaceRange(t,r,new yt(Ze.from(n),0,0))}function Wue(e,t,r){let n=e.doc.resolve(t),a=e.doc.resolve(r),i=m$(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 m$(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 ax=class e extends vi{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 Bi.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 Bi.fromReplace(t,this.pos,this.pos+1,new yt(Ze.from(a),0,r.isLeaf?0:1))}getMap(){return $c.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)}};vi.jsonID("attr",ax);var ix=class e extends vi{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 Bi.ok(n)}getMap(){return $c.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)}};vi.jsonID("docAttr",ix);var q1=class extends Error{};q1=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r};q1.prototype=Object.create(Error.prototype);q1.prototype.constructor=q1;q1.prototype.name="TransformError";var $1=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new A2}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let r=this.maybeStep(t);if(r.failed)throw new q1(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=yt.empty){let a=E2(this.doc,t,r,n);return a&&this.step(a),this}replaceWith(t,r,n){return this.replace(t,r,new yt(Ze.from(n),0,0))}delete(t,r){return this.replace(t,r,yt.empty)}insert(t,r){return this.replaceWith(t,t,r)}replaceRange(t,r,n){return Vue(this,t,r,n),this}replaceRangeWith(t,r,n){return Gue(this,t,r,n),this}deleteRange(t,r){return Wue(this,t,r),this}lift(t,r){return zue(this,t,r),this}join(t,r=1){return Hue(this,t,r),this}wrap(t,r){return Nue(this,t,r),this}setBlockType(t,r=t,n,a=null){return Oue(this,t,r,n,a),this}setNodeMarkup(t,r,n=null,a){return Fue(this,t,r,n,a),this}setNodeAttribute(t,r,n){return this.step(new ax(t,r,n)),this}setDocAttribute(t,r){return this.step(new ix(t,r)),this}addNodeMark(t,r){return this.step(new T2(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 Zr)r.isInSet(n.marks)&&this.step(new F1(t,r));else{let a=n.marks,i,o=[];for(;i=r.isInSet(a);)o.push(new F1(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 que(this,t,r,n),this}addMark(t,r,n){return Eue(this,t,r,n),this}removeMark(t,r,n){return Due(this,t,r,n),this}clearIncompatible(t,r,n){return NM(this,t,r,n),this}};var OM=Object.create(null),Xt=class{constructor(t,r,n){this.$anchor=t,this.$head=r,this.ranges=n||[new lx(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=yt.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?yt.empty:r),s==0&&b$(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),b$(t,n,r.isInline?-1:1))}}static findFrom(t,r,n=!1){let a=t.parent.inlineContent?new Ot(t):j1(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?j1(t.node(0),t.node(i),t.before(i+1),t.index(i),r,n):j1(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 xo(t.node(0))}static atStart(t){return j1(t,t,0,0,1)||new xo(t)}static atEnd(t){return j1(t,t,t.content.size,t.childCount,-1)||new xo(t)}static fromJSON(t,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=OM[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 OM)throw new RangeError("Duplicate use of selection JSON ID "+t);return OM[t]=r,r.prototype.jsonID=t,r}getBookmark(){return Ot.between(this.$anchor,this.$head).getBookmark()}};Xt.prototype.visible=!0;var lx=class{constructor(t,r){this.$from=t,this.$to=r}},g$=!1;function y$(e){!g$&&!e.parent.inlineContent&&(g$=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var Ot=class e extends Xt{constructor(t,r=t){y$(t),y$(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 Xt.near(n);let a=t.resolve(r.map(this.anchor));return new e(a.parent.inlineContent?a:n,n)}replace(t,r=yt.empty){if(super.replace(t,r),r==yt.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 ux(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=Xt.findFrom(r,n,!0)||Xt.findFrom(r,-n,!0);if(i)r=i.$head;else return Xt.near(r,n)}return t.parent.inlineContent||(a==0?t=r:(t=(Xt.findFrom(t,-n,!0)||Xt.findFrom(t,n,!0)).$anchor,t.pos<r.pos!=a<0&&(t=r))),new e(t,r)}};Xt.jsonID("text",Ot);var ux=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 Ot.between(t.resolve(this.anchor),t.resolve(this.head))}},Dt=class e extends Xt{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?Xt.near(i):new e(i)}content(){return new yt(Ze.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 FM(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}};Dt.prototype.visible=!1;Xt.jsonID("node",Dt);var FM=class e{constructor(t){this.anchor=t}map(t){let{deleted:r,pos:n}=t.mapResult(this.anchor);return r?new ux(n,n):new e(n)}resolve(t){let r=t.resolve(this.anchor),n=r.nodeAfter;return n&&Dt.isSelectable(n)?new Dt(r):Xt.near(r)}},xo=class e extends Xt{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,r=yt.empty){if(r==yt.empty){t.delete(0,t.doc.content.size);let n=Xt.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 Xue}};Xt.jsonID("all",xo);var Xue={map(){return this},resolve(e){return new xo(e)}};function j1(e,t,r,n,a,i=!1){if(t.inlineContent)return Ot.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&&Dt.isSelectable(s))return Dt.create(e,r-(a<0?s.nodeSize:0))}else{let l=j1(e,s,r+a,a<0?s.childCount:0,a,i);if(l)return l}r+=s.nodeSize*a}return null}function b$(e,t,r){let n=e.steps.length-1;if(n<t)return;let a=e.steps[n];if(!(a instanceof Yi||a instanceof Ya))return;let i=e.mapping.maps[n],o;i.forEach((s,l,u,c)=>{o==null&&(o=c)}),e.setSelection(Xt.near(e.doc.resolve(o),r))}var x$=1,sx=2,v$=4,qM=class extends $1{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|x$)&~sx,this.storedMarks=null,this}get selectionSet(){return(this.updated&x$)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=sx,this}ensureMarks(t){return Zr.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&sx)>0}addStep(t,r){super.addStep(t,r),this.updated=this.updated&~sx,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)||Zr.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(Xt.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|=v$,this}get scrolledIntoView(){return(this.updated&v$)>0}};function w$(e,t){return!t||!e?e:e.bind(t)}var fp=class{constructor(t,r,n){this.name=t,this.init=w$(r.init,n),this.apply=w$(r.apply,n)}},Yue=[new fp("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new fp("selection",{init(e,t){return e.selection||Xt.atStart(t.doc)},apply(e){return e.selection}}),new fp("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,r,n){return n.selection.$cursor?e.storedMarks:null}}),new fp("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],D2=class{constructor(t,r){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Yue.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 fp(n.key,n.spec.state,n))})}},cx=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 qM(this)}static create(t){let r=new D2(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 D2(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 D2(t.schema,t.plugins),i=new e(a);return a.fields.forEach(o=>{if(o.name=="doc")i.doc=Yo.fromJSON(t.schema,r.doc);else if(o.name=="selection")i.selection=Xt.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 k$(e,t,r){for(let n in e){let a=e[n];a instanceof Function?a=a.bind(t):n=="handleDOMEvents"&&(a=k$(a,t,{})),r[n]=a}return r}var tr=class{constructor(t){this.spec=t,this.props={},t.props&&k$(t.props,this,this.props),this.key=t.key?t.key.key:S$("plugin")}getState(t){return t[this.key]}},PM=Object.create(null);function S$(e){return e in PM?e+"$"+ ++PM[e]:(PM[e]=0,e+"$")}var Sr=class{constructor(t="key"){this.key=S$(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var dx=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function M$(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("backward",e):r.parentOffset>0)?null:r}var HM=(e,t,r)=>{let n=M$(e,r);if(!n)return!1;let a=UM(n);if(!a){let o=n.blockRange(),s=o&&jc(o);return s==null?!1:(t&&t(e.tr.lift(o,s).scrollIntoView()),!0)}let i=a.nodeBefore;if(B$(e,a,t,-1))return!0;if(n.parent.content.size==0&&(U1(i,"end")||Dt.isSelectable(i)))for(let o=n.depth;;o--){let s=E2(e.doc,n.before(o),n.after(o),yt.empty);if(s&&s.slice.size<s.to-s.from){if(t){let l=e.tr.step(s);l.setSelection(U1(i,"end")?Xt.findFrom(l.doc.resolve(l.mapping.map(a.pos,-1)),-1):Dt.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},_$=(e,t,r)=>{let n=M$(e,r);if(!n)return!1;let a=UM(n);return a?L$(e,a,t):!1},A$=(e,t,r)=>{let n=T$(e,r);if(!n)return!1;let a=GM(n);return a?L$(e,a,t):!1};function L$(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=E2(e.doc,i,l,yt.empty);if(!u||u.from!=i||u instanceof Yi&&u.slice.size>=l-i)return!1;if(r){let c=e.tr.step(u);c.setSelection(Ot.create(c.doc,i)),r(c.scrollIntoView())}return!0}function U1(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 jM=(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=UM(n)}let o=i&&i.nodeBefore;return!o||!Dt.isSelectable(o)?!1:(t&&t(e.tr.setSelection(Dt.create(e.doc,i.pos-o.nodeSize)).scrollIntoView()),!0)};function UM(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 T$(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)?null:r}var KM=(e,t,r)=>{let n=T$(e,r);if(!n)return!1;let a=GM(n);if(!a)return!1;let i=a.nodeAfter;if(B$(e,a,t,1))return!0;if(n.parent.content.size==0&&(U1(i,"start")||Dt.isSelectable(i))){let o=E2(e.doc,n.before(),n.after(),yt.empty);if(o&&o.slice.size<o.to-o.from){if(t){let s=e.tr.step(o);s.setSelection(U1(i,"start")?Xt.findFrom(s.doc.resolve(s.mapping.map(a.pos)),1):Dt.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},VM=(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=GM(n)}let o=i&&i.nodeAfter;return!o||!Dt.isSelectable(o)?!1:(t&&t(e.tr.setSelection(Dt.create(e.doc,i.pos)).scrollIntoView()),!0)};function GM(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 E$=(e,t)=>{let r=e.selection,n=r instanceof Dt,a;if(n){if(r.node.isTextblock||!fl(e.doc,r.from))return!1;a=r.from}else if(a=dp(e.doc,r.from,-1),a==null)return!1;if(t){let i=e.tr.join(a);n&&i.setSelection(Dt.create(i.doc,a-e.doc.resolve(a).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},D$=(e,t)=>{let r=e.selection,n;if(r instanceof Dt){if(r.node.isTextblock||!fl(e.doc,r.to))return!1;n=r.to}else if(n=dp(e.doc,r.to,1),n==null)return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0},I$=(e,t)=>{let{$from:r,$to:n}=e.selection,a=r.blockRange(n),i=a&&jc(a);return i==null?!1:(t&&t(e.tr.lift(a,i).scrollIntoView()),!0)},WM=(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 XM(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 YM=(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=XM(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(Xt.near(l.doc.resolve(s),1)),t(l.scrollIntoView())}return!0},JM=(e,t)=>{let r=e.selection,{$from:n,$to:a}=r;if(r instanceof xo||n.parent.inlineContent||a.parent.inlineContent)return!1;let i=XM(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(Ot.create(s.doc,o+1)),t(s.scrollIntoView())}return!0},ZM=(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(As(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let n=r.blockRange(),a=n&&jc(n);return a==null?!1:(t&&t(e.tr.lift(n,a).scrollIntoView()),!0)};function Jue(e){return(t,r)=>{let{$from:n,$to:a}=t.selection;if(t.selection instanceof Dt&&t.selection.node.isBlock)return!n.parentOffset||!As(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=XM(n.node(p-1).contentMatchAt(n.indexAfter(p-1)));let v=e&&e(a.parent,l,n);i.unshift(v||(l&&s?{type:s}:null)),o=p;break}else{if(p==1)return!1;i.unshift(null)}let c=t.tr;(t.selection instanceof Ot||t.selection instanceof xo)&&c.deleteSelection();let f=c.mapping.map(n.pos),d=As(c.doc,f,i.length,i);if(d||(i[0]=s?{type:s}:null,d=As(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)),b=c.doc.resolve(p);s&&n.node(o-1).canReplaceWith(b.index(),b.index()+1,s)&&c.setNodeMarkup(c.mapping.map(n.before(o)),s)}return r&&r(c.scrollIntoView()),!0}}var Zue=Jue();var z$=(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(Dt.create(e.doc,a))),!0)},Que=(e,t)=>(t&&t(e.tr.setSelection(new xo(e.doc))),!0);function ece(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||fl(e.doc,t.pos))?!1:(r&&r(e.tr.join(t.pos).scrollIntoView()),!0)}function B$(e,t,r,n){let a=t.nodeBefore,i=t.nodeAfter,o,s,l=a.type.spec.isolating||i.type.spec.isolating;if(!l&&ece(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,b=Ze.empty;for(let w=o.length-1;w>=0;w--)b=Ze.from(o[w].create(null,b));b=Ze.from(a.copy(b));let v=e.tr.step(new Ya(t.pos-1,p,t.pos,p,new yt(b,1,0),o.length,!0)),k=v.doc.resolve(p+2*o.length);k.nodeAfter&&k.nodeAfter.type==a.type&&fl(v.doc,k.pos)&&v.join(k.pos),r(v.scrollIntoView())}return!0}let c=i.type.spec.isolating||n>0&&l?null:Xt.findFrom(t,1),f=c&&c.$from.blockRange(c.$to),d=f&&jc(f);if(d!=null&&d>=t.depth)return r&&r(e.tr.lift(f,d).scrollIntoView()),!0;if(u&&U1(i,"start",!0)&&U1(a,"end")){let p=a,b=[];for(;b.push(p),!p.isTextblock;)p=p.lastChild;let v=i,k=1;for(;!v.isTextblock;v=v.firstChild)k++;if(p.canReplace(p.childCount,p.childCount,v.content)){if(r){let w=Ze.empty;for(let T=b.length-1;T>=0;T--)w=Ze.from(b[T].copy(w));let S=e.tr.step(new Ya(t.pos-b.length,t.pos+i.nodeSize,t.pos+k,t.pos+i.nodeSize-k,new yt(w,b.length,0),0,!0));r(S.scrollIntoView())}return!0}}return!1}function R$(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(Ot.create(t.doc,e<0?a.start(i):a.end(i)))),!0):!1}}var QM=R$(-1),e_=R$(1);function N$(e,t=null){return function(r,n){let{$from:a,$to:i}=r.selection,o=a.blockRange(i),s=o&&H1(o,e,t);return s?(n&&n(r.tr.wrap(o,s).scrollIntoView()),!0):!1}}function t_(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 r_(...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 $M=r_(dx,HM,jM),C$=r_(dx,KM,VM),wd={Enter:r_(WM,JM,ZM,Zue),"Mod-Enter":YM,Backspace:$M,"Mod-Backspace":$M,"Shift-Backspace":$M,Delete:C$,"Mod-Delete":C$,"Mod-a":Que},tce={"Ctrl-h":wd.Backspace,"Alt-Backspace":wd["Mod-Backspace"],"Ctrl-d":wd.Delete,"Ctrl-Alt-Backspace":wd["Mod-Delete"],"Alt-Delete":wd["Mod-Delete"],"Alt-d":wd["Mod-Delete"],"Ctrl-a":QM,"Ctrl-e":e_};for(let e in wd)tce[e]=wd[e];var tke=typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os!="undefined"&&os.platform?os.platform()=="darwin":!1;function O$(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 rce(s,o,e,t)?(n&&n(s.scrollIntoView()),!0):!1}}function rce(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 up(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new up(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),a=!0}let s=H1(i,r,n,t);return s?(e&&nce(e,t,s,a,r),!0):!1}function nce(e,t,r,n,a){let i=Ze.empty;for(let c=r.length-1;c>=0;c--)i=Ze.from(r[c].type.create(r[c].attrs,i));e.step(new Ya(t.start-(n?2:0),t.end,t.start,t.end,new yt(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&&As(e.doc,l,s)&&(e.split(l,s),l+=2*s),l+=u.child(c).nodeSize;return e}function P$(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?ace(t,r,e,i):ice(t,r,i):!0:!1}}function ace(e,t,r,n){let a=e.tr,i=n.end,o=n.$to.end(n.depth);i<o&&(a.step(new Ya(i-1,o,i,o,new yt(Ze.from(r.create(null,n.parent.copy())),1,0),1,!0)),n=new up(a.doc.resolve(n.$from.pos),a.doc.resolve(o),n.depth));let s=jc(n);if(s==null)return!1;a.lift(n,s);let l=a.doc.resolve(a.mapping.map(i,-1)-1);return fl(a.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&a.join(l.pos),t(a.scrollIntoView()),!0}function ice(e,t,r){let n=e.tr,a=r.parent;for(let p=r.end,b=r.endIndex-1,v=r.startIndex;b>v;b--)p-=a.child(b).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?Ze.empty:Ze.from(a))))return!1;let f=i.pos,d=f+o.nodeSize;return n.step(new Ya(f-(s?1:0),d+(l?1:0),f+1,d-1,new yt((s?Ze.empty:Ze.from(a.copy(Ze.empty))).append(l?Ze.empty:Ze.from(a.copy(Ze.empty))),s?0:1,l?0:1),s?0:1)),t(n.scrollIntoView()),!0}function F$(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=Ze.from(u?e.create():null),f=new yt(Ze.from(e.create(null,Ze.from(s.type.create(null,c)))),u?3:1,0),d=i.start,p=i.end;r(t.tr.step(new Ya(d-(u?3:1),p,d,p,f,1,!0)).scrollIntoView())}return!0}}var Ri=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},X1=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},l_=null,Kc=function(e,t,r){let n=l_||(l_=document.createRange());return n.setEnd(e,r==null?e.nodeValue.length:r),n.setStart(e,t||0),n},oce=function(){l_=null},xp=function(e,t,r,n){return r&&(q$(e,t,r,n,-1)||q$(e,t,r,n,1))},sce=/^(img|br|input|textarea|hr)$/i;function q$(e,t,r,n,a){for(var i;;){if(e==r&&t==n)return!0;if(t==(a<0?0:hl(e))){let o=e.parentNode;if(!o||o.nodeType!=1||F2(e)||sce.test(e.nodeName)||e.contentEditable=="false")return!1;t=Ri(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?hl(e):0}else return!1}}function hl(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function lce(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=hl(e)}else if(e.parentNode&&!F2(e))t=Ri(e),e=e.parentNode;else return null}}function uce(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&&!F2(e))t=Ri(e)+1,e=e.parentNode;else return null}}function cce(e,t,r){for(let n=t==0,a=t==hl(e);n||a;){if(e==r)return!0;let i=Ri(e);if(e=e.parentNode,!e)return!1;n=n&&i==0,a=a&&i==hl(e)}}function F2(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 kx=function(e){return e.focusNode&&xp(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function pp(e,t){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=e,r.key=r.code=t,r}function dce(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function fce(e,t,r){if(e.caretPositionFromPoint)try{let n=e.caretPositionFromPoint(t,r);if(n)return{node:n.offsetNode,offset:Math.min(hl(n.offsetNode),n.offset)}}catch(n){}if(e.caretRangeFromPoint){let n=e.caretRangeFromPoint(t,r);if(n)return{node:n.startContainer,offset:Math.min(hl(n.startContainer),n.startOffset)}}}var Du=typeof navigator!="undefined"?navigator:null,$$=typeof document!="undefined"?document:null,Ad=Du&&Du.userAgent||"",u_=/Edge\/(\d+)/.exec(Ad),xH=/MSIE \d/.exec(Ad),c_=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ad),Jo=!!(xH||c_||u_),Md=xH?document.documentMode:c_?+c_[1]:u_?+u_[1]:0,ml=!Jo&&/gecko\/(\d+)/i.test(Ad);ml&&+(/Firefox\/(\d+)/.exec(Ad)||[0,0])[1];var d_=!Jo&&/Chrome\/(\d+)/.exec(Ad),Ni=!!d_,vH=d_?+d_[1]:0,Zi=!Jo&&!!Du&&/Apple Computer/.test(Du.vendor),Y1=Zi&&(/Mobile\/\w+/.test(Ad)||!!Du&&Du.maxTouchPoints>2),pl=Y1||(Du?/Mac/.test(Du.platform):!1),wH=Du?/Win/.test(Du.platform):!1,Vc=/Android \d/.test(Ad),q2=!!$$&&"webkitFontSmoothing"in $$.documentElement.style,pce=q2?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function hce(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 Uc(e,t){return typeof e=="number"?e:e[t]}function mce(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 H$(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=X1(o);continue}let s=o,l=s==i.body,u=l?hce(i):mce(s),c=0,f=0;if(t.top<u.top+Uc(n,"top")?f=-(u.top-t.top+Uc(a,"top")):t.bottom>u.bottom-Uc(n,"bottom")&&(f=t.bottom-t.top>u.bottom-u.top?t.top+Uc(a,"top")-u.top:t.bottom-u.bottom+Uc(a,"bottom")),t.left<u.left+Uc(n,"left")?c=-(u.left-t.left+Uc(a,"left")):t.right>u.right-Uc(n,"right")&&(c=t.right-u.right+Uc(a,"right")),c||f)if(l)i.defaultView.scrollBy(c,f);else{let p=s.scrollLeft,b=s.scrollTop;f&&(s.scrollTop+=f),c&&(s.scrollLeft+=c);let v=s.scrollLeft-p,k=s.scrollTop-b;t={left:t.left-v,top:t.top-k,right:t.right-v,bottom:t.bottom-k}}let d=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(d))break;o=d=="absolute"?o.offsetParent:X1(o)}}function gce(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:kH(e.dom)}}function kH(e){let t=[],r=e.ownerDocument;for(let n=e;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),e!=r);n=X1(n));return t}function yce({refDOM:e,refTop:t,stack:r}){let n=e?e.getBoundingClientRect().top:0;SH(r,n==0?0:n-t)}function SH(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 K1=null;function bce(e){if(e.setActive)return e.setActive();if(K1)return e.focus(K1);let t=kH(e);e.focus(K1==null?{get preventScroll(){return K1={preventScroll:!0},!0}}:void 0),K1||(K1=!1,SH(t,0))}function CH(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=Kc(c).getClientRects();else continue;for(let p=0;p<d.length;p++){let b=d[p];if(b.top<=o&&b.bottom>=s){o=Math.max(b.bottom,o),s=Math.min(b.top,s);let v=b.left>t.left?b.left-t.left:b.right<t.left?t.left-b.right:0;if(v<n){r=c,n=v,a=v&&r.nodeType==3?{left:b.right<t.left?b.right:b.left,top:t.top}:t,c.nodeType==1&&v&&(i=f+(t.left>=(b.left+b.right)/2?1:0));continue}}else b.top>t.top&&!l&&b.left<=t.left&&b.right>=t.left&&(l=c,u={left:Math.max(b.left,Math.min(b.right,t.left)),top:b.top});!r&&(t.left>=b.right&&t.top>=b.top||t.left>=b.left&&t.top>=b.bottom)&&(i=f+1)}}return!r&&l&&(r=l,a=u,n=0),r&&r.nodeType==3?xce(r,a):!r||n&&r.nodeType==1?{node:e,offset:i}:CH(r,a)}function xce(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=kd(n,1);if(o.top!=o.bottom&&__(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 __(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function vce(e,t){let r=e.parentNode;return r&&/^li$/i.test(r.nodeName)&&t.left<e.getBoundingClientRect().left?r:e}function wce(e,t,r){let{node:n,offset:a}=CH(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 kce(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 MH(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(__(t,u))return MH(o,t,u)}}if((i=(i+1)%n)==a)break}return e}function Sce(e,t){let r=e.dom.ownerDocument,n,a=0,i=fce(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(!__(t,u)||(o=MH(e.dom,t,u),!o))return null}if(Zi)for(let u=o;n&&u;u=X1(u))u.draggable&&(n=void 0);if(o=vce(o,t),n){if(ml&&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;q2&&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=kce(e,n,a,t))}s==null&&(s=wce(e,o,t));let l=e.docView.nearestDesc(o,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function j$(e){return e.top<e.bottom||e.left<e.right}function kd(e,t){let r=e.getClientRects();if(r.length){let n=r[t<0?0:r.length-1];if(j$(n))return n}return Array.prototype.find.call(r,j$)||e.getBoundingClientRect()}var Cce=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function _H(e,t,r){let{node:n,offset:a,atom:i}=e.docView.domFromPos(t,r<0?-1:1),o=q2||ml;if(n.nodeType==3)if(o&&(Cce.test(n.nodeValue)||(r<0?!a:a==n.nodeValue.length))){let l=kd(Kc(n,a,a),r);if(ml&&a&&/\s/.test(n.nodeValue[a-1])&&a<n.nodeValue.length){let u=kd(Kc(n,a-1,a-1),-1);if(u.top==l.top){let c=kd(Kc(n,a,a+1),-1);if(c.top!=l.top)return I2(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++,I2(kd(Kc(n,l,u),c),c<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&a&&(r<0||a==hl(n))){let l=n.childNodes[a-1];if(l.nodeType==1)return n_(l.getBoundingClientRect(),!1)}if(i==null&&a<hl(n)){let l=n.childNodes[a];if(l.nodeType==1)return n_(l.getBoundingClientRect(),!0)}return n_(n.getBoundingClientRect(),r>=0)}if(i==null&&a&&(r<0||a==hl(n))){let l=n.childNodes[a-1],u=l.nodeType==3?Kc(l,hl(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return I2(kd(u,1),!1)}if(i==null&&a<hl(n)){let l=n.childNodes[a];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?Kc(l,0,o?0:1):l.nodeType==1?l:null:null;if(u)return I2(kd(u,-1),!0)}return I2(kd(n.nodeType==3?Kc(n):n,-r),r>=0)}function I2(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 n_(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 AH(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 Mce(e,t,r){let n=t.selection,a=r=="up"?n.$from:n.$to;return AH(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=_H(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=Kc(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 _ce=/[\u0590-\u08ac]/;function Ace(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?!_ce.test(n.parent.textContent)||!s.modify?r=="left"||r=="backward"?i:o:AH(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:b,focusOffset:v}=e.domSelectionRange(),k=b&&!p.contains(b.nodeType==1?b:b.parentNode)||l==b&&u==v;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 U$=null,K$=null,V$=!1;function Lce(e,t,r){return U$==t&&K$==r?V$:(U$=t,K$=r,V$=r=="up"||r=="down"?Mce(e,t,r):Ace(e,t,r))}var gl=0,G$=1,hp=2,Iu=3,vp=class{constructor(t,r,n,a){this.parent=t,this.children=r,this.dom=n,this.contentDOM=a,this.dirty=gl,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>Ri(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 hx){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 fx&&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?Ri(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?Ri(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=Ri(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=Ri(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,b=0;p<this.children.length;p++){let v=this.children[p],k=b+v.size;if(i>b&&o<k)return v.setSelection(t-b-v.border,r-b-v.border,n,a);b=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((ml||Zi)&&t==r){let{node:p,offset:b}=s;if(p.nodeType==3){if(f=!!(b&&p.nodeValue[b-1]==`
|
|
3915
|
+
`).scrollIntoView()),!0)};function XM(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 YM=(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=XM(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(Xt.near(l.doc.resolve(s),1)),t(l.scrollIntoView())}return!0},JM=(e,t)=>{let r=e.selection,{$from:n,$to:a}=r;if(r instanceof xo||n.parent.inlineContent||a.parent.inlineContent)return!1;let i=XM(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(Ot.create(s.doc,o+1)),t(s.scrollIntoView())}return!0},ZM=(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(As(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let n=r.blockRange(),a=n&&jc(n);return a==null?!1:(t&&t(e.tr.lift(n,a).scrollIntoView()),!0)};function Jue(e){return(t,r)=>{let{$from:n,$to:a}=t.selection;if(t.selection instanceof Dt&&t.selection.node.isBlock)return!n.parentOffset||!As(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=XM(n.node(p-1).contentMatchAt(n.indexAfter(p-1)));let v=e&&e(a.parent,l,n);i.unshift(v||(l&&s?{type:s}:null)),o=p;break}else{if(p==1)return!1;i.unshift(null)}let c=t.tr;(t.selection instanceof Ot||t.selection instanceof xo)&&c.deleteSelection();let f=c.mapping.map(n.pos),d=As(c.doc,f,i.length,i);if(d||(i[0]=s?{type:s}:null,d=As(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)),b=c.doc.resolve(p);s&&n.node(o-1).canReplaceWith(b.index(),b.index()+1,s)&&c.setNodeMarkup(c.mapping.map(n.before(o)),s)}return r&&r(c.scrollIntoView()),!0}}var Zue=Jue();var z$=(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(Dt.create(e.doc,a))),!0)},Que=(e,t)=>(t&&t(e.tr.setSelection(new xo(e.doc))),!0);function ece(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||fl(e.doc,t.pos))?!1:(r&&r(e.tr.join(t.pos).scrollIntoView()),!0)}function B$(e,t,r,n){let a=t.nodeBefore,i=t.nodeAfter,o,s,l=a.type.spec.isolating||i.type.spec.isolating;if(!l&&ece(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,b=Ze.empty;for(let w=o.length-1;w>=0;w--)b=Ze.from(o[w].create(null,b));b=Ze.from(a.copy(b));let v=e.tr.step(new Ya(t.pos-1,p,t.pos,p,new yt(b,1,0),o.length,!0)),k=v.doc.resolve(p+2*o.length);k.nodeAfter&&k.nodeAfter.type==a.type&&fl(v.doc,k.pos)&&v.join(k.pos),r(v.scrollIntoView())}return!0}let c=i.type.spec.isolating||n>0&&l?null:Xt.findFrom(t,1),f=c&&c.$from.blockRange(c.$to),d=f&&jc(f);if(d!=null&&d>=t.depth)return r&&r(e.tr.lift(f,d).scrollIntoView()),!0;if(u&&U1(i,"start",!0)&&U1(a,"end")){let p=a,b=[];for(;b.push(p),!p.isTextblock;)p=p.lastChild;let v=i,k=1;for(;!v.isTextblock;v=v.firstChild)k++;if(p.canReplace(p.childCount,p.childCount,v.content)){if(r){let w=Ze.empty;for(let T=b.length-1;T>=0;T--)w=Ze.from(b[T].copy(w));let S=e.tr.step(new Ya(t.pos-b.length,t.pos+i.nodeSize,t.pos+k,t.pos+i.nodeSize-k,new yt(w,b.length,0),0,!0));r(S.scrollIntoView())}return!0}}return!1}function R$(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(Ot.create(t.doc,e<0?a.start(i):a.end(i)))),!0):!1}}var QM=R$(-1),e_=R$(1);function N$(e,t=null){return function(r,n){let{$from:a,$to:i}=r.selection,o=a.blockRange(i),s=o&&H1(o,e,t);return s?(n&&n(r.tr.wrap(o,s).scrollIntoView()),!0):!1}}function t_(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 r_(...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 $M=r_(dx,HM,jM),C$=r_(dx,KM,VM),wd={Enter:r_(WM,JM,ZM,Zue),"Mod-Enter":YM,Backspace:$M,"Mod-Backspace":$M,"Shift-Backspace":$M,Delete:C$,"Mod-Delete":C$,"Mod-a":Que},tce={"Ctrl-h":wd.Backspace,"Alt-Backspace":wd["Mod-Backspace"],"Ctrl-d":wd.Delete,"Ctrl-Alt-Backspace":wd["Mod-Delete"],"Alt-Delete":wd["Mod-Delete"],"Alt-d":wd["Mod-Delete"],"Ctrl-a":QM,"Ctrl-e":e_};for(let e in wd)tce[e]=wd[e];var rke=typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os!="undefined"&&os.platform?os.platform()=="darwin":!1;function O$(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 rce(s,o,e,t)?(n&&n(s.scrollIntoView()),!0):!1}}function rce(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 up(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new up(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),a=!0}let s=H1(i,r,n,t);return s?(e&&nce(e,t,s,a,r),!0):!1}function nce(e,t,r,n,a){let i=Ze.empty;for(let c=r.length-1;c>=0;c--)i=Ze.from(r[c].type.create(r[c].attrs,i));e.step(new Ya(t.start-(n?2:0),t.end,t.start,t.end,new yt(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&&As(e.doc,l,s)&&(e.split(l,s),l+=2*s),l+=u.child(c).nodeSize;return e}function P$(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?ace(t,r,e,i):ice(t,r,i):!0:!1}}function ace(e,t,r,n){let a=e.tr,i=n.end,o=n.$to.end(n.depth);i<o&&(a.step(new Ya(i-1,o,i,o,new yt(Ze.from(r.create(null,n.parent.copy())),1,0),1,!0)),n=new up(a.doc.resolve(n.$from.pos),a.doc.resolve(o),n.depth));let s=jc(n);if(s==null)return!1;a.lift(n,s);let l=a.doc.resolve(a.mapping.map(i,-1)-1);return fl(a.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&a.join(l.pos),t(a.scrollIntoView()),!0}function ice(e,t,r){let n=e.tr,a=r.parent;for(let p=r.end,b=r.endIndex-1,v=r.startIndex;b>v;b--)p-=a.child(b).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?Ze.empty:Ze.from(a))))return!1;let f=i.pos,d=f+o.nodeSize;return n.step(new Ya(f-(s?1:0),d+(l?1:0),f+1,d-1,new yt((s?Ze.empty:Ze.from(a.copy(Ze.empty))).append(l?Ze.empty:Ze.from(a.copy(Ze.empty))),s?0:1,l?0:1),s?0:1)),t(n.scrollIntoView()),!0}function F$(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=Ze.from(u?e.create():null),f=new yt(Ze.from(e.create(null,Ze.from(s.type.create(null,c)))),u?3:1,0),d=i.start,p=i.end;r(t.tr.step(new Ya(d-(u?3:1),p,d,p,f,1,!0)).scrollIntoView())}return!0}}var Ri=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},X1=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},l_=null,Kc=function(e,t,r){let n=l_||(l_=document.createRange());return n.setEnd(e,r==null?e.nodeValue.length:r),n.setStart(e,t||0),n},oce=function(){l_=null},xp=function(e,t,r,n){return r&&(q$(e,t,r,n,-1)||q$(e,t,r,n,1))},sce=/^(img|br|input|textarea|hr)$/i;function q$(e,t,r,n,a){for(var i;;){if(e==r&&t==n)return!0;if(t==(a<0?0:hl(e))){let o=e.parentNode;if(!o||o.nodeType!=1||F2(e)||sce.test(e.nodeName)||e.contentEditable=="false")return!1;t=Ri(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?hl(e):0}else return!1}}function hl(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function lce(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=hl(e)}else if(e.parentNode&&!F2(e))t=Ri(e),e=e.parentNode;else return null}}function uce(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&&!F2(e))t=Ri(e)+1,e=e.parentNode;else return null}}function cce(e,t,r){for(let n=t==0,a=t==hl(e);n||a;){if(e==r)return!0;let i=Ri(e);if(e=e.parentNode,!e)return!1;n=n&&i==0,a=a&&i==hl(e)}}function F2(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 kx=function(e){return e.focusNode&&xp(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function pp(e,t){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=e,r.key=r.code=t,r}function dce(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function fce(e,t,r){if(e.caretPositionFromPoint)try{let n=e.caretPositionFromPoint(t,r);if(n)return{node:n.offsetNode,offset:Math.min(hl(n.offsetNode),n.offset)}}catch(n){}if(e.caretRangeFromPoint){let n=e.caretRangeFromPoint(t,r);if(n)return{node:n.startContainer,offset:Math.min(hl(n.startContainer),n.startOffset)}}}var Du=typeof navigator!="undefined"?navigator:null,$$=typeof document!="undefined"?document:null,Ad=Du&&Du.userAgent||"",u_=/Edge\/(\d+)/.exec(Ad),xH=/MSIE \d/.exec(Ad),c_=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ad),Jo=!!(xH||c_||u_),Md=xH?document.documentMode:c_?+c_[1]:u_?+u_[1]:0,ml=!Jo&&/gecko\/(\d+)/i.test(Ad);ml&&+(/Firefox\/(\d+)/.exec(Ad)||[0,0])[1];var d_=!Jo&&/Chrome\/(\d+)/.exec(Ad),Ni=!!d_,vH=d_?+d_[1]:0,Zi=!Jo&&!!Du&&/Apple Computer/.test(Du.vendor),Y1=Zi&&(/Mobile\/\w+/.test(Ad)||!!Du&&Du.maxTouchPoints>2),pl=Y1||(Du?/Mac/.test(Du.platform):!1),wH=Du?/Win/.test(Du.platform):!1,Vc=/Android \d/.test(Ad),q2=!!$$&&"webkitFontSmoothing"in $$.documentElement.style,pce=q2?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function hce(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 Uc(e,t){return typeof e=="number"?e:e[t]}function mce(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 H$(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=X1(o);continue}let s=o,l=s==i.body,u=l?hce(i):mce(s),c=0,f=0;if(t.top<u.top+Uc(n,"top")?f=-(u.top-t.top+Uc(a,"top")):t.bottom>u.bottom-Uc(n,"bottom")&&(f=t.bottom-t.top>u.bottom-u.top?t.top+Uc(a,"top")-u.top:t.bottom-u.bottom+Uc(a,"bottom")),t.left<u.left+Uc(n,"left")?c=-(u.left-t.left+Uc(a,"left")):t.right>u.right-Uc(n,"right")&&(c=t.right-u.right+Uc(a,"right")),c||f)if(l)i.defaultView.scrollBy(c,f);else{let p=s.scrollLeft,b=s.scrollTop;f&&(s.scrollTop+=f),c&&(s.scrollLeft+=c);let v=s.scrollLeft-p,k=s.scrollTop-b;t={left:t.left-v,top:t.top-k,right:t.right-v,bottom:t.bottom-k}}let d=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(d))break;o=d=="absolute"?o.offsetParent:X1(o)}}function gce(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:kH(e.dom)}}function kH(e){let t=[],r=e.ownerDocument;for(let n=e;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),e!=r);n=X1(n));return t}function yce({refDOM:e,refTop:t,stack:r}){let n=e?e.getBoundingClientRect().top:0;SH(r,n==0?0:n-t)}function SH(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 K1=null;function bce(e){if(e.setActive)return e.setActive();if(K1)return e.focus(K1);let t=kH(e);e.focus(K1==null?{get preventScroll(){return K1={preventScroll:!0},!0}}:void 0),K1||(K1=!1,SH(t,0))}function CH(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=Kc(c).getClientRects();else continue;for(let p=0;p<d.length;p++){let b=d[p];if(b.top<=o&&b.bottom>=s){o=Math.max(b.bottom,o),s=Math.min(b.top,s);let v=b.left>t.left?b.left-t.left:b.right<t.left?t.left-b.right:0;if(v<n){r=c,n=v,a=v&&r.nodeType==3?{left:b.right<t.left?b.right:b.left,top:t.top}:t,c.nodeType==1&&v&&(i=f+(t.left>=(b.left+b.right)/2?1:0));continue}}else b.top>t.top&&!l&&b.left<=t.left&&b.right>=t.left&&(l=c,u={left:Math.max(b.left,Math.min(b.right,t.left)),top:b.top});!r&&(t.left>=b.right&&t.top>=b.top||t.left>=b.left&&t.top>=b.bottom)&&(i=f+1)}}return!r&&l&&(r=l,a=u,n=0),r&&r.nodeType==3?xce(r,a):!r||n&&r.nodeType==1?{node:e,offset:i}:CH(r,a)}function xce(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=kd(n,1);if(o.top!=o.bottom&&__(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 __(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function vce(e,t){let r=e.parentNode;return r&&/^li$/i.test(r.nodeName)&&t.left<e.getBoundingClientRect().left?r:e}function wce(e,t,r){let{node:n,offset:a}=CH(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 kce(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 MH(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(__(t,u))return MH(o,t,u)}}if((i=(i+1)%n)==a)break}return e}function Sce(e,t){let r=e.dom.ownerDocument,n,a=0,i=fce(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(!__(t,u)||(o=MH(e.dom,t,u),!o))return null}if(Zi)for(let u=o;n&&u;u=X1(u))u.draggable&&(n=void 0);if(o=vce(o,t),n){if(ml&&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;q2&&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=kce(e,n,a,t))}s==null&&(s=wce(e,o,t));let l=e.docView.nearestDesc(o,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function j$(e){return e.top<e.bottom||e.left<e.right}function kd(e,t){let r=e.getClientRects();if(r.length){let n=r[t<0?0:r.length-1];if(j$(n))return n}return Array.prototype.find.call(r,j$)||e.getBoundingClientRect()}var Cce=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function _H(e,t,r){let{node:n,offset:a,atom:i}=e.docView.domFromPos(t,r<0?-1:1),o=q2||ml;if(n.nodeType==3)if(o&&(Cce.test(n.nodeValue)||(r<0?!a:a==n.nodeValue.length))){let l=kd(Kc(n,a,a),r);if(ml&&a&&/\s/.test(n.nodeValue[a-1])&&a<n.nodeValue.length){let u=kd(Kc(n,a-1,a-1),-1);if(u.top==l.top){let c=kd(Kc(n,a,a+1),-1);if(c.top!=l.top)return I2(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++,I2(kd(Kc(n,l,u),c),c<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&a&&(r<0||a==hl(n))){let l=n.childNodes[a-1];if(l.nodeType==1)return n_(l.getBoundingClientRect(),!1)}if(i==null&&a<hl(n)){let l=n.childNodes[a];if(l.nodeType==1)return n_(l.getBoundingClientRect(),!0)}return n_(n.getBoundingClientRect(),r>=0)}if(i==null&&a&&(r<0||a==hl(n))){let l=n.childNodes[a-1],u=l.nodeType==3?Kc(l,hl(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return I2(kd(u,1),!1)}if(i==null&&a<hl(n)){let l=n.childNodes[a];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?Kc(l,0,o?0:1):l.nodeType==1?l:null:null;if(u)return I2(kd(u,-1),!0)}return I2(kd(n.nodeType==3?Kc(n):n,-r),r>=0)}function I2(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 n_(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 AH(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 Mce(e,t,r){let n=t.selection,a=r=="up"?n.$from:n.$to;return AH(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=_H(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=Kc(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 _ce=/[\u0590-\u08ac]/;function Ace(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?!_ce.test(n.parent.textContent)||!s.modify?r=="left"||r=="backward"?i:o:AH(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:b,focusOffset:v}=e.domSelectionRange(),k=b&&!p.contains(b.nodeType==1?b:b.parentNode)||l==b&&u==v;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 U$=null,K$=null,V$=!1;function Lce(e,t,r){return U$==t&&K$==r?V$:(U$=t,K$=r,V$=r=="up"||r=="down"?Mce(e,t,r):Ace(e,t,r))}var gl=0,G$=1,hp=2,Iu=3,vp=class{constructor(t,r,n,a){this.parent=t,this.children=r,this.dom=n,this.contentDOM=a,this.dirty=gl,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>Ri(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 hx){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 fx&&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?Ri(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?Ri(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=Ri(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=Ri(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,b=0;p<this.children.length;p++){let v=this.children[p],k=b+v.size;if(i>b&&o<k)return v.setSelection(t-b-v.border,r-b-v.border,n,a);b=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((ml||Zi)&&t==r){let{node:p,offset:b}=s;if(p.nodeType==3){if(f=!!(b&&p.nodeValue[b-1]==`
|
|
3916
3916
|
`),f&&b==p.nodeValue.length)for(let v=p,k;v;v=v.parentNode){if(k=v.nextSibling){k.nodeName=="BR"&&(s=l={node:k.parentNode,offset:Ri(k)+1});break}let w=v.pmViewDesc;if(w&&w.node&&w.node.isBlock)break}}else{let v=p.childNodes[b-1];f=v&&(v.nodeName=="BR"||v.contentEditable=="false")}}if(ml&&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&&Zi)&&xp(s.node,s.offset,c.anchorNode,c.anchorOffset)&&xp(l.node,l.offset,c.focusNode,c.focusOffset))return;let d=!1;if((u.extend||t==r)&&!(f&&ml)){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 b=s;s=l,l=b}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?hp:G$,t==s&&r==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Iu:i.markDirty(t-s,r-s);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?hp:Iu}n=o}this.dirty=hp}markParentsDirty(){let t=1;for(let r=this.parent;r;r=r.parent,t++){let n=t==1?hp:G$;r.dirty<n&&(r.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}},fx=class extends vp{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==gl&&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}},f_=class extends vp{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}},J1=class e extends vp{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=qc.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&Iu||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Iu&&this.mark.eq(t)}markDirty(t,r){if(super.markDirty(t,r),this.dirty!=gl){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty<this.dirty&&(n.dirty=this.dirty),this.dirty=gl}}slice(t,r,n){let a=e.create(this.parent,this.mark,!0,n),i=this.children,o=this.size;r<o&&(i=g_(i,r,o,n)),t>0&&(i=g_(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()}},_d=class e extends vp{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}=qc.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=EH(c,n,r),u?l=new p_(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=()=>Ze.empty)}return t}matchesNode(t,r,n){return this.dirty==gl&&t.eq(this.node)&&mx(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 m_(this,o&&o.node,t);Ice(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?Zr.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==hp)&&(o&&this.protectLocalComposition(t,o),LH(this.contentDOM,this.children,t),Y1&&zce(this.dom))}localCompositionInfo(t,r){let{from:n,to:a}=t.state.selection;if(!(t.state.selection instanceof Ot)||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=Bce(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 f_(this,i,r,a);t.input.compositionNodes.push(o),this.children=g_(this.children,n,n+a.length,t,o)}update(t,r,n,a){return this.dirty==Iu||!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=gl}updateOuterDeco(t){if(mx(t,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=TH(this.dom,this.nodeDOM,h_(this.outerDeco,this.node,r),h_(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 W$(e,t,r,n,a){EH(n,t,e);let i=new _d(void 0,e,t,r,n,n,n,a,0);return i.contentDOM&&i.updateChildren(a,0),i}var px=class e extends _d{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==Iu||this.dirty!=gl&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=gl||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=gl,!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=Iu)}get domAtom(){return!1}isText(t){return this.node.text==t}},hx=class extends vp{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==gl&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},p_=class extends _d{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==Iu)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 LH(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=X$(n),a=!0;n=n.nextSibling}else a=!0,e.insertBefore(s,n);if(o instanceof J1){let l=n?n.previousSibling:e.lastChild;LH(o.contentDOM,o.children,r),n=l?l.nextSibling:e.firstChild}}for(;n;)n=X$(n),a=!0;a&&r.trackWrites==e&&(r.trackWrites=null)}var z2=function(e){e&&(this.nodeName=e)};z2.prototype=Object.create(null);var mp=[new z2];function h_(e,t,r){if(e.length==0)return mp;let n=r?mp[0]:new z2,a=[n];for(let i=0;i<e.length;i++){let o=e[i].type.attrs;if(o){o.nodeName&&a.push(n=new z2(o.nodeName));for(let s in o){let l=o[s];l!=null&&(r&&a.length==1&&a.push(n=new z2(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 TH(e,t,r,n){if(r==mp&&n==mp)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=mp[0]),a=l}Tce(a,s||mp[0],o)}return a}function Tce(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 EH(e,t,r){return TH(e,e,mp,h_(t,r,e.nodeType!=1))}function mx(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 X$(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var m_=class{constructor(t,r,n){this.lock=r,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=Ece(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=gl,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=J1.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==Iu&&o.dom==o.contentDOM&&(o.dirty=hp),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 _d){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!=Iu&&mx(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=hp,f.updateChildren(a,o+1),f.dirty=gl),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)||!mx(n,t.outerDeco)||!a.eq(t.innerDeco))return null;let s=_d.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=_d.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 fx(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 J1;)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))&&((Zi||Ni)&&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 hx(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 Ece(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 J1)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 Dce(e,t){return e.type.side-t.type.side}function Ice(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(Dce);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 b=i+d.nodeSize;if(d.isText){let k=b;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<b&&(l=d.cut(k-i),d=d.cut(0,k-i),b=k,p=-1)}else for(;o<a.length&&a[o].to<b;)o++;let v=d.isInline&&!d.isLeaf?s.filter(k=>!k.inline):s.slice();n(d,v,t.forChild(i,d),p),i=b}}function zce(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 Bce(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 g_(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 A_(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(kx(r)){for(l=o;a&&!a.node;)a=a.parent;let f=a.node;if(a&&f.isAtom&&Dt.isSelectable(f)&&a.parent&&!(f.isInline&&cce(r.focusNode,r.focusOffset,a.dom))){let d=a.posBefore;u=new Dt(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 b=r.getRangeAt(p);f=Math.min(f,e.docView.posFromDOM(b.startContainer,b.startOffset,1)),d=Math.max(d,e.docView.posFromDOM(b.endContainer,b.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=L_(e,c,s,f)}return u}function DH(e){return e.editable?e.hasFocus():zH(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Gc(e,t=!1){let r=e.state.selection;if(IH(e,r),!!DH(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Ni){let n=e.domSelectionRange(),a=e.domObserver.currentSelection;if(n.anchorNode&&a.anchorNode&&xp(n.anchorNode,n.anchorOffset,a.anchorNode,a.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Nce(e);else{let{anchor:n,head:a}=r,i,o;Y$&&!(r instanceof Ot)&&(r.$from.parent.inlineContent||(i=J$(e,r.from)),!r.empty&&!r.$from.parent.inlineContent&&(o=J$(e,r.to))),e.docView.setSelection(n,a,e,t),Y$&&(i&&Z$(i),o&&Z$(o)),r.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Rce(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var Y$=Zi||Ni&&vH<63;function J$(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(Zi&&a&&a.contentEditable=="false")return a_(a);if((!a||a.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(a)return a_(a);if(i)return a_(i)}}function a_(e){return e.contentEditable="true",Zi&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Z$(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Rce(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(()=>{(!DH(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function Nce(e){let t=e.domSelection();if(!t)return;let r=e.cursorWrapper.dom,n=r.nodeName=="IMG";n?t.collapse(r.parentNode,Ri(r)+1):t.collapse(r,0),!n&&!e.state.selection.visible&&Jo&&Md<=11&&(r.disabled=!0,r.disabled=!1)}function IH(e,t){if(t instanceof Dt){let r=e.docView.descAt(t.from);r!=e.lastSelectedViewDesc&&(Q$(e),r&&r.selectNode(),e.lastSelectedViewDesc=r)}else Q$(e)}function Q$(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function L_(e,t,r,n){return e.someProp("createSelectionBetween",a=>a(e,t,r))||Ot.between(t,r,n)}function eH(e){return e.editable&&!e.hasFocus()?!1:zH(e)}function zH(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 Oce(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),r=e.domSelectionRange();return xp(t.node,t.offset,r.anchorNode,r.anchorOffset)}function y_(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&&Xt.findFrom(i,t)}function Sd(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function tH(e,t,r){let n=e.state.selection;if(n instanceof Ot)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 Sd(e,new Ot(n.$anchor,o))}else if(n.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let a=y_(e.state,t);return a&&a instanceof Dt?Sd(e,a):!1}else if(!(pl&&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?Dt.isSelectable(i)?Sd(e,new Dt(t<0?e.state.doc.resolve(a.pos-i.nodeSize):a)):q2?Sd(e,new Ot(e.state.doc.resolve(t<0?s:s+i.nodeSize))):!1:!1}}else return!1;else{if(n instanceof Dt&&n.node.isInline)return Sd(e,new Ot(t>0?n.$to:n.$from));{let a=y_(e.state,t);return a?Sd(e,a):!1}}}function gx(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function B2(e,t){let r=e.pmViewDesc;return r&&r.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function V1(e,t){return t<0?Pce(e):Fce(e)}function Pce(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let a,i,o=!1;for(ml&&r.nodeType==1&&n<gx(r)&&B2(r.childNodes[n],-1)&&(o=!0);;)if(n>0){if(r.nodeType!=1)break;{let s=r.childNodes[n-1];if(B2(s,-1))a=r,i=--n;else if(s.nodeType==3)r=s,n=r.nodeValue.length;else break}}else{if(BH(r))break;{let s=r.previousSibling;for(;s&&B2(s,-1);)a=r.parentNode,i=Ri(s),s=s.previousSibling;if(s)r=s,n=gx(r);else{if(r=r.parentNode,r==e.dom)break;n=0}}}o?b_(e,r,n):a&&b_(e,a,i)}function Fce(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let a=gx(r),i,o;for(;;)if(n<a){if(r.nodeType!=1)break;let s=r.childNodes[n];if(B2(s,1))i=r,o=++n;else break}else{if(BH(r))break;{let s=r.nextSibling;for(;s&&B2(s,1);)i=s.parentNode,o=Ri(s)+1,s=s.nextSibling;if(s)r=s,n=0,a=gx(r);else{if(r=r.parentNode,r==e.dom)break;n=a=0}}}i&&b_(e,i,o)}function BH(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function qce(e,t){for(;e&&t==e.childNodes.length&&!F2(e);)t=Ri(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 $ce(e,t){for(;e&&!t&&!F2(e);)t=Ri(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 b_(e,t,r){if(t.nodeType!=3){let i,o;(o=qce(t,r))?(t=o,r=0):(i=$ce(t,r))&&(t=i,r=i.nodeValue.length)}let n=e.domSelection();if(!n)return;if(kx(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&&Gc(e)},50)}function rH(e,t){let r=e.state.doc.resolve(t);if(!(Ni||wH)&&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 nH(e,t,r){let n=e.state.selection;if(n instanceof Ot&&!n.empty||r.indexOf("s")>-1||pl&&r.indexOf("m")>-1)return!1;let{$from:a,$to:i}=n;if(!a.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let o=y_(e.state,t);if(o&&o instanceof Dt)return Sd(e,o)}if(!a.parent.inlineContent){let o=t<0?a:i,s=n instanceof xo?Xt.near(o,t):Xt.findFrom(o,t);return s?Sd(e,s):!1}return!1}function aH(e,t){if(!(e.state.selection instanceof Ot))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 iH(e,t,r){e.domObserver.stop(),t.contentEditable=r,e.domObserver.start()}function Hce(e){if(!Zi||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;iH(e,n,"true"),setTimeout(()=>iH(e,n,"false"),20)}return!1}function jce(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function Uce(e,t){let r=t.keyCode,n=jce(t);if(r==8||pl&&r==72&&n=="c")return aH(e,-1)||V1(e,-1);if(r==46&&!t.shiftKey||pl&&r==68&&n=="c")return aH(e,1)||V1(e,1);if(r==13||r==27)return!0;if(r==37||pl&&r==66&&n=="c"){let a=r==37?rH(e,e.state.selection.from)=="ltr"?-1:1:-1;return tH(e,a,n)||V1(e,a)}else if(r==39||pl&&r==70&&n=="c"){let a=r==39?rH(e,e.state.selection.from)=="ltr"?1:-1:1;return tH(e,a,n)||V1(e,a)}else{if(r==38||pl&&r==80&&n=="c")return nH(e,-1,n)||V1(e,-1);if(r==40||pl&&r==78&&n=="c")return Hce(e)||nH(e,1,n)||V1(e,1);if(n==(pl?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function T_(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")||qc.fromSchema(e.state.schema),s=qH(),l=s.createElement("div");l.appendChild(o.serializeFragment(n,{document:s}));let u=l.firstChild,c,f=0;for(;u&&u.nodeType==1&&(c=FH[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let b=s.createElement(c[p]);for(;l.firstChild;)b.appendChild(l.firstChild);l.appendChild(b),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 RH(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 yt(Ze.from(e.state.schema.text(t.replace(/\r\n?/g,`
|
|
@@ -4006,7 +4006,7 @@ ${k}
|
|
|
4006
4006
|
`);B.trim()&&(t.customNestedParser?S=t.customNestedParser(B):S=r.blockTokens(B))}let I=t.createToken(b,S);l.push(I)}if(l.length!==0)return{items:l,raw:u}}function G2(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 zfe(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(ie(ie({},e.attrs),r));i.removeMark(u,c,e.type),i.addMark(u,c,p)}}),i.docChanged&&t.view.dispatch(i)}var Hn=class Hj extends W_{constructor(){super(...arguments),this.type="node"}static create(t={}){let r=typeof t=="function"?t():t;return new Hj(r)}configure(t){return super.configure(t)}extend(t){let r=typeof t=="function"?t():t;return super.extend(r)}};function yl(e){return new bfe({find:e.find,handler:({state:t,range:r,match:n,pasteEvent:a})=>{let i=pn(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(Ox(r.from,r.to,t.doc).filter(b=>b.mark.type.excluded.find(k=>k===e.type&&k!==b.mark.type)).filter(b=>b.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 Ed=Pe(kt(),1);var{getOwnPropertyNames:Bfe,getOwnPropertySymbols:Rfe}=Object,{hasOwnProperty:Nfe}=Object.prototype;function J_(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function Hx(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 Ofe(e){return e!=null?e[Symbol.toStringTag]:void 0}function jj(e){return Bfe(e).concat(Rfe(e))}var Pfe=Object.hasOwn||((e,t)=>Nfe.call(e,t));function kp(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Ffe="__v",qfe="__o",$fe="_owner",{getOwnPropertyDescriptor:Uj,keys:Kj}=Object;function Hfe(e,t){return e.byteLength===t.byteLength&&jx(new Uint8Array(e),new Uint8Array(t))}function jfe(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 Ufe(e,t){return e.byteLength===t.byteLength&&jx(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Kfe(e,t){return kp(e.getTime(),t.getTime())}function Vfe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Gfe(e,t){return e===t}function Vj(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 Wfe=kp;function Xfe(e,t,r){let n=Kj(e),a=n.length;if(Kj(t).length!==a)return!1;for(;a-- >0;)if(!Wj(e,t,r,n[a]))return!1;return!0}function W2(e,t,r){let n=jj(e),a=n.length;if(jj(t).length!==a)return!1;let i,o,s;for(;a-- >0;)if(i=n[a],!Wj(e,t,r,i)||(o=Uj(e,i),s=Uj(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Yfe(e,t){return kp(e.valueOf(),t.valueOf())}function Jfe(e,t){return e.source===t.source&&e.flags===t.flags}function Gj(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 jx(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 Zfe(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 Wj(e,t,r,n){return(n===$fe||n===qfe||n===Ffe)&&(e.$$typeof||t.$$typeof)?!0:Pfe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Qfe="[object ArrayBuffer]",epe="[object Arguments]",tpe="[object Boolean]",rpe="[object DataView]",npe="[object Date]",ape="[object Error]",ipe="[object Map]",ope="[object Number]",spe="[object Object]",lpe="[object RegExp]",upe="[object Set]",cpe="[object String]",dpe={"[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},fpe="[object URL]",ppe=Object.prototype.toString;function hpe({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:b}){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 I=k.constructor;if(I!==w.constructor)return!1;if(I===Object)return l(k,w,S);if(Array.isArray(k))return t(k,w,S);if(I===Date)return n(k,w,S);if(I===RegExp)return c(k,w,S);if(I===Map)return o(k,w,S);if(I===Set)return f(k,w,S);let B=ppe.call(k);if(B===npe)return n(k,w,S);if(B===lpe)return c(k,w,S);if(B===ipe)return o(k,w,S);if(B===upe)return f(k,w,S);if(B===spe)return typeof k.then!="function"&&typeof w.then!="function"&&l(k,w,S);if(B===fpe)return p(k,w,S);if(B===ape)return a(k,w,S);if(B===epe)return l(k,w,S);if(dpe[B])return d(k,w,S);if(B===Qfe)return e(k,w,S);if(B===rpe)return r(k,w,S);if(B===tpe||B===ope||B===cpe)return u(k,w,S);if(b){let O=b[B];if(!O){let N=Ofe(k);N&&(O=b[N])}if(O)return O(k,w,S)}return!1}}function mpe({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:Hfe,areArraysEqual:r?W2:jfe,areDataViewsEqual:Ufe,areDatesEqual:Kfe,areErrorsEqual:Vfe,areFunctionsEqual:Gfe,areMapsEqual:r?J_(Vj,W2):Vj,areNumbersEqual:Wfe,areObjectsEqual:r?W2:Xfe,arePrimitiveWrappersEqual:Yfe,areRegExpsEqual:Jfe,areSetsEqual:r?J_(Gj,W2):Gj,areTypedArraysEqual:r?J_(jx,W2):jx,areUrlsEqual:Zfe,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){let a=Hx(n.areArraysEqual),i=Hx(n.areMapsEqual),o=Hx(n.areObjectsEqual),s=Hx(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:o,areSetsEqual:s})}return n}function gpe(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function ype({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 Xj=Ld(),VSe=Ld({strict:!0}),GSe=Ld({circular:!0}),WSe=Ld({circular:!0,strict:!0}),XSe=Ld({createInternalComparator:()=>kp}),YSe=Ld({strict:!0,createInternalComparator:()=>kp}),JSe=Ld({circular:!0,createInternalComparator:()=>kp}),ZSe=Ld({circular:!0,createInternalComparator:()=>kp,strict:!0});function Ld(e={}){let{circular:t=!1,createInternalComparator:r,createState:n,strict:a=!1}=e,i=mpe(e),o=hpe(i),s=r?r(o):gpe(o);return ype({circular:t,comparator:o,createState:n,equals:s,strict:a})}var Dd=Pe(kt(),1);var Ux=Pe(kt());function Yj(e,t,r,n,a){let i=(0,Ux.useRef)(null);return(0,Ux.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 tU=Pe($t(),1),X2=Pe(kt(),1),Epe=Pe($t(),1),nU=Pe(kt(),1),aU=Pe($t(),1);var iU=Pe(kt(),1),Dpe=Pe(kt(),1),Ipe=Pe(Tg(),1),zpe=Pe($t(),1),Bpe=Pe($t(),1);var eA=Pe(kt(),1),Rpe=Pe($t(),1),Sp=Pe(kt(),1),Kx=Pe($t(),1);var bpe=(...e)=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r&&(r.current=t)})},xpe=({contentComponent:e})=>{let t=(0,x2.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Yc.jsx)(Yc.Fragment,{children:Object.values(t)})};function vpe(){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=Xe(ie({},t),{[r]:Zj.default.createPortal(n.reactElement,n.element,r)}),e.forEach(a=>a())},removeRenderer(r){let n=ie({},t);delete n[r],t=n,e.forEach(a=>a())}}}var wpe=class extends Td.default.Component{constructor(e){var t;super(e),this.editorContentRef=Td.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=vpe(),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=Vn(n,["editor","innerRef"]);return(0,Yc.jsxs)(Yc.Fragment,{children:[(0,Yc.jsx)("div",ie({ref:bpe(t,this.editorContentRef)},r)),(e==null?void 0:e.contentComponent)&&(0,Yc.jsx)(xpe,{contentComponent:e.contentComponent})]})}},kpe=(0,Td.forwardRef)((e,t)=>{let r=Td.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Td.default.createElement(wpe,ie({key:r,innerRef:t},e))}),Q_=Td.default.memo(kpe),Spe=typeof window!="undefined"?Dd.useLayoutEffect:Dd.useEffect,Cpe=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 Mpe(e){var t;let[r]=(0,Dd.useState)(()=>new Cpe(e.editor)),n=Yj(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:Xj);return Spe(()=>r.watch(e.editor),[e.editor,r]),(0,Dd.useDebugValue)(n),n}var Jj=!1,Z_=typeof window=="undefined",_pe=Z_||!!(typeof window!="undefined"&&window.next),Ape=class Qj{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(Z_||_pe){if(Jj)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&&Z_&&Jj)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=Xe(ie({},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 Fj(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?Qj.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions(Xe(ie({},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 eU(e={},t=[]){let r=(0,Ed.useRef)(e);r.current=e;let[n]=(0,Ed.useState)(()=>new Ape(r)),a=(0,x2.useSyncExternalStore)(n.subscribe,n.getEditor,n.getServerSnapshot);return(0,Ed.useDebugValue)(a),(0,Ed.useEffect)(n.onRender(t)),Mpe({editor:a,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&i===0?0:i+1}),a}var rU=(0,Vx.createContext)({editor:null}),oCe=rU.Consumer;var Lpe=(0,X2.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var Tpe=()=>(0,X2.useContext)(Lpe);var sCe=nU.default.forwardRef((e,t)=>{let{onDragStart:r}=Tpe(),n=e.as||"div";return(0,aU.jsx)(n,Xe(ie({},e),{ref:t,"data-node-view-wrapper":"",onDragStart:r,style:ie({whiteSpace:"normal"},e.style)}))});var lCe=iU.default.createContext({markViewContentRef:()=>{}});var tA=(0,Sp.createContext)({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});tA.displayName="TiptapContext";var Npe=()=>(0,Sp.useContext)(tA);function oU({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,Sp.useMemo)(()=>({editor:n}),[n]),i=(0,Sp.useMemo)(()=>({editor:n}),[n]);return(0,Kx.jsx)(rU.Provider,{value:i,children:(0,Kx.jsx)(tA.Provider,{value:a,children:r})})}oU.displayName="Tiptap";function sU(t){var e=Vn(t,[]);let{editor:r}=Npe();return(0,Kx.jsx)(Q_,ie({editor:r},e))}sU.displayName="Tiptap.Content";var uCe=Object.assign(oU,{Content:sU});var em=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let a=t!=null?t:{},{children:r}=a,n=Vn(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 Ope=/^\s*>\s$/,lU=Hn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return em("blockquote",Xe(ie({},zr(this.options.HTMLAttributes,e)),{children:em("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 zfe(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(ie(ie({},e.attrs),r));i.removeMark(u,c,e.type),i.addMark(u,c,p)}}),i.docChanged&&t.view.dispatch(i)}var Hn=class Hj extends W_{constructor(){super(...arguments),this.type="node"}static create(t={}){let r=typeof t=="function"?t():t;return new Hj(r)}configure(t){return super.configure(t)}extend(t){let r=typeof t=="function"?t():t;return super.extend(r)}};function yl(e){return new bfe({find:e.find,handler:({state:t,range:r,match:n,pasteEvent:a})=>{let i=pn(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(Ox(r.from,r.to,t.doc).filter(b=>b.mark.type.excluded.find(k=>k===e.type&&k!==b.mark.type)).filter(b=>b.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 Ed=Pe(kt(),1);var{getOwnPropertyNames:Bfe,getOwnPropertySymbols:Rfe}=Object,{hasOwnProperty:Nfe}=Object.prototype;function J_(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function Hx(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 Ofe(e){return e!=null?e[Symbol.toStringTag]:void 0}function jj(e){return Bfe(e).concat(Rfe(e))}var Pfe=Object.hasOwn||((e,t)=>Nfe.call(e,t));function kp(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Ffe="__v",qfe="__o",$fe="_owner",{getOwnPropertyDescriptor:Uj,keys:Kj}=Object;function Hfe(e,t){return e.byteLength===t.byteLength&&jx(new Uint8Array(e),new Uint8Array(t))}function jfe(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 Ufe(e,t){return e.byteLength===t.byteLength&&jx(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Kfe(e,t){return kp(e.getTime(),t.getTime())}function Vfe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Gfe(e,t){return e===t}function Vj(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 Wfe=kp;function Xfe(e,t,r){let n=Kj(e),a=n.length;if(Kj(t).length!==a)return!1;for(;a-- >0;)if(!Wj(e,t,r,n[a]))return!1;return!0}function W2(e,t,r){let n=jj(e),a=n.length;if(jj(t).length!==a)return!1;let i,o,s;for(;a-- >0;)if(i=n[a],!Wj(e,t,r,i)||(o=Uj(e,i),s=Uj(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Yfe(e,t){return kp(e.valueOf(),t.valueOf())}function Jfe(e,t){return e.source===t.source&&e.flags===t.flags}function Gj(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 jx(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 Zfe(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 Wj(e,t,r,n){return(n===$fe||n===qfe||n===Ffe)&&(e.$$typeof||t.$$typeof)?!0:Pfe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Qfe="[object ArrayBuffer]",epe="[object Arguments]",tpe="[object Boolean]",rpe="[object DataView]",npe="[object Date]",ape="[object Error]",ipe="[object Map]",ope="[object Number]",spe="[object Object]",lpe="[object RegExp]",upe="[object Set]",cpe="[object String]",dpe={"[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},fpe="[object URL]",ppe=Object.prototype.toString;function hpe({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:b}){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 I=k.constructor;if(I!==w.constructor)return!1;if(I===Object)return l(k,w,S);if(Array.isArray(k))return t(k,w,S);if(I===Date)return n(k,w,S);if(I===RegExp)return c(k,w,S);if(I===Map)return o(k,w,S);if(I===Set)return f(k,w,S);let B=ppe.call(k);if(B===npe)return n(k,w,S);if(B===lpe)return c(k,w,S);if(B===ipe)return o(k,w,S);if(B===upe)return f(k,w,S);if(B===spe)return typeof k.then!="function"&&typeof w.then!="function"&&l(k,w,S);if(B===fpe)return p(k,w,S);if(B===ape)return a(k,w,S);if(B===epe)return l(k,w,S);if(dpe[B])return d(k,w,S);if(B===Qfe)return e(k,w,S);if(B===rpe)return r(k,w,S);if(B===tpe||B===ope||B===cpe)return u(k,w,S);if(b){let O=b[B];if(!O){let N=Ofe(k);N&&(O=b[N])}if(O)return O(k,w,S)}return!1}}function mpe({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:Hfe,areArraysEqual:r?W2:jfe,areDataViewsEqual:Ufe,areDatesEqual:Kfe,areErrorsEqual:Vfe,areFunctionsEqual:Gfe,areMapsEqual:r?J_(Vj,W2):Vj,areNumbersEqual:Wfe,areObjectsEqual:r?W2:Xfe,arePrimitiveWrappersEqual:Yfe,areRegExpsEqual:Jfe,areSetsEqual:r?J_(Gj,W2):Gj,areTypedArraysEqual:r?J_(jx,W2):jx,areUrlsEqual:Zfe,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){let a=Hx(n.areArraysEqual),i=Hx(n.areMapsEqual),o=Hx(n.areObjectsEqual),s=Hx(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:o,areSetsEqual:s})}return n}function gpe(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function ype({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 Xj=Ld(),GSe=Ld({strict:!0}),WSe=Ld({circular:!0}),XSe=Ld({circular:!0,strict:!0}),YSe=Ld({createInternalComparator:()=>kp}),JSe=Ld({strict:!0,createInternalComparator:()=>kp}),ZSe=Ld({circular:!0,createInternalComparator:()=>kp}),QSe=Ld({circular:!0,createInternalComparator:()=>kp,strict:!0});function Ld(e={}){let{circular:t=!1,createInternalComparator:r,createState:n,strict:a=!1}=e,i=mpe(e),o=hpe(i),s=r?r(o):gpe(o);return ype({circular:t,comparator:o,createState:n,equals:s,strict:a})}var Dd=Pe(kt(),1);var Ux=Pe(kt());function Yj(e,t,r,n,a){let i=(0,Ux.useRef)(null);return(0,Ux.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 tU=Pe($t(),1),X2=Pe(kt(),1),Epe=Pe($t(),1),nU=Pe(kt(),1),aU=Pe($t(),1);var iU=Pe(kt(),1),Dpe=Pe(kt(),1),Ipe=Pe(Tg(),1),zpe=Pe($t(),1),Bpe=Pe($t(),1);var eA=Pe(kt(),1),Rpe=Pe($t(),1),Sp=Pe(kt(),1),Kx=Pe($t(),1);var bpe=(...e)=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r&&(r.current=t)})},xpe=({contentComponent:e})=>{let t=(0,x2.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,Yc.jsx)(Yc.Fragment,{children:Object.values(t)})};function vpe(){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=Xe(ie({},t),{[r]:Zj.default.createPortal(n.reactElement,n.element,r)}),e.forEach(a=>a())},removeRenderer(r){let n=ie({},t);delete n[r],t=n,e.forEach(a=>a())}}}var wpe=class extends Td.default.Component{constructor(e){var t;super(e),this.editorContentRef=Td.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=vpe(),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=Vn(n,["editor","innerRef"]);return(0,Yc.jsxs)(Yc.Fragment,{children:[(0,Yc.jsx)("div",ie({ref:bpe(t,this.editorContentRef)},r)),(e==null?void 0:e.contentComponent)&&(0,Yc.jsx)(xpe,{contentComponent:e.contentComponent})]})}},kpe=(0,Td.forwardRef)((e,t)=>{let r=Td.default.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Td.default.createElement(wpe,ie({key:r,innerRef:t},e))}),Q_=Td.default.memo(kpe),Spe=typeof window!="undefined"?Dd.useLayoutEffect:Dd.useEffect,Cpe=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 Mpe(e){var t;let[r]=(0,Dd.useState)(()=>new Cpe(e.editor)),n=Yj(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:Xj);return Spe(()=>r.watch(e.editor),[e.editor,r]),(0,Dd.useDebugValue)(n),n}var Jj=!1,Z_=typeof window=="undefined",_pe=Z_||!!(typeof window!="undefined"&&window.next),Ape=class Qj{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(Z_||_pe){if(Jj)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&&Z_&&Jj)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=Xe(ie({},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 Fj(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?Qj.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions(Xe(ie({},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 eU(e={},t=[]){let r=(0,Ed.useRef)(e);r.current=e;let[n]=(0,Ed.useState)(()=>new Ape(r)),a=(0,x2.useSyncExternalStore)(n.subscribe,n.getEditor,n.getServerSnapshot);return(0,Ed.useDebugValue)(a),(0,Ed.useEffect)(n.onRender(t)),Mpe({editor:a,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&i===0?0:i+1}),a}var rU=(0,Vx.createContext)({editor:null}),sCe=rU.Consumer;var Lpe=(0,X2.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var Tpe=()=>(0,X2.useContext)(Lpe);var lCe=nU.default.forwardRef((e,t)=>{let{onDragStart:r}=Tpe(),n=e.as||"div";return(0,aU.jsx)(n,Xe(ie({},e),{ref:t,"data-node-view-wrapper":"",onDragStart:r,style:ie({whiteSpace:"normal"},e.style)}))});var uCe=iU.default.createContext({markViewContentRef:()=>{}});var tA=(0,Sp.createContext)({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});tA.displayName="TiptapContext";var Npe=()=>(0,Sp.useContext)(tA);function oU({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,Sp.useMemo)(()=>({editor:n}),[n]),i=(0,Sp.useMemo)(()=>({editor:n}),[n]);return(0,Kx.jsx)(rU.Provider,{value:i,children:(0,Kx.jsx)(tA.Provider,{value:a,children:r})})}oU.displayName="Tiptap";function sU(t){var e=Vn(t,[]);let{editor:r}=Npe();return(0,Kx.jsx)(Q_,ie({editor:r},e))}sU.displayName="Tiptap.Content";var cCe=Object.assign(oU,{Content:sU});var em=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);let a=t!=null?t:{},{children:r}=a,n=Vn(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 Ope=/^\s*>\s$/,lU=Hn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return em("blockquote",Xe(ie({},zr(this.options.HTMLAttributes,e)),{children:em("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]=Mhe(a);if(i.length===0)return;let s=jU(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(Ahe,this.editor.getAttributes(NU)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Ru({find:OU,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=Ru({find:OU,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>ie({start:+t[1]},this.editor.getAttributes(NU)),joinPredicate:(t,r)=>r.childCount+r.attrs.start===+t[1],editor:this.editor})),[e]}}),Lhe=/^\s*(\[([( |x])?\])\s$/,The=Hn.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",zr(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 G2(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?Xe(ie({},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 b=r();if(typeof b!="number")return!1;let v=p.doc.nodeAt(b);return p.setNodeMarkup(b,void 0,Xe(ie({},v==null?void 0:v.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=Q1(f,d),b=new Set(Object.keys(p)),v=this.options.HTMLAttributes;return c.forEach(k=>{b.has(k)||(k in v?a.setAttribute(k,v[k]):a.removeAttribute(k))}),Object.entries(p).forEach(([k,w])=>{w==null?k in v?a.setAttribute(k,v[k]):a.removeAttribute(k):a.setAttribute(k,w)}),c=b,!0}}}},addInputRules(){return[Ru({find:Lhe,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),Ehe=Hn.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",zr(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=$x(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=$x(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()}}}),fMe=Qr.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(LA.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(TA.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(DA.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(IA.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(The.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(Ehe.configure(this.options.taskList)),e}});var UU=" ",Dhe="\xA0",KU=Hn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",zr(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===UU||n[0].text===Dhe)?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?UU:t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var Ihe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,zhe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,VU=Ls.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",zr(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[Bu({find:Ihe,type:this.type})]},addPasteRules(){return[yl({find:zhe,type:this.type})]}});var GU=Hn.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var WU=Ls.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",zr(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 XU(e={}){return new tr({view(t){return new zA(t,e)}})}var zA=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 b=p.getBoundingClientRect(),v=f?b.bottom:b.top;f&&d&&(v=(v+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let k=this.width/2*s;n={left:b.left,right:b.right,top:v-k,bottom:v+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=ox(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 eo=class e extends Xt{constructor(t){super(t,t)}map(t,r){let n=t.resolve(r.map(this.head));return e.valid(n)?new e(n):Xt.near(n)}content(){return yt.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 BA(this.anchor)}static valid(t){let r=t.parent;if(r.isTextblock||!Bhe(t)||!Rhe(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&&!Dt.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}}};eo.prototype.visible=!1;eo.findFrom=eo.findGapCursorFrom;Xt.jsonID("gapcursor",eo);var BA=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 eo.valid(r)?new eo(r):Xt.near(r)}};function YU(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function Bhe(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||YU(a.type))return!0;if(a.inlineContent)return!1}}return!0}function Rhe(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||YU(a.type))return!0;if(a.inlineContent)return!1}}return!0}function JU(){return new tr({props:{decorations:Fhe,createSelectionBetween(e,t,r){return t.pos==r.pos&&eo.valid(r)?new eo(r):null},handleClick:Ohe,handleKeyDown:Nhe,handleDOMEvents:{beforeinput:Phe}}})}var Nhe=R_({ArrowLeft:Av("horiz",-1),ArrowRight:Av("horiz",1),ArrowUp:Av("vert",-1),ArrowDown:Av("vert",1)});function Av(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 Ot){if(!i.endOfTextblock(r)||s.depth==0)return!1;l=!1,s=n.doc.resolve(t>0?s.after():s.before())}let u=eo.findGapCursorFrom(s,t,l);return u?(a&&a(n.tr.setSelection(new eo(u))),!0):!1}}function Ohe(e,t,r){if(!e||!e.editable)return!1;let n=e.state.doc.resolve(t);if(!eo.valid(n))return!1;let a=e.posAtCoords({left:r.clientX,top:r.clientY});return a&&a.inside>-1&&Dt.isSelectable(e.state.doc.nodeAt(a.inside))?!1:(e.dispatch(e.state.tr.setSelection(new eo(n))),!0)}function Phe(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof eo))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=Ze.empty;for(let o=n.length-1;o>=0;o--)a=Ze.from(n[o].createAndFill(null,a));let i=e.state.tr.replace(r.pos,r.pos,new yt(a,0,0));return i.setSelection(Ot.near(i.doc.resolve(r.pos+1))),e.dispatch(i),!1}function Fhe(e){if(!(e.selection instanceof eo))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",qa.create(e.doc,[Qi.widget(e.selection.head,t,{key:"gapcursor"})])}var Lv=200,Oi=function(){};Oi.prototype.append=function(t){return t.length?(t=Oi.from(t),!this.length&&t||t.length<Lv&&this.leafAppend(t)||this.length<Lv&&t.leafPrepend(this)||this.appendInner(t)):this};Oi.prototype.prepend=function(t){return t.length?Oi.from(t).append(this):this};Oi.prototype.appendInner=function(t){return new qhe(this,t)};Oi.prototype.slice=function(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.length),t>=r?Oi.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,r))};Oi.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Oi.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)};Oi.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};Oi.from=function(t){return t instanceof Oi?t:t&&t.length?new ZU(t):Oi.empty};var ZU=(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<=Lv)return new t(this.values.concat(a.flatten()))},t.prototype.leafPrepend=function(a){if(this.length+a.length<=Lv)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})(Oi);Oi.empty=new ZU([]);var qhe=(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})(Oi),RA=Oi;var $he=500,Ap=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 Pu(f.map));let p=f.step.map(a.slice(i)),b;p&&o.maybeStep(p).doc&&(b=o.mapping.maps[o.mapping.maps.length-1],u.push(new Pu(b,void 0,void 0,u.length+c.length))),i--,b&&a.appendMap(b,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 Pu(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>jhe&&(s=Hhe(s,u),o-=u),new e(s.append(i),o)}remapping(t,r){let n=new A2;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 Pu(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 b=i.maps[p];if(d.step){let v=t.steps[p].invert(t.docs[p]),k=d.selection&&d.selection.map(i.slice(l+1,p));k&&s++,n.push(new Pu(b,v,k))}else n.push(new Pu(b))},a);let u=[];for(let d=r;d<o;d++)u.push(new Pu(i.maps[d]));let c=this.items.slice(0,a).append(u).append(n),f=new e(c,s);return f.emptyItemCount()>$he&&(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 Pu(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(RA.from(a.reverse()),i)}};Ap.empty=new Ap(RA.empty,0);function Hhe(e,t){let r;return e.forEach((n,a)=>{if(n.selection&&t--==0)return r=a,!1}),e.slice(r)}var Pu=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)}}},Fu=class{constructor(t,r,n,a,i){this.done=t,this.undone=r,this.prevRanges=n,this.prevTime=a,this.prevComposition=i}},jhe=20;function Uhe(e,t,r,n){let a=r.getMeta(_p),i;if(a)return a.historyState;r.getMeta(Ghe)&&(e=new Fu(e.done,e.undone,null,0,-1));let o=r.getMeta("appendedTransaction");if(r.steps.length==0)return e;if(o&&o.getMeta(_p))return o.getMeta(_p).redo?new Fu(e.done.addTransform(r,void 0,n,Tv(t)),e.undone,QU(r.mapping.maps),e.prevTime,e.prevComposition):new Fu(e.done,e.undone.addTransform(r,void 0,n,Tv(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||!Khe(r,e.prevRanges)),u=o?NA(e.prevRanges,r.mapping):QU(r.mapping.maps);return new Fu(e.done.addTransform(r,l?t.selection.getBookmark():void 0,n,Tv(t)),Ap.empty,u,r.time,s==null?e.prevComposition:s)}else return(i=r.getMeta("rebased"))?new Fu(e.done.rebased(r,i),e.undone.rebased(r,i),NA(e.prevRanges,r.mapping),e.prevTime,e.prevComposition):new Fu(e.done.addMaps(r.mapping.maps),e.undone.addMaps(r.mapping.maps),NA(e.prevRanges,r.mapping),e.prevTime,e.prevComposition)}function Khe(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 QU(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 NA(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 Vhe(e,t,r){let n=Tv(t),a=_p.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 Fu(r?s:i.remaining,r?i.remaining:s,null,0,-1);return i.transform.setSelection(o).setMeta(_p,{redo:r,historyState:l})}var OA=!1,eK=null;function Tv(e){let t=e.plugins;if(eK!=t){OA=!1,eK=t;for(let r=0;r<t.length;r++)if(t[r].spec.historyPreserveItems){OA=!0;break}}return OA}var _p=new Sr("history"),Ghe=new Sr("closeHistory");function tK(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new tr({key:_p,state:{init(){return new Fu(Ap.empty,Ap.empty,null,0,-1)},apply(t,r,n){return Uhe(r,n,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,r){let n=r.inputType,a=n=="historyUndo"?PA:n=="historyRedo"?FA:null;return!a||!t.editable?!1:(r.preventDefault(),a(t.state,t.dispatch))}}}})}function Ev(e,t){return(r,n)=>{let a=_p.getState(r);if(!a||(e?a.undone:a.done).eventCount==0)return!1;if(n){let i=Vhe(a,r,e);i&&n(t?i.scrollIntoView():i)}return!0}}var PA=Ev(!1,!0),FA=Ev(!0,!0),FMe=Ev(!1,!1),qMe=Ev(!0,!1);var VMe=Qr.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 tr({key:new Sr("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)}})]}}),aK=Qr.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[XU(this.options)]}}),ZMe=Qr.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new tr({key:new Sr("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:r,isFocused:n}=this.editor,{anchor:a}=t,i=[];if(!r||!n)return qa.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(Qi.node(u,u+l.nodeSize,{class:this.options.className}))}),qa.create(e,i)}}})]}}),iK=Qr.create({name:"gapCursor",addProseMirrorPlugins(){return[JU()]},extendNodeSchema(e){var t;let r={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=pn(zt(e,"allowGapCursor",r)))!=null?t:null}}}),rK="placeholder";function Whe(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var a_e=Qr.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:rK,placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${Whe(this.options.dataAttribute)}`:`data-${rK}`;return[new tr({key:new Sr("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&&K2(s);if((u||!this.options.showOnlyCurrent)&&c){let f=[this.options.emptyNodeClass];o&&f.push(this.options.emptyEditorClass);let d=Qi.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}),qa.create(t,i)}}})]}}),l_e=Qr.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new tr({key:new Sr("selection"),props:{decorations(r){return r.selection.empty||e.isFocused||!e.isEditable||Px(r.selection)||e.view.dragging?null:qa.create(r.doc,[Qi.inline(r.selection.from,r.selection.to,{class:t.className})])}}})]}});function nK({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}var oK=Qr.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Sr(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 tr({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!nK({node:o,types:n})},apply:(a,i)=>{if(!a.docChanged||a.getMeta("__uniqueIDTransaction"))return i;let o=a.doc.lastChild;return!nK({node:o,types:n})}}})]}}),sK=Qr.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>PA(e,t),redo:()=>({state:e,dispatch:t})=>FA(e,t)}},addProseMirrorPlugins(){return[tK(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 Xhe=Qr.create({name:"starterKit",addExtensions(){var e,t,r,n;let a=[];return this.options.bold!==!1&&a.push(uU.configure(this.options.bold)),this.options.blockquote!==!1&&a.push(lU.configure(this.options.blockquote)),this.options.bulletList!==!1&&a.push(LA.configure(this.options.bulletList)),this.options.code!==!1&&a.push(cU.configure(this.options.code)),this.options.codeBlock!==!1&&a.push(dU.configure(this.options.codeBlock)),this.options.document!==!1&&a.push(fU.configure(this.options.document)),this.options.dropcursor!==!1&&a.push(aK.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&a.push(iK.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&a.push(pU.configure(this.options.hardBreak)),this.options.heading!==!1&&a.push(hU.configure(this.options.heading)),this.options.undoRedo!==!1&&a.push(sK.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&a.push(mU.configure(this.options.horizontalRule)),this.options.italic!==!1&&a.push(gU.configure(this.options.italic)),this.options.listItem!==!1&&a.push(TA.configure(this.options.listItem)),this.options.listKeymap!==!1&&a.push(DA.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&a.push(IU.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&a.push(IA.configure(this.options.orderedList)),this.options.paragraph!==!1&&a.push(KU.configure(this.options.paragraph)),this.options.strike!==!1&&a.push(VU.configure(this.options.strike)),this.options.text!==!1&&a.push(GU.configure(this.options.text)),this.options.underline!==!1&&a.push(WU.configure((r=this.options)==null?void 0:r.underline)),this.options.trailingNode!==!1&&a.push(oK.configure((n=this.options)==null?void 0:n.trailingNode)),a}}),qA=Xhe;function cK(e){return e.trim().split(/\s+/).filter(Boolean).length}function dK(e){return e.length}function Yhe(e){let t=r=>r.map(n=>{var a;return((a=n.text)!=null?a:"")+(n.content?t(n.content):"")}).join(" ");return cK(t(e))}function Jhe(e){let t=r=>r.map(n=>{var a;return((a=n.text)!=null?a:"")+(n.content?t(n.content):"")}).join("");return dK(t(e))}function $A({node:e}){var t,r,n;if(e.type==="text"){if(!e.marks||e.marks.length===0)return(0,qe.jsx)(qe.Fragment,{children:e.text});let a=e.text||"";for(let i of e.marks)i.type==="bold"?a=(0,qe.jsx)("strong",{children:a}):i.type==="italic"?a=(0,qe.jsx)("em",{children:a}):i.type==="underline"?a=(0,qe.jsx)("u",{children:a}):i.type==="strike"?a=(0,qe.jsx)("s",{children:a}):i.type==="textStyle"&&((t=i.attrs)!=null&&t.color)&&(a=(0,qe.jsx)("span",{style:{color:i.attrs.color},children:a}));return(0,qe.jsx)(qe.Fragment,{children:a})}return e.type==="paragraph"?(0,qe.jsx)("span",{className:"block",children:(n=(r=e.content)==null?void 0:r.map((a,i)=>(0,qe.jsx)($A,{node:a},i)))!=null?n:(0,qe.jsx)("br",{})}):e.type==="hardBreak"?(0,qe.jsx)("br",{}):e.content?(0,qe.jsx)("span",{className:"block",children:e.content.map((a,i)=>(0,qe.jsx)($A,{node:a},i))}):null}function Zhe({nodes:e}){return(0,qe.jsx)("span",{className:"block space-y-1 text-amber-900",children:e.map((t,r)=>(0,qe.jsx)($A,{node:t},r))})}function Qhe({hint:e}){let t=ga(),[r,n]=(0,rr.useState)(!1),[a,i]=(0,rr.useState)(!1),o=(0,rr.useRef)(null);return(0,rr.useEffect)(()=>{if(!a)return;let s=l=>{o.current&&!o.current.contains(l.target)&&(i(!1),n(!1))};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a]),(0,qe.jsxs)("span",{ref:o,className:"relative inline-flex items-center align-middle",onMouseEnter:()=>n(!0),onMouseLeave:()=>{a||n(!1)},children:[(0,qe.jsx)("button",{type:"button",onClick:s=>{s.stopPropagation(),a?(i(!1),n(!1)):(i(!0),n(!0))},className:ar("player-blank-hint-btn select-none",a&&"player-blank-hint-btn--pinned"),"aria-label":t.showHint,children:"?"}),r&&(0,qe.jsx)("span",{className:"player-blank-hint-pop",onClick:s=>s.stopPropagation(),children:(0,qe.jsx)(Zhe,{nodes:e})})]})}function lK(e){if(!isFinite(e.duration)){e.currentTime=1e101;let t=()=>{e.currentTime=0,e.removeEventListener("timeupdate",t)};e.addEventListener("timeupdate",t)}}function e1e(e){return/youtube\.com|youtu\.be/i.test(e)?"youtube":/vimeo\.com/i.test(e)?"vimeo":"other"}function t1e(e){let t=e.match(/[?&]v=([^&]+)/)||e.match(/youtu\.be\/([^?]+)/)||e.match(/embed\/([^?]+)/);return t?t[1]:null}function uK(e){let t=Math.floor(e/60),r=e%60;return`${t}:${r.toString().padStart(2,"0")}`}function I6({node:e,validationFeedback:t,readOnly:r=!1,mediaHandler:n}){var Y;let a=bi(),i=ga(),{id:o,attrs:s}=e,{mode:l,placeholder:u,allowFormatting:c,wordLimit:f,characterLimit:d,allowedTypes:p,allowMultiple:b,fileInstructions:v,maxDuration:k,hint:w}=s,S=r||((Y=t==null?void 0:t.showFeedback)!=null?Y:!1),T=t==null?void 0:t.state,I=(0,rr.useRef)(null),B=(0,rr.useCallback)(V=>{I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{var xe;let re=(xe=V.files)==null?void 0:xe.map(oe=>({url:oe.url,mimeType:oe.kind==="videoLink"?"video/x-link":oe.mimeType,name:oe.kind==="videoLink"?void 0:oe.name,duration:oe.kind==="videoLink"?void 0:oe.duration}));a.emit({type:"answer:changed",answer:{nodeId:o,type:"openResponse",timestamp:Date.now(),answer:Xe(ie({},V),{files:re})}})},300)},[o,a]);(0,rr.useEffect)(()=>{B({})},[]);let[O,N]=(0,rr.useState)([]);(0,rr.useEffect)(()=>{(l==="file"||l==="text+file")&&l==="file"&&B({files:O})},[O,l]),(0,rr.useEffect)(()=>{let V=()=>{N([])};return a.on("answers:reset",V),()=>a.off("answers:reset",V)},[a]),(0,rr.useEffect)(()=>{let V=re=>{var le,Se;let oe=((le=re.answers)!=null?le:[]).find(_e=>_e.nodeId===o&&_e.type==="openResponse");(Se=oe==null?void 0:oe.answer)!=null&&Se.files&&N(oe.answer.files)};return a.on("answers:prefill",V),()=>a.off("answers:prefill",V)},[o,a]);let j=t==null?void 0:t.showFeedback,H=ar(!j&&"player-or-field--pre",j&&T==="correct"&&"player-or-field--correct",j&&T==="partial"&&"player-or-field--partial",j&&T==="incorrect"&&"player-or-field--incorrect",j&&T==="awaiting_review"&&"player-or-field--review");return(0,qe.jsxs)("div",{className:"my-3 space-y-2",children:[!S&&w&&w.length>0&&(0,qe.jsx)("div",{className:"flex justify-end",children:(0,qe.jsx)(Qhe,{hint:w})}),l==="text"&&(0,qe.jsx)(fK,{nodeId:o,placeholder:u,allowFormatting:c,wordLimit:f,characterLimit:d,isDisabled:S,feedbackBorderClass:H,emitAnswer:V=>B({text:V}),answerBus:a}),l==="file"&&(0,qe.jsx)(HA,{allowedTypes:p!=null?p:["image"],allowMultiple:!!b,fileInstructions:v,isDisabled:S,feedbackBorderClass:H,files:O,setFiles:N,mediaHandler:n,t:i}),(l==="audio"||l==="video"||l==="screen")&&(0,qe.jsx)(o1e,{kind:l,maxDuration:k,isDisabled:S,feedbackBorderClass:H,mediaHandler:n,emitAnswer:V=>B({recording:V}),t:i}),l==="text+file"&&(0,qe.jsx)(i1e,{nodeId:o,placeholder:u,allowFormatting:c,wordLimit:f,characterLimit:d,allowedTypes:p!=null?p:["image"],allowMultiple:!!b,fileInstructions:v,isDisabled:S,feedbackBorderClass:H,files:O,setFiles:N,emitAnswer:B,answerBus:a,mediaHandler:n,t:i}),(t==null?void 0:t.showFeedback)&&T==="awaiting_review"&&(0,qe.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,qe.jsx)(cl,{size:15,style:ma(15),className:"animate-pulse"}),(0,qe.jsx)("span",{children:i.openResponseAwaitingReview})]}),(t==null?void 0:t.showFeedback)&&T!=="awaiting_review"&&t.teacherFeedback&&(0,qe.jsx)(s1e,{feedback:t.teacherFeedback,feedbackState:T,score:t.score,t:i})]})}function fK({nodeId:e,placeholder:t,allowFormatting:r,wordLimit:n,characterLimit:a,isDisabled:i,feedbackBorderClass:o,emitAnswer:s,answerBus:l}){let u=ga(),[c,f]=(0,rr.useState)(""),[d,p]=(0,rr.useState)(0),[b,v]=(0,rr.useState)(0),k=(0,rr.useRef)(null),w=(0,rr.useCallback)(()=>{let le=k.current;le&&(le.style.height="auto",le.style.height=`${le.scrollHeight}px`)},[]),S=eU({extensions:[qA.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1})],immediatelyRender:!1,editable:!i,content:"",onUpdate({editor:le}){var Ue;if(i)return;let _e=(Ue=le.getJSON().content)!=null?Ue:[],de=Yhe(_e),me=Jhe(_e);p(de),v(me),s({content:_e,wordCount:de})}});(0,rr.useEffect)(()=>{S&&S.setEditable(!i)},[i,S]);let T=(0,rr.useRef)(null);(0,rr.useEffect)(()=>{S&&T.current!==null&&(S.commands.setContent({type:"doc",content:T.current}),T.current=null)},[S]),(0,rr.useEffect)(()=>{let le=Se=>{var me,Ue,Le;let _e=((me=Se.answers)!=null?me:[]).find(Ie=>Ie.nodeId===e&&Ie.type==="openResponse");if(!((Ue=_e==null?void 0:_e.answer)!=null&&Ue.text))return;let de=(Le=_e.answer.text.content)!=null?Le:[];if(r)S?S.commands.setContent({type:"doc",content:de}):T.current=de;else{let Ie=de.flatMap(ye=>{var Me,He,st;return(st=(Me=ye.content)==null?void 0:Me.map(_t=>{var ct;return(ct=_t.text)!=null?ct:""}))!=null?st:[(He=ye.text)!=null?He:""]}).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=$x(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=$x(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()}}}),pMe=Qr.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(LA.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(TA.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(DA.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(IA.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(The.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(Ehe.configure(this.options.taskList)),e}});var UU=" ",Dhe="\xA0",KU=Hn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",zr(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===UU||n[0].text===Dhe)?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?UU:t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var Ihe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,zhe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,VU=Ls.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",zr(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[Bu({find:Ihe,type:this.type})]},addPasteRules(){return[yl({find:zhe,type:this.type})]}});var GU=Hn.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var WU=Ls.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",zr(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 XU(e={}){return new tr({view(t){return new zA(t,e)}})}var zA=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 b=p.getBoundingClientRect(),v=f?b.bottom:b.top;f&&d&&(v=(v+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let k=this.width/2*s;n={left:b.left,right:b.right,top:v-k,bottom:v+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=ox(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 eo=class e extends Xt{constructor(t){super(t,t)}map(t,r){let n=t.resolve(r.map(this.head));return e.valid(n)?new e(n):Xt.near(n)}content(){return yt.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 BA(this.anchor)}static valid(t){let r=t.parent;if(r.isTextblock||!Bhe(t)||!Rhe(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&&!Dt.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}}};eo.prototype.visible=!1;eo.findFrom=eo.findGapCursorFrom;Xt.jsonID("gapcursor",eo);var BA=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 eo.valid(r)?new eo(r):Xt.near(r)}};function YU(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function Bhe(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||YU(a.type))return!0;if(a.inlineContent)return!1}}return!0}function Rhe(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||YU(a.type))return!0;if(a.inlineContent)return!1}}return!0}function JU(){return new tr({props:{decorations:Fhe,createSelectionBetween(e,t,r){return t.pos==r.pos&&eo.valid(r)?new eo(r):null},handleClick:Ohe,handleKeyDown:Nhe,handleDOMEvents:{beforeinput:Phe}}})}var Nhe=R_({ArrowLeft:Av("horiz",-1),ArrowRight:Av("horiz",1),ArrowUp:Av("vert",-1),ArrowDown:Av("vert",1)});function Av(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 Ot){if(!i.endOfTextblock(r)||s.depth==0)return!1;l=!1,s=n.doc.resolve(t>0?s.after():s.before())}let u=eo.findGapCursorFrom(s,t,l);return u?(a&&a(n.tr.setSelection(new eo(u))),!0):!1}}function Ohe(e,t,r){if(!e||!e.editable)return!1;let n=e.state.doc.resolve(t);if(!eo.valid(n))return!1;let a=e.posAtCoords({left:r.clientX,top:r.clientY});return a&&a.inside>-1&&Dt.isSelectable(e.state.doc.nodeAt(a.inside))?!1:(e.dispatch(e.state.tr.setSelection(new eo(n))),!0)}function Phe(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof eo))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=Ze.empty;for(let o=n.length-1;o>=0;o--)a=Ze.from(n[o].createAndFill(null,a));let i=e.state.tr.replace(r.pos,r.pos,new yt(a,0,0));return i.setSelection(Ot.near(i.doc.resolve(r.pos+1))),e.dispatch(i),!1}function Fhe(e){if(!(e.selection instanceof eo))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",qa.create(e.doc,[Qi.widget(e.selection.head,t,{key:"gapcursor"})])}var Lv=200,Oi=function(){};Oi.prototype.append=function(t){return t.length?(t=Oi.from(t),!this.length&&t||t.length<Lv&&this.leafAppend(t)||this.length<Lv&&t.leafPrepend(this)||this.appendInner(t)):this};Oi.prototype.prepend=function(t){return t.length?Oi.from(t).append(this):this};Oi.prototype.appendInner=function(t){return new qhe(this,t)};Oi.prototype.slice=function(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.length),t>=r?Oi.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,r))};Oi.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Oi.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)};Oi.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};Oi.from=function(t){return t instanceof Oi?t:t&&t.length?new ZU(t):Oi.empty};var ZU=(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<=Lv)return new t(this.values.concat(a.flatten()))},t.prototype.leafPrepend=function(a){if(this.length+a.length<=Lv)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})(Oi);Oi.empty=new ZU([]);var qhe=(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})(Oi),RA=Oi;var $he=500,Ap=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 Pu(f.map));let p=f.step.map(a.slice(i)),b;p&&o.maybeStep(p).doc&&(b=o.mapping.maps[o.mapping.maps.length-1],u.push(new Pu(b,void 0,void 0,u.length+c.length))),i--,b&&a.appendMap(b,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 Pu(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>jhe&&(s=Hhe(s,u),o-=u),new e(s.append(i),o)}remapping(t,r){let n=new A2;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 Pu(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 b=i.maps[p];if(d.step){let v=t.steps[p].invert(t.docs[p]),k=d.selection&&d.selection.map(i.slice(l+1,p));k&&s++,n.push(new Pu(b,v,k))}else n.push(new Pu(b))},a);let u=[];for(let d=r;d<o;d++)u.push(new Pu(i.maps[d]));let c=this.items.slice(0,a).append(u).append(n),f=new e(c,s);return f.emptyItemCount()>$he&&(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 Pu(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(RA.from(a.reverse()),i)}};Ap.empty=new Ap(RA.empty,0);function Hhe(e,t){let r;return e.forEach((n,a)=>{if(n.selection&&t--==0)return r=a,!1}),e.slice(r)}var Pu=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)}}},Fu=class{constructor(t,r,n,a,i){this.done=t,this.undone=r,this.prevRanges=n,this.prevTime=a,this.prevComposition=i}},jhe=20;function Uhe(e,t,r,n){let a=r.getMeta(_p),i;if(a)return a.historyState;r.getMeta(Ghe)&&(e=new Fu(e.done,e.undone,null,0,-1));let o=r.getMeta("appendedTransaction");if(r.steps.length==0)return e;if(o&&o.getMeta(_p))return o.getMeta(_p).redo?new Fu(e.done.addTransform(r,void 0,n,Tv(t)),e.undone,QU(r.mapping.maps),e.prevTime,e.prevComposition):new Fu(e.done,e.undone.addTransform(r,void 0,n,Tv(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||!Khe(r,e.prevRanges)),u=o?NA(e.prevRanges,r.mapping):QU(r.mapping.maps);return new Fu(e.done.addTransform(r,l?t.selection.getBookmark():void 0,n,Tv(t)),Ap.empty,u,r.time,s==null?e.prevComposition:s)}else return(i=r.getMeta("rebased"))?new Fu(e.done.rebased(r,i),e.undone.rebased(r,i),NA(e.prevRanges,r.mapping),e.prevTime,e.prevComposition):new Fu(e.done.addMaps(r.mapping.maps),e.undone.addMaps(r.mapping.maps),NA(e.prevRanges,r.mapping),e.prevTime,e.prevComposition)}function Khe(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 QU(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 NA(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 Vhe(e,t,r){let n=Tv(t),a=_p.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 Fu(r?s:i.remaining,r?i.remaining:s,null,0,-1);return i.transform.setSelection(o).setMeta(_p,{redo:r,historyState:l})}var OA=!1,eK=null;function Tv(e){let t=e.plugins;if(eK!=t){OA=!1,eK=t;for(let r=0;r<t.length;r++)if(t[r].spec.historyPreserveItems){OA=!0;break}}return OA}var _p=new Sr("history"),Ghe=new Sr("closeHistory");function tK(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new tr({key:_p,state:{init(){return new Fu(Ap.empty,Ap.empty,null,0,-1)},apply(t,r,n){return Uhe(r,n,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,r){let n=r.inputType,a=n=="historyUndo"?PA:n=="historyRedo"?FA:null;return!a||!t.editable?!1:(r.preventDefault(),a(t.state,t.dispatch))}}}})}function Ev(e,t){return(r,n)=>{let a=_p.getState(r);if(!a||(e?a.undone:a.done).eventCount==0)return!1;if(n){let i=Vhe(a,r,e);i&&n(t?i.scrollIntoView():i)}return!0}}var PA=Ev(!1,!0),FA=Ev(!0,!0),qMe=Ev(!1,!1),$Me=Ev(!0,!1);var GMe=Qr.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 tr({key:new Sr("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)}})]}}),aK=Qr.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[XU(this.options)]}}),QMe=Qr.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new tr({key:new Sr("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:r,isFocused:n}=this.editor,{anchor:a}=t,i=[];if(!r||!n)return qa.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(Qi.node(u,u+l.nodeSize,{class:this.options.className}))}),qa.create(e,i)}}})]}}),iK=Qr.create({name:"gapCursor",addProseMirrorPlugins(){return[JU()]},extendNodeSchema(e){var t;let r={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=pn(zt(e,"allowGapCursor",r)))!=null?t:null}}}),rK="placeholder";function Whe(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var i_e=Qr.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:rK,placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${Whe(this.options.dataAttribute)}`:`data-${rK}`;return[new tr({key:new Sr("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&&K2(s);if((u||!this.options.showOnlyCurrent)&&c){let f=[this.options.emptyNodeClass];o&&f.push(this.options.emptyEditorClass);let d=Qi.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}),qa.create(t,i)}}})]}}),u_e=Qr.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new tr({key:new Sr("selection"),props:{decorations(r){return r.selection.empty||e.isFocused||!e.isEditable||Px(r.selection)||e.view.dragging?null:qa.create(r.doc,[Qi.inline(r.selection.from,r.selection.to,{class:t.className})])}}})]}});function nK({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}var oK=Qr.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new Sr(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 tr({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!nK({node:o,types:n})},apply:(a,i)=>{if(!a.docChanged||a.getMeta("__uniqueIDTransaction"))return i;let o=a.doc.lastChild;return!nK({node:o,types:n})}}})]}}),sK=Qr.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>PA(e,t),redo:()=>({state:e,dispatch:t})=>FA(e,t)}},addProseMirrorPlugins(){return[tK(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 Xhe=Qr.create({name:"starterKit",addExtensions(){var e,t,r,n;let a=[];return this.options.bold!==!1&&a.push(uU.configure(this.options.bold)),this.options.blockquote!==!1&&a.push(lU.configure(this.options.blockquote)),this.options.bulletList!==!1&&a.push(LA.configure(this.options.bulletList)),this.options.code!==!1&&a.push(cU.configure(this.options.code)),this.options.codeBlock!==!1&&a.push(dU.configure(this.options.codeBlock)),this.options.document!==!1&&a.push(fU.configure(this.options.document)),this.options.dropcursor!==!1&&a.push(aK.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&a.push(iK.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&a.push(pU.configure(this.options.hardBreak)),this.options.heading!==!1&&a.push(hU.configure(this.options.heading)),this.options.undoRedo!==!1&&a.push(sK.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&a.push(mU.configure(this.options.horizontalRule)),this.options.italic!==!1&&a.push(gU.configure(this.options.italic)),this.options.listItem!==!1&&a.push(TA.configure(this.options.listItem)),this.options.listKeymap!==!1&&a.push(DA.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&a.push(IU.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&a.push(IA.configure(this.options.orderedList)),this.options.paragraph!==!1&&a.push(KU.configure(this.options.paragraph)),this.options.strike!==!1&&a.push(VU.configure(this.options.strike)),this.options.text!==!1&&a.push(GU.configure(this.options.text)),this.options.underline!==!1&&a.push(WU.configure((r=this.options)==null?void 0:r.underline)),this.options.trailingNode!==!1&&a.push(oK.configure((n=this.options)==null?void 0:n.trailingNode)),a}}),qA=Xhe;function cK(e){return e.trim().split(/\s+/).filter(Boolean).length}function dK(e){return e.length}function Yhe(e){let t=r=>r.map(n=>{var a;return((a=n.text)!=null?a:"")+(n.content?t(n.content):"")}).join(" ");return cK(t(e))}function Jhe(e){let t=r=>r.map(n=>{var a;return((a=n.text)!=null?a:"")+(n.content?t(n.content):"")}).join("");return dK(t(e))}function $A({node:e}){var t,r,n;if(e.type==="text"){if(!e.marks||e.marks.length===0)return(0,qe.jsx)(qe.Fragment,{children:e.text});let a=e.text||"";for(let i of e.marks)i.type==="bold"?a=(0,qe.jsx)("strong",{children:a}):i.type==="italic"?a=(0,qe.jsx)("em",{children:a}):i.type==="underline"?a=(0,qe.jsx)("u",{children:a}):i.type==="strike"?a=(0,qe.jsx)("s",{children:a}):i.type==="textStyle"&&((t=i.attrs)!=null&&t.color)&&(a=(0,qe.jsx)("span",{style:{color:i.attrs.color},children:a}));return(0,qe.jsx)(qe.Fragment,{children:a})}return e.type==="paragraph"?(0,qe.jsx)("span",{className:"block",children:(n=(r=e.content)==null?void 0:r.map((a,i)=>(0,qe.jsx)($A,{node:a},i)))!=null?n:(0,qe.jsx)("br",{})}):e.type==="hardBreak"?(0,qe.jsx)("br",{}):e.content?(0,qe.jsx)("span",{className:"block",children:e.content.map((a,i)=>(0,qe.jsx)($A,{node:a},i))}):null}function Zhe({nodes:e}){return(0,qe.jsx)("span",{className:"block space-y-1 text-amber-900",children:e.map((t,r)=>(0,qe.jsx)($A,{node:t},r))})}function Qhe({hint:e}){let t=ga(),[r,n]=(0,rr.useState)(!1),[a,i]=(0,rr.useState)(!1),o=(0,rr.useRef)(null);return(0,rr.useEffect)(()=>{if(!a)return;let s=l=>{o.current&&!o.current.contains(l.target)&&(i(!1),n(!1))};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a]),(0,qe.jsxs)("span",{ref:o,className:"relative inline-flex items-center align-middle",onMouseEnter:()=>n(!0),onMouseLeave:()=>{a||n(!1)},children:[(0,qe.jsx)("button",{type:"button",onClick:s=>{s.stopPropagation(),a?(i(!1),n(!1)):(i(!0),n(!0))},className:ar("player-blank-hint-btn select-none",a&&"player-blank-hint-btn--pinned"),"aria-label":t.showHint,children:"?"}),r&&(0,qe.jsx)("span",{className:"player-blank-hint-pop",onClick:s=>s.stopPropagation(),children:(0,qe.jsx)(Zhe,{nodes:e})})]})}function lK(e){if(!isFinite(e.duration)){e.currentTime=1e101;let t=()=>{e.currentTime=0,e.removeEventListener("timeupdate",t)};e.addEventListener("timeupdate",t)}}function e1e(e){return/youtube\.com|youtu\.be/i.test(e)?"youtube":/vimeo\.com/i.test(e)?"vimeo":"other"}function t1e(e){let t=e.match(/[?&]v=([^&]+)/)||e.match(/youtu\.be\/([^?]+)/)||e.match(/embed\/([^?]+)/);return t?t[1]:null}function uK(e){let t=Math.floor(e/60),r=e%60;return`${t}:${r.toString().padStart(2,"0")}`}function I6({node:e,validationFeedback:t,readOnly:r=!1,mediaHandler:n}){var Y;let a=bi(),i=ga(),{id:o,attrs:s}=e,{mode:l,placeholder:u,allowFormatting:c,wordLimit:f,characterLimit:d,allowedTypes:p,allowMultiple:b,fileInstructions:v,maxDuration:k,hint:w}=s,S=r||((Y=t==null?void 0:t.showFeedback)!=null?Y:!1),T=t==null?void 0:t.state,I=(0,rr.useRef)(null),B=(0,rr.useCallback)(V=>{I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{var xe;let re=(xe=V.files)==null?void 0:xe.map(oe=>({url:oe.url,mimeType:oe.kind==="videoLink"?"video/x-link":oe.mimeType,name:oe.kind==="videoLink"?void 0:oe.name,duration:oe.kind==="videoLink"?void 0:oe.duration}));a.emit({type:"answer:changed",answer:{nodeId:o,type:"openResponse",timestamp:Date.now(),answer:Xe(ie({},V),{files:re})}})},300)},[o,a]);(0,rr.useEffect)(()=>{B({})},[]);let[O,N]=(0,rr.useState)([]);(0,rr.useEffect)(()=>{(l==="file"||l==="text+file")&&l==="file"&&B({files:O})},[O,l]),(0,rr.useEffect)(()=>{let V=()=>{N([])};return a.on("answers:reset",V),()=>a.off("answers:reset",V)},[a]),(0,rr.useEffect)(()=>{let V=re=>{var le,Se;let oe=((le=re.answers)!=null?le:[]).find(_e=>_e.nodeId===o&&_e.type==="openResponse");(Se=oe==null?void 0:oe.answer)!=null&&Se.files&&N(oe.answer.files)};return a.on("answers:prefill",V),()=>a.off("answers:prefill",V)},[o,a]);let j=t==null?void 0:t.showFeedback,H=ar(!j&&"player-or-field--pre",j&&T==="correct"&&"player-or-field--correct",j&&T==="partial"&&"player-or-field--partial",j&&T==="incorrect"&&"player-or-field--incorrect",j&&T==="awaiting_review"&&"player-or-field--review");return(0,qe.jsxs)("div",{className:"my-3 space-y-2",children:[!S&&w&&w.length>0&&(0,qe.jsx)("div",{className:"flex justify-end",children:(0,qe.jsx)(Qhe,{hint:w})}),l==="text"&&(0,qe.jsx)(fK,{nodeId:o,placeholder:u,allowFormatting:c,wordLimit:f,characterLimit:d,isDisabled:S,feedbackBorderClass:H,emitAnswer:V=>B({text:V}),answerBus:a}),l==="file"&&(0,qe.jsx)(HA,{allowedTypes:p!=null?p:["image"],allowMultiple:!!b,fileInstructions:v,isDisabled:S,feedbackBorderClass:H,files:O,setFiles:N,mediaHandler:n,t:i}),(l==="audio"||l==="video"||l==="screen")&&(0,qe.jsx)(o1e,{kind:l,maxDuration:k,isDisabled:S,feedbackBorderClass:H,mediaHandler:n,emitAnswer:V=>B({recording:V}),t:i}),l==="text+file"&&(0,qe.jsx)(i1e,{nodeId:o,placeholder:u,allowFormatting:c,wordLimit:f,characterLimit:d,allowedTypes:p!=null?p:["image"],allowMultiple:!!b,fileInstructions:v,isDisabled:S,feedbackBorderClass:H,files:O,setFiles:N,emitAnswer:B,answerBus:a,mediaHandler:n,t:i}),(t==null?void 0:t.showFeedback)&&T==="awaiting_review"&&(0,qe.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,qe.jsx)(cl,{size:15,style:ma(15),className:"animate-pulse"}),(0,qe.jsx)("span",{children:i.openResponseAwaitingReview})]}),(t==null?void 0:t.showFeedback)&&T!=="awaiting_review"&&t.teacherFeedback&&(0,qe.jsx)(s1e,{feedback:t.teacherFeedback,feedbackState:T,score:t.score,t:i})]})}function fK({nodeId:e,placeholder:t,allowFormatting:r,wordLimit:n,characterLimit:a,isDisabled:i,feedbackBorderClass:o,emitAnswer:s,answerBus:l}){let u=ga(),[c,f]=(0,rr.useState)(""),[d,p]=(0,rr.useState)(0),[b,v]=(0,rr.useState)(0),k=(0,rr.useRef)(null),w=(0,rr.useCallback)(()=>{let le=k.current;le&&(le.style.height="auto",le.style.height=`${le.scrollHeight}px`)},[]),S=eU({extensions:[qA.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1})],immediatelyRender:!1,editable:!i,content:"",onUpdate({editor:le}){var Ue;if(i)return;let _e=(Ue=le.getJSON().content)!=null?Ue:[],de=Yhe(_e),me=Jhe(_e);p(de),v(me),s({content:_e,wordCount:de})}});(0,rr.useEffect)(()=>{S&&S.setEditable(!i)},[i,S]);let T=(0,rr.useRef)(null);(0,rr.useEffect)(()=>{S&&T.current!==null&&(S.commands.setContent({type:"doc",content:T.current}),T.current=null)},[S]),(0,rr.useEffect)(()=>{let le=Se=>{var me,Ue,Le;let _e=((me=Se.answers)!=null?me:[]).find(Ie=>Ie.nodeId===e&&Ie.type==="openResponse");if(!((Ue=_e==null?void 0:_e.answer)!=null&&Ue.text))return;let de=(Le=_e.answer.text.content)!=null?Le:[];if(r)S?S.commands.setContent({type:"doc",content:de}):T.current=de;else{let Ie=de.flatMap(ye=>{var Me,He,st;return(st=(Me=ye.content)==null?void 0:Me.map(_t=>{var ct;return(ct=_t.text)!=null?ct:""}))!=null?st:[(He=ye.text)!=null?He:""]}).join(`
|
|
4050
4050
|
`);f(Ie),setTimeout(w,0)}};return l.on("answers:prefill",le),()=>l.off("answers:prefill",le)},[e,l,r,S]),(0,rr.useEffect)(()=>{let le=()=>{r&&S?S.commands.clearContent():(f(""),setTimeout(w,0)),p(0),v(0)};return l.on("answers:reset",le),()=>l.off("answers:reset",le)},[l,r,S,w]);let I=!!n,B=!!a&&!n,O=I?d:b,N=I?n==null?void 0:n.max:a==null?void 0:a.max,j=I?n==null?void 0:n.min:a==null?void 0:a.min,H=N!=null&&O>N,Y=N!=null&&O>=N*.8&&!H,V=j!=null&&O<j&&O>0,re="text-xs tabular-nums",xe=H?{color:"var(--pen, #d23b2b)",fontWeight:500}:Y||V?{color:"var(--almost, #c8810e)"}:{color:"var(--ink-faint, #8d93a0)"},oe=I?N?`${d} / ${N} ${u.openResponseWords}`:j?`${d} ${u.openResponseWords} (min. ${j})`:`${d} ${u.openResponseWords}`:B?N?`${b} / ${N} ${u.openResponseChars}`:`${b} ${u.openResponseChars}`:null;return r?(0,qe.jsxs)("div",{className:"relative",children:[(0,qe.jsxs)("div",{className:ar("rounded border transition-colors min-h-[120px]",o),children:[!i&&(0,qe.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:le,cmd:Se,style:_e})=>(0,qe.jsx)("button",{type:"button",onMouseDown:de=>{var me;de.preventDefault(),(me=S==null?void 0:S.chain().focus())==null||me[Se]().run()},className:`text-xs px-1.5 py-0.5 rounded hover:bg-gray-100 ${_e}`,children:le},le)),(0,qe.jsx)("button",{type:"button",onMouseDown:le=>{le.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,qe.jsx)(Q_,{editor:S,className:"prose prose-sm max-w-none p-3 outline-none [&_.ProseMirror]:min-h-[80px] [&_.ProseMirror]:outline-none"})]}),oe&&(0,qe.jsx)("div",{className:ar("absolute bottom-2 right-3",re),style:xe,children:oe})]}):(0,qe.jsxs)("div",{className:"relative",children:[(0,qe.jsx)("textarea",{ref:k,value:c,onChange:le=>{if(i)return;let Se=le.target.value;f(Se);let _e=cK(Se),de=dK(Se);p(_e),v(de),w(),s({content:[{type:"paragraph",content:[{type:"text",text:Se}]}],wordCount:_e})},onInput:w,disabled:i,placeholder:t||u.openResponseTextPlaceholder,rows:4,style:{resize:"none",overflow:"hidden"},className:ar("w-full px-3 py-2 text-base min-h-[100px] rounded border transition-colors outline-none",o,i&&"cursor-default")}),oe&&(0,qe.jsx)("div",{className:ar("absolute bottom-2 right-3",re),children:oe})]})}var r1e={image:"image/*",pdf:"application/pdf",audio:"audio/*",video:"video/*"},n1e={image:(0,qe.jsx)(c2,{size:12,style:ma(12)}),pdf:(0,qe.jsx)(B1,{size:12,style:ma(12)}),audio:(0,qe.jsx)(m2,{size:12,style:ma(12)}),video:(0,qe.jsx)(N1,{size:12,style:ma(12)}),videoLink:(0,qe.jsx)(d2,{size:12,style:ma(12)})};function HA({allowedTypes:e,allowMultiple:t,fileInstructions:r,isDisabled:n,files:a,setFiles:i,mediaHandler:o,t:s,compact:l=!1}){let u=(0,rr.useRef)(null),[c,f]=(0,rr.useState)(!1),[d,p]=(0,rr.useState)(!1),[b,v]=(0,rr.useState)(""),k=e.some(Y=>Y!=="videoLink"),w=e.includes("videoLink"),S=t||a.length===0,T=e.filter(Y=>Y!=="videoLink").map(Y=>r1e[Y]).filter(Boolean).join(","),I=(0,rr.useCallback)(Y=>{i(V=>t?[...V,Y]:[Y])},[t,i]),B=(0,rr.useCallback)(Y=>{i(V=>V.filter((re,xe)=>xe!==Y))},[i]),O=async Y=>{var V;if(!(!S||n)){f(!0);try{let re=Y.type.startsWith("image/")?"image":Y.type==="application/pdf"?"document":Y.type.startsWith("audio/")?"audio":Y.type.startsWith("video/")?"video":"file";if(o){let xe=await o.upload(Y,re);I({kind:"file",url:xe.url,mimeType:(V=xe.mimeType)!=null?V:Y.type,name:Y.name})}else{let xe=URL.createObjectURL(Y);I({kind:"file",url:xe,mimeType:Y.type,name:Y.name})}}finally{f(!1)}}},N=async Y=>{var re;if(Y.preventDefault(),p(!1),n||!S)return;let V=(re=Y.dataTransfer.files)==null?void 0:re[0];V&&await O(V)},j=()=>{let Y=b.trim();Y&&(I({kind:"videoLink",url:Y,platform:e1e(Y)}),v(""))},H={image:s.openResponseTypeImage,pdf:s.openResponseTypePdf,audio:s.openResponseTypeAudio,video:s.openResponseTypeVideo,videoLink:s.openResponseTypeVideoLink};return(0,qe.jsxs)("div",{className:"space-y-2",children:[r&&!l&&(0,qe.jsx)("p",{className:"text-sm text-gray-600 italic",children:r}),a.length>0&&(0,qe.jsx)("div",{className:l?"flex flex-wrap gap-1.5":"space-y-2",children:a.map((Y,V)=>(0,qe.jsx)(a1e,{file:Y,onRemove:n?void 0:()=>B(V),compact:l,t:s},V))}),!n&&S&&(0,qe.jsxs)("div",{className:"space-y-2",children:[k&&!l&&(0,qe.jsxs)("div",{onDragOver:Y=>{Y.preventDefault(),p(!0)},onDragLeave:()=>p(!1),onDrop:N,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 Y;return(Y=u.current)==null?void 0:Y.click()},children:[(0,qe.jsx)(u2,{size:26,className:"mx-auto mb-2",style:Xe(ie({},ma(26)),{color:"var(--ink-soft, #565b66)"})}),(0,qe.jsx)("p",{className:"text-sm font-medium",style:{color:"var(--ink-soft, #565b66)"},children:s.openResponseDropZoneLabel}),(0,qe.jsx)("p",{className:"text-xs hover:underline mt-0.5",style:{color:"var(--ink, #1d2025)"},children:s.openResponseDropZoneBrowse}),c&&(0,qe.jsx)("p",{className:"text-xs mt-1 animate-pulse",style:{color:"var(--ink-faint, #8d93a0)"},children:s.openResponseUploading}),(0,qe.jsx)("div",{className:"flex flex-wrap justify-center gap-1.5 mt-3",children:e.filter(Y=>Y!=="videoLink").map(Y=>(0,qe.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:[n1e[Y]," ",H[Y]]},Y))})]}),k&&l&&(0,qe.jsx)("button",{type:"button",onClick:()=>{var Y;return(Y=u.current)==null?void 0:Y.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,qe.jsx)("input",{ref:u,type:"file",accept:T,onChange:async Y=>{var re;let V=(re=Y.target.files)==null?void 0:re[0];V&&(await O(V),Y.target.value="")},className:"hidden"}),w&&(0,qe.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,qe.jsx)("input",{type:"url",value:b,onChange:Y=>v(Y.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:Y=>{Y.key==="Enter"&&(Y.preventDefault(),j())}}),(0,qe.jsx)("button",{type:"button",onClick:j,disabled:!b.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,qe.jsx)("p",{className:"text-sm text-gray-400 text-center py-3",children:s.openResponseNoSubmission})]})}function a1e({file:e,onRemove:t,compact:r,t:n}){var a,i,o,s,l,u;if(e.kind==="videoLink"){let c=e.platform==="youtube"?t1e(e.url):null;return(0,qe.jsxs)("div",{className:ar("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,qe.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,qe.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,qe.jsx)("button",{type:"button",onClick:t,className:"ml-auto text-gray-400 hover:text-rose-500 text-xs",children:"\u2715"})]})}return(0,qe.jsxs)("div",{className:ar("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,qe.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/")?(0,qe.jsx)("audio",{src:e.url,controls:!0,className:r?"hidden":"h-8 max-w-[240px]"}):(s=e.mimeType)!=null&&s.startsWith("video/")?(0,qe.jsx)("video",{src:e.url,controls:!0,className:r?"hidden":"h-16 max-w-[240px] rounded"}):(0,qe.jsx)(B1,{size:20,style:Xe(ie({},ma(20)),{color:"var(--ink-soft, #565b66)"})}),(0,qe.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qe.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,qe.jsx)("audio",{src:e.url,controls:!0,className:"h-6 max-w-[160px] mt-0.5"})]}),t&&(0,qe.jsx)("button",{type:"button",onClick:t,className:"ml-auto text-gray-400 hover:text-rose-500 text-xs shrink-0",children:"\u2715"})]})}function i1e({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:b,t:v}){let[k,w]=(0,rr.useState)(null),[S,T]=(0,rr.useState)(!1);return(0,rr.useEffect)(()=>{d(Xe(ie({},k&&{text:k}),{files:c.length>0?c:void 0}))},[k,c]),(0,qe.jsxs)("div",{className:"space-y-2",children:[(0,qe.jsx)(fK,{nodeId:e,placeholder:t,allowFormatting:r,wordLimit:n,characterLimit:a,isDisabled:l,feedbackBorderClass:u,emitAnswer:I=>w(I),answerBus:p}),!l&&(0,qe.jsxs)("div",{children:[(0,qe.jsxs)("button",{type:"button",onClick:()=>T(!S),className:"flex items-center gap-1.5 text-xs",style:{color:"var(--ink-soft, #565b66)"},children:[(0,qe.jsx)("span",{children:S?"\u25BE":"\u25B8"}),(0,qe.jsxs)("span",{children:[v.openResponseAttachFiles,c.length>0&&(0,qe.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,qe.jsx)("div",{className:"mt-1.5",children:(0,qe.jsx)(HA,{allowedTypes:i,allowMultiple:o,fileInstructions:s,isDisabled:l,feedbackBorderClass:u,files:c,setFiles:f,mediaHandler:b,t:v,compact:!0})})]}),l&&c.length>0&&(0,qe.jsxs)("div",{className:"space-y-1",children:[(0,qe.jsx)("p",{className:"text-xs text-gray-500 font-medium",children:v.openResponseAttachedFiles}),(0,qe.jsx)(HA,{allowedTypes:i,allowMultiple:o,isDisabled:!0,feedbackBorderClass:u,files:c,setFiles:f,t:v,compact:!0})]})]})}function o1e({kind:e,maxDuration:t,isDisabled:r,feedbackBorderClass:n,mediaHandler:a,emitAnswer:i,t:o}){let[s,l]=(0,rr.useState)("idle"),[u,c]=(0,rr.useState)(0),[f,d]=(0,rr.useState)(null),[p,b]=(0,rr.useState)("audio/webm"),[v,k]=(0,rr.useState)(null),w=(0,rr.useRef)(null),S=(0,rr.useRef)(null),T=(0,rr.useRef)([]),I=(0,rr.useRef)(null),B=(0,rr.useRef)(null),O=(0,rr.useRef)(null),N=(0,rr.useRef)(0);(0,rr.useEffect)(()=>()=>{j(),I.current&&clearInterval(I.current),cancelAnimationFrame(N.current)},[]),(0,rr.useEffect)(()=>{s==="recording"&&e==="audio"&&S.current&&xe(S.current)},[s]);let j=()=>{var oe;(oe=S.current)==null||oe.getTracks().forEach(le=>le.stop()),S.current=null},H=async()=>{var oe;if(!a){k(o.openResponseMediaHandlerRequired);return}k(null),l("requesting");try{let le;if(e==="screen"){let de=await navigator.mediaDevices.getDisplayMedia({video:{cursor:"always"},audio:!1});try{let Ue=(await navigator.mediaDevices.getUserMedia({audio:!0})).getAudioTracks()[0];Ue&&de.addTrack(Ue)}catch(me){}(oe=de.getVideoTracks()[0])==null||oe.addEventListener("ended",()=>{var me;((me=w.current)==null?void 0:me.state)==="recording"&&Y()}),le=de,B.current&&(B.current.srcObject=le,B.current.play())}else e==="video"?(le=await navigator.mediaDevices.getUserMedia({audio:!0,video:{facingMode:"environment"}}),B.current&&(B.current.srcObject=le,B.current.play())):le=await navigator.mediaDevices.getUserMedia({audio:!0});S.current=le;let Se=e==="audio"?"audio/webm":"video/webm";b(Se);let _e=new MediaRecorder(le,{mimeType:Se});w.current=_e,T.current=[],_e.ondataavailable=de=>{de.data.size>0&&T.current.push(de.data)},_e.onstop=()=>{let de=new Blob(T.current,{type:Se}),me=URL.createObjectURL(de);d(me),l("reviewing"),j(),cancelAnimationFrame(N.current)},_e.start(200),l("recording"),c(0),I.current=setInterval(()=>{c(de=>{let me=de+1;return t&&me>=t&&Y(),me})},1e3)}catch(le){l("idle"),k(o.openResponsePermissionDenied)}},Y=()=>{var oe;I.current&&(clearInterval(I.current),I.current=null),(oe=w.current)==null||oe.stop()},V=async()=>{var me;if(!f||!a)return;l("submitted");let le=await(await fetch(f)).blob(),Se=e==="screen"?"video":e,_e=new File([le],"recording.webm",{type:p}),de=await a.upload(_e,Se);URL.revokeObjectURL(f),i({url:de.url,mimeType:(me=de.mimeType)!=null?me:p,duration:u,kind:Se})},re=()=>{f&&URL.revokeObjectURL(f),d(null),c(0),l("idle")},xe=oe=>{let le=new AudioContext,Se=le.createMediaStreamSource(oe),_e=le.createAnalyser();_e.fftSize=64,Se.connect(_e);let de=new Uint8Array(_e.frequencyBinCount),me=O.current;if(!me)return;let Ue=()=>{_e.getByteFrequencyData(de);let Le=me.getContext("2d");if(!Le)return;Le.clearRect(0,0,me.width,me.height);let Ie=me.width/de.length*2.5,ye=0;for(let Me=0;Me<de.length;Me++){let He=de[Me]/255*me.height;Le.fillStyle="#1d2025",Le.fillRect(ye,me.height-He,Ie,He),ye+=Ie+1}N.current=requestAnimationFrame(Ue)};Ue()};return r?(0,qe.jsx)("div",{className:ar("rounded border p-4 text-center text-sm text-gray-400",n),children:o.openResponseRecordingSubmitted}):(0,qe.jsxs)("div",{className:ar("rounded border p-4 space-y-3",n),children:[v&&(0,qe.jsx)("p",{className:"text-sm",style:{color:"var(--pen, #d23b2b)"},children:v}),(e==="video"||e==="screen")&&s==="recording"&&(0,qe.jsx)("video",{ref:B,muted:!0,className:"w-full rounded max-h-48 bg-black",playsInline:!0}),e==="audio"&&s==="recording"&&(0,qe.jsx)("canvas",{ref:O,width:300,height:48,className:"w-full rounded bg-gray-900"}),s==="reviewing"&&f&&(e==="audio"?(0,qe.jsx)("audio",{src:f,controls:!0,className:"w-full",onLoadedMetadata:oe=>lK(oe.currentTarget)}):(0,qe.jsx)("video",{src:f,controls:!0,className:"w-full rounded max-h-48",onLoadedMetadata:oe=>lK(oe.currentTarget)})),(0,qe.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[s==="idle"&&(0,qe.jsxs)("button",{type:"button",onClick:H,className:"flex flex-col items-center gap-1 px-6 py-3 rounded-full font-medium text-white transition-colors",style:{background:"var(--ink, #1d2025)"},children:[e==="audio"?(0,qe.jsx)(p2,{size:22,style:ma(22)}):e==="screen"?(0,qe.jsx)(h2,{size:22,style:ma(22)}):(0,qe.jsx)(N1,{size:22,style:ma(22)}),(0,qe.jsx)("span",{className:"text-sm",children:e==="screen"?o.openResponseTapToRecordScreen:o.openResponseTapToRecord})]}),s==="requesting"&&(0,qe.jsx)("p",{className:"text-sm text-gray-500 animate-pulse",children:o.openResponseRequestingPermission}),s==="recording"&&(0,qe.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,qe.jsxs)("div",{className:"flex items-center gap-2 font-mono text-lg",style:{color:"var(--pen, #d23b2b)"},children:[(0,qe.jsx)("span",{className:"animate-pulse",children:"\u25CF"}),(0,qe.jsx)("span",{children:uK(u)}),t&&(0,qe.jsxs)("span",{className:"text-sm",style:{color:"var(--ink-faint, #8d93a0)"},children:["/ ",uK(t)]})]}),(0,qe.jsx)("button",{type:"button",onClick:Y,className:"px-5 py-2 rounded-full text-white text-sm font-medium",style:{background:"var(--pen, #d23b2b)"},children:o.openResponseStopRecording})]}),s==="reviewing"&&(0,qe.jsxs)("div",{className:"flex gap-2",children:[(0,qe.jsx)("button",{type:"button",onClick:re,className:"px-4 py-1.5 rounded border text-sm",style:{borderColor:"var(--line-strong, #d6d3cc)",color:"var(--ink, #1d2025)"},children:o.openResponseReRecord}),(0,qe.jsx)("button",{type:"button",onClick:V,className:"px-4 py-1.5 rounded text-white text-sm",style:{background:"var(--ink, #1d2025)"},children:o.openResponseConfirmRecording})]}),s==="submitted"&&(0,qe.jsxs)("p",{className:"text-sm",style:{color:"var(--ok, #1f8a4c)"},children:["\u2713 ",o.openResponseRecordingSubmitted]})]})]})}function s1e({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,qe.jsxs)("div",{className:"rounded p-3 text-sm border",style:{background:a.bg,borderColor:a.border,color:"var(--ink, #1d2025)"},children:[(0,qe.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,qe.jsxs)("div",{className:"mt-1 text-right",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',fontSize:ht("1.4rem"),lineHeight:1,color:a.ink},children:[r," pts"]})]})}var ci=Pe($t(),1),b0=Pe(kt(),1);function C3e(e){return e!=null&&e.showFeedback?e.state==="validating"?"validating":e.state==="correct"?"correct":e.state==="incorrect"?"incorrect":"idle":"idle"}function z6({nodeId:e,placeholder:t,hint:r,validationFeedback:n,readOnly:a=!1}){let i=bi(),o=(0,b0.useRef)(null),[s,l]=(0,b0.useState)(""),[u,c]=(0,b0.useState)(!1),f=C3e(n),d=n==null?void 0:n.score,p=n==null?void 0:n.maxScore,b=w=>Number.isInteger(w)?String(w):w.toFixed(2);(0,b0.useEffect)(()=>{Promise.resolve().then(()=>(bJ(),yJ)).then(()=>{c(!0)}).catch(()=>{})},[]),(0,b0.useEffect)(()=>{let w=S=>{var I,B;let T=(I=S.answers)==null?void 0:I.find(O=>O.nodeId===e&&O.type==="mathResponse");((B=T==null?void 0:T.answer)==null?void 0:B.latex)!==void 0&&(l(T.answer.latex),o.current&&(o.current.value=T.answer.latex))};return i.on("answers:prefill",w),()=>i.off("answers:prefill",w)},[i,e]),(0,b0.useEffect)(()=>{i.emit({type:"answer:changed",answer:{nodeId:e,type:"mathResponse",timestamp:Date.now(),answer:{latex:s}}})},[s,e,i]);let v=w=>{var T,I;let S=(I=(T=w.target)==null?void 0:T.value)!=null?I:"";l(S)},k=f==="correct"?"player-math-field--correct":f==="incorrect"?"player-math-field--incorrect":f==="validating"?"player-math-field--validating":"";return(0,ci.jsxs)("div",{dir:"ltr",className:"math-response-player",children:[(0,ci.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:ht("0.4rem")},children:[(0,ci.jsx)("div",{className:"player-math-field"+(k?" "+k:"")+(a?" player-math-field--readonly":""),children:u?(0,ci.jsx)("math-field",{ref:o,value:s,onInput:v,"virtual-keyboard-mode":"onfocus","smart-fence":"true",className:"player-math-field__input",style:{opacity:a?.7:1,pointerEvents:a?"none":"auto"}}):(0,ci.jsx)("input",{type:"text",value:s,onChange:w=>l(w.target.value),placeholder:t||"Enter LaTeX (e.g. \\frac{x^2}{2})",readOnly:a,className:"player-math-field__fallback"})}),(0,ci.jsx)(Au,{hint:r})]}),(n==null?void 0:n.showFeedback)&&(0,ci.jsxs)("div",{className:"player-math-feedback player-math-feedback--"+f,children:[f==="validating"&&(0,ci.jsxs)(ci.Fragment,{children:[(0,ci.jsx)("span",{className:"player-math-spinner"}),(0,ci.jsx)("span",{children:"Checking your answer\u2026"})]}),f==="correct"&&(0,ci.jsxs)(ci.Fragment,{children:[(0,ci.jsx)("span",{children:"\u2713 Correct"}),d!=null&&(0,ci.jsxs)("span",{className:"player-math-score",children:[b(d),p!=null?` / ${b(p)}`:""]})]}),f==="incorrect"&&(0,ci.jsx)("span",{children:"\u2717 Incorrect"})]})]})}var Ft=Pe($t(),1),Il=Pe(kt(),1);function S9(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)=>S9(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=>S9(a[l],i[l]))}var w6e=`
|
|
4051
4051
|
"use strict";
|
|
4052
4052
|
|
|
@@ -4092,7 +4092,7 @@ sys.stdout = _stdout_capture
|
|
|
4092
4092
|
import io
|
|
4093
4093
|
sys.stdin = io.StringIO(${JSON.stringify(o)})
|
|
4094
4094
|
`),c.runPython(e);let f=c.runPython("_stdout_capture.getvalue()");c.runPython("sys.stdout = sys.__stdout__");let d=f.trim()===(s||"").trim();return{testId:n,passed:d,actualStdout:f,durationMs:Date.now()-u}}else{c.runPython(e);let f=(a||[]).map(b=>JSON.stringify(b)).join(", "),d=c.runPython(`${r}(${f})`),p=S9(d,i);return{testId:n,passed:p,actual:d,durationMs:Date.now()-u}}}catch(c){return{testId:n,passed:!1,stderr:String(c),errored:!0,durationMs:Date.now()-u}}}var k9=null;async function L6e(){var r;if(k9)return k9;let e=await Promise.resolve().then(()=>Pe(xJ(),1));return k9=await((r=e.default)!=null?r:e)(),k9}async function T6e(e,t,r,n){let a=Date.now();try{let i=await L6e(),o=new i.Database;r&&o.run(r);let l=o.exec(e).flatMap(c=>c.values.map(f=>f.map(String).join("|"))).join(`
|
|
4095
|
-
`),u=l.trim()===(n||"").trim();return o.close(),{testId:t,passed:u,actualStdout:l,durationMs:Date.now()-a}}catch(i){return{testId:t,passed:!1,stderr:String(i),errored:!0,durationMs:Date.now()-a}}}async function E6e(e){let{transform:t}=await Promise.resolve().then(()=>(_ee(),Mee));return t(e,{transforms:["typescript"]}).code}var tg=class{supports(t){return["javascript","typescript","python","sql"].includes(t)}async run(t){let{language:r,source:n,mode:a,entryFunction:i,tests:o,timeoutMs:s=5e3}=t;if(!this.supports(r))return o.map(c=>({testId:c.id,passed:!1,stderr:`Language "${r}" cannot run in-browser. Configure a RemoteExecutor for compiled languages.`,errored:!0}));let l=n;if(r==="typescript")try{l=await E6e(n)}catch(c){return o.map(f=>({testId:f.id,passed:!1,stderr:`TypeScript compile error: ${c.message}`,errored:!0}))}let u=[];for(let c of o){let f;r==="python"?f=await A6e(l,a,i,c.id,c.args,c.expectedReturn,c.stdin,c.expectedStdout,s):r==="sql"?f=await T6e(l,c.id,c.stdin,c.expectedStdout):f=await k6e(l,a,i,c.id,c.args,c.expectedReturn,c.stdin,c.expectedStdout,s),u.push(f)}return u}};var ID=Pe($t(),1),rc=Pe(kt(),1);function Rxe(e){var r;return(r={javascript:"javascript",typescript:"typescript",python:"python",sql:"sql",java:"java",cpp:"cpp",go:"go"}[e])!=null?r:"plaintext"}var zD=(0,rc.forwardRef)(function({value:t,onChange:r,language:n="javascript",readOnly:a=!1,readOnlyRanges:i,placeholder:o,height:s=300,className:l,autoFocus:u},c){let[f,d]=(0,rc.useState)(null),{scale:p}=Ul(),b=(0,rc.useRef)(null);(0,rc.useEffect)(()=>{Promise.resolve().then(()=>(lte(),ste)).then(S=>{d(()=>S.default)}).catch(()=>{})},[]),(0,rc.useImperativeHandle)(c,()=>({getValue(){var S,T,I;return(I=(T=(S=b.current)==null?void 0:S.getValue)==null?void 0:T.call(S))!=null?I:t},focus(){var S,T;(T=(S=b.current)==null?void 0:S.focus)==null||T.call(S)},insert(S){let T=b.current;if(!T)return;let I=T.getSelection();T.executeEdits("insert",[{range:I,text:S,forceMoveMarkers:!0}])}}));function v(S){b.current=S,u&&S.focus(),i!=null&&i.length&&S.onDidAttemptReadOnlyEdit(()=>{})}function k(S){r(S!=null?S:"")}let w=typeof s=="number"?s*p:s;return f?(0,ID.jsx)(f,{className:l,height:w,language:Rxe(n),value:t,onChange:k,onMount:v,options:{readOnly:a,minimap:{enabled:!1},fontSize:14*p,lineNumbers:"on",scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,wordWrap:"on"}}):(0,ID.jsx)("textarea",{className:l,value:t,onChange:S=>r(S.target.value),readOnly:a,placeholder:o,style:{width:"100%",height:typeof s=="number"?ht(s):s,fontFamily:"monospace",fontSize:ht(14),padding:ht("0.5rem"),border:"1px solid #e2e8f0",borderRadius:ht("0.375rem"),resize:"vertical",background:a?"#f8fafc":"white",boxSizing:"border-box"},autoFocus:u})});var Nxe=new tg;function Oxe(e){var t;return e!=null&&e.showFeedback&&(t=e.state)!=null?t:"idle"}function ute(e){var r;let t={};for(let n of(r=e.attrs.starters)!=null?r:[])t[n.language]=n.code;return t}function Pxe({sample:e,result:t,mode:r}){var l;let n=t==null?void 0:t.passed,a=t==null?void 0:t.errored,i=t!==void 0,o=i?a?"var(--almost, #c8810e)":n?"var(--ok, #1f8a4c)":"var(--pen, #d23b2b)":"var(--ink-faint, #8d93a0)",s=i?a?"\u26A0":null:"\u25CB";return(0,Ft.jsxs)("div",{style:{padding:`${ht("0.5rem")} ${ht("0.75rem")}`,borderBottom:"1px solid var(--line, #e7e5e0)",fontSize:ht("0.8125rem"),fontFamily:"var(--font-mono, ui-monospace, monospace)"},children:[(0,Ft.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:ht("0.5rem")},children:[(0,Ft.jsx)("span",{style:{color:o,fontWeight:700,fontSize:ht("0.875rem"),display:"inline-flex"},children:s!=null?s:n?(0,Ft.jsx)(Vl,{size:15,style:ma(15)}):(0,Ft.jsx)(Wi,{size:15})}),(0,Ft.jsx)("span",{style:{fontWeight:600,color:"var(--ink, #1d2025)"},children:(l=e.name)!=null?l:`Test ${e.id}`})]}),i&&!n&&(0,Ft.jsxs)("div",{style:{marginTop:ht("0.25rem"),paddingLeft:ht("1.5rem")},children:[r==="function"?(0,Ft.jsx)(Ft.Fragment,{children:(t==null?void 0:t.actual)!==void 0&&(0,Ft.jsxs)("div",{style:{color:"var(--ink-soft, #565b66)"},children:[(0,Ft.jsx)("span",{style:{color:"var(--ink-faint, #8d93a0)"},children:"got: "}),(0,Ft.jsx)("span",{style:{color:"var(--pen, #d23b2b)"},children:JSON.stringify(t.actual)}),(0,Ft.jsx)("span",{style:{color:"var(--ink-faint, #8d93a0)"},children:" expected: "}),(0,Ft.jsx)("span",{style:{color:"var(--ok, #1f8a4c)"},children:JSON.stringify(e.expectedReturn)})]})}):(0,Ft.jsx)(Ft.Fragment,{children:(t==null?void 0:t.actualStdout)!==void 0&&(0,Ft.jsxs)("div",{style:{color:"var(--ink-soft, #565b66)"},children:[(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)("span",{style:{color:"var(--ink-faint, #8d93a0)"},children:"got: "}),(0,Ft.jsx)("span",{style:{color:"var(--pen, #d23b2b)",whiteSpace:"pre-wrap"},children:t.actualStdout||"(empty)"})]}),(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)("span",{style:{color:"var(--ink-faint, #8d93a0)"},children:"expected: "}),(0,Ft.jsx)("span",{style:{color:"var(--ok, #1f8a4c)",whiteSpace:"pre-wrap"},children:e.expectedStdout||"(empty)"})]})]})}),(t==null?void 0:t.stderr)&&(0,Ft.jsx)("div",{style:{color:"var(--almost-ink, #8a5a08)",marginTop:ht("0.125rem"),whiteSpace:"pre-wrap"},children:t.stderr})]})]})}function B6({node:e,validationFeedback:t,readOnly:r=!1,executor:n=Nxe,gradingTests:a}){var oe,le,Se,_e;let i=bi(),o=(0,Il.useRef)(null),{attrs:s}=e,l=e.id,[u,c]=(0,Il.useState)(s.defaultLanguage),[f,d]=(0,Il.useState)(()=>ute(e)),[p,b]=(0,Il.useState)([]),[v,k]=(0,Il.useState)(!1),[w,S]=(0,Il.useState)(!1),T=(oe=f[u])!=null?oe:"",I=Oxe(t);(0,Il.useEffect)(()=>{let de=Ue=>{var Ie;let Le=(Ie=Ue.answers)==null?void 0:Ie.find(ye=>ye.nodeId===l&&ye.type==="codingResponse");Le!=null&&Le.answer&&(Le.answer.language&&c(Le.answer.language),Le.answer.sourceByLanguage&&d(Le.answer.sourceByLanguage),Le.answer.testResults&&b(Le.answer.testResults))},me=()=>{d(ute(e)),b([]),S(!1)};return i.on("answers:prefill",de),i.on("answers:reset",me),()=>{i.off("answers:prefill",de),i.off("answers:reset",me)}},[i,l,e]);let B=(0,Il.useCallback)((de,me,Ue)=>{var Le;i.emit({type:"answer:changed",answer:{nodeId:l,type:"codingResponse",timestamp:Date.now(),answer:{language:de,sourceByLanguage:me,source:(Le=me[de])!=null?Le:"",testResults:Ue}}})},[i,l]),O=de=>{let me=Xe(ie({},f),{[u]:de});d(me),B(u,me,p)},N=de=>{c(de),b([]),B(de,f,[])},j=async()=>{var me;if(v)return;k(!0),b([]);let de=a!=null?a:(me=s.visibleSamples)!=null?me:[];if(de.length===0){k(!1);return}try{let Ue=await n.run({language:u,source:T,mode:s.testMode,entryFunction:s.entryFunction,tests:de,timeoutMs:5e3});b(Ue),B(u,f,Ue)}catch(Ue){let Le=de.map(Ie=>({testId:Ie.id,passed:!1,stderr:String(Ue),errored:!0}));b(Le),B(u,f,Le)}finally{k(!1)}},H=()=>{w||(S(!0),B(u,f,p))},Y=(a!=null?a:[]).filter(de=>de.hidden).length,V=Y>0?p.filter(de=>{let me=(a!=null?a:[]).find(Ue=>Ue.id===de.testId);return(me==null?void 0:me.hidden)&&de.passed}).length:0,re=a?a.filter(de=>!de.hidden):(le=s.visibleSamples)!=null?le:[],xe=I==="correct"?"var(--ok, #1f8a4c)":I==="partial"?"var(--almost, #c8810e)":I==="incorrect"?"var(--pen, #d23b2b)":"var(--line-strong, #d6d3cc)";return(0,Ft.jsxs)("div",{style:{margin:`${ht("0.75rem")} 0`,border:`1px solid ${xe}`,borderRadius:ht("0.875rem"),overflow:"hidden",transition:"border-color 0.2s"},children:[(0,Ft.jsxs)("div",{style:{background:"var(--ui-muted, #f5f4f1)",borderBottom:"1px solid var(--line, #e7e5e0)",padding:`${ht("0.5rem")} ${ht("0.75rem")}`,display:"flex",alignItems:"center",gap:ht("0.5rem"),flexWrap:"wrap"},children:[(0,Ft.jsx)("div",{style:{display:"flex",gap:ht("0.25rem")},children:s.languages.map(de=>(0,Ft.jsx)("button",{onClick:()=>!r&&N(de),disabled:r,style:{padding:`${ht("0.2rem")} ${ht("0.6rem")}`,borderRadius:ht("0.375rem"),border:"1px solid",borderColor:u===de?"var(--ink, #1d2025)":"var(--line, #e7e5e0)",background:u===de?"var(--ink, #1d2025)":"var(--card, #fff)",color:u===de?"#fff":"var(--ink-soft, #565b66)",fontSize:ht("0.75rem"),fontWeight:600,cursor:r?"default":"pointer",fontFamily:"var(--font-mono, ui-monospace, monospace)"},children:de},de))}),(0,Ft.jsx)("div",{style:{flex:1}}),(0,Ft.jsx)(Au,{hint:s.hint}),!r&&(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsxs)("button",{onClick:j,disabled:v,style:{padding:`${ht("0.25rem")} ${ht("0.75rem")}`,borderRadius:ht("0.5rem"),border:"1px solid var(--line-strong, #d6d3cc)",background:v?"var(--ui-muted, #f5f4f1)":"var(--card, #fff)",color:"var(--ink, #1d2025)",fontSize:ht("0.8125rem"),fontWeight:600,cursor:v?"not-allowed":"pointer",display:"inline-flex",alignItems:"center",gap:ht("0.35rem")},children:[(0,Ft.jsx)(g2,{size:13,style:ma(13)})," ",v?"Running\u2026":"Run"]}),(0,Ft.jsxs)("button",{onClick:H,disabled:w,style:{padding:`${ht("0.3rem")} ${ht("0.85rem")}`,borderRadius:ht("0.5rem"),border:"none",background:w?"var(--ok-soft, #ecf8f0)":"var(--ink, #1d2025)",color:w?"var(--ok, #1f8a4c)":"#fff",fontSize:ht("0.8125rem"),fontWeight:600,cursor:w?"default":"pointer",display:"inline-flex",alignItems:"center",gap:ht("0.35rem")},children:[w&&(0,Ft.jsx)(Vl,{size:13,style:ma(13)})," ",w?"Submitted":"Submit"]})]})]}),(0,Ft.jsx)(zD,{ref:o,value:T,onChange:O,language:u,readOnly:r,readOnlyRanges:(Se=s.starters.find(de=>de.language===u))==null?void 0:Se.readOnlyRanges,height:320}),(p.length>0||re.length>0)&&(0,Ft.jsxs)("div",{style:{borderTop:"1px solid var(--line, #e7e5e0)",background:"var(--paper, #fbfaf7)"},children:[(0,Ft.jsx)("div",{style:{padding:`${ht("0.5rem")} ${ht("0.75rem")}`,fontSize:ht("0.7rem"),fontWeight:700,color:"var(--ink-faint, #8d93a0)",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Test Results"}),re.map(de=>(0,Ft.jsx)(Pxe,{sample:de,result:p.find(me=>me.testId===de.id),mode:s.testMode},de.id)),Y>0&&(0,Ft.jsxs)("div",{style:{padding:`${ht("0.5rem")} ${ht("0.75rem")}`,fontSize:ht("0.8125rem"),color:"var(--ink-soft, #565b66)",borderTop:"1px solid var(--line, #e7e5e0)",fontStyle:"italic",display:"flex",alignItems:"center",gap:ht("0.4rem")},children:[(0,Ft.jsx)(f2,{size:13,style:ma(13)})," Hidden tests: ",V,"/",Y," passed"]})]}),(t==null?void 0:t.showFeedback)&&(0,Ft.jsxs)("div",{style:{padding:`${ht("0.55rem")} ${ht("0.75rem")}`,fontSize:ht("0.85rem"),fontWeight:600,borderTop:"1px solid var(--line, #e7e5e0)",display:"flex",alignItems:"center",gap:ht("0.45rem"),background:I==="correct"?"var(--ok-soft, #ecf8f0)":I==="partial"?"var(--almost-soft, #fbf1dc)":I==="incorrect"?"var(--pen-soft, #fdeeec)":"transparent",color:I==="correct"?"var(--ok, #1f8a4c)":I==="partial"?"var(--almost-ink, #8a5a08)":I==="incorrect"?"var(--pen, #d23b2b)":"var(--ink-soft, #565b66)"},children:[I==="correct"&&(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsx)(Vl,{size:15,style:ma(15)})," All tests passed"]}),I==="partial"&&"Partial credit",I==="incorrect"&&(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsx)(Wi,{size:15,style:ma(15)})," Tests failed"]}),I==="validating"&&"Evaluating\u2026",I==="awaiting_review"&&"Awaiting teacher review",t.score!==void 0&&(0,Ft.jsxs)("span",{style:{marginLeft:"auto",fontFamily:'var(--font-hand, "Caveat", cursive)',fontSize:ht("1.5rem"),lineHeight:1},children:[t.score," / ",(_e=t.maxScore)!=null?_e:s.maxScore]})]})]})}var gf=Pe($t(),1),z9=Pe(kt(),1);var I9=Pe($t(),1);function BD(){var r,n;let{active:e}=a2();if(!e)return null;let t=(n=(r=e.data.current)==null?void 0:r.html)!=null?n:"";return(0,I9.jsx)(yq,{dropAnimation:null,children:(0,I9.jsx)("div",{style:{display:"inline-block",padding:"0.375rem 0.75rem",borderRadius:"9999px",backgroundColor:"white",border:"1px solid #e5e7eb",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",cursor:"grabbing",maxWidth:"20rem"},children:(0,I9.jsx)("span",{dangerouslySetInnerHTML:{__html:t},style:{pointerEvents:"none",whiteSpace:"nowrap",lineHeight:"1.25"}})})})}var cte=(0,z9.createContext)(!1);function B9({children:e}){let t=(0,z9.useContext)(cte),r=U6(Q4,{activationConstraint:{distance:8}}),n=U6(e2,{activationConstraint:{delay:120,tolerance:8}}),a=U6(E1),i=ZF(r,n,a);return t?(0,gf.jsx)(gf.Fragment,{children:e}):(0,gf.jsx)(cte.Provider,{value:!0,children:(0,gf.jsxs)(hq,{sensors:i,children:[e,(0,gf.jsx)(BD,{})]})})}function ng({content:e,onAnswersChange:t,onSubmit:r,answerBus:n,namespace:a,initialAnswers:i,validationFeedback:o,className:s="",locale:l,readOnly:u=!1,mediaHandler:c,codeExecutor:f,display:d}){let p=Ms(d),b=(0,A0.useMemo)(()=>il(p),[p]),v=(0,A0.useRef)(null);v.current||(v.current=new Ec);let k=n!=null?n:v.current;(0,A0.useEffect)(()=>{i&&i.length>0&&k.prefillAnswers(i)},[i,k]),(0,A0.useEffect)(()=>{if(!t)return;let S=()=>{let T=k.getAllAnswers();t(T)};return k.on("answer:changed",S),()=>k.off("answer:changed",S)},[k,t]),(0,A0.useEffect)(()=>{if(!r)return;let S=T=>{r(T.answers)};return k.on("answer:submitted",S),()=>k.off("answer:submitted",S)},[k,r]),(0,A0.useEffect)(()=>{document.querySelectorAll("[data-audio]").forEach(T=>{let I=T.querySelector("audio"),B=T.querySelector("svg");!I||!B||(T.onclick=()=>{I.paused?(I.play(),B.innerHTML='<path d="M6 4h4v16H6zm8 0h4v16h-4z"/>',B.dataset.icon="pause"):(I.pause(),B.innerHTML='<path d="M6 4v16l12-8z"/>',B.dataset.icon="play")},I.onended=()=>{B.innerHTML='<path d="M6 4v16l12-8z"/>',B.dataset.icon="play"})})},[e]);let w=al(e,o,{readOnly:u,mediaHandler:c,codeExecutor:f});return(0,hh.jsx)($4,{locale:l,children:(0,hh.jsx)(_s,{display:p,children:(0,hh.jsx)(X5,{bus:k,children:(0,hh.jsx)(B9,{children:(0,hh.jsx)(G6,{initialAnswers:i,children:(0,hh.jsx)("div",{className:`question-runtime ${s}${b.sizeSet?" edp-scaled":""}`,"data-namespace":a,style:ie({fontSize:ht("1.125rem"),lineHeight:"1.75"},ol(b)),children:w})})})})})})}var zl=Pe($t(),1),nc=Pe(kt(),1);var dte={words:80,media:1,tableRows:6},Fxe=new Set(["resizableImage","resizableVideo","youtubeEmbed"]);function fte(e){let t={words:0,media:0,tableRows:0},r=n=>{var a,i;if(typeof n.text=="string"&&(t.words+=n.text.split(/\s+/).filter(o=>/[\p{L}\p{N}]/u.test(o)).length),n.type&&Fxe.has(n.type)&&t.media++,n.type==="table"){let o=((a=n.content)!=null?a:[]).filter(s=>s.type==="tableRow").length;t.tableRows=Math.max(t.tableRows,o)}for(let o of(i=n.content)!=null?i:[])r(o)};return e&&r(e),t}function Jy(e,t=dte){let r=fte(e);return r.words>t.words||r.media>t.media||r.tableRows>t.tableRows}var R9=Pe(kt(),1),pte=(0,R9.createContext)(null),N9=pte.Provider;function O9(){return(0,R9.useContext)(pte)}function P9({exercise:e,onAnswersChange:t,validationFeedback:r,renderSharedContext:n,renderQuestion:a,renderSeparator:i,className:o="",locale:s,display:l}){let u=Ms(l),c=(0,nc.useMemo)(()=>il(u),[u]),f=(0,nc.useRef)(new Map),d=(0,nc.useRef)({exercise:e,onAnswersChange:t});d.current={exercise:e,onAnswersChange:t};let p=(0,nc.useCallback)((S,T)=>{f.current.set(S,T);let{exercise:I,onAnswersChange:B}=d.current;if(B){let O={exerciseId:I.id,questionAnswers:I.questions.map(N=>{var j;return{questionId:N.id,answers:(j=f.current.get(N.id))!=null?j:[]}})};B(O)}},[]),b=O9(),v=q4(s),k=!!(b&&e.sharedContext&&Jy(e.sharedContext)),w=e.sharedContext?k?(0,zl.jsxs)("p",{className:"exercise-reference-cue",children:[(0,zl.jsx)("span",{children:v.referenceInPanel(b.label)})," ",(0,zl.jsxs)("button",{type:"button",className:"exercise-reference-cue__link",onClick:()=>b.showExerciseReference(e.id),children:[v.readReference,(0,zl.jsx)("span",{"aria-hidden":"true",className:"exercise-reference-cue__arrow",children:"\u203A"})]})]}):(0,zl.jsx)("div",{className:"exercise-shared-context",children:al(e.sharedContext)}):null;return(0,zl.jsx)(_s,{display:u,children:(0,zl.jsxs)("div",{className:`exercise-runtime ${o}`,style:ol(c),children:[w&&(n?n(w):w),e.questions.map((S,T)=>{let I=r==null?void 0:r.get(S.id),B=(0,zl.jsx)(qxe,{questionId:S.id,content:S.content,onQuestionAnswers:p,validationFeedback:I,locale:s},S.id);return(0,zl.jsxs)("div",{children:[a?a(S,B,T):B,i&&T<e.questions.length-1?i(T):null]},S.id)})]})})}var qxe=(0,nc.memo)(function({questionId:t,content:r,onQuestionAnswers:n,validationFeedback:a,locale:i}){let o=(0,nc.useCallback)(s=>n(t,s),[n,t]);return(0,zl.jsx)(ng,{content:r,onAnswersChange:o,validationFeedback:a,locale:i})});var ag=Pe($t(),1),L0=Pe(kt(),1);function yf({assessment:e,onAnswersChange:t,validationFeedback:r,renderExercise:n,renderSharedContext:a,renderSeparator:i,className:o="",brandingConfig:s,locale:l,display:u}){let c=(0,L0.useRef)(new Map),f=Ms(u),d=(0,L0.useMemo)(()=>il(f),[f]);(0,L0.useEffect)(()=>{if(!(s!=null&&s.fontUrl))return;let k=`edpire-brand-font-${s.fontUrl.replace(/\W/g,"").slice(-24)}`;if(document.getElementById(k))return;let w=document.createElement("link");w.id=k,w.rel="stylesheet",w.href=s.fontUrl,document.head.appendChild(w)},[s==null?void 0:s.fontUrl]);let p=ie({},ol(d));s!=null&&s.fontFamily&&(p["--brand-font"]=s.fontFamily);let b=(0,L0.useRef)({assessment:e,onAnswersChange:t});b.current={assessment:e,onAnswersChange:t};let v=(0,L0.useCallback)(k=>{c.current.set(k.exerciseId,k);let{assessment:w,onAnswersChange:S}=b.current;if(S){let T={exerciseAnswers:w.exercises.map(I=>{var B;return(B=c.current.get(I.id))!=null?B:{exerciseId:I.id,questionAnswers:[]}})};S(T)}},[]);return(0,ag.jsx)(_s,{display:f,children:(0,ag.jsx)("div",{className:`assessment-runtime ${o}`,style:Object.keys(p).length?p:void 0,children:e.exercises.map((k,w)=>{let S=r==null?void 0:r.get(k.id),T=(0,ag.jsx)(P9,{exercise:k,onAnswersChange:v,validationFeedback:S,renderSharedContext:a?I=>a(I,k):void 0,locale:l},k.id);return(0,ag.jsxs)("div",{children:[n?n(k,T,w):T,i&&w<e.exercises.length-1?i(w):null]},k.id)})})})}var RD=Pe($t(),1),hte=Pe(kt(),1);function F9({content:e,className:t,display:r}){let n=Ms(r),a=(0,hte.useMemo)(()=>il(n),[n]);return(0,RD.jsx)(_s,{display:n,children:(0,RD.jsx)("div",{className:`content-view ${t!=null?t:""}`,style:ol(a),children:al(e)})})}var is=Pe($t(),1),mte=Pe(kt(),1);function Zy({item:e,className:t,renderFigureLabel:r,display:n}){let a=Ms(n),i=(0,mte.useMemo)(()=>il(a),[a]);return(0,is.jsx)(_s,{display:a,children:(0,is.jsxs)("div",{className:`annex-item-view ${t!=null?t:""}${i.sizeSet?" edp-scaled":""}`,style:ol(i),children:[e.type==="text-document"&&(0,is.jsxs)(is.Fragment,{children:[e.title&&(0,is.jsx)("h3",{className:"text-base font-semibold mb-2",children:e.title}),al(e.content)]}),e.type==="figure"&&(0,is.jsxs)("figure",{children:[al(e.content),(0,is.jsx)("figcaption",{children:r?r(e.label):(0,is.jsx)("span",{children:e.label})})]}),e.type==="rich-block"&&(0,is.jsxs)(is.Fragment,{children:[e.title&&(0,is.jsx)("h3",{className:"text-base font-semibold mb-2",children:e.title}),al(e.content)]})]})})}var gte=Pe($t(),1),$xe=Pe(kt(),1);var yte=Pe($t(),1),ND=Pe(kt(),1);var OD=Pe($t(),1),bte=Pe(kt(),1);var Wxe=e=>{let t=Yxe(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{let s=o.split("-");return s[0]===""&&s.length!==1&&s.shift(),wte(s,t)||Xxe(o)},getConflictingClassGroupIds:(o,s)=>{let l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},wte=(e,t)=>{var o;if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),a=n?wte(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;let i=e.join("-");return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},xte=/^\[(.+)\]$/,Xxe=e=>{if(xte.test(e)){let t=xte.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Yxe=e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Zxe(Object.entries(e.classGroups),r).forEach(([i,o])=>{FD(o,n,i,t)}),n},FD=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){let i=a===""?t:vte(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(Jxe(a)){FD(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{FD(o,vte(t,i),r,n)})})},vte=(e,t)=>{let r=e;return t.split("-").forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Jxe=e=>e.isThemeGetter,Zxe=(e,t)=>t?e.map(([r,n])=>{let a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[t+o,s])):i);return[r,a]}):e,Qxe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map,a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}};var eve=e=>{let{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=s=>{let l=[],u=0,c=0,f;for(let k=0;k<s.length;k++){let w=s[k];if(u===0){if(w===a&&(n||s.slice(k,k+i)===t)){l.push(s.slice(c,k)),c=k+i;continue}if(w==="/"){f=k;continue}}w==="["?u++:w==="]"&&u--}let d=l.length===0?s:s.substring(c),p=d.startsWith("!"),b=p?d.substring(1):d,v=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:v}};return r?s=>r({className:s,parseClassName:o}):o},tve=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},rve=e=>ie({cache:Qxe(e.cacheSize),parseClassName:eve(e)},Wxe(e)),nve=/\s+/,ave=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(nve),s="";for(let l=o.length-1;l>=0;l-=1){let u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:p}=r(u),b=!!p,v=n(b?d.substring(0,p):d);if(!v){if(!b){s=u+(s.length>0?" "+s:s);continue}if(v=n(d),!v){s=u+(s.length>0?" "+s:s);continue}b=!1}let k=tve(c).join(":"),w=f?k+"!":k,S=w+v;if(i.includes(S))continue;i.push(S);let T=a(v,b);for(let I=0;I<T.length;++I){let B=T[I];i.push(w+B)}s=u+(s.length>0?" "+s:s)}return s};function ive(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=kte(t))&&(n&&(n+=" "),n+=r);return n}var kte=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=kte(e[n]))&&(r&&(r+=" "),r+=t);return r};function ove(e,...t){let r,n,a,i=o;function o(l){let u=t.reduce((c,f)=>f(c),e());return r=rve(u),n=r.cache.get,a=r.cache.set,i=s,s(l)}function s(l){let u=n(l);if(u)return u;let c=ave(l,r);return a(l,c),c}return function(){return i(ive.apply(null,arguments))}}var ra=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ste=/^\[(?:([a-z-]+):)?(.+)\]$/i,sve=/^\d+\/\d+$/,lve=new Set(["px","full","screen"]),uve=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cve=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dve=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fve=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,T0=e=>ig(e)||lve.has(e)||sve.test(e),bf=e=>og(e,"length",wve),ig=e=>!!e&&!Number.isNaN(Number(e)),PD=e=>og(e,"number",ig),Qy=e=>!!e&&Number.isInteger(Number(e)),hve=e=>e.endsWith("%")&&ig(e.slice(0,-1)),xr=e=>Ste.test(e),xf=e=>uve.test(e),mve=new Set(["length","size","percentage"]),gve=e=>og(e,mve,Cte),yve=e=>og(e,"position",Cte),bve=new Set(["image","url"]),xve=e=>og(e,bve,Sve),vve=e=>og(e,"",kve),eb=()=>!0,og=(e,t,r)=>{let n=Ste.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},wve=e=>cve.test(e)&&!dve.test(e),Cte=()=>!1,kve=e=>fve.test(e),Sve=e=>pve.test(e);var Cve=()=>{let e=ra("colors"),t=ra("spacing"),r=ra("blur"),n=ra("brightness"),a=ra("borderColor"),i=ra("borderRadius"),o=ra("borderSpacing"),s=ra("borderWidth"),l=ra("contrast"),u=ra("grayscale"),c=ra("hueRotate"),f=ra("invert"),d=ra("gap"),p=ra("gradientColorStops"),b=ra("gradientColorStopPositions"),v=ra("inset"),k=ra("margin"),w=ra("opacity"),S=ra("padding"),T=ra("saturate"),I=ra("scale"),B=ra("sepia"),O=ra("skew"),N=ra("space"),j=ra("translate"),H=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",xr,t],re=()=>[xr,t],xe=()=>["",T0,bf],oe=()=>["auto",ig,xr],le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Se=()=>["solid","dashed","dotted","double","none"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>["start","end","center","between","around","evenly","stretch"],me=()=>["","0",xr],Ue=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Le=()=>[ig,xr];return{cacheSize:500,separator:":",theme:{colors:[eb],spacing:[T0,bf],blur:["none","",xf,xr],brightness:Le(),borderColor:[e],borderRadius:["none","","full",xf,xr],borderSpacing:re(),borderWidth:xe(),contrast:Le(),grayscale:me(),hueRotate:Le(),invert:me(),gap:re(),gradientColorStops:[e],gradientColorStopPositions:[hve,bf],inset:V(),margin:V(),opacity:Le(),padding:re(),saturate:Le(),scale:Le(),sepia:me(),skew:Le(),space:re(),translate:re()},classGroups:{aspect:[{aspect:["auto","square","video",xr]}],container:["container"],columns:[{columns:[xf]}],"break-after":[{"break-after":Ue()}],"break-before":[{"break-before":Ue()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...le(),xr]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Qy,xr]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",xr]}],grow:[{grow:me()}],shrink:[{shrink:me()}],order:[{order:["first","last","none",Qy,xr]}],"grid-cols":[{"grid-cols":[eb]}],"col-start-end":[{col:["auto",{span:["full",Qy,xr]},xr]}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":[eb]}],"row-start-end":[{row:["auto",{span:[Qy,xr]},xr]}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",xr]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",xr]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...de()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...de(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...de(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",xr,t]}],"min-w":[{"min-w":[xr,t,"min","max","fit"]}],"max-w":[{"max-w":[xr,t,"none","full","min","max","fit","prose",{screen:[xf]},xf]}],h:[{h:[xr,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[xr,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[xr,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[xr,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xf,bf]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",PD]}],"font-family":[{font:[eb]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",xr]}],"line-clamp":[{"line-clamp":["none",ig,PD]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",T0,xr]}],"list-image":[{"list-image":["none",xr]}],"list-style-type":[{list:["none","disc","decimal",xr]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",T0,bf]}],"underline-offset":[{"underline-offset":["auto",T0,xr]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:re()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xr]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xr]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...le(),yve]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",gve]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},xve]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...Se(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:Se()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...Se()]}],"outline-offset":[{"outline-offset":[T0,xr]}],"outline-w":[{outline:[T0,bf]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[T0,bf]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xf,vve]}],"shadow-color":[{shadow:[eb]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[..._e(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_e()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",xf,xr]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[T]}],sepia:[{sepia:[B]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",xr]}],duration:[{duration:Le()}],ease:[{ease:["linear","in","out","in-out",xr]}],delay:[{delay:Le()}],animate:[{animate:["none","spin","ping","pulse","bounce",xr]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Qy,xr]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",xr]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xr]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":re()}],"scroll-mx":[{"scroll-mx":re()}],"scroll-my":[{"scroll-my":re()}],"scroll-ms":[{"scroll-ms":re()}],"scroll-me":[{"scroll-me":re()}],"scroll-mt":[{"scroll-mt":re()}],"scroll-mr":[{"scroll-mr":re()}],"scroll-mb":[{"scroll-mb":re()}],"scroll-ml":[{"scroll-ml":re()}],"scroll-p":[{"scroll-p":re()}],"scroll-px":[{"scroll-px":re()}],"scroll-py":[{"scroll-py":re()}],"scroll-ps":[{"scroll-ps":re()}],"scroll-pe":[{"scroll-pe":re()}],"scroll-pt":[{"scroll-pt":re()}],"scroll-pr":[{"scroll-pr":re()}],"scroll-pb":[{"scroll-pb":re()}],"scroll-pl":[{"scroll-pl":re()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xr]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[T0,bf,PD]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Mte=ove(Cve);function Ao(...e){return Mte(cC(e))}var ba=Pe($t());function Mve({accent:e}){return(0,ba.jsx)("div",{style:{width:48,height:48,borderRadius:"50%",border:`4px solid ${e}33`,borderTopColor:e,animation:"edpire-spin 0.8s linear infinite"}})}function _ve({accent:e}){return(0,ba.jsx)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[0,1,2].map(t=>(0,ba.jsx)("div",{style:{width:12,height:12,borderRadius:"50%",background:e,animation:`edpire-bounce 1.2s ease-in-out ${t*.2}s infinite`}},t))})}function Ave({accent:e}){return(0,ba.jsxs)("div",{style:{position:"relative",width:48,height:48},children:[[0,1].map(t=>(0,ba.jsx)("div",{style:{position:"absolute",inset:0,borderRadius:"50%",background:e,opacity:.4,animation:`edpire-pulse 1.6s ease-out ${t*.8}s infinite`}},t)),(0,ba.jsx)("div",{style:{position:"absolute",inset:"25%",borderRadius:"50%",background:e}})]})}function Lve({accent:e}){return(0,ba.jsx)("div",{style:{display:"flex",gap:4,alignItems:"flex-end",height:40},children:[0,1,2,3].map(t=>(0,ba.jsx)("div",{style:{width:8,borderRadius:4,background:e,animation:`edpire-bars 1s ease-in-out ${t*.15}s infinite`}},t))})}function _te({visible:e,bgColor:t="rgba(0,0,0,0.55)",accentColor:r="#6366f1",text:n="Evaluating your answers\u2026",aiText:a="Some answers are being reviewed by AI, this may take a few seconds.",spinnerTheme:i="default",animationUrl:o,hasAiNodes:s=!1,contained:l=!1}){return e?(0,ba.jsxs)(ba.Fragment,{children:[(0,ba.jsx)("style",{children:`
|
|
4095
|
+
`),u=l.trim()===(n||"").trim();return o.close(),{testId:t,passed:u,actualStdout:l,durationMs:Date.now()-a}}catch(i){return{testId:t,passed:!1,stderr:String(i),errored:!0,durationMs:Date.now()-a}}}async function E6e(e){let{transform:t}=await Promise.resolve().then(()=>(_ee(),Mee));return t(e,{transforms:["typescript"]}).code}var tg=class{supports(t){return["javascript","typescript","python","sql"].includes(t)}async run(t){let{language:r,source:n,mode:a,entryFunction:i,tests:o,timeoutMs:s=5e3}=t;if(!this.supports(r))return o.map(c=>({testId:c.id,passed:!1,stderr:`Language "${r}" cannot run in-browser. Configure a RemoteExecutor for compiled languages.`,errored:!0}));let l=n;if(r==="typescript")try{l=await E6e(n)}catch(c){return o.map(f=>({testId:f.id,passed:!1,stderr:`TypeScript compile error: ${c.message}`,errored:!0}))}let u=[];for(let c of o){let f;r==="python"?f=await A6e(l,a,i,c.id,c.args,c.expectedReturn,c.stdin,c.expectedStdout,s):r==="sql"?f=await T6e(l,c.id,c.stdin,c.expectedStdout):f=await k6e(l,a,i,c.id,c.args,c.expectedReturn,c.stdin,c.expectedStdout,s),u.push(f)}return u}};var ID=Pe($t(),1),rc=Pe(kt(),1);function Rxe(e){var r;return(r={javascript:"javascript",typescript:"typescript",python:"python",sql:"sql",java:"java",cpp:"cpp",go:"go"}[e])!=null?r:"plaintext"}var zD=(0,rc.forwardRef)(function({value:t,onChange:r,language:n="javascript",readOnly:a=!1,readOnlyRanges:i,placeholder:o,height:s=300,className:l,autoFocus:u},c){let[f,d]=(0,rc.useState)(null),{scale:p}=Ul(),b=(0,rc.useRef)(null);(0,rc.useEffect)(()=>{Promise.resolve().then(()=>(lte(),ste)).then(S=>{d(()=>S.default)}).catch(()=>{})},[]),(0,rc.useImperativeHandle)(c,()=>({getValue(){var S,T,I;return(I=(T=(S=b.current)==null?void 0:S.getValue)==null?void 0:T.call(S))!=null?I:t},focus(){var S,T;(T=(S=b.current)==null?void 0:S.focus)==null||T.call(S)},insert(S){let T=b.current;if(!T)return;let I=T.getSelection();T.executeEdits("insert",[{range:I,text:S,forceMoveMarkers:!0}])}}));function v(S){b.current=S,u&&S.focus(),i!=null&&i.length&&S.onDidAttemptReadOnlyEdit(()=>{})}function k(S){r(S!=null?S:"")}let w=typeof s=="number"?s*p:s;return f?(0,ID.jsx)(f,{className:l,height:w,language:Rxe(n),value:t,onChange:k,onMount:v,options:{readOnly:a,minimap:{enabled:!1},fontSize:14*p,lineNumbers:"on",scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,wordWrap:"on"}}):(0,ID.jsx)("textarea",{className:l,value:t,onChange:S=>r(S.target.value),readOnly:a,placeholder:o,style:{width:"100%",height:typeof s=="number"?ht(s):s,fontFamily:"monospace",fontSize:ht(14),padding:ht("0.5rem"),border:"1px solid #e2e8f0",borderRadius:ht("0.375rem"),resize:"vertical",background:a?"#f8fafc":"white",boxSizing:"border-box"},autoFocus:u})});var Nxe=new tg;function Oxe(e){var t;return e!=null&&e.showFeedback&&(t=e.state)!=null?t:"idle"}function ute(e){var r;let t={};for(let n of(r=e.attrs.starters)!=null?r:[])t[n.language]=n.code;return t}function Pxe({sample:e,result:t,mode:r}){var l;let n=t==null?void 0:t.passed,a=t==null?void 0:t.errored,i=t!==void 0,o=i?a?"var(--almost, #c8810e)":n?"var(--ok, #1f8a4c)":"var(--pen, #d23b2b)":"var(--ink-faint, #8d93a0)",s=i?a?"\u26A0":null:"\u25CB";return(0,Ft.jsxs)("div",{style:{padding:`${ht("0.5rem")} ${ht("0.75rem")}`,borderBottom:"1px solid var(--line, #e7e5e0)",fontSize:ht("0.8125rem"),fontFamily:"var(--font-mono, ui-monospace, monospace)"},children:[(0,Ft.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:ht("0.5rem")},children:[(0,Ft.jsx)("span",{style:{color:o,fontWeight:700,fontSize:ht("0.875rem"),display:"inline-flex"},children:s!=null?s:n?(0,Ft.jsx)(Vl,{size:15,style:ma(15)}):(0,Ft.jsx)(Wi,{size:15})}),(0,Ft.jsx)("span",{style:{fontWeight:600,color:"var(--ink, #1d2025)"},children:(l=e.name)!=null?l:`Test ${e.id}`})]}),i&&!n&&(0,Ft.jsxs)("div",{style:{marginTop:ht("0.25rem"),paddingLeft:ht("1.5rem")},children:[r==="function"?(0,Ft.jsx)(Ft.Fragment,{children:(t==null?void 0:t.actual)!==void 0&&(0,Ft.jsxs)("div",{style:{color:"var(--ink-soft, #565b66)"},children:[(0,Ft.jsx)("span",{style:{color:"var(--ink-faint, #8d93a0)"},children:"got: "}),(0,Ft.jsx)("span",{style:{color:"var(--pen, #d23b2b)"},children:JSON.stringify(t.actual)}),(0,Ft.jsx)("span",{style:{color:"var(--ink-faint, #8d93a0)"},children:" expected: "}),(0,Ft.jsx)("span",{style:{color:"var(--ok, #1f8a4c)"},children:JSON.stringify(e.expectedReturn)})]})}):(0,Ft.jsx)(Ft.Fragment,{children:(t==null?void 0:t.actualStdout)!==void 0&&(0,Ft.jsxs)("div",{style:{color:"var(--ink-soft, #565b66)"},children:[(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)("span",{style:{color:"var(--ink-faint, #8d93a0)"},children:"got: "}),(0,Ft.jsx)("span",{style:{color:"var(--pen, #d23b2b)",whiteSpace:"pre-wrap"},children:t.actualStdout||"(empty)"})]}),(0,Ft.jsxs)("div",{children:[(0,Ft.jsx)("span",{style:{color:"var(--ink-faint, #8d93a0)"},children:"expected: "}),(0,Ft.jsx)("span",{style:{color:"var(--ok, #1f8a4c)",whiteSpace:"pre-wrap"},children:e.expectedStdout||"(empty)"})]})]})}),(t==null?void 0:t.stderr)&&(0,Ft.jsx)("div",{style:{color:"var(--almost-ink, #8a5a08)",marginTop:ht("0.125rem"),whiteSpace:"pre-wrap"},children:t.stderr})]})]})}function B6({node:e,validationFeedback:t,readOnly:r=!1,executor:n=Nxe,gradingTests:a}){var oe,le,Se,_e;let i=bi(),o=(0,Il.useRef)(null),{attrs:s}=e,l=e.id,[u,c]=(0,Il.useState)(s.defaultLanguage),[f,d]=(0,Il.useState)(()=>ute(e)),[p,b]=(0,Il.useState)([]),[v,k]=(0,Il.useState)(!1),[w,S]=(0,Il.useState)(!1),T=(oe=f[u])!=null?oe:"",I=Oxe(t);(0,Il.useEffect)(()=>{let de=Ue=>{var Ie;let Le=(Ie=Ue.answers)==null?void 0:Ie.find(ye=>ye.nodeId===l&&ye.type==="codingResponse");Le!=null&&Le.answer&&(Le.answer.language&&c(Le.answer.language),Le.answer.sourceByLanguage&&d(Le.answer.sourceByLanguage),Le.answer.testResults&&b(Le.answer.testResults))},me=()=>{d(ute(e)),b([]),S(!1)};return i.on("answers:prefill",de),i.on("answers:reset",me),()=>{i.off("answers:prefill",de),i.off("answers:reset",me)}},[i,l,e]);let B=(0,Il.useCallback)((de,me,Ue)=>{var Le;i.emit({type:"answer:changed",answer:{nodeId:l,type:"codingResponse",timestamp:Date.now(),answer:{language:de,sourceByLanguage:me,source:(Le=me[de])!=null?Le:"",testResults:Ue}}})},[i,l]),O=de=>{let me=Xe(ie({},f),{[u]:de});d(me),B(u,me,p)},N=de=>{c(de),b([]),B(de,f,[])},j=async()=>{var me;if(v)return;k(!0),b([]);let de=a!=null?a:(me=s.visibleSamples)!=null?me:[];if(de.length===0){k(!1);return}try{let Ue=await n.run({language:u,source:T,mode:s.testMode,entryFunction:s.entryFunction,tests:de,timeoutMs:5e3});b(Ue),B(u,f,Ue)}catch(Ue){let Le=de.map(Ie=>({testId:Ie.id,passed:!1,stderr:String(Ue),errored:!0}));b(Le),B(u,f,Le)}finally{k(!1)}},H=()=>{w||(S(!0),B(u,f,p))},Y=(a!=null?a:[]).filter(de=>de.hidden).length,V=Y>0?p.filter(de=>{let me=(a!=null?a:[]).find(Ue=>Ue.id===de.testId);return(me==null?void 0:me.hidden)&&de.passed}).length:0,re=a?a.filter(de=>!de.hidden):(le=s.visibleSamples)!=null?le:[],xe=I==="correct"?"var(--ok, #1f8a4c)":I==="partial"?"var(--almost, #c8810e)":I==="incorrect"?"var(--pen, #d23b2b)":"var(--line-strong, #d6d3cc)";return(0,Ft.jsxs)("div",{style:{margin:`${ht("0.75rem")} 0`,border:`1px solid ${xe}`,borderRadius:ht("0.875rem"),overflow:"hidden",transition:"border-color 0.2s"},children:[(0,Ft.jsxs)("div",{style:{background:"var(--ui-muted, #f5f4f1)",borderBottom:"1px solid var(--line, #e7e5e0)",padding:`${ht("0.5rem")} ${ht("0.75rem")}`,display:"flex",alignItems:"center",gap:ht("0.5rem"),flexWrap:"wrap"},children:[(0,Ft.jsx)("div",{style:{display:"flex",gap:ht("0.25rem")},children:s.languages.map(de=>(0,Ft.jsx)("button",{onClick:()=>!r&&N(de),disabled:r,style:{padding:`${ht("0.2rem")} ${ht("0.6rem")}`,borderRadius:ht("0.375rem"),border:"1px solid",borderColor:u===de?"var(--ink, #1d2025)":"var(--line, #e7e5e0)",background:u===de?"var(--ink, #1d2025)":"var(--card, #fff)",color:u===de?"#fff":"var(--ink-soft, #565b66)",fontSize:ht("0.75rem"),fontWeight:600,cursor:r?"default":"pointer",fontFamily:"var(--font-mono, ui-monospace, monospace)"},children:de},de))}),(0,Ft.jsx)("div",{style:{flex:1}}),(0,Ft.jsx)(Au,{hint:s.hint}),!r&&(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsxs)("button",{onClick:j,disabled:v,style:{padding:`${ht("0.25rem")} ${ht("0.75rem")}`,borderRadius:ht("0.5rem"),border:"1px solid var(--line-strong, #d6d3cc)",background:v?"var(--ui-muted, #f5f4f1)":"var(--card, #fff)",color:"var(--ink, #1d2025)",fontSize:ht("0.8125rem"),fontWeight:600,cursor:v?"not-allowed":"pointer",display:"inline-flex",alignItems:"center",gap:ht("0.35rem")},children:[(0,Ft.jsx)(g2,{size:13,style:ma(13)})," ",v?"Running\u2026":"Run"]}),(0,Ft.jsxs)("button",{onClick:H,disabled:w,style:{padding:`${ht("0.3rem")} ${ht("0.85rem")}`,borderRadius:ht("0.5rem"),border:"none",background:w?"var(--ok-soft, #ecf8f0)":"var(--ink, #1d2025)",color:w?"var(--ok, #1f8a4c)":"#fff",fontSize:ht("0.8125rem"),fontWeight:600,cursor:w?"default":"pointer",display:"inline-flex",alignItems:"center",gap:ht("0.35rem")},children:[w&&(0,Ft.jsx)(Vl,{size:13,style:ma(13)})," ",w?"Submitted":"Submit"]})]})]}),(0,Ft.jsx)(zD,{ref:o,value:T,onChange:O,language:u,readOnly:r,readOnlyRanges:(Se=s.starters.find(de=>de.language===u))==null?void 0:Se.readOnlyRanges,height:320}),(p.length>0||re.length>0)&&(0,Ft.jsxs)("div",{style:{borderTop:"1px solid var(--line, #e7e5e0)",background:"var(--paper, #fbfaf7)"},children:[(0,Ft.jsx)("div",{style:{padding:`${ht("0.5rem")} ${ht("0.75rem")}`,fontSize:ht("0.7rem"),fontWeight:700,color:"var(--ink-faint, #8d93a0)",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Test Results"}),re.map(de=>(0,Ft.jsx)(Pxe,{sample:de,result:p.find(me=>me.testId===de.id),mode:s.testMode},de.id)),Y>0&&(0,Ft.jsxs)("div",{style:{padding:`${ht("0.5rem")} ${ht("0.75rem")}`,fontSize:ht("0.8125rem"),color:"var(--ink-soft, #565b66)",borderTop:"1px solid var(--line, #e7e5e0)",fontStyle:"italic",display:"flex",alignItems:"center",gap:ht("0.4rem")},children:[(0,Ft.jsx)(f2,{size:13,style:ma(13)})," Hidden tests: ",V,"/",Y," passed"]})]}),(t==null?void 0:t.showFeedback)&&(0,Ft.jsxs)("div",{style:{padding:`${ht("0.55rem")} ${ht("0.75rem")}`,fontSize:ht("0.85rem"),fontWeight:600,borderTop:"1px solid var(--line, #e7e5e0)",display:"flex",alignItems:"center",gap:ht("0.45rem"),background:I==="correct"?"var(--ok-soft, #ecf8f0)":I==="partial"?"var(--almost-soft, #fbf1dc)":I==="incorrect"?"var(--pen-soft, #fdeeec)":"transparent",color:I==="correct"?"var(--ok, #1f8a4c)":I==="partial"?"var(--almost-ink, #8a5a08)":I==="incorrect"?"var(--pen, #d23b2b)":"var(--ink-soft, #565b66)"},children:[I==="correct"&&(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsx)(Vl,{size:15,style:ma(15)})," All tests passed"]}),I==="partial"&&"Partial credit",I==="incorrect"&&(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsx)(Wi,{size:15,style:ma(15)})," Tests failed"]}),I==="validating"&&"Evaluating\u2026",I==="awaiting_review"&&"Awaiting teacher review",t.score!==void 0&&(0,Ft.jsxs)("span",{style:{marginLeft:"auto",fontFamily:'var(--font-hand, "Caveat", cursive)',fontSize:ht("1.5rem"),lineHeight:1},children:[t.score," / ",(_e=t.maxScore)!=null?_e:s.maxScore]})]})]})}var gf=Pe($t(),1),z9=Pe(kt(),1);var I9=Pe($t(),1);function BD(){var r,n;let{active:e}=a2();if(!e)return null;let t=(n=(r=e.data.current)==null?void 0:r.html)!=null?n:"";return(0,I9.jsx)(yq,{dropAnimation:null,children:(0,I9.jsx)("div",{style:{display:"inline-block",padding:"0.375rem 0.75rem",borderRadius:"9999px",backgroundColor:"white",border:"1px solid #e5e7eb",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",cursor:"grabbing",maxWidth:"20rem"},children:(0,I9.jsx)("span",{dangerouslySetInnerHTML:{__html:t},style:{pointerEvents:"none",whiteSpace:"nowrap",lineHeight:"1.25"}})})})}var cte=(0,z9.createContext)(!1),Fxe={acceleration:3,threshold:{x:0,y:.12}};function B9({children:e}){let t=(0,z9.useContext)(cte),r=U6(Q4,{activationConstraint:{distance:8}}),n=U6(e2,{activationConstraint:{delay:250,tolerance:5}}),a=U6(E1),i=ZF(r,n,a);return t?(0,gf.jsx)(gf.Fragment,{children:e}):(0,gf.jsx)(cte.Provider,{value:!0,children:(0,gf.jsxs)(hq,{sensors:i,autoScroll:Fxe,children:[e,(0,gf.jsx)(BD,{})]})})}function ng({content:e,onAnswersChange:t,onSubmit:r,answerBus:n,namespace:a,initialAnswers:i,validationFeedback:o,className:s="",locale:l,readOnly:u=!1,mediaHandler:c,codeExecutor:f,display:d}){let p=Ms(d),b=(0,A0.useMemo)(()=>il(p),[p]),v=(0,A0.useRef)(null);v.current||(v.current=new Ec);let k=n!=null?n:v.current;(0,A0.useEffect)(()=>{i&&i.length>0&&k.prefillAnswers(i)},[i,k]),(0,A0.useEffect)(()=>{if(!t)return;let S=()=>{let T=k.getAllAnswers();t(T)};return k.on("answer:changed",S),()=>k.off("answer:changed",S)},[k,t]),(0,A0.useEffect)(()=>{if(!r)return;let S=T=>{r(T.answers)};return k.on("answer:submitted",S),()=>k.off("answer:submitted",S)},[k,r]),(0,A0.useEffect)(()=>{document.querySelectorAll("[data-audio]").forEach(T=>{let I=T.querySelector("audio"),B=T.querySelector("svg");!I||!B||(T.onclick=()=>{I.paused?(I.play(),B.innerHTML='<path d="M6 4h4v16H6zm8 0h4v16h-4z"/>',B.dataset.icon="pause"):(I.pause(),B.innerHTML='<path d="M6 4v16l12-8z"/>',B.dataset.icon="play")},I.onended=()=>{B.innerHTML='<path d="M6 4v16l12-8z"/>',B.dataset.icon="play"})})},[e]);let w=al(e,o,{readOnly:u,mediaHandler:c,codeExecutor:f});return(0,hh.jsx)($4,{locale:l,children:(0,hh.jsx)(_s,{display:p,children:(0,hh.jsx)(X5,{bus:k,children:(0,hh.jsx)(B9,{children:(0,hh.jsx)(G6,{initialAnswers:i,children:(0,hh.jsx)("div",{className:`question-runtime ${s}${b.sizeSet?" edp-scaled":""}`,"data-namespace":a,style:ie({fontSize:ht("1.125rem"),lineHeight:"1.75"},ol(b)),children:w})})})})})})}var zl=Pe($t(),1),nc=Pe(kt(),1);var dte={words:80,media:1,tableRows:6},qxe=new Set(["resizableImage","resizableVideo","youtubeEmbed"]);function fte(e){let t={words:0,media:0,tableRows:0},r=n=>{var a,i;if(typeof n.text=="string"&&(t.words+=n.text.split(/\s+/).filter(o=>/[\p{L}\p{N}]/u.test(o)).length),n.type&&qxe.has(n.type)&&t.media++,n.type==="table"){let o=((a=n.content)!=null?a:[]).filter(s=>s.type==="tableRow").length;t.tableRows=Math.max(t.tableRows,o)}for(let o of(i=n.content)!=null?i:[])r(o)};return e&&r(e),t}function Jy(e,t=dte){let r=fte(e);return r.words>t.words||r.media>t.media||r.tableRows>t.tableRows}var R9=Pe(kt(),1),pte=(0,R9.createContext)(null),N9=pte.Provider;function O9(){return(0,R9.useContext)(pte)}function P9({exercise:e,onAnswersChange:t,validationFeedback:r,renderSharedContext:n,renderQuestion:a,renderSeparator:i,className:o="",locale:s,display:l}){let u=Ms(l),c=(0,nc.useMemo)(()=>il(u),[u]),f=(0,nc.useRef)(new Map),d=(0,nc.useRef)({exercise:e,onAnswersChange:t});d.current={exercise:e,onAnswersChange:t};let p=(0,nc.useCallback)((S,T)=>{f.current.set(S,T);let{exercise:I,onAnswersChange:B}=d.current;if(B){let O={exerciseId:I.id,questionAnswers:I.questions.map(N=>{var j;return{questionId:N.id,answers:(j=f.current.get(N.id))!=null?j:[]}})};B(O)}},[]),b=O9(),v=q4(s),k=!!(b&&e.sharedContext&&Jy(e.sharedContext)),w=e.sharedContext?k?(0,zl.jsxs)("p",{className:"exercise-reference-cue",children:[(0,zl.jsx)("span",{children:v.referenceInPanel(b.label)})," ",(0,zl.jsxs)("button",{type:"button",className:"exercise-reference-cue__link",onClick:()=>b.showExerciseReference(e.id),children:[v.readReference,(0,zl.jsx)("span",{"aria-hidden":"true",className:"exercise-reference-cue__arrow",children:"\u203A"})]})]}):(0,zl.jsx)("div",{className:"exercise-shared-context",children:al(e.sharedContext)}):null;return(0,zl.jsx)(_s,{display:u,children:(0,zl.jsxs)("div",{className:`exercise-runtime ${o}`,style:ol(c),children:[w&&(n?n(w):w),e.questions.map((S,T)=>{let I=r==null?void 0:r.get(S.id),B=(0,zl.jsx)($xe,{questionId:S.id,content:S.content,onQuestionAnswers:p,validationFeedback:I,locale:s},S.id);return(0,zl.jsxs)("div",{children:[a?a(S,B,T):B,i&&T<e.questions.length-1?i(T):null]},S.id)})]})})}var $xe=(0,nc.memo)(function({questionId:t,content:r,onQuestionAnswers:n,validationFeedback:a,locale:i}){let o=(0,nc.useCallback)(s=>n(t,s),[n,t]);return(0,zl.jsx)(ng,{content:r,onAnswersChange:o,validationFeedback:a,locale:i})});var ag=Pe($t(),1),L0=Pe(kt(),1);function yf({assessment:e,onAnswersChange:t,validationFeedback:r,renderExercise:n,renderSharedContext:a,renderSeparator:i,className:o="",brandingConfig:s,locale:l,display:u}){let c=(0,L0.useRef)(new Map),f=Ms(u),d=(0,L0.useMemo)(()=>il(f),[f]);(0,L0.useEffect)(()=>{if(!(s!=null&&s.fontUrl))return;let k=`edpire-brand-font-${s.fontUrl.replace(/\W/g,"").slice(-24)}`;if(document.getElementById(k))return;let w=document.createElement("link");w.id=k,w.rel="stylesheet",w.href=s.fontUrl,document.head.appendChild(w)},[s==null?void 0:s.fontUrl]);let p=ie({},ol(d));s!=null&&s.fontFamily&&(p["--brand-font"]=s.fontFamily);let b=(0,L0.useRef)({assessment:e,onAnswersChange:t});b.current={assessment:e,onAnswersChange:t};let v=(0,L0.useCallback)(k=>{c.current.set(k.exerciseId,k);let{assessment:w,onAnswersChange:S}=b.current;if(S){let T={exerciseAnswers:w.exercises.map(I=>{var B;return(B=c.current.get(I.id))!=null?B:{exerciseId:I.id,questionAnswers:[]}})};S(T)}},[]);return(0,ag.jsx)(_s,{display:f,children:(0,ag.jsx)("div",{className:`assessment-runtime ${o}`,style:Object.keys(p).length?p:void 0,children:e.exercises.map((k,w)=>{let S=r==null?void 0:r.get(k.id),T=(0,ag.jsx)(P9,{exercise:k,onAnswersChange:v,validationFeedback:S,renderSharedContext:a?I=>a(I,k):void 0,locale:l},k.id);return(0,ag.jsxs)("div",{children:[n?n(k,T,w):T,i&&w<e.exercises.length-1?i(w):null]},k.id)})})})}var RD=Pe($t(),1),hte=Pe(kt(),1);function F9({content:e,className:t,display:r}){let n=Ms(r),a=(0,hte.useMemo)(()=>il(n),[n]);return(0,RD.jsx)(_s,{display:n,children:(0,RD.jsx)("div",{className:`content-view ${t!=null?t:""}`,style:ol(a),children:al(e)})})}var is=Pe($t(),1),mte=Pe(kt(),1);function Zy({item:e,className:t,renderFigureLabel:r,display:n}){let a=Ms(n),i=(0,mte.useMemo)(()=>il(a),[a]);return(0,is.jsx)(_s,{display:a,children:(0,is.jsxs)("div",{className:`annex-item-view ${t!=null?t:""}${i.sizeSet?" edp-scaled":""}`,style:ol(i),children:[e.type==="text-document"&&(0,is.jsxs)(is.Fragment,{children:[e.title&&(0,is.jsx)("h3",{className:"text-base font-semibold mb-2",children:e.title}),al(e.content)]}),e.type==="figure"&&(0,is.jsxs)("figure",{children:[al(e.content),(0,is.jsx)("figcaption",{children:r?r(e.label):(0,is.jsx)("span",{children:e.label})})]}),e.type==="rich-block"&&(0,is.jsxs)(is.Fragment,{children:[e.title&&(0,is.jsx)("h3",{className:"text-base font-semibold mb-2",children:e.title}),al(e.content)]})]})})}var gte=Pe($t(),1),Hxe=Pe(kt(),1);var yte=Pe($t(),1),ND=Pe(kt(),1);var OD=Pe($t(),1),bte=Pe(kt(),1);var Xxe=e=>{let t=Jxe(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{let s=o.split("-");return s[0]===""&&s.length!==1&&s.shift(),wte(s,t)||Yxe(o)},getConflictingClassGroupIds:(o,s)=>{let l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},wte=(e,t)=>{var o;if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),a=n?wte(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;let i=e.join("-");return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},xte=/^\[(.+)\]$/,Yxe=e=>{if(xte.test(e)){let t=xte.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Jxe=e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Qxe(Object.entries(e.classGroups),r).forEach(([i,o])=>{FD(o,n,i,t)}),n},FD=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){let i=a===""?t:vte(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(Zxe(a)){FD(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{FD(o,vte(t,i),r,n)})})},vte=(e,t)=>{let r=e;return t.split("-").forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Zxe=e=>e.isThemeGetter,Qxe=(e,t)=>t?e.map(([r,n])=>{let a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[t+o,s])):i);return[r,a]}):e,eve=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map,a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}};var tve=e=>{let{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=s=>{let l=[],u=0,c=0,f;for(let k=0;k<s.length;k++){let w=s[k];if(u===0){if(w===a&&(n||s.slice(k,k+i)===t)){l.push(s.slice(c,k)),c=k+i;continue}if(w==="/"){f=k;continue}}w==="["?u++:w==="]"&&u--}let d=l.length===0?s:s.substring(c),p=d.startsWith("!"),b=p?d.substring(1):d,v=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:v}};return r?s=>r({className:s,parseClassName:o}):o},rve=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},nve=e=>ie({cache:eve(e.cacheSize),parseClassName:tve(e)},Xxe(e)),ave=/\s+/,ive=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(ave),s="";for(let l=o.length-1;l>=0;l-=1){let u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:p}=r(u),b=!!p,v=n(b?d.substring(0,p):d);if(!v){if(!b){s=u+(s.length>0?" "+s:s);continue}if(v=n(d),!v){s=u+(s.length>0?" "+s:s);continue}b=!1}let k=rve(c).join(":"),w=f?k+"!":k,S=w+v;if(i.includes(S))continue;i.push(S);let T=a(v,b);for(let I=0;I<T.length;++I){let B=T[I];i.push(w+B)}s=u+(s.length>0?" "+s:s)}return s};function ove(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=kte(t))&&(n&&(n+=" "),n+=r);return n}var kte=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=kte(e[n]))&&(r&&(r+=" "),r+=t);return r};function sve(e,...t){let r,n,a,i=o;function o(l){let u=t.reduce((c,f)=>f(c),e());return r=nve(u),n=r.cache.get,a=r.cache.set,i=s,s(l)}function s(l){let u=n(l);if(u)return u;let c=ive(l,r);return a(l,c),c}return function(){return i(ove.apply(null,arguments))}}var ra=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Ste=/^\[(?:([a-z-]+):)?(.+)\]$/i,lve=/^\d+\/\d+$/,uve=new Set(["px","full","screen"]),cve=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dve=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fve=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pve=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,T0=e=>ig(e)||uve.has(e)||lve.test(e),bf=e=>og(e,"length",kve),ig=e=>!!e&&!Number.isNaN(Number(e)),PD=e=>og(e,"number",ig),Qy=e=>!!e&&Number.isInteger(Number(e)),mve=e=>e.endsWith("%")&&ig(e.slice(0,-1)),xr=e=>Ste.test(e),xf=e=>cve.test(e),gve=new Set(["length","size","percentage"]),yve=e=>og(e,gve,Cte),bve=e=>og(e,"position",Cte),xve=new Set(["image","url"]),vve=e=>og(e,xve,Cve),wve=e=>og(e,"",Sve),eb=()=>!0,og=(e,t,r)=>{let n=Ste.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},kve=e=>dve.test(e)&&!fve.test(e),Cte=()=>!1,Sve=e=>pve.test(e),Cve=e=>hve.test(e);var Mve=()=>{let e=ra("colors"),t=ra("spacing"),r=ra("blur"),n=ra("brightness"),a=ra("borderColor"),i=ra("borderRadius"),o=ra("borderSpacing"),s=ra("borderWidth"),l=ra("contrast"),u=ra("grayscale"),c=ra("hueRotate"),f=ra("invert"),d=ra("gap"),p=ra("gradientColorStops"),b=ra("gradientColorStopPositions"),v=ra("inset"),k=ra("margin"),w=ra("opacity"),S=ra("padding"),T=ra("saturate"),I=ra("scale"),B=ra("sepia"),O=ra("skew"),N=ra("space"),j=ra("translate"),H=()=>["auto","contain","none"],Y=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",xr,t],re=()=>[xr,t],xe=()=>["",T0,bf],oe=()=>["auto",ig,xr],le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Se=()=>["solid","dashed","dotted","double","none"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>["start","end","center","between","around","evenly","stretch"],me=()=>["","0",xr],Ue=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Le=()=>[ig,xr];return{cacheSize:500,separator:":",theme:{colors:[eb],spacing:[T0,bf],blur:["none","",xf,xr],brightness:Le(),borderColor:[e],borderRadius:["none","","full",xf,xr],borderSpacing:re(),borderWidth:xe(),contrast:Le(),grayscale:me(),hueRotate:Le(),invert:me(),gap:re(),gradientColorStops:[e],gradientColorStopPositions:[mve,bf],inset:V(),margin:V(),opacity:Le(),padding:re(),saturate:Le(),scale:Le(),sepia:me(),skew:Le(),space:re(),translate:re()},classGroups:{aspect:[{aspect:["auto","square","video",xr]}],container:["container"],columns:[{columns:[xf]}],"break-after":[{"break-after":Ue()}],"break-before":[{"break-before":Ue()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...le(),xr]}],overflow:[{overflow:Y()}],"overflow-x":[{"overflow-x":Y()}],"overflow-y":[{"overflow-y":Y()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Qy,xr]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",xr]}],grow:[{grow:me()}],shrink:[{shrink:me()}],order:[{order:["first","last","none",Qy,xr]}],"grid-cols":[{"grid-cols":[eb]}],"col-start-end":[{col:["auto",{span:["full",Qy,xr]},xr]}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":[eb]}],"row-start-end":[{row:["auto",{span:[Qy,xr]},xr]}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",xr]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",xr]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...de()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...de(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...de(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",xr,t]}],"min-w":[{"min-w":[xr,t,"min","max","fit"]}],"max-w":[{"max-w":[xr,t,"none","full","min","max","fit","prose",{screen:[xf]},xf]}],h:[{h:[xr,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[xr,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[xr,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[xr,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xf,bf]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",PD]}],"font-family":[{font:[eb]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",xr]}],"line-clamp":[{"line-clamp":["none",ig,PD]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",T0,xr]}],"list-image":[{"list-image":["none",xr]}],"list-style-type":[{list:["none","disc","decimal",xr]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",T0,bf]}],"underline-offset":[{"underline-offset":["auto",T0,xr]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:re()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xr]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xr]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...le(),bve]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",yve]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vve]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...Se(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:Se()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...Se()]}],"outline-offset":[{"outline-offset":[T0,xr]}],"outline-w":[{outline:[T0,bf]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[T0,bf]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xf,wve]}],"shadow-color":[{shadow:[eb]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[..._e(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_e()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",xf,xr]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[T]}],sepia:[{sepia:[B]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",xr]}],duration:[{duration:Le()}],ease:[{ease:["linear","in","out","in-out",xr]}],delay:[{delay:Le()}],animate:[{animate:["none","spin","ping","pulse","bounce",xr]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-x":[{"scale-x":[I]}],"scale-y":[{"scale-y":[I]}],rotate:[{rotate:[Qy,xr]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",xr]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xr]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":re()}],"scroll-mx":[{"scroll-mx":re()}],"scroll-my":[{"scroll-my":re()}],"scroll-ms":[{"scroll-ms":re()}],"scroll-me":[{"scroll-me":re()}],"scroll-mt":[{"scroll-mt":re()}],"scroll-mr":[{"scroll-mr":re()}],"scroll-mb":[{"scroll-mb":re()}],"scroll-ml":[{"scroll-ml":re()}],"scroll-p":[{"scroll-p":re()}],"scroll-px":[{"scroll-px":re()}],"scroll-py":[{"scroll-py":re()}],"scroll-ps":[{"scroll-ps":re()}],"scroll-pe":[{"scroll-pe":re()}],"scroll-pt":[{"scroll-pt":re()}],"scroll-pr":[{"scroll-pr":re()}],"scroll-pb":[{"scroll-pb":re()}],"scroll-pl":[{"scroll-pl":re()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xr]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[T0,bf,PD]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Mte=sve(Mve);function Ao(...e){return Mte(cC(e))}var ba=Pe($t());function _ve({accent:e}){return(0,ba.jsx)("div",{style:{width:48,height:48,borderRadius:"50%",border:`4px solid ${e}33`,borderTopColor:e,animation:"edpire-spin 0.8s linear infinite"}})}function Ave({accent:e}){return(0,ba.jsx)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[0,1,2].map(t=>(0,ba.jsx)("div",{style:{width:12,height:12,borderRadius:"50%",background:e,animation:`edpire-bounce 1.2s ease-in-out ${t*.2}s infinite`}},t))})}function Lve({accent:e}){return(0,ba.jsxs)("div",{style:{position:"relative",width:48,height:48},children:[[0,1].map(t=>(0,ba.jsx)("div",{style:{position:"absolute",inset:0,borderRadius:"50%",background:e,opacity:.4,animation:`edpire-pulse 1.6s ease-out ${t*.8}s infinite`}},t)),(0,ba.jsx)("div",{style:{position:"absolute",inset:"25%",borderRadius:"50%",background:e}})]})}function Tve({accent:e}){return(0,ba.jsx)("div",{style:{display:"flex",gap:4,alignItems:"flex-end",height:40},children:[0,1,2,3].map(t=>(0,ba.jsx)("div",{style:{width:8,borderRadius:4,background:e,animation:`edpire-bars 1s ease-in-out ${t*.15}s infinite`}},t))})}function _te({visible:e,bgColor:t="rgba(0,0,0,0.55)",accentColor:r="#6366f1",text:n="Evaluating your answers\u2026",aiText:a="Some answers are being reviewed by AI, this may take a few seconds.",spinnerTheme:i="default",animationUrl:o,hasAiNodes:s=!1,contained:l=!1}){return e?(0,ba.jsxs)(ba.Fragment,{children:[(0,ba.jsx)("style",{children:`
|
|
4096
4096
|
@keyframes edpire-spin {
|
|
4097
4097
|
to { transform: rotate(360deg); }
|
|
4098
4098
|
}
|
|
@@ -4108,11 +4108,11 @@ sys.stdin = io.StringIO(${JSON.stringify(o)})
|
|
|
4108
4108
|
0%, 100% { height: 12px; }
|
|
4109
4109
|
50% { height: 40px; }
|
|
4110
4110
|
}
|
|
4111
|
-
`}),(0,ba.jsx)("div",{style:{background:t},className:`${l?"absolute":"fixed"} inset-0 z-[60] flex items-center justify-center`,children:(0,ba.jsxs)("div",{className:"flex flex-col items-center gap-5 bg-white rounded-2xl shadow-2xl px-10 py-8 max-w-xs text-center",children:[(()=>{if(o)return(0,ba.jsx)("img",{src:o,alt:"",className:"w-24 h-24 object-contain"});switch(i){case"dots":return(0,ba.jsx)(_ve,{accent:r});case"pulse":return(0,ba.jsx)(Ave,{accent:r});case"bars":return(0,ba.jsx)(Lve,{accent:r});default:return(0,ba.jsx)(Mve,{accent:r})}})(),(0,ba.jsx)("p",{className:"text-sm font-semibold text-slate-800",children:n}),s&&(0,ba.jsx)("p",{className:"text-xs text-slate-500 leading-snug",children:a})]})})]}):null}var Lo=Pe(kt());var Hr=Pe($t());function qD(e){return e.exercises.flatMap((t,r)=>t.sharedContext&&Jy(t.sharedContext)?[{id:t.id,index:r,content:t.sharedContext}]:[])}var Ate=()=>{var e;return typeof window!="undefined"&&((e=window.matchMedia)==null?void 0:e.call(window,"(prefers-reduced-motion: reduce)").matches)};function Tve(e){e.removeAttribute("data-flash"),e.offsetWidth,e.setAttribute("data-flash","true"),setTimeout(()=>e.removeAttribute("data-flash"),1200)}function Lte({assessment:e,isSubmitted:t,setAnswers:r,validationFeedback:n,renderExercise:a,renderSeparator:i,primaryColor:o,contained:s=!1,locale:l,contentMaxWidth:u,t:c,footer:f}){let[d,p]=(0,Lo.useState)(!1),b=e.annex,v=(b==null?void 0:b.tabLabel)||c("annexDocuments"),k=(0,Lo.useMemo)(()=>qD(e),[e]),w=(0,Lo.useRef)(null),S=(0,Lo.useRef)(null),T=(0,Lo.useRef)(null),I=(0,Lo.useRef)(null),B=()=>{var re,xe;return((xe=(re=w.current)==null?void 0:re.getClientRects().length)!=null?xe:0)>0},O=(0,Lo.useCallback)((re,xe)=>{let oe=re==null?void 0:re.querySelector(`[data-reference-for="${CSS.escape(xe)}"]`);if(!re||!oe)return;let le=oe.getBoundingClientRect().top-re.getBoundingClientRect().top+re.scrollTop-12;re.scrollTo({top:le,behavior:Ate()?"auto":"smooth"}),Tve(oe)},[]),N=(0,Lo.useCallback)(re=>{if(B()){O(S.current,re);return}p(!0),requestAnimationFrame(()=>requestAnimationFrame(()=>O(I.current,re)))},[O]),j=re=>{var le;let xe=B()?w.current:T.current;B()||p(!1);let oe=Array.from((le=xe==null?void 0:xe.querySelectorAll(`[data-exercise-id="${CSS.escape(re)}"]`))!=null?le:[]).find(Se=>Se.getClientRects().length>0);oe==null||oe.scrollIntoView({behavior:Ate()?"auto":"smooth",block:"start"})};(0,Lo.useEffect)(()=>{let re=w.current;if(!re||k.length===0||typeof IntersectionObserver=="undefined")return;let xe=new Set(k.map(Se=>Se.id)),oe=null,le=new IntersectionObserver(Se=>{var me;if(!B())return;let _e=Se.filter(Ue=>{var Le;return Ue.isIntersecting&&xe.has((Le=Ue.target.dataset.exerciseId)!=null?Le:"")}).sort((Ue,Le)=>Ue.boundingClientRect.top-Le.boundingClientRect.top)[0],de=(me=_e==null?void 0:_e.target)==null?void 0:me.dataset.exerciseId;!de||de===oe||(oe=de,O(S.current,de))},{root:re,rootMargin:"0px 0px -60% 0px"});return re.querySelectorAll("[data-exercise-id]").forEach(Se=>le.observe(Se)),()=>le.disconnect()},[k,O]);let H=(0,Lo.useMemo)(()=>({label:v,showExerciseReference:N}),[v,N]),Y=(0,Hr.jsxs)(Hr.Fragment,{children:[b==null?void 0:b.items.map(re=>(0,Hr.jsx)(Zy,{item:re},re.id)),b!=null&&b.items.length&&k.length?(0,Hr.jsx)("div",{className:"border-t border-[#e7e5e0]"}):null,k.map(re=>(0,Hr.jsxs)("section",{"data-reference-for":re.id,className:"-mx-3 flex flex-col gap-2 rounded-[10px] px-3 py-2 transition-colors duration-700 data-[flash=true]:bg-[#fbf1dc] data-[flash=true]:duration-150",children:[(0,Hr.jsx)("button",{type:"button",onClick:()=>j(re.id),className:"self-start cursor-pointer text-xs font-bold uppercase tracking-widest text-[#565b66] underline-offset-4 hover:text-[#1d2025] hover:underline focus-visible:outline-2 focus-visible:outline-[#1d2025] rounded-sm",children:c("exercise",{index:re.index+1})}),(0,Hr.jsx)(F9,{content:re.content})]},re.id))]}),V=(0,Hr.jsx)(yf,{assessment:e,onAnswersChange:t?void 0:r,validationFeedback:n,renderExercise:a,renderSeparator:i,locale:l});return(0,Hr.jsx)(N9,{value:H,children:(0,Hr.jsxs)("div",{className:Ao("@container flex-1 min-h-0 flex",s&&"relative"),children:[(0,Hr.jsxs)("div",{ref:w,className:"hidden @6xl:flex flex-1 gap-4 p-4 bg-[#f5f4f1] items-start overflow-y-auto",children:[(0,Hr.jsxs)("div",{className:"flex-1 sticky top-4 max-h-[calc(100svh-6rem)] flex flex-col bg-white rounded-[14px] border border-[#e7e5e0] shadow-sm overflow-hidden",children:[(0,Hr.jsxs)("div",{className:"flex items-center gap-2 px-5 py-3 border-b border-[#e7e5e0] flex-shrink-0",children:[(0,Hr.jsx)(Pc,{size:14,className:"text-[#8d93a0]"}),(0,Hr.jsx)("span",{className:"text-xs font-bold text-[#565b66] uppercase tracking-widest",children:v})]}),(0,Hr.jsx)("div",{ref:S,className:"flex-1 overflow-y-auto px-6 py-5 flex flex-col gap-6",children:Y})]}),(0,Hr.jsx)("div",{className:"w-px bg-[#e7e5e0] flex-shrink-0 self-stretch my-1 rounded-full"}),(0,Hr.jsx)("div",{className:"flex-1 bg-white rounded-[14px] border border-[#e7e5e0] shadow-sm",children:(0,Hr.jsxs)("div",{className:"px-6 py-5 flex flex-col gap-4",children:[V,f]})})]}),(0,Hr.jsxs)("div",{className:"@6xl:hidden flex-1 relative overflow-hidden",children:[(0,Hr.jsx)("div",{ref:T,className:"absolute inset-0 overflow-y-auto",children:(0,Hr.jsxs)("div",{className:"mx-auto px-5 py-5 flex flex-col gap-4",style:{maxWidth:u},children:[V,f]})}),d&&(0,Hr.jsx)("div",{className:Ao("inset-0 z-30 bg-black/25",s?"absolute":"fixed"),onClick:()=>p(!1)}),(0,Hr.jsxs)("div",{role:"dialog","aria-label":v,"aria-hidden":!d,className:Ao("top-1/2 start-2 -translate-y-1/2 z-40 w-[88%] bg-[#f1efe9] rounded-2xl shadow-2xl flex flex-col overflow-hidden transition-transform duration-300 ease-in-out",s?"absolute":"fixed",d?"translate-x-0":"-translate-x-[110%] rtl:translate-x-[110%]"),children:[(0,Hr.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 flex-shrink-0",children:[(0,Hr.jsx)("span",{className:"text-sm font-bold text-[#1d2025]",children:v}),(0,Hr.jsx)("button",{onClick:()=>p(!1),"aria-label":c("close"),className:"p-1 text-[#8d93a0] hover:text-[#1d2025] rounded-lg transition-colors",children:(0,Hr.jsx)(Wi,{size:18})})]}),(0,Hr.jsx)("div",{ref:I,className:"overflow-y-auto max-h-[calc(100vh-8rem)] px-5 pb-5 flex flex-col gap-5",children:Y})]})]}),!d&&(0,Hr.jsxs)("button",{onClick:()=>p(!0),"aria-label":v,style:ie({transform:"translateY(-50%)"},o?{backgroundColor:o}:{}),className:Ao("@6xl:hidden top-1/2 start-0 z-20 flex flex-col items-center gap-1 py-3 px-1.5 bg-[#1d2025] text-white text-[10px] font-bold uppercase tracking-wider rounded-e-lg shadow-md hover:bg-[#31353c] transition-colors",s?"absolute":"fixed"),children:[(0,Hr.jsx)(Pc,{size:12}),(0,Hr.jsx)("span",{style:{writingMode:"vertical-rl",transform:"rotate(180deg)"},children:v})]})]})})}var Tte=Pe(kt());var An=Pe($t());function Ete({assessment:e,isSubmitted:t,setAnswers:r,validationFeedback:n,renderExercise:a,renderSeparator:i,primaryColor:o,contained:s=!1,locale:l,contentMaxWidth:u,t:c,onAddAnnex:f,footer:d}){let[p,b]=(0,Tte.useState)(!1),v=(0,An.jsx)(yf,{assessment:e,onAnswersChange:t?void 0:r,validationFeedback:n,renderExercise:a,renderSeparator:i,locale:l});if(p)return(0,An.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,An.jsxs)("div",{className:"mx-auto p-6 flex flex-col gap-4",style:{maxWidth:u},children:[v,d]})});let k=T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),f())},w=T=>(0,An.jsxs)("span",{style:o?{backgroundColor:o}:void 0,className:Ao("flex-none inline-flex items-center gap-1.5 rounded-lg bg-[#1d2025] text-white font-semibold shadow-sm group-hover:shadow-md transition-shadow",T?"px-3 py-1.5 text-xs":"mt-1 px-3.5 py-2 text-xs"),children:[(0,An.jsx)(y2,{size:13}),c("annexEmptyCta")]}),S=T=>(0,An.jsx)("button",{type:"button",onClick:I=>{I.stopPropagation(),b(!0)},"aria-label":c("annexEmptyDismiss"),title:c("annexEmptyDismiss"),className:Ao("flex-none flex items-center justify-center w-7 h-7 rounded-lg text-[#8d93a0] hover:text-[#1d2025] hover:bg-[#f1efe9] transition-colors cursor-pointer",T&&"absolute top-2 end-2 z-10"),children:(0,An.jsx)(Wi,{size:15})});return(0,An.jsxs)("div",{className:Ao("@container flex-1 min-h-0 flex",s&&"relative"),children:[(0,An.jsxs)("div",{className:"hidden @6xl:flex flex-1 gap-4 p-4 bg-[#f5f4f1] items-start overflow-y-auto",children:[(0,An.jsx)("div",{className:"flex-1 sticky top-4 flex min-h-[200px] max-h-[calc(100svh-6rem)]",children:(0,An.jsxs)("div",{role:"button",tabIndex:0,onClick:f,onKeyDown:k,className:"group relative flex-1 w-full flex flex-col items-center justify-center gap-3 text-center rounded-[14px] border-2 border-dashed border-[#d6d3cc] bg-white/60 hover:border-[#8d93a0] hover:bg-white transition-colors cursor-pointer px-6 py-8 outline-none focus-visible:ring-2 focus-visible:ring-[#8d93a0] focus-visible:ring-offset-2",children:[S(!0),(0,An.jsx)("span",{className:"flex items-center justify-center w-11 h-11 rounded-full bg-[#f1efe9] text-[#8d93a0] group-hover:text-[#1d2025] transition-colors",children:(0,An.jsx)(Pc,{size:20})}),(0,An.jsx)("span",{className:"text-sm font-bold text-[#565b66]",children:c("annexEmptyTitle")}),(0,An.jsx)("span",{className:"text-xs text-[#8d93a0] max-w-[32ch] leading-relaxed",children:c("annexEmptyBody")}),w(!1)]})}),(0,An.jsx)("div",{className:"w-px bg-[#e7e5e0] flex-shrink-0 self-stretch my-1 rounded-full"}),(0,An.jsx)("div",{className:"flex-1 bg-white rounded-[14px] border border-[#e7e5e0] shadow-sm",children:(0,An.jsxs)("div",{className:"px-6 py-5 flex flex-col gap-4",children:[v,d]})})]}),(0,An.jsx)("div",{className:"@6xl:hidden flex-1 overflow-y-auto",children:(0,An.jsxs)("div",{className:"mx-auto px-5 py-5 flex flex-col gap-4",style:{maxWidth:u},children:[(0,An.jsxs)("div",{role:"button",tabIndex:0,onClick:f,onKeyDown:k,className:"group flex items-center gap-3 rounded-[14px] border-2 border-dashed border-[#d6d3cc] bg-white/60 hover:border-[#8d93a0] hover:bg-white transition-colors cursor-pointer px-4 py-2.5 outline-none focus-visible:ring-2 focus-visible:ring-[#8d93a0]",children:[(0,An.jsx)("span",{className:"flex-none flex items-center justify-center w-9 h-9 rounded-full bg-[#f1efe9] text-[#8d93a0] group-hover:text-[#1d2025] transition-colors",children:(0,An.jsx)(Pc,{size:16})}),(0,An.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,An.jsx)("div",{className:"text-xs font-bold text-[#565b66]",children:c("annexEmptyTitle")}),(0,An.jsx)("div",{className:"text-[11px] text-[#8d93a0] leading-snug",children:c("annexEmptyBody")})]}),w(!0),S(!1)]}),v,d]})})]})}function q9(e){var r,n;let t=new Map;for(let a of e){let i=new Map;for(let o of a.questions){let s=new Map;for(let l of o.nodeResults){let u=ie(ie(ie({state:l.status,showFeedback:!0,score:l.score},l.feedback!==void 0?{message:l.feedback}:{}),l.displayAnswer!==void 0?{displayAnswer:l.displayAnswer}:{}),l.teacherFeedback!==void 0?{teacherFeedback:l.teacherFeedback}:{});((r=l.detail)==null?void 0:r.type)==="choiceSet"?u.correctChoiceIds=l.detail.correctChoiceIds:((n=l.detail)==null?void 0:n.type)==="matchingSet"&&(u.pairFeedback=l.detail.pairFeedback,u.correctPairings=l.detail.correctPairings),s.set(l.nodeId,u)}i.set(o.questionId,s)}t.set(a.exerciseId,i)}return t}var Eve=new Set(["choiceSet","inlineChoiceSet","blank","aiAnswerInput","matchingSet","openResponseNode","mathResponse","codingResponse"]),Dve=new Set(["blankPool","inlinePool"]);function Ive(e){var t,r;switch(e.type){case"choiceSet":case"inlineChoiceSet":return e.answer.selectedIds.length>0;case"blank":return e.answer.mode==="choice"?e.answer.choiceId.length>0:e.answer.text.trim().length>0;case"matchingSet":return e.answer.connections.length>0;case"aiAnswer":return e.answer.text.trim().length>0;case"openResponse":{let n=e.answer;return n.recording||n.files&&n.files.length>0?!0:((r=(t=n.text)==null?void 0:t.wordCount)!=null?r:0)>0}case"mathResponse":return e.answer.latex.trim().length>0;case"codingResponse":return e.answer.source.trim().length>0;default:{let n=e;return!0}}}function zve(e){let t=0,r=n=>{if(Array.isArray(n)){for(let o of n)r(o);return}if(!n||typeof n!="object")return;let{type:a,content:i}=n;if(typeof a=="string"){if(Eve.has(a)){t+=1;return}if(Dve.has(a))return}i!==void 0&&r(i)};return r(e),t}function Dte(e,t){var a;let r=new Map;for(let i of(a=t==null?void 0:t.exerciseAnswers)!=null?a:[])for(let o of i.questionAnswers){let s=r.get(o.questionId);s||(s=new Set,r.set(o.questionId,s));for(let l of o.answers)Ive(l)&&s.add(l.nodeId)}let n=[];return e.exercises.forEach((i,o)=>{i.questions.forEach((s,l)=>{var c,f;let u=zve(s.content);u!==0&&((f=(c=r.get(s.id))==null?void 0:c.size)!=null?f:0)<u&&n.push({questionId:s.id,exerciseIndex:o,questionIndex:l,only:i.questions.length===1})})}),n}var Bve={exercise:"Exercise {index}",question:"Question {index}",points:"pts","points.one":"pt",submit:"Submit Assessment",submitting:"Submitting...",confirmTitle:"Submit Assessment",confirmDescription:"Are you sure you want to submit? You cannot change your answers after submitting.",unansweredOne:"1 question is not fully answered.",unansweredMany:"{count} questions are not fully answered.",unansweredMore:"and {count} more",confirmSubmit:"Submit",confirmCancel:"Cancel",assessmentPassed:"Assessment passed",assessmentNotPassed:"Assessment not passed",awaitingReview:"Awaiting review",awaitingReviewDesc:"Your teacher is reviewing your open responses. Your final score will be available once grading is complete.",beingMarked:"Being marked",beingMarkedDesc:"Some answers are still being marked. Your final score will be available once every answer is marked.",pendingReview:"Pending review",viewFullReport:"View Full Report",poweredBy:"Powered by Edpire",evaluating:"Evaluating your answers\u2026",aiEvaluating:"Some answers are being reviewed by AI, this may take a few seconds.",reset:"Reset",back:"Back",annexDocuments:"Documents",annexEmptyTitle:"No reference yet",annexEmptyBody:"A text, figure, table or document that stays in view across the whole assessment while students answer.",annexEmptyCta:"Add reference",annexEmptyDismiss:"Hide","timeUp.title":"Time's up","timeUp.submitting":"Submitting your answers\u2026",yourScore:"Your score",answersSaving:"Saving\u2026",answersSaved:"Answers saved",answersNotSaved:"Your answers aren't being saved. Check your connection.",resumeRestored:"Welcome back. Your answers are here.",resumeFresh:"Welcome back.",resumeTimeLeft:"The clock kept running: {minutes} min left.",close:"Close"},Rve={exercise:"Exercice {index}",question:"Question {index}",points:"pts","points.one":"pt",submit:"Soumettre l'\xE9valuation",submitting:"Soumission...",confirmTitle:"Soumettre l'\xE9valuation",confirmDescription:"\xCAtes-vous s\xFBr de vouloir soumettre ? Vous ne pourrez pas modifier vos r\xE9ponses.",unansweredOne:"1 question n'est pas enti\xE8rement remplie.",unansweredMany:"{count} questions ne sont pas enti\xE8rement remplies.",unansweredMore:"et {count} autres",confirmSubmit:"Soumettre",confirmCancel:"Annuler",assessmentPassed:"\xC9valuation r\xE9ussie",assessmentNotPassed:"\xC9valuation non r\xE9ussie",awaitingReview:"En attente de correction",awaitingReviewDesc:"Votre professeur examine vos r\xE9ponses ouvertes. Votre note finale sera disponible une fois la correction termin\xE9e.",beingMarked:"Correction en cours",beingMarkedDesc:"Certaines r\xE9ponses sont encore en cours de correction. Votre note finale sera disponible d\xE8s que toutes les r\xE9ponses seront corrig\xE9es.",pendingReview:"En attente de correction",viewFullReport:"Voir le rapport complet",poweredBy:"Propuls\xE9 par Edpire",evaluating:"\xC9valuation de vos r\xE9ponses\u2026",aiEvaluating:"Certaines r\xE9ponses sont examin\xE9es par l'IA, cela peut prendre quelques secondes.",reset:"R\xE9initialiser",back:"Retour",annexDocuments:"Documents",annexEmptyTitle:"Aucune annexe pour l'instant",annexEmptyBody:"Un texte, une figure, un tableau ou un document qui reste visible pour toute l'\xE9valuation pendant que les \xE9l\xE8ves r\xE9pondent.",annexEmptyCta:"Ajouter une annexe",annexEmptyDismiss:"Masquer","timeUp.title":"Temps \xE9coul\xE9","timeUp.submitting":"Envoi de vos r\xE9ponses\u2026",yourScore:"Votre score",answersSaving:"Enregistrement\u2026",answersSaved:"R\xE9ponses enregistr\xE9es",answersNotSaved:"Vos r\xE9ponses ne sont pas enregistr\xE9es. V\xE9rifiez votre connexion.",resumeRestored:"Bon retour. Vos r\xE9ponses sont l\xE0.",resumeFresh:"Bon retour.",resumeTimeLeft:"Le chrono a continu\xE9 : il reste {minutes} min.",close:"Fermer"},Nve={exercise:"\u062A\u0645\u0631\u064A\u0646 {index}",question:"\u0633\u0624\u0627\u0644 {index}",points:"\u0646\u0642\u0637\u0629","points.two":"\u0646\u0642\u0637\u062A\u0627\u0646","points.few":"\u0646\u0642\u0627\u0637",submit:"\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u062A\u0642\u064A\u064A\u0645",submitting:"\u062C\u0627\u0631\u064D \u0627\u0644\u0625\u0631\u0633\u0627\u0644...",confirmTitle:"\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u062A\u0642\u064A\u064A\u0645",confirmDescription:"\u0647\u0644 \u0623\u0646\u062A \u0645\u062A\u0623\u0643\u062F \u0645\u0646 \u0627\u0644\u0625\u0631\u0633\u0627\u0644\u061F \u0644\u0646 \u062A\u062A\u0645\u0643\u0646 \u0645\u0646 \u062A\u063A\u064A\u064A\u0631 \u0625\u062C\u0627\u0628\u0627\u062A\u0643 \u0628\u0639\u062F \u0627\u0644\u0625\u0631\u0633\u0627\u0644.",unansweredOne:"\u0644\u0645 \u062A\u064F\u0643\u0645\u0644 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0639\u0646 \u0633\u0624\u0627\u0644 \u0648\u0627\u062D\u062F.",unansweredMany:"\u0644\u0645 \u062A\u064F\u0643\u0645\u0644 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0639\u0646 {count} \u0645\u0646 \u0627\u0644\u0623\u0633\u0626\u0644\u0629.",unansweredMore:"\u0648{count} \u0623\u062E\u0631\u0649",confirmSubmit:"\u0625\u0631\u0633\u0627\u0644",confirmCancel:"\u0625\u0644\u063A\u0627\u0621",assessmentPassed:"\u0627\u062C\u062A\u064A\u0627\u0632 \u0627\u0644\u062A\u0642\u064A\u064A\u0645",assessmentNotPassed:"\u0644\u0645 \u064A\u062A\u0645 \u0627\u062C\u062A\u064A\u0627\u0632 \u0627\u0644\u062A\u0642\u064A\u064A\u0645",awaitingReview:"\u0641\u064A \u0627\u0646\u062A\u0638\u0627\u0631 \u0627\u0644\u062A\u0635\u062D\u064A\u062D",awaitingReviewDesc:"\u064A\u0642\u0648\u0645 \u0645\u0639\u0644\u0645\u0643 \u0628\u0645\u0631\u0627\u062C\u0639\u0629 \u0625\u062C\u0627\u0628\u0627\u062A\u0643 \u0627\u0644\u0645\u0641\u062A\u0648\u062D\u0629. \u0633\u062A\u0638\u0647\u0631 \u0639\u0644\u0627\u0645\u062A\u0643 \u0627\u0644\u0646\u0647\u0627\u0626\u064A\u0629 \u0628\u0639\u062F \u0627\u0643\u062A\u0645\u0627\u0644 \u0627\u0644\u062A\u0635\u062D\u064A\u062D.",beingMarked:"\u0642\u064A\u062F \u0627\u0644\u062A\u0635\u062D\u064A\u062D",beingMarkedDesc:"\u0628\u0639\u0636 \u0627\u0644\u0625\u062C\u0627\u0628\u0627\u062A \u0645\u0627 \u0632\u0627\u0644\u062A \u0642\u064A\u062F \u0627\u0644\u062A\u0635\u062D\u064A\u062D. \u0633\u062A\u0638\u0647\u0631 \u0639\u0644\u0627\u0645\u062A\u0643 \u0627\u0644\u0646\u0647\u0627\u0626\u064A\u0629 \u0628\u0639\u062F \u062A\u0635\u062D\u064A\u062D \u062C\u0645\u064A\u0639 \u0627\u0644\u0625\u062C\u0627\u0628\u0627\u062A.",pendingReview:"\u0642\u064A\u062F \u0627\u0644\u062A\u0635\u062D\u064A\u062D",viewFullReport:"\u0639\u0631\u0636 \u0627\u0644\u062A\u0642\u0631\u064A\u0631 \u0627\u0644\u0643\u0627\u0645\u0644",poweredBy:"\u0645\u062F\u0639\u0648\u0645 \u0645\u0646 Edpire",evaluating:"\u062C\u0627\u0631\u064D \u062A\u0642\u064A\u064A\u0645 \u0625\u062C\u0627\u0628\u0627\u062A\u0643\u2026",aiEvaluating:"\u0628\u0639\u0636 \u0627\u0644\u0625\u062C\u0627\u0628\u0627\u062A \u0642\u064A\u062F \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629 \u0628\u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064A\u060C \u0642\u062F \u064A\u0633\u062A\u063A\u0631\u0642 \u0630\u0644\u0643 \u0628\u0636\u0639 \u062B\u0648\u0627\u0646\u064D.",reset:"\u0625\u0639\u0627\u062F\u0629 \u062A\u0639\u064A\u064A\u0646",back:"\u0631\u062C\u0648\u0639",annexDocuments:"\u0627\u0644\u0645\u0633\u062A\u0646\u062F\u0627\u062A",annexEmptyTitle:"\u0644\u0627 \u064A\u0648\u062C\u062F \u0645\u064F\u0644\u062D\u064E\u0642 \u0628\u0639\u062F",annexEmptyBody:"\u0646\u0635 \u0623\u0648 \u0635\u0648\u0631\u0629 \u0623\u0648 \u062C\u062F\u0648\u0644 \u0623\u0648 \u0645\u0633\u062A\u0646\u062F \u064A\u0628\u0642\u0649 \u0638\u0627\u0647\u0631\u064B\u0627 \u0637\u0648\u0627\u0644 \u0627\u0644\u062A\u0642\u064A\u064A\u0645 \u0623\u062B\u0646\u0627\u0621 \u0625\u062C\u0627\u0628\u0629 \u0627\u0644\u0637\u0644\u0627\u0628.",annexEmptyCta:"\u0625\u0636\u0627\u0641\u0629 \u0645\u064F\u0644\u062D\u064E\u0642",annexEmptyDismiss:"\u0625\u062E\u0641\u0627\u0621","timeUp.title":"\u0627\u0646\u062A\u0647\u0649 \u0627\u0644\u0648\u0642\u062A","timeUp.submitting":"\u062C\u0627\u0631\u064D \u0625\u0631\u0633\u0627\u0644 \u0625\u062C\u0627\u0628\u0627\u062A\u0643\u2026",yourScore:"\u0646\u062A\u064A\u062C\u062A\u0643",answersSaving:"\u062C\u0627\u0631\u064D \u0627\u0644\u062D\u0641\u0638\u2026",answersSaved:"\u062A\u0645 \u062D\u0641\u0638 \u0627\u0644\u0625\u062C\u0627\u0628\u0627\u062A",answersNotSaved:"\u0644\u0627 \u064A\u062A\u0645 \u062D\u0641\u0638 \u0625\u062C\u0627\u0628\u0627\u062A\u0643. \u062A\u062D\u0642\u0651\u0642 \u0645\u0646 \u0627\u062A\u0635\u0627\u0644\u0643.",resumeRestored:"\u0645\u0631\u062D\u0628\u064B\u0627 \u0628\u0639\u0648\u062F\u062A\u0643. \u0625\u062C\u0627\u0628\u0627\u062A\u0643 \u0647\u0646\u0627.",resumeFresh:"\u0645\u0631\u062D\u0628\u064B\u0627 \u0628\u0639\u0648\u062F\u062A\u0643.",resumeTimeLeft:"\u0627\u0633\u062A\u0645\u0631\u0651 \u0627\u0644\u0645\u0624\u0642\u0651\u062A: \u062A\u0628\u0642\u0651\u0649 {minutes} \u062F\u0642\u064A\u0642\u0629.",close:"\u0625\u063A\u0644\u0627\u0642"},sg={en:Bve,fr:Rve,ar:Nve};function Ove(e,t,r){var i,o,s;let a=(s=(o=((i=sg[e])!=null?i:sg.en)[t])!=null?o:sg.en[t])!=null?s:t;return r?Object.entries(r).reduce((l,[u,c])=>l.replace(`{${u}}`,String(c)),a):a}function Ite(e,t){var a,i,o;let r=new Intl.PluralRules(e).select(t),n=(a=sg[e])!=null?a:sg.en;return(o=(i=n[`points.${r}`])!=null?i:n.points)!=null?o:sg.en.points}function zte(e){return(t,r)=>Ove(e,t,r)}function Bte(e){return e==="ar"}function $9(e){return e==="en"?"en":"fr"}var Rte="48rem";function E0(e,{insertAt:t}={}){if(!e||typeof document=="undefined")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}E0(`:root{--ink: #1d2025;--ink-soft: #565b66;--ink-faint: #8d93a0;--ui-muted: #f5f4f1;--line: #e7e5e0;--line-strong: #d6d3cc;--ok: #1f8a4c;--ok-soft: #ecf8f0;--pen: #d23b2b;--pen-soft: #fdeeec;--almost: #c8810e;--almost-ink: #8a5a08;--almost-soft: #fbf1dc;--font-hand: "Caveat", cursive}@keyframes answer-shake{10%,90%{transform:translate(-2px)}20%,80%{transform:translate(4px)}30%,50%,70%{transform:translate(-6px)}40%,60%{transform:translate(6px)}}@keyframes hop{0%,to{transform:translateY(0) scale(1)}40%{transform:translateY(-6%) scale(1.05)}}@keyframes wobble{0%,to{transform:translate(0)}15%,85%{transform:translate(-4px)}30%,70%{transform:translate(4px)}45%,55%{transform:translate(-2px)}}.animate-shake{animation:answer-shake .4s both}.animate-hop{animation:hop .5s ease-out}.animate-wobble{animation:wobble .5s ease}.cs-player__grid{display:grid;gap:calc(.75rem * var(--edp-scale, 1));grid-template-columns:repeat(1,minmax(0,1fr))}@media(min-width:40rem){:where(.cs-player:not(.cs-player--box)) .cs-player__grid--row{grid-template-columns:repeat(2,minmax(0,1fr))}}.cs-player--box{container-type:inline-size}@container (min-width: 35.5em){.cs-player--box .cs-player__grid--row{grid-template-columns:repeat(2,minmax(0,1fr))}}.player-choice{position:relative;display:inline-flex;align-items:center;gap:calc(.75rem * var(--edp-scale, 1));flex-wrap:wrap;width:100%;padding:calc(.75rem * var(--edp-scale, 1)) calc(1rem * var(--edp-scale, 1));border:1.5px solid var(--line, #e7e5e0);border-radius:calc(.75rem * var(--edp-scale, 1));background-color:#fff;color:var(--ink, #1d2025);cursor:pointer;user-select:none;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease;font-weight:500;text-align:start}.player-choice:hover:not(:disabled){background-color:var(--ui-muted, #f5f4f1);border-color:var(--line-strong, #d6d3cc)}.player-choice:disabled{cursor:default}.player-choice>img{flex-shrink:0}.player-choice__mark{flex:none;display:grid;place-items:center;width:calc(20px * var(--edp-scale, 1));height:calc(20px * var(--edp-scale, 1));border:1.5px solid var(--ink-faint, #8d93a0);background:#fff;color:#fff;transition:border-color .15s,background .15s}.player-choice__mark--radio{border-radius:999px}.player-choice__mark--box{border-radius:calc(6px * var(--edp-scale, 1))}.player-choice__mark>svg{width:calc(13px * var(--edp-scale, 1));height:calc(13px * var(--edp-scale, 1));opacity:0}.player-choice__text{flex:1;min-width:0}.player-choice{height:100%}.player-choice__text img,.player-choice__text video,.player-choice__text iframe{max-height:calc(120px * var(--edp-scale, 1));width:auto;max-width:100%}.player-choice--tile{flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:calc(.5rem * var(--edp-scale, 1));padding:calc(1rem * var(--edp-scale, 1)) calc(.75rem * var(--edp-scale, 1))}.player-choice--tile .player-choice__mark{position:absolute;top:calc(.5rem * var(--edp-scale, 1));inset-inline-start:calc(.5rem * var(--edp-scale, 1))}.player-choice--tile .player-choice__text{flex:0 1 auto;width:100%;text-align:center}.player-choice--tile .player-choice__text img,.player-choice--tile .player-choice__text video,.player-choice--tile .player-choice__text iframe{display:block!important;margin-inline:auto;margin-bottom:calc(.4rem * var(--edp-scale, 1))}.player-choice--selected{background-color:var(--ui-muted, #f5f4f1);border-color:var(--ink, #1d2025)}.player-choice--selected .player-choice__mark{border-color:var(--ink, #1d2025);background:var(--ink, #1d2025)}.player-choice--selected .player-choice__mark>svg{opacity:1}.player-choice--correct{background-color:var(--ok-soft, #ecf8f0);border-color:var(--ok, #1f8a4c)}.player-choice--correct .player-choice__mark{border-color:var(--ok, #1f8a4c);background:var(--ok, #1f8a4c)}.player-choice--correct .player-choice__mark>svg{opacity:1}.player-choice--correct-unchosen{background-color:#fff;border-color:var(--ok, #1f8a4c);border-style:dashed}.player-choice--correct-unchosen .player-choice__mark{border-color:var(--ok, #1f8a4c)}.player-choice--incorrect{background-color:var(--pen-soft, #fdeeec);border-color:var(--pen, #d23b2b)}.player-choice--incorrect .player-choice__mark{border-color:var(--pen, #d23b2b);background:var(--pen, #d23b2b)}.player-choice--incorrect .player-choice__mark>svg{opacity:1}.player-choice--muted{opacity:.55}.player-choice--partial{background-color:var(--ok-soft, #ecf8f0);border-color:var(--ok, #1f8a4c)}.player-choice--disabled{cursor:default}.player-choice__mark--letter{width:calc(1.625rem * var(--edp-scale, 1));height:calc(1.625rem * var(--edp-scale, 1));color:var(--ink, #1d2025);font-size:.8em;font-weight:700;line-height:1}.player-choice--selected .player-choice__mark--letter,.player-choice--correct .player-choice__mark--letter,.player-choice--incorrect .player-choice__mark--letter{color:#fff}.player-choice--correct-unchosen .player-choice__mark--letter{color:var(--ok, #1f8a4c)}.player-choice__verdict{flex:none;display:grid;place-items:center;margin-inline-start:auto}.player-choice__verdict>svg{width:calc(1.125rem * var(--edp-scale, 1));height:calc(1.125rem * var(--edp-scale, 1))}.player-choice__verdict--correct{color:var(--ok, #1f8a4c)}.player-choice__verdict--incorrect{color:var(--pen, #d23b2b)}.player-choice--tile .player-choice__verdict{position:absolute;top:calc(.5rem * var(--edp-scale, 1));inset-inline-end:calc(.5rem * var(--edp-scale, 1));margin:0}.player-inline-choice{display:inline-flex;align-items:center;gap:calc(.25rem * var(--edp-scale, 1));padding:.05em .55em;border:1.5px solid var(--line-strong, #d6d3cc);border-radius:999px;background:#fff;color:var(--ink, #1d2025);font-size:.9em;line-height:inherit;cursor:pointer;user-select:none;transition:border-color .15s,background .15s}.player-inline-choice:hover:not(:disabled){background:var(--ui-muted, #f5f4f1)}.player-inline-choice:disabled{cursor:default}.player-inline-choice--selected{border-color:var(--ink, #1d2025);background:var(--ui-muted, #f5f4f1)}.player-inline-choice--correct{border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0)}.player-inline-choice--correct-unchosen{border-color:var(--ok, #1f8a4c);border-style:dashed}.player-inline-choice--incorrect{border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec)}.player-inline-choice--muted{opacity:.55}.player-inline-choice:focus-visible{outline:2px solid var(--ink, #1d2025);outline-offset:2px}.player-blank-input{display:inline-block;min-width:3ch;padding:calc(.25rem * var(--edp-scale, 1)) calc(.5rem * var(--edp-scale, 1));border:none;border-bottom:2px solid var(--line-strong, #d6d3cc);background-color:transparent;font-size:inherit;font-family:inherit;transition:all .2s ease;outline:none}.player-blank-input:focus{border-bottom-color:var(--ink, #1d2025);background-color:var(--ui-muted, #f5f4f1)}.player-blank-input--correct{border-bottom-color:var(--ok, #1f8a4c);background-color:var(--ok-soft, #ecf8f0);color:var(--ok, #1f8a4c)}.player-blank-input--incorrect{border-bottom-color:var(--pen, #d23b2b);background-color:var(--pen-soft, #fdeeec);color:var(--pen, #d23b2b)}.player-blank-input:disabled{opacity:.7;cursor:not-allowed}.player-typed-blank{display:inline-block;min-width:7ch;max-width:100%;padding:0 calc(.25rem * var(--edp-scale, 1));font-weight:600;text-align:center;line-height:1.25;border:1px solid var(--line-strong, #d6d3cc);border-bottom-width:2px;border-radius:calc(2px * var(--edp-scale, 1));background:var(--ui-muted, #f5f4f1);color:var(--ink, #1d2025);outline:none;resize:none;overflow:hidden;vertical-align:middle}.player-typed-blank::placeholder{color:var(--ink-faint, #8d93a0);font-weight:500}.player-typed-blank:focus{border-color:var(--ink, #1d2025)}.player-typed-blank--pending{border-color:var(--ink-faint, #8d93a0);background:var(--card, #ffffff)}.player-typed-blank-feedback{display:inline-block;min-width:2ch;max-width:100%;padding:0 calc(.25rem * var(--edp-scale, 1));font-weight:600;text-align:center;line-height:1.25;border:1px solid var(--line-strong, #d6d3cc);border-bottom-width:2px;border-radius:calc(2px * var(--edp-scale, 1));overflow-x:auto;cursor:default;vertical-align:middle}.player-typed-blank-feedback--correct{border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0);color:var(--ok, #1f8a4c)}.player-typed-blank-feedback--partial{border-color:var(--ok, #1f8a4c);border-style:dashed;background:var(--ok-soft, #ecf8f0);color:var(--ok, #1f8a4c)}.player-typed-blank-feedback--incorrect{border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec);color:var(--pen, #d23b2b);text-decoration:line-through}.player-typed-blank-spinner{display:inline-block;width:calc(.75rem * var(--edp-scale, 1));height:calc(.75rem * var(--edp-scale, 1));border:2px solid var(--ink-faint, #8d93a0);border-top-color:transparent;border-radius:999px;animation:blank-spin .7s linear infinite}@keyframes blank-spin{to{transform:rotate(360deg)}}.player-blank-reveal{font-weight:700;color:var(--ok, #1f8a4c);font-size:.875em;word-break:break-word;min-width:0}.player-blank-feedback{display:inline-block;font-size:.8em;font-weight:500;line-height:1.3;padding:calc(2px * var(--edp-scale, 1)) calc(8px * var(--edp-scale, 1));border-radius:999px;word-break:break-word;min-width:0;background:var(--ui-muted, #f5f4f1);color:var(--ink-soft, #565b66)}.player-blank-feedback--correct{background:var(--ok-soft, #ecf8f0);color:var(--ok, #1f8a4c)}.player-blank-feedback--incorrect{background:var(--pen-soft, #fdeeec);color:var(--pen, #d23b2b)}.player-blank-hint-btn{width:calc(1rem * var(--edp-scale, 1));height:calc(1rem * var(--edp-scale, 1));border:0;border-radius:999px;background:#fbbf24;color:#fff;font-size:calc(10px * var(--edp-scale, 1));font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s}.player-blank-hint-btn:hover,.player-blank-hint-btn--pinned{background:#f59e0b}.player-blank-hint-pop{position:absolute;bottom:100%;left:50%;transform:translate(-50%);margin-bottom:calc(.5rem * var(--edp-scale, 1));z-index:9999;min-width:calc(180px * var(--edp-scale, 1));max-width:calc(300px * var(--edp-scale, 1));width:max-content;background:#fffbeb;border:1px solid #fde68a;border-radius:calc(14px * var(--edp-scale, 1));box-shadow:0 8px 24px #92400e2e;padding:calc(.5rem * var(--edp-scale, 1)) calc(.75rem * var(--edp-scale, 1));font-size:calc(.875rem * var(--edp-scale, 1));color:#78350f}.matching-player-hintrow{display:flex;justify-content:flex-start;margin-bottom:calc(.4rem * var(--edp-scale, 1))}.player-choice-blank{display:inline-flex;align-items:center;justify-content:center;min-width:4ch;padding:calc(.1rem * var(--edp-scale, 1)) calc(.5rem * var(--edp-scale, 1));border:2px dashed var(--line-strong, #d6d3cc);border-radius:calc(.5rem * var(--edp-scale, 1));color:var(--ink-faint, #8d93a0);background:transparent;transition:border-color .15s,background .15s,transform .15s,color .15s;vertical-align:middle}.player-choice-blank--target{border-color:var(--ink, #1d2025);background:var(--ui-muted, #f5f4f1)}.player-choice-blank--over{border-style:solid;border-color:var(--ink, #1d2025);background:var(--ui-muted, #f5f4f1);transform:scale(1.05)}.player-choice-blank--filled{border-style:solid;border-color:var(--ink, #1d2025);background:var(--ui-muted, #f5f4f1);color:var(--ink, #1d2025);cursor:pointer}.player-choice-blank--correct,.player-choice-blank--partial{border-style:solid;border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0);color:var(--ok, #1f8a4c)}.player-choice-blank--incorrect{border-style:solid;border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec);color:var(--pen, #d23b2b)}.player-choice-blank__clear{margin-inline-start:calc(.25rem * var(--edp-scale, 1));opacity:0;font-size:calc(.75rem * var(--edp-scale, 1));line-height:1;transition:opacity .12s}.player-choice-blank--filled:hover .player-choice-blank__clear{opacity:.6}.player-word-bank{margin:calc(1rem * var(--edp-scale, 1)) 0;position:relative;border:1px solid var(--line, #e7e5e0);border-radius:calc(14px * var(--edp-scale, 1));background:var(--ui-muted, #f5f4f1);padding:calc(.75rem * var(--edp-scale, 1)) calc(1rem * var(--edp-scale, 1))}.player-word-bank__label{margin-bottom:calc(.5rem * var(--edp-scale, 1));font-size:.7em;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft, #565b66);user-select:none}.player-word-bank__items{display:flex;flex-wrap:wrap;gap:calc(.5rem * var(--edp-scale, 1))}.player-word-bank__items--grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(calc(10rem * var(--edp-scale, 1)),1fr));gap:calc(.5rem * var(--edp-scale, 1))}.player-bank-pill{display:inline-block;padding:calc(.35rem * var(--edp-scale, 1)) calc(.75rem * var(--edp-scale, 1));border:1px solid var(--line-strong, #d6d3cc);border-radius:999px;background:var(--card, #ffffff);color:var(--ink, #1d2025);user-select:none;touch-action:manipulation;cursor:grab;transition:border-color .15s,background .15s,box-shadow .15s}.player-bank-pill:hover{border-color:var(--ink, #1d2025);background:var(--ui-muted, #f5f4f1)}.player-bank-pill--dragging{opacity:.5;cursor:grabbing;box-shadow:0 8px 24px #1d20252e}.exercise-runtime{font-family:var(--brand-font, "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif);font-size:calc(1.25rem * var(--edp-scale, 1));line-height:1.6;color:#1f2937}.exercise-runtime input,.exercise-runtime textarea{font-family:inherit}@media(min-width:640px){.exercise-runtime{font-size:calc(1.5rem * var(--edp-scale, 1))}}@media(min-width:768px){.exercise-runtime{font-size:calc(1.5rem * var(--edp-scale, 1))}}@media(min-width:1024px){.exercise-runtime{font-size:calc(2.25rem * var(--edp-scale, 1))}}@media(min-width:1280px){.exercise-runtime{font-size:calc(2.25rem * var(--edp-scale, 1))}}.exercise-runtime :lang(ar),.exercise-runtime [lang=ar],.exercise-runtime [dir=rtl]{direction:rtl;font-family:Arial,Scheherazade New,Amiri,sans-serif;text-align:right}.exercise-runtime p{margin:.5em 0;min-height:1.5em}.exercise-runtime p:empty:after{content:"\\a0";display:inline-block;min-height:1em}.exercise-runtime strong{font-weight:600;color:inherit}.exercise-runtime em{font-style:italic}.exercise-runtime ul,.exercise-runtime ol{list-style:revert;margin-left:calc(1.25rem * var(--edp-scale, 1));padding-left:0}.exercise-runtime img{max-width:100%;height:auto;vertical-align:middle;display:inline-block;margin:0 calc(4px * var(--edp-scale, 1))}.exercise-runtime .inline-math{display:inline-block;vertical-align:middle;margin:0 calc(2px * var(--edp-scale, 1))}.exercise-runtime .math-formula{display:flex;justify-content:center;margin:1em 0}.choice-set-player{margin:calc(1rem * var(--edp-scale, 1)) 0}.choice-set-player__prompt{font-weight:600;margin-bottom:calc(.75rem * var(--edp-scale, 1));color:#374151}.choice-set-player__prompt-hint{margin-left:calc(.5rem * var(--edp-scale, 1));font-size:calc(.875rem * var(--edp-scale, 1));opacity:.7;font-weight:400}.choice-set-player__choices{display:flex;flex-direction:column;gap:calc(.75rem * var(--edp-scale, 1))}.choice-set-player__choices--grid{display:grid;gap:calc(.75rem * var(--edp-scale, 1));grid-template-columns:1fr}@media(min-width:640px){.choice-set-player__choices--grid{grid-template-columns:repeat(2,1fr)}}.choice-set-player--inline{display:inline-flex;align-items:center;gap:calc(.5rem * var(--edp-scale, 1));flex-wrap:wrap}.choice-set-player--inline .player-choice{width:auto;padding:calc(.5rem * var(--edp-scale, 1)) calc(1rem * var(--edp-scale, 1))}.player-choice:focus-visible{outline:2px solid var(--ink, #1d2025);outline-offset:2px}.player-blank-input:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}@media(prefers-contrast:high){.player-choice{border-width:3px}.player-choice--correct{border-color:#15803d}.player-choice--incorrect{border-color:#991b1b}}@media(prefers-reduced-motion:reduce){.animate-shake,.animate-hop,.animate-wobble{animation:none}.player-choice{transition:none}}@media print{.exercise-runtime{font-size:12pt;color:#000}.player-choice{border:1px solid black;background-color:#fff;page-break-inside:avoid}.player-choice--correct:after{content:" \\2713";font-weight:700}.player-choice--incorrect:after{content:" \\2717";font-weight:700}}.matching-player{margin:calc(1rem * var(--edp-scale, 1)) 0}.matching-player-feedback{display:flex;align-items:center;gap:calc(.45rem * var(--edp-scale, 1));margin-top:calc(.6rem * var(--edp-scale, 1));padding:calc(.55rem * var(--edp-scale, 1)) calc(.75rem * var(--edp-scale, 1));border:1px solid var(--line, #e7e5e0);border-radius:calc(.625rem * var(--edp-scale, 1));font-size:calc(.85rem * var(--edp-scale, 1));font-weight:600}.matching-player-feedback--correct{color:var(--ok, #1f8a4c);border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0)}.matching-player-feedback--partial{color:var(--almost-ink, #8a5a08);border-color:var(--almost, #c8810e);background:var(--almost-soft, #fbf1dc)}.matching-player-feedback--incorrect{color:var(--pen, #d23b2b);border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec)}.matching-player-score{margin-inline-start:auto;font-family:var(--font-hand, "Caveat", cursive);font-size:calc(1.5rem * var(--edp-scale, 1));line-height:1}.matching-player__instruction{display:none}.matching-player__arena{position:relative;display:flex;flex-direction:column;gap:calc(.5rem * var(--edp-scale, 1))}.matching-player__arena--dragging{user-select:none;touch-action:none}.matching-player__svg{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:1}.matching-player__columns{display:grid;grid-template-columns:1fr 1fr;gap:calc(5rem * var(--edp-scale, 1));align-items:start;position:relative}.matching-player__column{display:flex;flex-direction:column;gap:calc(.5rem * var(--edp-scale, 1))}.matching-player__item{display:flex;align-items:center;flex-wrap:wrap;gap:calc(.5rem * var(--edp-scale, 1));width:100%;padding:calc(.75rem * var(--edp-scale, 1)) calc(1rem * var(--edp-scale, 1));border:2px solid var(--line, #e7e5e0);border-radius:calc(.625rem * var(--edp-scale, 1));background:var(--card, #ffffff);text-align:left;transition:border-color .15s,background .15s,box-shadow .15s,transform .1s;font-size:inherit;font-family:inherit;color:var(--ink, #1d2025);min-height:calc(52px * var(--edp-scale, 1));user-select:none;-webkit-tap-highlight-color:transparent}.matching-player__item:not(.matching-player__item--disabled){cursor:grab}.matching-player__item:not(.matching-player__item--disabled):active{cursor:grabbing}.matching-player__item:hover:not(.matching-player__item--disabled){border-color:var(--line-strong, #d6d3cc);background:var(--ui-muted, #f5f4f1)}.matching-player__item--selected{border-color:var(--ink, #1d2025)!important;background:var(--ui-muted, #f5f4f1)!important;box-shadow:0 0 0 3px #1d20251f;transform:scale(1.02)}.matching-player__item--available{border-color:var(--ink-faint, #8d93a0);border-style:dashed}.matching-player__item--available:hover{border-color:var(--ink, #1d2025);border-style:solid;background:var(--ui-muted, #f5f4f1)}.matching-player__item--matched{border-width:2px;border-color:var(--ink, #1d2025)}.matching-player__item--matched:hover:not(.matching-player__item--disabled){background:var(--ui-muted, #f5f4f1)}.matching-player__item--correct,.matching-player__item--correct:hover{border-color:var(--ok, #1f8a4c)!important;background:var(--ok-soft, #ecf8f0)!important}.matching-player__item--incorrect,.matching-player__item--incorrect:hover{border-color:var(--pen, #d23b2b)!important;background:var(--pen-soft, #fdeeec)!important}.matching-player__item--disabled{cursor:default;pointer-events:none}.matching-player__item-text{flex:1;min-width:0;line-height:1.4}.matching-player__item-text p{margin:0}.matching-player__pair-num{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:calc(22px * var(--edp-scale, 1));height:calc(22px * var(--edp-scale, 1));border-radius:50%;font-size:calc(.7rem * var(--edp-scale, 1));font-weight:700;line-height:1;background:var(--ink, #1d2025);color:#fff}.matching-player__item--correct .matching-player__pair-num{background:var(--ok, #1f8a4c)}.matching-player__item--incorrect .matching-player__pair-num{background:var(--pen, #d23b2b)}.matching-player__connector{flex-shrink:0;color:var(--ink-faint, #8d93a0);display:flex;align-items:center;transition:color .2s,transform .2s;border-radius:50%}.matching-player__item:hover .matching-player__connector{color:var(--ink, #1d2025);transform:scale(1.25)}.matching-player__connector--left{order:10;margin-left:calc(6px * var(--edp-scale, 1))}.matching-player__connector--right{order:-1;margin-right:calc(6px * var(--edp-scale, 1))}.matching-player__connector svg{width:calc(18px * var(--edp-scale, 1));height:calc(18px * var(--edp-scale, 1))}.matching-player__correct-hint{width:100%;order:20;font-weight:700;color:var(--ok, #1f8a4c);font-size:.82em;line-height:1.4;padding-top:.1em;word-break:break-word}.matching-player__correct-hint p{display:inline;margin:0}.matching-player__item:focus-visible{outline:3px solid var(--ink, #1d2025);outline-offset:2px}.blank-correct-hint{display:inline;font-weight:700;color:var(--ok, #1f8a4c);font-size:.875em;margin-left:.3em;word-break:break-word}@keyframes matching-pulse{0%{opacity:.5}to{opacity:1}}@media(prefers-reduced-motion:reduce){.matching-player__item{transition:none}}@media(max-width:600px){:where(.matching-player:not(.matching-player--box)) .matching-player__columns{gap:calc(1rem * var(--edp-scale, 1))}:where(.matching-player:not(.matching-player--box)) .matching-player__item{padding:calc(.5rem * var(--edp-scale, 1)) calc(.6rem * var(--edp-scale, 1));min-height:calc(44px * var(--edp-scale, 1));font-size:calc(.875rem * var(--edp-scale, 1));gap:calc(.35rem * var(--edp-scale, 1))}.matching-player__item:not(.matching-player__item--disabled){cursor:pointer}.matching-player__item:not(.matching-player__item--disabled):active{cursor:pointer}:where(.matching-player:not(.matching-player--box)) .matching-player__connector svg{width:calc(15px * var(--edp-scale, 1));height:calc(15px * var(--edp-scale, 1))}}.matching-player--box{container-type:inline-size}@container (max-width: 33.3em){.matching-player--box .matching-player__columns{gap:calc(1rem * var(--edp-scale, 1))}.matching-player--box .matching-player__item{padding:calc(.5rem * var(--edp-scale, 1)) calc(.6rem * var(--edp-scale, 1));min-height:calc(44px * var(--edp-scale, 1));font-size:calc(.875rem * var(--edp-scale, 1));gap:calc(.35rem * var(--edp-scale, 1))}.matching-player--box .matching-player__connector svg{width:calc(15px * var(--edp-scale, 1));height:calc(15px * var(--edp-scale, 1))}}.math-response-player{margin:calc(.5rem * var(--edp-scale, 1)) 0}.player-math-field{border:2px solid var(--line, #e7e5e0);border-radius:calc(.625rem * var(--edp-scale, 1));padding:calc(.375rem * var(--edp-scale, 1)) calc(.5rem * var(--edp-scale, 1));background:var(--card, #ffffff);transition:border-color .2s ease,background .2s ease}.player-math-field:focus-within{border-color:var(--ink, #1d2025)}.player-math-field--readonly{background:var(--ui-muted, #f5f4f1)}.player-math-field__input{width:100%;min-height:calc(2.5rem * var(--edp-scale, 1));font-size:calc(1.1rem * var(--edp-scale, 1));outline:none;--primary: var(--ink, #1d2025);--caret-color: var(--ink, #1d2025);--selection-background-color: var(--ink-soft, #565b66);--contains-highlight-background-color: var(--ui-muted, #f5f4f1)}.player-math-field__input::part(virtual-keyboard-toggle),.player-math-field__input::part(menu-toggle){color:var(--ink-faint, #8d93a0)}.player-math-field__fallback{width:100%;border:none;outline:none;font-size:calc(1rem * var(--edp-scale, 1));font-family:monospace;background:transparent;color:var(--ink, #1d2025)}.player-math-field--correct{border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0)}.player-math-field--incorrect{border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec)}.player-math-field--validating{border-color:var(--ink-faint, #8d93a0)}.player-math-feedback{margin-top:calc(.4rem * var(--edp-scale, 1));font-size:calc(.8rem * var(--edp-scale, 1));font-weight:600;display:flex;align-items:center;gap:calc(.4rem * var(--edp-scale, 1))}.player-math-feedback--correct{color:var(--ok, #1f8a4c)}.player-math-feedback--incorrect{color:var(--pen, #d23b2b)}.player-math-feedback--validating{color:var(--ink-soft, #565b66)}.player-math-score{margin-inline-start:auto;font-family:var(--font-hand, "Caveat", cursive);font-size:calc(1.5rem * var(--edp-scale, 1));line-height:1;color:var(--ok, #1f8a4c)}.player-math-spinner{display:inline-block;width:calc(.9rem * var(--edp-scale, 1));height:calc(.9rem * var(--edp-scale, 1));border:2px solid var(--ink-faint, #8d93a0);border-top-color:transparent;border-radius:50%;animation:player-math-spin .7s linear infinite}@keyframes player-math-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.player-math-spinner{animation:none}}.player-ai{margin:calc(1rem * var(--edp-scale, 1)) 0;padding:calc(.5rem * var(--edp-scale, 1));display:flex;flex-direction:column;gap:calc(.75rem * var(--edp-scale, 1));border:1px solid var(--line, #e7e5e0);border-radius:calc(.875rem * var(--edp-scale, 1));background:var(--ui-muted, #f5f4f1)}.player-ai-counts{display:flex;justify-content:flex-end;gap:calc(.5rem * var(--edp-scale, 1))}.player-ai-count{font-size:calc(.75rem * var(--edp-scale, 1));font-weight:600;padding:calc(.1rem * var(--edp-scale, 1)) calc(.5rem * var(--edp-scale, 1));border-radius:999px;background:var(--card, #ffffff);border:1px solid var(--line, #e7e5e0);color:var(--ink-soft, #565b66)}.player-ai-count--over{color:var(--pen, #d23b2b);border-color:var(--pen, #d23b2b)}.player-ai-count--min{color:var(--ink-faint, #8d93a0)}.player-ai-input{width:100%;box-sizing:border-box;padding:calc(.5rem * var(--edp-scale, 1)) calc(.75rem * var(--edp-scale, 1));font-size:calc(1rem * var(--edp-scale, 1));border:1px solid var(--line-strong, #d6d3cc);border-radius:calc(.625rem * var(--edp-scale, 1));background:var(--card, #ffffff);color:var(--ink, #1d2025);outline:none;transition:border-color .2s ease,background .2s ease}.player-ai-input::placeholder{color:var(--ink-faint, #8d93a0)}.player-ai-input:focus{border-color:var(--ink, #1d2025)}.player-ai-input--multiline{min-height:calc(120px * var(--edp-scale, 1));resize:vertical}.player-ai-input:disabled{cursor:default}.player-ai-input--correct{border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0)}.player-ai-input--partial{border-color:var(--almost, #c8810e);border-style:dashed;background:var(--almost-soft, #fbf1dc)}.player-ai-input--incorrect{border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec)}.player-ai-feedback{display:flex;flex-direction:column;gap:calc(.25rem * var(--edp-scale, 1));padding:calc(.75rem * var(--edp-scale, 1));border-radius:calc(.5rem * var(--edp-scale, 1));font-size:calc(.875rem * var(--edp-scale, 1));border:1px solid var(--line, #e7e5e0);background:var(--card, #ffffff);color:var(--ink, #1d2025)}.player-ai-feedback--correct{border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0);color:var(--ok, #1f8a4c)}.player-ai-feedback--partial{border-color:var(--almost, #c8810e);background:var(--almost-soft, #fbf1dc);color:var(--almost-ink, #8a5a08)}.player-ai-feedback--incorrect{border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec);color:var(--pen, #d23b2b)}.player-ai-message{margin:0}.player-ai-score-row{display:flex;justify-content:flex-end}.player-ai-score{font-family:var(--font-hand, "Caveat", cursive);font-size:calc(1.5rem * var(--edp-scale, 1));font-weight:600;line-height:1;padding:0 calc(.35rem * var(--edp-scale, 1));color:inherit}.player-ai-validating{display:flex;align-items:center;gap:calc(.5rem * var(--edp-scale, 1));padding:calc(.25rem * var(--edp-scale, 1)) 0;color:var(--ink-soft, #565b66)}.player-ai-spinner{display:inline-block;width:calc(.9rem * var(--edp-scale, 1));height:calc(.9rem * var(--edp-scale, 1));border:2px solid var(--ink-faint, #8d93a0);border-top-color:transparent;border-radius:999px;animation:ai-answer-spin .7s linear infinite}@keyframes ai-answer-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.player-ai-spinner{animation:none}}.player-or-field--pre{border-color:var(--line-strong, #d6d3cc)!important}.player-or-field--correct{border-color:var(--ok, #1f8a4c)!important;background:var(--ok-soft, #ecf8f0)!important}.player-or-field--partial,.player-or-field--review{border-color:var(--almost, #c8810e)!important;background:var(--almost-soft, #fbf1dc)!important}.player-or-field--review{border-style:dashed!important}.player-or-field--incorrect{border-color:var(--pen, #d23b2b)!important;background:var(--pen-soft, #fdeeec)!important}.edp-scaled .text-xs{font-size:calc(.75rem * var(--edp-scale, 1));line-height:calc(1 / .75)}.edp-scaled .text-sm{font-size:calc(.875rem * var(--edp-scale, 1));line-height:calc(1.25 / .875)}.edp-scaled .text-base{font-size:calc(1rem * var(--edp-scale, 1));line-height:1.5}.edp-scaled .text-lg{font-size:calc(1.125rem * var(--edp-scale, 1));line-height:calc(1.75 / 1.125)}.edp-scaled .text-\\[10px\\]{font-size:calc(10px * var(--edp-scale, 1))}.edp-scaled .prose-sm{font-size:calc(.875rem * var(--edp-scale, 1))}.edp-scaled .p-2{padding:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .p-3{padding:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .p-4{padding:calc(1rem * var(--edp-scale, 1))}.edp-scaled .p-6{padding:calc(1.5rem * var(--edp-scale, 1))}.edp-scaled .pb-1{padding-bottom:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .pt-1\\.5{padding-top:calc(.375rem * var(--edp-scale, 1))}.edp-scaled .px-1\\.5{padding-left:calc(.375rem * var(--edp-scale, 1));padding-right:calc(.375rem * var(--edp-scale, 1))}.edp-scaled .px-2{padding-left:calc(.5rem * var(--edp-scale, 1));padding-right:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .px-3{padding-left:calc(.75rem * var(--edp-scale, 1));padding-right:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .px-4{padding-left:calc(1rem * var(--edp-scale, 1));padding-right:calc(1rem * var(--edp-scale, 1))}.edp-scaled .px-5{padding-left:calc(1.25rem * var(--edp-scale, 1));padding-right:calc(1.25rem * var(--edp-scale, 1))}.edp-scaled .px-6{padding-left:calc(1.5rem * var(--edp-scale, 1));padding-right:calc(1.5rem * var(--edp-scale, 1))}.edp-scaled .py-0\\.5{padding-top:calc(.125rem * var(--edp-scale, 1));padding-bottom:calc(.125rem * var(--edp-scale, 1))}.edp-scaled .py-1{padding-top:calc(.25rem * var(--edp-scale, 1));padding-bottom:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .py-1\\.5{padding-top:calc(.375rem * var(--edp-scale, 1));padding-bottom:calc(.375rem * var(--edp-scale, 1))}.edp-scaled .py-2{padding-top:calc(.5rem * var(--edp-scale, 1));padding-bottom:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .py-3{padding-top:calc(.75rem * var(--edp-scale, 1));padding-bottom:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .mb-1{margin-bottom:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .mb-2{margin-bottom:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .ml-1{margin-left:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .ml-2{margin-left:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .mr-2{margin-right:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .mt-0\\.5{margin-top:calc(.125rem * var(--edp-scale, 1))}.edp-scaled .mt-1{margin-top:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .mt-1\\.5{margin-top:calc(.375rem * var(--edp-scale, 1))}.edp-scaled .mt-3{margin-top:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .mx-1{margin-left:calc(.25rem * var(--edp-scale, 1));margin-right:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .my-3{margin-top:calc(.75rem * var(--edp-scale, 1));margin-bottom:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .my-4{margin-top:calc(1rem * var(--edp-scale, 1));margin-bottom:calc(1rem * var(--edp-scale, 1))}.edp-scaled .gap-1{gap:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .gap-1\\.5{gap:calc(.375rem * var(--edp-scale, 1))}.edp-scaled .gap-2{gap:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .gap-3{gap:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .gap-x-1{column-gap:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .gap-y-0\\.5{row-gap:calc(.125rem * var(--edp-scale, 1))}.edp-scaled .w-6{width:calc(1.5rem * var(--edp-scale, 1))}.edp-scaled .w-16{width:calc(4rem * var(--edp-scale, 1))}.edp-scaled .h-6{height:calc(1.5rem * var(--edp-scale, 1))}.edp-scaled .h-8{height:calc(2rem * var(--edp-scale, 1))}.edp-scaled .h-16{height:calc(4rem * var(--edp-scale, 1))}.edp-scaled .max-h-48{max-height:calc(12rem * var(--edp-scale, 1))}.edp-scaled .right-1{right:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .right-3{right:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .bottom-2{bottom:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .max-w-\\[160px\\]{max-width:calc(160px * var(--edp-scale, 1))}.edp-scaled .max-w-\\[200px\\]{max-width:calc(200px * var(--edp-scale, 1))}.edp-scaled .max-w-\\[240px\\]{max-width:calc(240px * var(--edp-scale, 1))}.edp-scaled .min-h-\\[100px\\]{min-height:calc(100px * var(--edp-scale, 1))}.edp-scaled .min-h-\\[120px\\]{min-height:calc(120px * var(--edp-scale, 1))}.edp-scaled .\\[\\&_\\.ProseMirror\\]\\:min-h-\\[80px\\] .ProseMirror{min-height:calc(80px * var(--edp-scale, 1))}.math-inline,.math-block,.math-response-player,.katex,.katex-display{direction:ltr;unicode-bidi:isolate}.exercise-shared-context{font-size:calc(1.125rem * var(--edp-scale, 1));margin-bottom:calc(1rem * var(--edp-scale, 1))}.exercise-reference-cue{display:flex;flex-wrap:wrap;align-items:baseline;gap:calc(.25rem * var(--edp-scale, 1)) calc(.5rem * var(--edp-scale, 1));margin:0 0 calc(1rem * var(--edp-scale, 1));padding:calc(.625rem * var(--edp-scale, 1)) calc(.875rem * var(--edp-scale, 1));border:1px solid var(--line, #e7e5e0);border-inline-start:3px solid var(--ink-soft, #565b66);border-radius:calc(.625rem * var(--edp-scale, 1));background:var(--ui-muted, #f5f4f1);color:var(--ink-soft, #565b66);font-size:calc(1rem * var(--edp-scale, 1));line-height:1.5}.exercise-reference-cue__link{font:inherit;font-weight:600;color:var(--ink, #1d2025);background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.exercise-reference-cue__link:hover{text-decoration-thickness:2px}.exercise-reference-cue__link:focus-visible{outline:2px solid var(--ink, #1d2025);outline-offset:2px;border-radius:2px}.exercise-reference-cue__arrow{display:inline-block;margin-inline-start:.25em}.exercise-reference-cue__arrow:dir(rtl){transform:scaleX(-1)}
|
|
4111
|
+
`}),(0,ba.jsx)("div",{style:{background:t},className:`${l?"absolute":"fixed"} inset-0 z-[60] flex items-center justify-center`,children:(0,ba.jsxs)("div",{className:"flex flex-col items-center gap-5 bg-white rounded-2xl shadow-2xl px-10 py-8 max-w-xs text-center",children:[(()=>{if(o)return(0,ba.jsx)("img",{src:o,alt:"",className:"w-24 h-24 object-contain"});switch(i){case"dots":return(0,ba.jsx)(Ave,{accent:r});case"pulse":return(0,ba.jsx)(Lve,{accent:r});case"bars":return(0,ba.jsx)(Tve,{accent:r});default:return(0,ba.jsx)(_ve,{accent:r})}})(),(0,ba.jsx)("p",{className:"text-sm font-semibold text-slate-800",children:n}),s&&(0,ba.jsx)("p",{className:"text-xs text-slate-500 leading-snug",children:a})]})})]}):null}var Lo=Pe(kt());var Hr=Pe($t());function qD(e){return e.exercises.flatMap((t,r)=>t.sharedContext&&Jy(t.sharedContext)?[{id:t.id,index:r,content:t.sharedContext}]:[])}var Ate=()=>{var e;return typeof window!="undefined"&&((e=window.matchMedia)==null?void 0:e.call(window,"(prefers-reduced-motion: reduce)").matches)};function Eve(e){e.removeAttribute("data-flash"),e.offsetWidth,e.setAttribute("data-flash","true"),setTimeout(()=>e.removeAttribute("data-flash"),1200)}function Lte({assessment:e,isSubmitted:t,setAnswers:r,validationFeedback:n,renderExercise:a,renderSeparator:i,primaryColor:o,contained:s=!1,locale:l,contentMaxWidth:u,t:c,footer:f}){let[d,p]=(0,Lo.useState)(!1),b=e.annex,v=(b==null?void 0:b.tabLabel)||c("annexDocuments"),k=(0,Lo.useMemo)(()=>qD(e),[e]),w=(0,Lo.useRef)(null),S=(0,Lo.useRef)(null),T=(0,Lo.useRef)(null),I=(0,Lo.useRef)(null),B=()=>{var re,xe;return((xe=(re=w.current)==null?void 0:re.getClientRects().length)!=null?xe:0)>0},O=(0,Lo.useCallback)((re,xe)=>{let oe=re==null?void 0:re.querySelector(`[data-reference-for="${CSS.escape(xe)}"]`);if(!re||!oe)return;let le=oe.getBoundingClientRect().top-re.getBoundingClientRect().top+re.scrollTop-12;re.scrollTo({top:le,behavior:Ate()?"auto":"smooth"}),Eve(oe)},[]),N=(0,Lo.useCallback)(re=>{if(B()){O(S.current,re);return}p(!0),requestAnimationFrame(()=>requestAnimationFrame(()=>O(I.current,re)))},[O]),j=re=>{var le;let xe=B()?w.current:T.current;B()||p(!1);let oe=Array.from((le=xe==null?void 0:xe.querySelectorAll(`[data-exercise-id="${CSS.escape(re)}"]`))!=null?le:[]).find(Se=>Se.getClientRects().length>0);oe==null||oe.scrollIntoView({behavior:Ate()?"auto":"smooth",block:"start"})};(0,Lo.useEffect)(()=>{let re=w.current;if(!re||k.length===0||typeof IntersectionObserver=="undefined")return;let xe=new Set(k.map(Se=>Se.id)),oe=null,le=new IntersectionObserver(Se=>{var me;if(!B())return;let _e=Se.filter(Ue=>{var Le;return Ue.isIntersecting&&xe.has((Le=Ue.target.dataset.exerciseId)!=null?Le:"")}).sort((Ue,Le)=>Ue.boundingClientRect.top-Le.boundingClientRect.top)[0],de=(me=_e==null?void 0:_e.target)==null?void 0:me.dataset.exerciseId;!de||de===oe||(oe=de,O(S.current,de))},{root:re,rootMargin:"0px 0px -60% 0px"});return re.querySelectorAll("[data-exercise-id]").forEach(Se=>le.observe(Se)),()=>le.disconnect()},[k,O]);let H=(0,Lo.useMemo)(()=>({label:v,showExerciseReference:N}),[v,N]),Y=(0,Hr.jsxs)(Hr.Fragment,{children:[b==null?void 0:b.items.map(re=>(0,Hr.jsx)(Zy,{item:re},re.id)),b!=null&&b.items.length&&k.length?(0,Hr.jsx)("div",{className:"border-t border-[#e7e5e0]"}):null,k.map(re=>(0,Hr.jsxs)("section",{"data-reference-for":re.id,className:"-mx-3 flex flex-col gap-2 rounded-[10px] px-3 py-2 transition-colors duration-700 data-[flash=true]:bg-[#fbf1dc] data-[flash=true]:duration-150",children:[(0,Hr.jsx)("button",{type:"button",onClick:()=>j(re.id),className:"self-start cursor-pointer text-xs font-bold uppercase tracking-widest text-[#565b66] underline-offset-4 hover:text-[#1d2025] hover:underline focus-visible:outline-2 focus-visible:outline-[#1d2025] rounded-sm",children:c("exercise",{index:re.index+1})}),(0,Hr.jsx)(F9,{content:re.content})]},re.id))]}),V=(0,Hr.jsx)(yf,{assessment:e,onAnswersChange:t?void 0:r,validationFeedback:n,renderExercise:a,renderSeparator:i,locale:l});return(0,Hr.jsx)(N9,{value:H,children:(0,Hr.jsxs)("div",{className:Ao("@container flex-1 min-h-0 flex",s&&"relative"),children:[(0,Hr.jsxs)("div",{ref:w,className:"hidden @6xl:flex flex-1 gap-4 p-4 bg-[#f5f4f1] items-start overflow-y-auto",children:[(0,Hr.jsxs)("div",{className:"flex-1 sticky top-4 max-h-[calc(100svh-6rem)] flex flex-col bg-white rounded-[14px] border border-[#e7e5e0] shadow-sm overflow-hidden",children:[(0,Hr.jsxs)("div",{className:"flex items-center gap-2 px-5 py-3 border-b border-[#e7e5e0] flex-shrink-0",children:[(0,Hr.jsx)(Pc,{size:14,className:"text-[#8d93a0]"}),(0,Hr.jsx)("span",{className:"text-xs font-bold text-[#565b66] uppercase tracking-widest",children:v})]}),(0,Hr.jsx)("div",{ref:S,className:"flex-1 overflow-y-auto px-6 py-5 flex flex-col gap-6",children:Y})]}),(0,Hr.jsx)("div",{className:"w-px bg-[#e7e5e0] flex-shrink-0 self-stretch my-1 rounded-full"}),(0,Hr.jsx)("div",{className:"flex-1 bg-white rounded-[14px] border border-[#e7e5e0] shadow-sm",children:(0,Hr.jsxs)("div",{className:"px-6 py-5 flex flex-col gap-4",children:[V,f]})})]}),(0,Hr.jsxs)("div",{className:"@6xl:hidden flex-1 relative overflow-hidden",children:[(0,Hr.jsx)("div",{ref:T,className:"absolute inset-0 overflow-y-auto",children:(0,Hr.jsxs)("div",{className:"mx-auto px-5 py-5 flex flex-col gap-4",style:{maxWidth:u},children:[V,f]})}),d&&(0,Hr.jsx)("div",{className:Ao("inset-0 z-30 bg-black/25",s?"absolute":"fixed"),onClick:()=>p(!1)}),(0,Hr.jsxs)("div",{role:"dialog","aria-label":v,"aria-hidden":!d,className:Ao("top-1/2 start-2 -translate-y-1/2 z-40 w-[88%] bg-[#f1efe9] rounded-2xl shadow-2xl flex flex-col overflow-hidden transition-transform duration-300 ease-in-out",s?"absolute":"fixed",d?"translate-x-0":"-translate-x-[110%] rtl:translate-x-[110%]"),children:[(0,Hr.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 flex-shrink-0",children:[(0,Hr.jsx)("span",{className:"text-sm font-bold text-[#1d2025]",children:v}),(0,Hr.jsx)("button",{onClick:()=>p(!1),"aria-label":c("close"),className:"p-1 text-[#8d93a0] hover:text-[#1d2025] rounded-lg transition-colors",children:(0,Hr.jsx)(Wi,{size:18})})]}),(0,Hr.jsx)("div",{ref:I,className:"overflow-y-auto max-h-[calc(100vh-8rem)] px-5 pb-5 flex flex-col gap-5",children:Y})]})]}),!d&&(0,Hr.jsxs)("button",{onClick:()=>p(!0),"aria-label":v,style:ie({transform:"translateY(-50%)"},o?{backgroundColor:o}:{}),className:Ao("@6xl:hidden top-1/2 start-0 z-20 flex flex-col items-center gap-1 py-3 px-1.5 bg-[#1d2025] text-white text-[10px] font-bold uppercase tracking-wider rounded-e-lg shadow-md hover:bg-[#31353c] transition-colors",s?"absolute":"fixed"),children:[(0,Hr.jsx)(Pc,{size:12}),(0,Hr.jsx)("span",{style:{writingMode:"vertical-rl",transform:"rotate(180deg)"},children:v})]})]})})}var Tte=Pe(kt());var An=Pe($t());function Ete({assessment:e,isSubmitted:t,setAnswers:r,validationFeedback:n,renderExercise:a,renderSeparator:i,primaryColor:o,contained:s=!1,locale:l,contentMaxWidth:u,t:c,onAddAnnex:f,footer:d}){let[p,b]=(0,Tte.useState)(!1),v=(0,An.jsx)(yf,{assessment:e,onAnswersChange:t?void 0:r,validationFeedback:n,renderExercise:a,renderSeparator:i,locale:l});if(p)return(0,An.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,An.jsxs)("div",{className:"mx-auto p-6 flex flex-col gap-4",style:{maxWidth:u},children:[v,d]})});let k=T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),f())},w=T=>(0,An.jsxs)("span",{style:o?{backgroundColor:o}:void 0,className:Ao("flex-none inline-flex items-center gap-1.5 rounded-lg bg-[#1d2025] text-white font-semibold shadow-sm group-hover:shadow-md transition-shadow",T?"px-3 py-1.5 text-xs":"mt-1 px-3.5 py-2 text-xs"),children:[(0,An.jsx)(y2,{size:13}),c("annexEmptyCta")]}),S=T=>(0,An.jsx)("button",{type:"button",onClick:I=>{I.stopPropagation(),b(!0)},"aria-label":c("annexEmptyDismiss"),title:c("annexEmptyDismiss"),className:Ao("flex-none flex items-center justify-center w-7 h-7 rounded-lg text-[#8d93a0] hover:text-[#1d2025] hover:bg-[#f1efe9] transition-colors cursor-pointer",T&&"absolute top-2 end-2 z-10"),children:(0,An.jsx)(Wi,{size:15})});return(0,An.jsxs)("div",{className:Ao("@container flex-1 min-h-0 flex",s&&"relative"),children:[(0,An.jsxs)("div",{className:"hidden @6xl:flex flex-1 gap-4 p-4 bg-[#f5f4f1] items-start overflow-y-auto",children:[(0,An.jsx)("div",{className:"flex-1 sticky top-4 flex min-h-[200px] max-h-[calc(100svh-6rem)]",children:(0,An.jsxs)("div",{role:"button",tabIndex:0,onClick:f,onKeyDown:k,className:"group relative flex-1 w-full flex flex-col items-center justify-center gap-3 text-center rounded-[14px] border-2 border-dashed border-[#d6d3cc] bg-white/60 hover:border-[#8d93a0] hover:bg-white transition-colors cursor-pointer px-6 py-8 outline-none focus-visible:ring-2 focus-visible:ring-[#8d93a0] focus-visible:ring-offset-2",children:[S(!0),(0,An.jsx)("span",{className:"flex items-center justify-center w-11 h-11 rounded-full bg-[#f1efe9] text-[#8d93a0] group-hover:text-[#1d2025] transition-colors",children:(0,An.jsx)(Pc,{size:20})}),(0,An.jsx)("span",{className:"text-sm font-bold text-[#565b66]",children:c("annexEmptyTitle")}),(0,An.jsx)("span",{className:"text-xs text-[#8d93a0] max-w-[32ch] leading-relaxed",children:c("annexEmptyBody")}),w(!1)]})}),(0,An.jsx)("div",{className:"w-px bg-[#e7e5e0] flex-shrink-0 self-stretch my-1 rounded-full"}),(0,An.jsx)("div",{className:"flex-1 bg-white rounded-[14px] border border-[#e7e5e0] shadow-sm",children:(0,An.jsxs)("div",{className:"px-6 py-5 flex flex-col gap-4",children:[v,d]})})]}),(0,An.jsx)("div",{className:"@6xl:hidden flex-1 overflow-y-auto",children:(0,An.jsxs)("div",{className:"mx-auto px-5 py-5 flex flex-col gap-4",style:{maxWidth:u},children:[(0,An.jsxs)("div",{role:"button",tabIndex:0,onClick:f,onKeyDown:k,className:"group flex items-center gap-3 rounded-[14px] border-2 border-dashed border-[#d6d3cc] bg-white/60 hover:border-[#8d93a0] hover:bg-white transition-colors cursor-pointer px-4 py-2.5 outline-none focus-visible:ring-2 focus-visible:ring-[#8d93a0]",children:[(0,An.jsx)("span",{className:"flex-none flex items-center justify-center w-9 h-9 rounded-full bg-[#f1efe9] text-[#8d93a0] group-hover:text-[#1d2025] transition-colors",children:(0,An.jsx)(Pc,{size:16})}),(0,An.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,An.jsx)("div",{className:"text-xs font-bold text-[#565b66]",children:c("annexEmptyTitle")}),(0,An.jsx)("div",{className:"text-[11px] text-[#8d93a0] leading-snug",children:c("annexEmptyBody")})]}),w(!0),S(!1)]}),v,d]})})]})}function q9(e){var r,n;let t=new Map;for(let a of e){let i=new Map;for(let o of a.questions){let s=new Map;for(let l of o.nodeResults){let u=ie(ie(ie({state:l.status,showFeedback:!0,score:l.score},l.feedback!==void 0?{message:l.feedback}:{}),l.displayAnswer!==void 0?{displayAnswer:l.displayAnswer}:{}),l.teacherFeedback!==void 0?{teacherFeedback:l.teacherFeedback}:{});((r=l.detail)==null?void 0:r.type)==="choiceSet"?u.correctChoiceIds=l.detail.correctChoiceIds:((n=l.detail)==null?void 0:n.type)==="matchingSet"&&(u.pairFeedback=l.detail.pairFeedback,u.correctPairings=l.detail.correctPairings),s.set(l.nodeId,u)}i.set(o.questionId,s)}t.set(a.exerciseId,i)}return t}var Dve=new Set(["choiceSet","inlineChoiceSet","blank","aiAnswerInput","matchingSet","openResponseNode","mathResponse","codingResponse"]),Ive=new Set(["blankPool","inlinePool"]);function zve(e){var t,r;switch(e.type){case"choiceSet":case"inlineChoiceSet":return e.answer.selectedIds.length>0;case"blank":return e.answer.mode==="choice"?e.answer.choiceId.length>0:e.answer.text.trim().length>0;case"matchingSet":return e.answer.connections.length>0;case"aiAnswer":return e.answer.text.trim().length>0;case"openResponse":{let n=e.answer;return n.recording||n.files&&n.files.length>0?!0:((r=(t=n.text)==null?void 0:t.wordCount)!=null?r:0)>0}case"mathResponse":return e.answer.latex.trim().length>0;case"codingResponse":return e.answer.source.trim().length>0;default:{let n=e;return!0}}}function Bve(e){let t=0,r=n=>{if(Array.isArray(n)){for(let o of n)r(o);return}if(!n||typeof n!="object")return;let{type:a,content:i}=n;if(typeof a=="string"){if(Dve.has(a)){t+=1;return}if(Ive.has(a))return}i!==void 0&&r(i)};return r(e),t}function Dte(e,t){var a;let r=new Map;for(let i of(a=t==null?void 0:t.exerciseAnswers)!=null?a:[])for(let o of i.questionAnswers){let s=r.get(o.questionId);s||(s=new Set,r.set(o.questionId,s));for(let l of o.answers)zve(l)&&s.add(l.nodeId)}let n=[];return e.exercises.forEach((i,o)=>{i.questions.forEach((s,l)=>{var c,f;let u=Bve(s.content);u!==0&&((f=(c=r.get(s.id))==null?void 0:c.size)!=null?f:0)<u&&n.push({questionId:s.id,exerciseIndex:o,questionIndex:l,only:i.questions.length===1})})}),n}var Rve={exercise:"Exercise {index}",question:"Question {index}",points:"pts","points.one":"pt",submit:"Submit Assessment",submitting:"Submitting...",confirmTitle:"Submit Assessment",confirmDescription:"Are you sure you want to submit? You cannot change your answers after submitting.",unansweredOne:"1 question is not fully answered.",unansweredMany:"{count} questions are not fully answered.",unansweredMore:"and {count} more",confirmSubmit:"Submit",confirmCancel:"Cancel",assessmentPassed:"Assessment passed",assessmentNotPassed:"Assessment not passed",awaitingReview:"Awaiting review",awaitingReviewDesc:"Your teacher is reviewing your open responses. Your final score will be available once grading is complete.",beingMarked:"Being marked",beingMarkedDesc:"Some answers are still being marked. Your final score will be available once every answer is marked.",pendingReview:"Pending review",viewFullReport:"View Full Report",poweredBy:"Powered by Edpire",evaluating:"Evaluating your answers\u2026",aiEvaluating:"Some answers are being reviewed by AI, this may take a few seconds.",reset:"Reset",back:"Back",annexDocuments:"Documents",annexEmptyTitle:"No reference yet",annexEmptyBody:"A text, figure, table or document that stays in view across the whole assessment while students answer.",annexEmptyCta:"Add reference",annexEmptyDismiss:"Hide","timeUp.title":"Time's up","timeUp.submitting":"Submitting your answers\u2026",yourScore:"Your score",answersSaving:"Saving\u2026",answersSaved:"Answers saved",answersNotSaved:"Your answers aren't being saved. Check your connection.",resumeRestored:"Welcome back. Your answers are here.",resumeFresh:"Welcome back.",resumeTimeLeft:"The clock kept running: {minutes} min left.",close:"Close"},Nve={exercise:"Exercice {index}",question:"Question {index}",points:"pts","points.one":"pt",submit:"Soumettre l'\xE9valuation",submitting:"Soumission...",confirmTitle:"Soumettre l'\xE9valuation",confirmDescription:"\xCAtes-vous s\xFBr de vouloir soumettre ? Vous ne pourrez pas modifier vos r\xE9ponses.",unansweredOne:"1 question n'est pas enti\xE8rement remplie.",unansweredMany:"{count} questions ne sont pas enti\xE8rement remplies.",unansweredMore:"et {count} autres",confirmSubmit:"Soumettre",confirmCancel:"Annuler",assessmentPassed:"\xC9valuation r\xE9ussie",assessmentNotPassed:"\xC9valuation non r\xE9ussie",awaitingReview:"En attente de correction",awaitingReviewDesc:"Votre professeur examine vos r\xE9ponses ouvertes. Votre note finale sera disponible une fois la correction termin\xE9e.",beingMarked:"Correction en cours",beingMarkedDesc:"Certaines r\xE9ponses sont encore en cours de correction. Votre note finale sera disponible d\xE8s que toutes les r\xE9ponses seront corrig\xE9es.",pendingReview:"En attente de correction",viewFullReport:"Voir le rapport complet",poweredBy:"Propuls\xE9 par Edpire",evaluating:"\xC9valuation de vos r\xE9ponses\u2026",aiEvaluating:"Certaines r\xE9ponses sont examin\xE9es par l'IA, cela peut prendre quelques secondes.",reset:"R\xE9initialiser",back:"Retour",annexDocuments:"Documents",annexEmptyTitle:"Aucune annexe pour l'instant",annexEmptyBody:"Un texte, une figure, un tableau ou un document qui reste visible pour toute l'\xE9valuation pendant que les \xE9l\xE8ves r\xE9pondent.",annexEmptyCta:"Ajouter une annexe",annexEmptyDismiss:"Masquer","timeUp.title":"Temps \xE9coul\xE9","timeUp.submitting":"Envoi de vos r\xE9ponses\u2026",yourScore:"Votre score",answersSaving:"Enregistrement\u2026",answersSaved:"R\xE9ponses enregistr\xE9es",answersNotSaved:"Vos r\xE9ponses ne sont pas enregistr\xE9es. V\xE9rifiez votre connexion.",resumeRestored:"Bon retour. Vos r\xE9ponses sont l\xE0.",resumeFresh:"Bon retour.",resumeTimeLeft:"Le chrono a continu\xE9 : il reste {minutes} min.",close:"Fermer"},Ove={exercise:"\u062A\u0645\u0631\u064A\u0646 {index}",question:"\u0633\u0624\u0627\u0644 {index}",points:"\u0646\u0642\u0637\u0629","points.two":"\u0646\u0642\u0637\u062A\u0627\u0646","points.few":"\u0646\u0642\u0627\u0637",submit:"\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u062A\u0642\u064A\u064A\u0645",submitting:"\u062C\u0627\u0631\u064D \u0627\u0644\u0625\u0631\u0633\u0627\u0644...",confirmTitle:"\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u062A\u0642\u064A\u064A\u0645",confirmDescription:"\u0647\u0644 \u0623\u0646\u062A \u0645\u062A\u0623\u0643\u062F \u0645\u0646 \u0627\u0644\u0625\u0631\u0633\u0627\u0644\u061F \u0644\u0646 \u062A\u062A\u0645\u0643\u0646 \u0645\u0646 \u062A\u063A\u064A\u064A\u0631 \u0625\u062C\u0627\u0628\u0627\u062A\u0643 \u0628\u0639\u062F \u0627\u0644\u0625\u0631\u0633\u0627\u0644.",unansweredOne:"\u0644\u0645 \u062A\u064F\u0643\u0645\u0644 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0639\u0646 \u0633\u0624\u0627\u0644 \u0648\u0627\u062D\u062F.",unansweredMany:"\u0644\u0645 \u062A\u064F\u0643\u0645\u0644 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0639\u0646 {count} \u0645\u0646 \u0627\u0644\u0623\u0633\u0626\u0644\u0629.",unansweredMore:"\u0648{count} \u0623\u062E\u0631\u0649",confirmSubmit:"\u0625\u0631\u0633\u0627\u0644",confirmCancel:"\u0625\u0644\u063A\u0627\u0621",assessmentPassed:"\u0627\u062C\u062A\u064A\u0627\u0632 \u0627\u0644\u062A\u0642\u064A\u064A\u0645",assessmentNotPassed:"\u0644\u0645 \u064A\u062A\u0645 \u0627\u062C\u062A\u064A\u0627\u0632 \u0627\u0644\u062A\u0642\u064A\u064A\u0645",awaitingReview:"\u0641\u064A \u0627\u0646\u062A\u0638\u0627\u0631 \u0627\u0644\u062A\u0635\u062D\u064A\u062D",awaitingReviewDesc:"\u064A\u0642\u0648\u0645 \u0645\u0639\u0644\u0645\u0643 \u0628\u0645\u0631\u0627\u062C\u0639\u0629 \u0625\u062C\u0627\u0628\u0627\u062A\u0643 \u0627\u0644\u0645\u0641\u062A\u0648\u062D\u0629. \u0633\u062A\u0638\u0647\u0631 \u0639\u0644\u0627\u0645\u062A\u0643 \u0627\u0644\u0646\u0647\u0627\u0626\u064A\u0629 \u0628\u0639\u062F \u0627\u0643\u062A\u0645\u0627\u0644 \u0627\u0644\u062A\u0635\u062D\u064A\u062D.",beingMarked:"\u0642\u064A\u062F \u0627\u0644\u062A\u0635\u062D\u064A\u062D",beingMarkedDesc:"\u0628\u0639\u0636 \u0627\u0644\u0625\u062C\u0627\u0628\u0627\u062A \u0645\u0627 \u0632\u0627\u0644\u062A \u0642\u064A\u062F \u0627\u0644\u062A\u0635\u062D\u064A\u062D. \u0633\u062A\u0638\u0647\u0631 \u0639\u0644\u0627\u0645\u062A\u0643 \u0627\u0644\u0646\u0647\u0627\u0626\u064A\u0629 \u0628\u0639\u062F \u062A\u0635\u062D\u064A\u062D \u062C\u0645\u064A\u0639 \u0627\u0644\u0625\u062C\u0627\u0628\u0627\u062A.",pendingReview:"\u0642\u064A\u062F \u0627\u0644\u062A\u0635\u062D\u064A\u062D",viewFullReport:"\u0639\u0631\u0636 \u0627\u0644\u062A\u0642\u0631\u064A\u0631 \u0627\u0644\u0643\u0627\u0645\u0644",poweredBy:"\u0645\u062F\u0639\u0648\u0645 \u0645\u0646 Edpire",evaluating:"\u062C\u0627\u0631\u064D \u062A\u0642\u064A\u064A\u0645 \u0625\u062C\u0627\u0628\u0627\u062A\u0643\u2026",aiEvaluating:"\u0628\u0639\u0636 \u0627\u0644\u0625\u062C\u0627\u0628\u0627\u062A \u0642\u064A\u062F \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629 \u0628\u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064A\u060C \u0642\u062F \u064A\u0633\u062A\u063A\u0631\u0642 \u0630\u0644\u0643 \u0628\u0636\u0639 \u062B\u0648\u0627\u0646\u064D.",reset:"\u0625\u0639\u0627\u062F\u0629 \u062A\u0639\u064A\u064A\u0646",back:"\u0631\u062C\u0648\u0639",annexDocuments:"\u0627\u0644\u0645\u0633\u062A\u0646\u062F\u0627\u062A",annexEmptyTitle:"\u0644\u0627 \u064A\u0648\u062C\u062F \u0645\u064F\u0644\u062D\u064E\u0642 \u0628\u0639\u062F",annexEmptyBody:"\u0646\u0635 \u0623\u0648 \u0635\u0648\u0631\u0629 \u0623\u0648 \u062C\u062F\u0648\u0644 \u0623\u0648 \u0645\u0633\u062A\u0646\u062F \u064A\u0628\u0642\u0649 \u0638\u0627\u0647\u0631\u064B\u0627 \u0637\u0648\u0627\u0644 \u0627\u0644\u062A\u0642\u064A\u064A\u0645 \u0623\u062B\u0646\u0627\u0621 \u0625\u062C\u0627\u0628\u0629 \u0627\u0644\u0637\u0644\u0627\u0628.",annexEmptyCta:"\u0625\u0636\u0627\u0641\u0629 \u0645\u064F\u0644\u062D\u064E\u0642",annexEmptyDismiss:"\u0625\u062E\u0641\u0627\u0621","timeUp.title":"\u0627\u0646\u062A\u0647\u0649 \u0627\u0644\u0648\u0642\u062A","timeUp.submitting":"\u062C\u0627\u0631\u064D \u0625\u0631\u0633\u0627\u0644 \u0625\u062C\u0627\u0628\u0627\u062A\u0643\u2026",yourScore:"\u0646\u062A\u064A\u062C\u062A\u0643",answersSaving:"\u062C\u0627\u0631\u064D \u0627\u0644\u062D\u0641\u0638\u2026",answersSaved:"\u062A\u0645 \u062D\u0641\u0638 \u0627\u0644\u0625\u062C\u0627\u0628\u0627\u062A",answersNotSaved:"\u0644\u0627 \u064A\u062A\u0645 \u062D\u0641\u0638 \u0625\u062C\u0627\u0628\u0627\u062A\u0643. \u062A\u062D\u0642\u0651\u0642 \u0645\u0646 \u0627\u062A\u0635\u0627\u0644\u0643.",resumeRestored:"\u0645\u0631\u062D\u0628\u064B\u0627 \u0628\u0639\u0648\u062F\u062A\u0643. \u0625\u062C\u0627\u0628\u0627\u062A\u0643 \u0647\u0646\u0627.",resumeFresh:"\u0645\u0631\u062D\u0628\u064B\u0627 \u0628\u0639\u0648\u062F\u062A\u0643.",resumeTimeLeft:"\u0627\u0633\u062A\u0645\u0631\u0651 \u0627\u0644\u0645\u0624\u0642\u0651\u062A: \u062A\u0628\u0642\u0651\u0649 {minutes} \u062F\u0642\u064A\u0642\u0629.",close:"\u0625\u063A\u0644\u0627\u0642"},sg={en:Rve,fr:Nve,ar:Ove};function Pve(e,t,r){var i,o,s;let a=(s=(o=((i=sg[e])!=null?i:sg.en)[t])!=null?o:sg.en[t])!=null?s:t;return r?Object.entries(r).reduce((l,[u,c])=>l.replace(`{${u}}`,String(c)),a):a}function Ite(e,t){var a,i,o;let r=new Intl.PluralRules(e).select(t),n=(a=sg[e])!=null?a:sg.en;return(o=(i=n[`points.${r}`])!=null?i:n.points)!=null?o:sg.en.points}function zte(e){return(t,r)=>Pve(e,t,r)}function Bte(e){return e==="ar"}function $9(e){return e==="en"?"en":"fr"}var Rte="48rem";function E0(e,{insertAt:t}={}){if(!e||typeof document=="undefined")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}E0(`:root{--ink: #1d2025;--ink-soft: #565b66;--ink-faint: #8d93a0;--ui-muted: #f5f4f1;--line: #e7e5e0;--line-strong: #d6d3cc;--ok: #1f8a4c;--ok-soft: #ecf8f0;--pen: #d23b2b;--pen-soft: #fdeeec;--almost: #c8810e;--almost-ink: #8a5a08;--almost-soft: #fbf1dc;--font-hand: "Caveat", cursive}@keyframes answer-shake{10%,90%{transform:translate(-2px)}20%,80%{transform:translate(4px)}30%,50%,70%{transform:translate(-6px)}40%,60%{transform:translate(6px)}}@keyframes hop{0%,to{transform:translateY(0) scale(1)}40%{transform:translateY(-6%) scale(1.05)}}@keyframes wobble{0%,to{transform:translate(0)}15%,85%{transform:translate(-4px)}30%,70%{transform:translate(4px)}45%,55%{transform:translate(-2px)}}.animate-shake{animation:answer-shake .4s both}.animate-hop{animation:hop .5s ease-out}.animate-wobble{animation:wobble .5s ease}.cs-player__grid{display:grid;gap:calc(.75rem * var(--edp-scale, 1));grid-template-columns:repeat(1,minmax(0,1fr))}@media(min-width:40rem){:where(.cs-player:not(.cs-player--box)) .cs-player__grid--row{grid-template-columns:repeat(2,minmax(0,1fr))}}.cs-player--box{container-type:inline-size}@container (min-width: 35.5em){.cs-player--box .cs-player__grid--row{grid-template-columns:repeat(2,minmax(0,1fr))}}.player-choice{position:relative;display:inline-flex;align-items:center;gap:calc(.75rem * var(--edp-scale, 1));flex-wrap:wrap;width:100%;padding:calc(.75rem * var(--edp-scale, 1)) calc(1rem * var(--edp-scale, 1));border:1.5px solid var(--line, #e7e5e0);border-radius:calc(.75rem * var(--edp-scale, 1));background-color:#fff;color:var(--ink, #1d2025);cursor:pointer;user-select:none;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease;font-weight:500;text-align:start}.player-choice:hover:not(:disabled){background-color:var(--ui-muted, #f5f4f1);border-color:var(--line-strong, #d6d3cc)}.player-choice:disabled{cursor:default}.player-choice>img{flex-shrink:0}.player-choice__mark{flex:none;display:grid;place-items:center;width:calc(20px * var(--edp-scale, 1));height:calc(20px * var(--edp-scale, 1));border:1.5px solid var(--ink-faint, #8d93a0);background:#fff;color:#fff;transition:border-color .15s,background .15s}.player-choice__mark--radio{border-radius:999px}.player-choice__mark--box{border-radius:calc(6px * var(--edp-scale, 1))}.player-choice__mark>svg{width:calc(13px * var(--edp-scale, 1));height:calc(13px * var(--edp-scale, 1));opacity:0}.player-choice__text{flex:1;min-width:0}.player-choice{height:100%}.player-choice__text img,.player-choice__text video,.player-choice__text iframe{max-height:calc(120px * var(--edp-scale, 1));width:auto;max-width:100%}.player-choice--tile{flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:calc(.5rem * var(--edp-scale, 1));padding:calc(1rem * var(--edp-scale, 1)) calc(.75rem * var(--edp-scale, 1))}.player-choice--tile .player-choice__mark{position:absolute;top:calc(.5rem * var(--edp-scale, 1));inset-inline-start:calc(.5rem * var(--edp-scale, 1))}.player-choice--tile .player-choice__text{flex:0 1 auto;width:100%;text-align:center}.player-choice--tile .player-choice__text img,.player-choice--tile .player-choice__text video,.player-choice--tile .player-choice__text iframe{display:block!important;margin-inline:auto;margin-bottom:calc(.4rem * var(--edp-scale, 1))}.player-choice--selected{background-color:var(--ui-muted, #f5f4f1);border-color:var(--ink, #1d2025)}.player-choice--selected .player-choice__mark{border-color:var(--ink, #1d2025);background:var(--ink, #1d2025)}.player-choice--selected .player-choice__mark>svg{opacity:1}.player-choice--correct{background-color:var(--ok-soft, #ecf8f0);border-color:var(--ok, #1f8a4c)}.player-choice--correct .player-choice__mark{border-color:var(--ok, #1f8a4c);background:var(--ok, #1f8a4c)}.player-choice--correct .player-choice__mark>svg{opacity:1}.player-choice--correct-unchosen{background-color:#fff;border-color:var(--ok, #1f8a4c);border-style:dashed}.player-choice--correct-unchosen .player-choice__mark{border-color:var(--ok, #1f8a4c)}.player-choice--incorrect{background-color:var(--pen-soft, #fdeeec);border-color:var(--pen, #d23b2b)}.player-choice--incorrect .player-choice__mark{border-color:var(--pen, #d23b2b);background:var(--pen, #d23b2b)}.player-choice--incorrect .player-choice__mark>svg{opacity:1}.player-choice--muted{opacity:.55}.player-choice--partial{background-color:var(--ok-soft, #ecf8f0);border-color:var(--ok, #1f8a4c)}.player-choice--disabled{cursor:default}.player-choice__mark--letter{width:calc(1.625rem * var(--edp-scale, 1));height:calc(1.625rem * var(--edp-scale, 1));color:var(--ink, #1d2025);font-size:.8em;font-weight:700;line-height:1}.player-choice--selected .player-choice__mark--letter,.player-choice--correct .player-choice__mark--letter,.player-choice--incorrect .player-choice__mark--letter{color:#fff}.player-choice--correct-unchosen .player-choice__mark--letter{color:var(--ok, #1f8a4c)}.player-choice__verdict{flex:none;display:grid;place-items:center;margin-inline-start:auto}.player-choice__verdict>svg{width:calc(1.125rem * var(--edp-scale, 1));height:calc(1.125rem * var(--edp-scale, 1))}.player-choice__verdict--correct{color:var(--ok, #1f8a4c)}.player-choice__verdict--incorrect{color:var(--pen, #d23b2b)}.player-choice--tile .player-choice__verdict{position:absolute;top:calc(.5rem * var(--edp-scale, 1));inset-inline-end:calc(.5rem * var(--edp-scale, 1));margin:0}.player-inline-choice{display:inline-flex;align-items:center;gap:calc(.25rem * var(--edp-scale, 1));padding:.05em .55em;border:1.5px solid var(--line-strong, #d6d3cc);border-radius:999px;background:#fff;color:var(--ink, #1d2025);font-size:.9em;line-height:inherit;cursor:pointer;user-select:none;transition:border-color .15s,background .15s}.player-inline-choice:hover:not(:disabled){background:var(--ui-muted, #f5f4f1)}.player-inline-choice:disabled{cursor:default}.player-inline-choice--selected{border-color:var(--ink, #1d2025);background:var(--ui-muted, #f5f4f1)}.player-inline-choice--correct{border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0)}.player-inline-choice--correct-unchosen{border-color:var(--ok, #1f8a4c);border-style:dashed}.player-inline-choice--incorrect{border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec)}.player-inline-choice--muted{opacity:.55}.player-inline-choice:focus-visible{outline:2px solid var(--ink, #1d2025);outline-offset:2px}.player-blank-input{display:inline-block;min-width:3ch;padding:calc(.25rem * var(--edp-scale, 1)) calc(.5rem * var(--edp-scale, 1));border:none;border-bottom:2px solid var(--line-strong, #d6d3cc);background-color:transparent;font-size:inherit;font-family:inherit;transition:all .2s ease;outline:none}.player-blank-input:focus{border-bottom-color:var(--ink, #1d2025);background-color:var(--ui-muted, #f5f4f1)}.player-blank-input--correct{border-bottom-color:var(--ok, #1f8a4c);background-color:var(--ok-soft, #ecf8f0);color:var(--ok, #1f8a4c)}.player-blank-input--incorrect{border-bottom-color:var(--pen, #d23b2b);background-color:var(--pen-soft, #fdeeec);color:var(--pen, #d23b2b)}.player-blank-input:disabled{opacity:.7;cursor:not-allowed}.player-typed-blank{display:inline-block;min-width:7ch;max-width:100%;padding:0 calc(.25rem * var(--edp-scale, 1));font-weight:600;text-align:center;line-height:1.25;border:1px solid var(--line-strong, #d6d3cc);border-bottom-width:2px;border-radius:calc(2px * var(--edp-scale, 1));background:var(--ui-muted, #f5f4f1);color:var(--ink, #1d2025);outline:none;resize:none;overflow:hidden;vertical-align:middle}.player-typed-blank::placeholder{color:var(--ink-faint, #8d93a0);font-weight:500}.player-typed-blank:focus{border-color:var(--ink, #1d2025)}.player-typed-blank--pending{border-color:var(--ink-faint, #8d93a0);background:var(--card, #ffffff)}.player-typed-blank-feedback{display:inline-block;min-width:2ch;max-width:100%;padding:0 calc(.25rem * var(--edp-scale, 1));font-weight:600;text-align:center;line-height:1.25;border:1px solid var(--line-strong, #d6d3cc);border-bottom-width:2px;border-radius:calc(2px * var(--edp-scale, 1));overflow-x:auto;cursor:default;vertical-align:middle}.player-typed-blank-feedback--correct{border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0);color:var(--ok, #1f8a4c)}.player-typed-blank-feedback--partial{border-color:var(--ok, #1f8a4c);border-style:dashed;background:var(--ok-soft, #ecf8f0);color:var(--ok, #1f8a4c)}.player-typed-blank-feedback--incorrect{border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec);color:var(--pen, #d23b2b);text-decoration:line-through}.player-typed-blank-spinner{display:inline-block;width:calc(.75rem * var(--edp-scale, 1));height:calc(.75rem * var(--edp-scale, 1));border:2px solid var(--ink-faint, #8d93a0);border-top-color:transparent;border-radius:999px;animation:blank-spin .7s linear infinite}@keyframes blank-spin{to{transform:rotate(360deg)}}.player-blank-reveal{font-weight:700;color:var(--ok, #1f8a4c);font-size:.875em;word-break:break-word;min-width:0}.player-blank-feedback{display:inline-block;font-size:.8em;font-weight:500;line-height:1.3;padding:calc(2px * var(--edp-scale, 1)) calc(8px * var(--edp-scale, 1));border-radius:999px;word-break:break-word;min-width:0;background:var(--ui-muted, #f5f4f1);color:var(--ink-soft, #565b66)}.player-blank-feedback--correct{background:var(--ok-soft, #ecf8f0);color:var(--ok, #1f8a4c)}.player-blank-feedback--incorrect{background:var(--pen-soft, #fdeeec);color:var(--pen, #d23b2b)}.player-blank-hint-btn{width:calc(1rem * var(--edp-scale, 1));height:calc(1rem * var(--edp-scale, 1));border:0;border-radius:999px;background:#fbbf24;color:#fff;font-size:calc(10px * var(--edp-scale, 1));font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s}.player-blank-hint-btn:hover,.player-blank-hint-btn--pinned{background:#f59e0b}.player-blank-hint-pop{position:absolute;bottom:100%;left:50%;transform:translate(-50%);margin-bottom:calc(.5rem * var(--edp-scale, 1));z-index:9999;min-width:calc(180px * var(--edp-scale, 1));max-width:calc(300px * var(--edp-scale, 1));width:max-content;background:#fffbeb;border:1px solid #fde68a;border-radius:calc(14px * var(--edp-scale, 1));box-shadow:0 8px 24px #92400e2e;padding:calc(.5rem * var(--edp-scale, 1)) calc(.75rem * var(--edp-scale, 1));font-size:calc(.875rem * var(--edp-scale, 1));color:#78350f}.matching-player-hintrow{display:flex;justify-content:flex-start;margin-bottom:calc(.4rem * var(--edp-scale, 1))}.player-choice-blank{display:inline-flex;align-items:center;justify-content:center;min-width:4ch;padding:calc(.1rem * var(--edp-scale, 1)) calc(.5rem * var(--edp-scale, 1));border:2px dashed var(--line-strong, #d6d3cc);border-radius:calc(.5rem * var(--edp-scale, 1));color:var(--ink-faint, #8d93a0);background:transparent;transition:border-color .15s,background .15s,transform .15s,color .15s;vertical-align:middle}.player-choice-blank--target{border-color:var(--ink, #1d2025);background:var(--ui-muted, #f5f4f1)}.player-choice-blank--over{border-style:solid;border-color:var(--ink, #1d2025);background:var(--ui-muted, #f5f4f1);transform:scale(1.05)}.player-choice-blank--filled{border-style:solid;border-color:var(--ink, #1d2025);background:var(--ui-muted, #f5f4f1);color:var(--ink, #1d2025);cursor:pointer}.player-choice-blank--correct,.player-choice-blank--partial{border-style:solid;border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0);color:var(--ok, #1f8a4c)}.player-choice-blank--incorrect{border-style:solid;border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec);color:var(--pen, #d23b2b)}.player-choice-blank__clear{margin-inline-start:calc(.25rem * var(--edp-scale, 1));opacity:0;font-size:calc(.75rem * var(--edp-scale, 1));line-height:1;transition:opacity .12s}.player-choice-blank--filled:hover .player-choice-blank__clear{opacity:.6}.player-word-bank{margin:calc(1rem * var(--edp-scale, 1)) 0;position:relative;border:1px solid var(--line, #e7e5e0);border-radius:calc(14px * var(--edp-scale, 1));background:var(--ui-muted, #f5f4f1);padding:calc(.75rem * var(--edp-scale, 1)) calc(1rem * var(--edp-scale, 1))}.player-word-bank__label{margin-bottom:calc(.5rem * var(--edp-scale, 1));font-size:.7em;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft, #565b66);user-select:none}.player-word-bank__items{display:flex;flex-wrap:wrap;gap:calc(.5rem * var(--edp-scale, 1))}.player-word-bank__items--grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(calc(10rem * var(--edp-scale, 1)),1fr));gap:calc(.5rem * var(--edp-scale, 1))}.player-bank-pill{display:inline-block;padding:calc(.35rem * var(--edp-scale, 1)) calc(.75rem * var(--edp-scale, 1));border:1px solid var(--line-strong, #d6d3cc);border-radius:999px;background:var(--card, #ffffff);color:var(--ink, #1d2025);user-select:none;-webkit-touch-callout:none;touch-action:manipulation;cursor:grab;transition:border-color .15s,background .15s,box-shadow .15s}.player-bank-pill:hover{border-color:var(--ink, #1d2025);background:var(--ui-muted, #f5f4f1)}.player-bank-pill--dragging{opacity:.5;cursor:grabbing;box-shadow:0 8px 24px #1d20252e}.exercise-runtime{font-family:var(--brand-font, "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif);font-size:calc(1.25rem * var(--edp-scale, 1));line-height:1.6;color:#1f2937}.exercise-runtime input,.exercise-runtime textarea{font-family:inherit}@media(min-width:640px){.exercise-runtime{font-size:calc(1.5rem * var(--edp-scale, 1))}}@media(min-width:768px){.exercise-runtime{font-size:calc(1.5rem * var(--edp-scale, 1))}}@media(min-width:1024px){.exercise-runtime{font-size:calc(2.25rem * var(--edp-scale, 1))}}@media(min-width:1280px){.exercise-runtime{font-size:calc(2.25rem * var(--edp-scale, 1))}}.exercise-runtime :lang(ar),.exercise-runtime [lang=ar],.exercise-runtime [dir=rtl]{direction:rtl;font-family:Arial,Scheherazade New,Amiri,sans-serif;text-align:right}.exercise-runtime p{margin:.5em 0;min-height:1.5em}.exercise-runtime p:empty:after{content:"\\a0";display:inline-block;min-height:1em}.exercise-runtime strong{font-weight:600;color:inherit}.exercise-runtime em{font-style:italic}.exercise-runtime ul,.exercise-runtime ol{list-style:revert;margin-left:calc(1.25rem * var(--edp-scale, 1));padding-left:0}.exercise-runtime img{max-width:100%;height:auto;vertical-align:middle;display:inline-block;margin:0 calc(4px * var(--edp-scale, 1))}.exercise-runtime .inline-math{display:inline-block;vertical-align:middle;margin:0 calc(2px * var(--edp-scale, 1))}.exercise-runtime .math-formula{display:flex;justify-content:center;margin:1em 0}.choice-set-player{margin:calc(1rem * var(--edp-scale, 1)) 0}.choice-set-player__prompt{font-weight:600;margin-bottom:calc(.75rem * var(--edp-scale, 1));color:#374151}.choice-set-player__prompt-hint{margin-left:calc(.5rem * var(--edp-scale, 1));font-size:calc(.875rem * var(--edp-scale, 1));opacity:.7;font-weight:400}.choice-set-player__choices{display:flex;flex-direction:column;gap:calc(.75rem * var(--edp-scale, 1))}.choice-set-player__choices--grid{display:grid;gap:calc(.75rem * var(--edp-scale, 1));grid-template-columns:1fr}@media(min-width:640px){.choice-set-player__choices--grid{grid-template-columns:repeat(2,1fr)}}.choice-set-player--inline{display:inline-flex;align-items:center;gap:calc(.5rem * var(--edp-scale, 1));flex-wrap:wrap}.choice-set-player--inline .player-choice{width:auto;padding:calc(.5rem * var(--edp-scale, 1)) calc(1rem * var(--edp-scale, 1))}.player-choice:focus-visible{outline:2px solid var(--ink, #1d2025);outline-offset:2px}.player-blank-input:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}@media(prefers-contrast:high){.player-choice{border-width:3px}.player-choice--correct{border-color:#15803d}.player-choice--incorrect{border-color:#991b1b}}@media(prefers-reduced-motion:reduce){.animate-shake,.animate-hop,.animate-wobble{animation:none}.player-choice{transition:none}}@media print{.exercise-runtime{font-size:12pt;color:#000}.player-choice{border:1px solid black;background-color:#fff;page-break-inside:avoid}.player-choice--correct:after{content:" \\2713";font-weight:700}.player-choice--incorrect:after{content:" \\2717";font-weight:700}}.matching-player{margin:calc(1rem * var(--edp-scale, 1)) 0}.matching-player-feedback{display:flex;align-items:center;gap:calc(.45rem * var(--edp-scale, 1));margin-top:calc(.6rem * var(--edp-scale, 1));padding:calc(.55rem * var(--edp-scale, 1)) calc(.75rem * var(--edp-scale, 1));border:1px solid var(--line, #e7e5e0);border-radius:calc(.625rem * var(--edp-scale, 1));font-size:calc(.85rem * var(--edp-scale, 1));font-weight:600}.matching-player-feedback--correct{color:var(--ok, #1f8a4c);border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0)}.matching-player-feedback--partial{color:var(--almost-ink, #8a5a08);border-color:var(--almost, #c8810e);background:var(--almost-soft, #fbf1dc)}.matching-player-feedback--incorrect{color:var(--pen, #d23b2b);border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec)}.matching-player-score{margin-inline-start:auto;font-family:var(--font-hand, "Caveat", cursive);font-size:calc(1.5rem * var(--edp-scale, 1));line-height:1}.matching-player__instruction{display:none}.matching-player__arena{position:relative;display:flex;flex-direction:column;gap:calc(.5rem * var(--edp-scale, 1))}.matching-player__arena--dragging{user-select:none;touch-action:none}.matching-player__svg{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:1}.matching-player__columns{display:grid;grid-template-columns:1fr 1fr;gap:calc(5rem * var(--edp-scale, 1));align-items:start;position:relative}.matching-player__column{display:flex;flex-direction:column;gap:calc(.5rem * var(--edp-scale, 1))}.matching-player__item{display:flex;align-items:center;flex-wrap:wrap;gap:calc(.5rem * var(--edp-scale, 1));width:100%;padding:calc(.75rem * var(--edp-scale, 1)) calc(1rem * var(--edp-scale, 1));border:2px solid var(--line, #e7e5e0);border-radius:calc(.625rem * var(--edp-scale, 1));background:var(--card, #ffffff);text-align:left;transition:border-color .15s,background .15s,box-shadow .15s,transform .1s;font-size:inherit;font-family:inherit;color:var(--ink, #1d2025);min-height:calc(52px * var(--edp-scale, 1));user-select:none;-webkit-tap-highlight-color:transparent}.matching-player__item:not(.matching-player__item--disabled){cursor:grab}.matching-player__item:not(.matching-player__item--disabled):active{cursor:grabbing}.matching-player__item:hover:not(.matching-player__item--disabled){border-color:var(--line-strong, #d6d3cc);background:var(--ui-muted, #f5f4f1)}.matching-player__item--selected{border-color:var(--ink, #1d2025)!important;background:var(--ui-muted, #f5f4f1)!important;box-shadow:0 0 0 3px #1d20251f;transform:scale(1.02)}.matching-player__item--available{border-color:var(--ink-faint, #8d93a0);border-style:dashed}.matching-player__item--available:hover{border-color:var(--ink, #1d2025);border-style:solid;background:var(--ui-muted, #f5f4f1)}.matching-player__item--matched{border-width:2px;border-color:var(--ink, #1d2025)}.matching-player__item--matched:hover:not(.matching-player__item--disabled){background:var(--ui-muted, #f5f4f1)}.matching-player__item--correct,.matching-player__item--correct:hover{border-color:var(--ok, #1f8a4c)!important;background:var(--ok-soft, #ecf8f0)!important}.matching-player__item--incorrect,.matching-player__item--incorrect:hover{border-color:var(--pen, #d23b2b)!important;background:var(--pen-soft, #fdeeec)!important}.matching-player__item--disabled{cursor:default;pointer-events:none}.matching-player__item-text{flex:1;min-width:0;line-height:1.4}.matching-player__item-text p{margin:0}.matching-player__pair-num{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:calc(22px * var(--edp-scale, 1));height:calc(22px * var(--edp-scale, 1));border-radius:50%;font-size:calc(.7rem * var(--edp-scale, 1));font-weight:700;line-height:1;background:var(--ink, #1d2025);color:#fff}.matching-player__item--correct .matching-player__pair-num{background:var(--ok, #1f8a4c)}.matching-player__item--incorrect .matching-player__pair-num{background:var(--pen, #d23b2b)}.matching-player__connector{flex-shrink:0;color:var(--ink-faint, #8d93a0);display:flex;align-items:center;transition:color .2s,transform .2s;border-radius:50%}.matching-player__item:hover .matching-player__connector{color:var(--ink, #1d2025);transform:scale(1.25)}.matching-player__connector--left{order:10;margin-left:calc(6px * var(--edp-scale, 1))}.matching-player__connector--right{order:-1;margin-right:calc(6px * var(--edp-scale, 1))}.matching-player__connector svg{width:calc(18px * var(--edp-scale, 1));height:calc(18px * var(--edp-scale, 1))}.matching-player__correct-hint{width:100%;order:20;font-weight:700;color:var(--ok, #1f8a4c);font-size:.82em;line-height:1.4;padding-top:.1em;word-break:break-word}.matching-player__correct-hint p{display:inline;margin:0}.matching-player__item:focus-visible{outline:3px solid var(--ink, #1d2025);outline-offset:2px}.blank-correct-hint{display:inline;font-weight:700;color:var(--ok, #1f8a4c);font-size:.875em;margin-left:.3em;word-break:break-word}@keyframes matching-pulse{0%{opacity:.5}to{opacity:1}}@media(prefers-reduced-motion:reduce){.matching-player__item{transition:none}}@media(max-width:600px){:where(.matching-player:not(.matching-player--box)) .matching-player__columns{gap:calc(1rem * var(--edp-scale, 1))}:where(.matching-player:not(.matching-player--box)) .matching-player__item{padding:calc(.5rem * var(--edp-scale, 1)) calc(.6rem * var(--edp-scale, 1));min-height:calc(44px * var(--edp-scale, 1));font-size:calc(.875rem * var(--edp-scale, 1));gap:calc(.35rem * var(--edp-scale, 1))}.matching-player__item:not(.matching-player__item--disabled){cursor:pointer}.matching-player__item:not(.matching-player__item--disabled):active{cursor:pointer}:where(.matching-player:not(.matching-player--box)) .matching-player__connector svg{width:calc(15px * var(--edp-scale, 1));height:calc(15px * var(--edp-scale, 1))}}.matching-player--box{container-type:inline-size}@container (max-width: 33.3em){.matching-player--box .matching-player__columns{gap:calc(1rem * var(--edp-scale, 1))}.matching-player--box .matching-player__item{padding:calc(.5rem * var(--edp-scale, 1)) calc(.6rem * var(--edp-scale, 1));min-height:calc(44px * var(--edp-scale, 1));font-size:calc(.875rem * var(--edp-scale, 1));gap:calc(.35rem * var(--edp-scale, 1))}.matching-player--box .matching-player__connector svg{width:calc(15px * var(--edp-scale, 1));height:calc(15px * var(--edp-scale, 1))}}.math-response-player{margin:calc(.5rem * var(--edp-scale, 1)) 0}.player-math-field{border:2px solid var(--line, #e7e5e0);border-radius:calc(.625rem * var(--edp-scale, 1));padding:calc(.375rem * var(--edp-scale, 1)) calc(.5rem * var(--edp-scale, 1));background:var(--card, #ffffff);transition:border-color .2s ease,background .2s ease}.player-math-field:focus-within{border-color:var(--ink, #1d2025)}.player-math-field--readonly{background:var(--ui-muted, #f5f4f1)}.player-math-field__input{width:100%;min-height:calc(2.5rem * var(--edp-scale, 1));font-size:calc(1.1rem * var(--edp-scale, 1));outline:none;--primary: var(--ink, #1d2025);--caret-color: var(--ink, #1d2025);--selection-background-color: var(--ink-soft, #565b66);--contains-highlight-background-color: var(--ui-muted, #f5f4f1)}.player-math-field__input::part(virtual-keyboard-toggle),.player-math-field__input::part(menu-toggle){color:var(--ink-faint, #8d93a0)}.player-math-field__fallback{width:100%;border:none;outline:none;font-size:calc(1rem * var(--edp-scale, 1));font-family:monospace;background:transparent;color:var(--ink, #1d2025)}.player-math-field--correct{border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0)}.player-math-field--incorrect{border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec)}.player-math-field--validating{border-color:var(--ink-faint, #8d93a0)}.player-math-feedback{margin-top:calc(.4rem * var(--edp-scale, 1));font-size:calc(.8rem * var(--edp-scale, 1));font-weight:600;display:flex;align-items:center;gap:calc(.4rem * var(--edp-scale, 1))}.player-math-feedback--correct{color:var(--ok, #1f8a4c)}.player-math-feedback--incorrect{color:var(--pen, #d23b2b)}.player-math-feedback--validating{color:var(--ink-soft, #565b66)}.player-math-score{margin-inline-start:auto;font-family:var(--font-hand, "Caveat", cursive);font-size:calc(1.5rem * var(--edp-scale, 1));line-height:1;color:var(--ok, #1f8a4c)}.player-math-spinner{display:inline-block;width:calc(.9rem * var(--edp-scale, 1));height:calc(.9rem * var(--edp-scale, 1));border:2px solid var(--ink-faint, #8d93a0);border-top-color:transparent;border-radius:50%;animation:player-math-spin .7s linear infinite}@keyframes player-math-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.player-math-spinner{animation:none}}.player-ai{margin:calc(1rem * var(--edp-scale, 1)) 0;padding:calc(.5rem * var(--edp-scale, 1));display:flex;flex-direction:column;gap:calc(.75rem * var(--edp-scale, 1));border:1px solid var(--line, #e7e5e0);border-radius:calc(.875rem * var(--edp-scale, 1));background:var(--ui-muted, #f5f4f1)}.player-ai-counts{display:flex;justify-content:flex-end;gap:calc(.5rem * var(--edp-scale, 1))}.player-ai-count{font-size:calc(.75rem * var(--edp-scale, 1));font-weight:600;padding:calc(.1rem * var(--edp-scale, 1)) calc(.5rem * var(--edp-scale, 1));border-radius:999px;background:var(--card, #ffffff);border:1px solid var(--line, #e7e5e0);color:var(--ink-soft, #565b66)}.player-ai-count--over{color:var(--pen, #d23b2b);border-color:var(--pen, #d23b2b)}.player-ai-count--min{color:var(--ink-faint, #8d93a0)}.player-ai-input{width:100%;box-sizing:border-box;padding:calc(.5rem * var(--edp-scale, 1)) calc(.75rem * var(--edp-scale, 1));font-size:calc(1rem * var(--edp-scale, 1));border:1px solid var(--line-strong, #d6d3cc);border-radius:calc(.625rem * var(--edp-scale, 1));background:var(--card, #ffffff);color:var(--ink, #1d2025);outline:none;transition:border-color .2s ease,background .2s ease}.player-ai-input::placeholder{color:var(--ink-faint, #8d93a0)}.player-ai-input:focus{border-color:var(--ink, #1d2025)}.player-ai-input--multiline{min-height:calc(120px * var(--edp-scale, 1));resize:vertical}.player-ai-input:disabled{cursor:default}.player-ai-input--correct{border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0)}.player-ai-input--partial{border-color:var(--almost, #c8810e);border-style:dashed;background:var(--almost-soft, #fbf1dc)}.player-ai-input--incorrect{border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec)}.player-ai-feedback{display:flex;flex-direction:column;gap:calc(.25rem * var(--edp-scale, 1));padding:calc(.75rem * var(--edp-scale, 1));border-radius:calc(.5rem * var(--edp-scale, 1));font-size:calc(.875rem * var(--edp-scale, 1));border:1px solid var(--line, #e7e5e0);background:var(--card, #ffffff);color:var(--ink, #1d2025)}.player-ai-feedback--correct{border-color:var(--ok, #1f8a4c);background:var(--ok-soft, #ecf8f0);color:var(--ok, #1f8a4c)}.player-ai-feedback--partial{border-color:var(--almost, #c8810e);background:var(--almost-soft, #fbf1dc);color:var(--almost-ink, #8a5a08)}.player-ai-feedback--incorrect{border-color:var(--pen, #d23b2b);background:var(--pen-soft, #fdeeec);color:var(--pen, #d23b2b)}.player-ai-message{margin:0}.player-ai-score-row{display:flex;justify-content:flex-end}.player-ai-score{font-family:var(--font-hand, "Caveat", cursive);font-size:calc(1.5rem * var(--edp-scale, 1));font-weight:600;line-height:1;padding:0 calc(.35rem * var(--edp-scale, 1));color:inherit}.player-ai-validating{display:flex;align-items:center;gap:calc(.5rem * var(--edp-scale, 1));padding:calc(.25rem * var(--edp-scale, 1)) 0;color:var(--ink-soft, #565b66)}.player-ai-spinner{display:inline-block;width:calc(.9rem * var(--edp-scale, 1));height:calc(.9rem * var(--edp-scale, 1));border:2px solid var(--ink-faint, #8d93a0);border-top-color:transparent;border-radius:999px;animation:ai-answer-spin .7s linear infinite}@keyframes ai-answer-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.player-ai-spinner{animation:none}}.player-or-field--pre{border-color:var(--line-strong, #d6d3cc)!important}.player-or-field--correct{border-color:var(--ok, #1f8a4c)!important;background:var(--ok-soft, #ecf8f0)!important}.player-or-field--partial,.player-or-field--review{border-color:var(--almost, #c8810e)!important;background:var(--almost-soft, #fbf1dc)!important}.player-or-field--review{border-style:dashed!important}.player-or-field--incorrect{border-color:var(--pen, #d23b2b)!important;background:var(--pen-soft, #fdeeec)!important}.edp-scaled .text-xs{font-size:calc(.75rem * var(--edp-scale, 1));line-height:calc(1 / .75)}.edp-scaled .text-sm{font-size:calc(.875rem * var(--edp-scale, 1));line-height:calc(1.25 / .875)}.edp-scaled .text-base{font-size:calc(1rem * var(--edp-scale, 1));line-height:1.5}.edp-scaled .text-lg{font-size:calc(1.125rem * var(--edp-scale, 1));line-height:calc(1.75 / 1.125)}.edp-scaled .text-\\[10px\\]{font-size:calc(10px * var(--edp-scale, 1))}.edp-scaled .prose-sm{font-size:calc(.875rem * var(--edp-scale, 1))}.edp-scaled .p-2{padding:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .p-3{padding:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .p-4{padding:calc(1rem * var(--edp-scale, 1))}.edp-scaled .p-6{padding:calc(1.5rem * var(--edp-scale, 1))}.edp-scaled .pb-1{padding-bottom:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .pt-1\\.5{padding-top:calc(.375rem * var(--edp-scale, 1))}.edp-scaled .px-1\\.5{padding-left:calc(.375rem * var(--edp-scale, 1));padding-right:calc(.375rem * var(--edp-scale, 1))}.edp-scaled .px-2{padding-left:calc(.5rem * var(--edp-scale, 1));padding-right:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .px-3{padding-left:calc(.75rem * var(--edp-scale, 1));padding-right:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .px-4{padding-left:calc(1rem * var(--edp-scale, 1));padding-right:calc(1rem * var(--edp-scale, 1))}.edp-scaled .px-5{padding-left:calc(1.25rem * var(--edp-scale, 1));padding-right:calc(1.25rem * var(--edp-scale, 1))}.edp-scaled .px-6{padding-left:calc(1.5rem * var(--edp-scale, 1));padding-right:calc(1.5rem * var(--edp-scale, 1))}.edp-scaled .py-0\\.5{padding-top:calc(.125rem * var(--edp-scale, 1));padding-bottom:calc(.125rem * var(--edp-scale, 1))}.edp-scaled .py-1{padding-top:calc(.25rem * var(--edp-scale, 1));padding-bottom:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .py-1\\.5{padding-top:calc(.375rem * var(--edp-scale, 1));padding-bottom:calc(.375rem * var(--edp-scale, 1))}.edp-scaled .py-2{padding-top:calc(.5rem * var(--edp-scale, 1));padding-bottom:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .py-3{padding-top:calc(.75rem * var(--edp-scale, 1));padding-bottom:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .mb-1{margin-bottom:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .mb-2{margin-bottom:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .ml-1{margin-left:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .ml-2{margin-left:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .mr-2{margin-right:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .mt-0\\.5{margin-top:calc(.125rem * var(--edp-scale, 1))}.edp-scaled .mt-1{margin-top:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .mt-1\\.5{margin-top:calc(.375rem * var(--edp-scale, 1))}.edp-scaled .mt-3{margin-top:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .mx-1{margin-left:calc(.25rem * var(--edp-scale, 1));margin-right:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .my-3{margin-top:calc(.75rem * var(--edp-scale, 1));margin-bottom:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .my-4{margin-top:calc(1rem * var(--edp-scale, 1));margin-bottom:calc(1rem * var(--edp-scale, 1))}.edp-scaled .gap-1{gap:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .gap-1\\.5{gap:calc(.375rem * var(--edp-scale, 1))}.edp-scaled .gap-2{gap:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .gap-3{gap:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .gap-x-1{column-gap:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .gap-y-0\\.5{row-gap:calc(.125rem * var(--edp-scale, 1))}.edp-scaled .w-6{width:calc(1.5rem * var(--edp-scale, 1))}.edp-scaled .w-16{width:calc(4rem * var(--edp-scale, 1))}.edp-scaled .h-6{height:calc(1.5rem * var(--edp-scale, 1))}.edp-scaled .h-8{height:calc(2rem * var(--edp-scale, 1))}.edp-scaled .h-16{height:calc(4rem * var(--edp-scale, 1))}.edp-scaled .max-h-48{max-height:calc(12rem * var(--edp-scale, 1))}.edp-scaled .right-1{right:calc(.25rem * var(--edp-scale, 1))}.edp-scaled .right-3{right:calc(.75rem * var(--edp-scale, 1))}.edp-scaled .bottom-2{bottom:calc(.5rem * var(--edp-scale, 1))}.edp-scaled .max-w-\\[160px\\]{max-width:calc(160px * var(--edp-scale, 1))}.edp-scaled .max-w-\\[200px\\]{max-width:calc(200px * var(--edp-scale, 1))}.edp-scaled .max-w-\\[240px\\]{max-width:calc(240px * var(--edp-scale, 1))}.edp-scaled .min-h-\\[100px\\]{min-height:calc(100px * var(--edp-scale, 1))}.edp-scaled .min-h-\\[120px\\]{min-height:calc(120px * var(--edp-scale, 1))}.edp-scaled .\\[\\&_\\.ProseMirror\\]\\:min-h-\\[80px\\] .ProseMirror{min-height:calc(80px * var(--edp-scale, 1))}.math-inline,.math-block,.math-response-player,.katex,.katex-display{direction:ltr;unicode-bidi:isolate}.exercise-shared-context{font-size:calc(1.125rem * var(--edp-scale, 1));margin-bottom:calc(1rem * var(--edp-scale, 1))}.exercise-reference-cue{display:flex;flex-wrap:wrap;align-items:baseline;gap:calc(.25rem * var(--edp-scale, 1)) calc(.5rem * var(--edp-scale, 1));margin:0 0 calc(1rem * var(--edp-scale, 1));padding:calc(.625rem * var(--edp-scale, 1)) calc(.875rem * var(--edp-scale, 1));border:1px solid var(--line, #e7e5e0);border-inline-start:3px solid var(--ink-soft, #565b66);border-radius:calc(.625rem * var(--edp-scale, 1));background:var(--ui-muted, #f5f4f1);color:var(--ink-soft, #565b66);font-size:calc(1rem * var(--edp-scale, 1));line-height:1.5}.exercise-reference-cue__link{font:inherit;font-weight:600;color:var(--ink, #1d2025);background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.exercise-reference-cue__link:hover{text-decoration-thickness:2px}.exercise-reference-cue__link:focus-visible{outline:2px solid var(--ink, #1d2025);outline-offset:2px;border-radius:2px}.exercise-reference-cue__arrow{display:inline-block;margin-inline-start:.25em}.exercise-reference-cue__arrow:dir(rtl){transform:scaleX(-1)}
|
|
4112
4112
|
`);E0(`@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}
|
|
4113
4113
|
`);E0(`.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}}
|
|
4114
4114
|
`);E0(`/*! 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-gray-900:oklch(21% .034 264.665);--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-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--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 .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-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-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-2{margin-left:calc(var(--spacing) * 2)}.edpire-scope .ml-auto{margin-left:auto}.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\\(100svh-6rem\\)\\]{max-height:calc(100svh - 6rem)}.edpire-scope .max-h-\\[calc\\(100vh-8rem\\)\\]{max-height:calc(100vh - 8rem)}.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 .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-\\[160px\\]{max-width:160px}.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-hidden{overflow:hidden}.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{background-color:var(--color-black)}.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-gray-900{background-color:var(--color-gray-900)}.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 .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-mono{font-family:var(--font-mono)}.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-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--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 .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-\\[\\#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 :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)}@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}}
|
|
4115
|
-
`);var Oe=Pe($t()),Pve="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 Fve(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 Pte(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 Nte(e){return e.questions.reduce((t,r)=>t+Pte(r),0)}function D0(e){return Number.isInteger(e)?String(e):parseFloat(e.toFixed(2)).toString()}var $D=5;function Fte(e){return e==="full"?"#1f8a4c":e==="partial"?"#c8810e":"#d23b2b"}function qve({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,Oe.jsx)("svg",{width:14,height:14,viewBox:"0 0 100 100",fill:"none",stroke:Fte(e),strokeWidth:9,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,Oe.jsx)("path",{d:t})})}function $ve({score:e,weight:t,unit:r,t:n}){if(e){if(e.awaiting)return(0,Oe.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,Oe.jsx)(cl,{size:11}),n("pendingReview")]});let a=e.m>0&&e.s>=e.m?"full":e.s>0?"partial":"none";return(0,Oe.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,Oe.jsx)(qve,{outcome:a}),(0,Oe.jsxs)("span",{className:"font-bold leading-none",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',fontSize:"1.05rem",color:Fte(a)},children:[D0(e.s)," / ",D0(e.m)]})]})}return t>0?(0,Oe.jsxs)("span",{className:"text-xs font-semibold tabular-nums text-[#8d93a0]",children:[D0(t)," ",r(t)]}):null}function Ote(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 Hve(e,t){return t.size===0?e:{exerciseAnswers:e.exerciseAnswers.map(r=>Xe(ie({},r),{questionAnswers:r.questionAnswers.map(n=>n.answers.length===0&&t.has(n.questionId)?Xe(ie({},n),{answers:t.get(n.questionId)}):n)}))}}function jve({timeLimitMinutes:e,startedAt:t,onExpire:r}){let n=e*6e4,a=new Date(t).getTime()+n,[i,o]=(0,cr.useState)(()=>Math.max(a-Date.now(),0)),s=(0,cr.useRef)(r);s.current=r,(0,cr.useEffect)(()=>{if(i<=0){s.current();return}let v=setInterval(()=>{let k=Math.max(a-Date.now(),0);o(k),k<=0&&(clearInterval(v),s.current())},1e3);return()=>clearInterval(v)},[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,b=f>0?`${f}:${String(d).padStart(2,"0")}:${String(p).padStart(2,"0")}`:`${d}:${String(p).padStart(2,"0")}`;return(0,Oe.jsxs)("span",{className:Ao("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,Oe.jsx)(cl,{size:12}),b]})}function H9({assessment:e,meta:t,locale:r="en",branding:n,timeLimitMinutes:a,startedAt:i,initialAnswers:o,onAnswersChange:s,saveState:l,resumed:u=!1,onSubmit:c,review:f,onViewReport:d,reportLabel:p,onBack:b,backLabel:v,allowReset:k,onReset:w,overlayConfig:S,contained:T=!1,layout:I,onClose:B,mediaHandler:O,onAddAnnex:N,fallbackLogoUrl:j}){var Eo,Do,gn,Sa,nr,an,zn,Ha,Bn,Mr;let H=(0,cr.useMemo)(()=>zte(r),[r]),Y=(0,cr.useCallback)(vt=>Ite(r,vt),[r]),V=Bte(r)?"rtl":"ltr",re=(0,cr.useRef)(null),xe=(Eo=I==null?void 0:I.maxWidth)!=null?Eo:Rte,oe=(Do=n==null?void 0:n.branding)==null?void 0:Do.primaryColor,le=(gn=n==null?void 0:n.branding)==null?void 0:gn.accentColor,Se=(Sa=n==null?void 0:n.branding)==null?void 0:Sa.fontFamily,_e=(nr=n==null?void 0:n.branding)==null?void 0:nr.fontUrl,de=((an=n==null?void 0:n.branding)==null?void 0:an.showPoweredBy)!==!1;(0,cr.useEffect)(()=>{if(!_e||typeof document=="undefined"||document.querySelector(`link[href="${_e}"]`))return;let wt=document.createElement("link");wt.rel="stylesheet",wt.href=_e,document.head.appendChild(wt)},[_e]);let[me,Ue]=(0,cr.useState)(()=>{var vt,wt;return(wt=(vt=f==null?void 0:f.answers)!=null?vt:o)!=null?wt:{exerciseAnswers:[]}}),[Le]=(0,cr.useState)(()=>f?new Map:Ote(o)),Ie=(0,cr.useRef)(s);Ie.current=s;let ye=(0,cr.useCallback)(vt=>{var M;let wt=Hve(vt,Le);Ue(wt),(M=Ie.current)==null||M.call(Ie,wt)},[Le]),[Me,He]=(0,cr.useState)(null);(0,cr.useEffect)(()=>{He(Date.now())},[]);let[st,_t]=(0,cr.useState)(u&&!f),ct=(0,cr.useMemo)(()=>{if(Me===null||!a||a<=0||!i)return null;let vt=new Date(i).getTime()+a*6e4-Me;return vt>0?Math.max(1,Math.floor(vt/6e4)):null},[Me,a,i]),[Ut,Bt]=(0,cr.useState)(!1),[rt,ft]=(0,cr.useState)(!1),[ot,Tr]=(0,cr.useState)((zn=f==null?void 0:f.result)!=null?zn:null),Rt=(0,cr.useMemo)(()=>Ote(f==null?void 0:f.answers),[f]),[gr,xa]=(0,cr.useState)(null),[na,cn]=(0,cr.useState)(!1),va=(0,cr.useRef)(!1),oo=(0,cr.useMemo)(()=>Fve(e),[e]),so=(0,cr.useMemo)(()=>rt?Dte(e,me):[],[rt,e,me]),_i=so.length,ss=(0,cr.useCallback)(vt=>{var E;ft(!1);let wt=(E=re.current)==null?void 0:E.querySelectorAll(`[data-question-id="${CSS.escape(vt)}"]`),M=Array.from(wt!=null?wt:[]).find(Ee=>Ee.getClientRects().length>0);M&&requestAnimationFrame(()=>M.scrollIntoView({block:"start",behavior:"smooth"}))},[]),At=(0,cr.useMemo)(()=>e.exercises.reduce((vt,wt)=>vt+Nte(wt),0),[e]),To=(0,cr.useMemo)(()=>ot?q9(ot.exerciseFeedback):void 0,[ot]),Ra=(0,cr.useMemo)(()=>{if(!ot)return{};let vt={};for(let wt of ot.exerciseFeedback){let M=0,E=0,Ee=!1;for(let q of wt.questions)for(let Z of q.nodeResults)M+=Z.score,E+=Z.maxScore,Z.status==="awaiting_review"&&(Ee=!0);vt[wt.exerciseId]={score:M,maxScore:E,awaiting:Ee}}return vt},[ot]),fi=(0,cr.useMemo)(()=>{if(!ot)return{};let vt={};for(let wt of ot.exerciseFeedback)for(let M of wt.questions){let E=0,Ee=0,q=!1;for(let Z of M.nodeResults)E+=Z.score,Ee+=Z.maxScore,Z.status==="awaiting_review"&&(q=!0);vt[M.questionId]={score:E,maxScore:Ee,awaiting:q}}return vt},[ot]),Na=(0,cr.useCallback)(async()=>{Bt(!0),xa(null);try{let vt=await c(me);Tr(vt),typeof window!="undefined"&&window.scrollTo({top:0,behavior:"smooth"})}catch(vt){xa(vt instanceof Error?vt.message:H("confirmCancel"))}finally{Bt(!1),ft(!1)}},[me,c,H]),Fr=(0,cr.useCallback)(()=>{!ot||!d||d(ot)},[ot,d]),Ve=(0,cr.useCallback)(()=>{var vt;va.current||Ut||ot||(va.current=!0,cn(!0),ft(!1),typeof document!="undefined"&&((vt=document.activeElement)==null||vt.blur()),setTimeout(()=>{Bt(!0),xa(null),c(me).then(wt=>{Tr(wt),typeof window!="undefined"&&window.scrollTo({top:0,behavior:"smooth"})}).catch(wt=>{xa(wt instanceof Error?wt.message:"submit_error")}).finally(()=>{Bt(!1),cn(!1)})},800))},[me,Ut,c,ot]),wa=(0,cr.useCallback)((vt,wt,M)=>{let E=Nte(vt),Ee=Ra[vt.id],q=vt.questions.length>1,Z=(0,cr.isValidElement)(wt)?(0,cr.cloneElement)(wt,{renderQuestion:(yr,Qe,Wr)=>{var ei;let Rn=yr.id,Lt=Le.get(Rn),dn=ie(ie({},O?{mediaHandler:O}:{}),f?{initialAnswers:(ei=Rt.get(Rn))!=null?ei:[],readOnly:!0}:Lt?{initialAnswers:Lt}:{}),Nn=Object.keys(dn).length>0&&(0,cr.isValidElement)(Qe)?(0,cr.cloneElement)(Qe,dn):Qe;if(!q)return(0,Oe.jsx)("div",{"data-question-id":Rn,children:Nn},Rn);let $i=fi[Rn],te=Pte(yr);return(0,Oe.jsxs)("div",{"data-question-id":Rn,children:[(0,Oe.jsxs)("div",{className:"flex items-center gap-2.5 mb-3",children:[(0,Oe.jsx)("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:H("question",{index:Wr+1})}),(0,Oe.jsx)($ve,{score:$i?{s:$i.score,m:$i.maxScore,awaiting:$i.awaiting}:null,weight:te,unit:Y,t:H})]}),Nn]},Rn)},renderSeparator:yr=>(0,Oe.jsx)("div",{className:"border-t border-[#e7e5e0] my-1"},`qsep-${yr}`)}):wt;return(0,Oe.jsxs)("div",{"data-exercise-id":vt.id,className:"bg-white rounded-[14px] border border-[#e7e5e0] shadow-sm overflow-hidden",children:[(0,Oe.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-[#f1efe9] border-b border-[#e7e5e0]",style:le?{backgroundColor:le}:void 0,children:[(0,Oe.jsx)("span",{className:"text-sm font-bold text-[#1d2025]",children:H("exercise",{index:M+1})}),Ee!=null&&Ee.awaiting?(0,Oe.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,Oe.jsx)(cl,{size:11}),H("pendingReview")]}):Ee?(0,Oe.jsxs)("span",{className:"font-bold leading-none tabular-nums",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',fontSize:"1.15rem",color:Ee.maxScore>0&&Ee.score>=Ee.maxScore?"#1f8a4c":Ee.maxScore>0&&Ee.score>0?"#c8810e":Ee.maxScore>0?"#d23b2b":"#8d93a0"},children:[D0(Ee.score)," / ",D0(Ee.maxScore)]}):E>0?(0,Oe.jsxs)("span",{className:"text-xs font-semibold text-[#8d93a0] tabular-nums",children:["/ ",D0(E)," ",Y(E)]}):null]}),(0,Oe.jsx)("div",{className:"p-4",children:Z})]},vt.id)},[H,Y,Ra,fi,le,O,f,Rt,Le]),ls=(0,cr.useMemo)(()=>qD(e).length>0,[e]),it=(0,cr.useCallback)(vt=>(0,Oe.jsxs)("div",{className:"flex items-center gap-3 py-2",children:[(0,Oe.jsx)("div",{className:"flex-1 border-t border-dashed border-[#e7e5e0]"}),(0,Oe.jsx)("span",{className:"text-[10px] font-bold text-[#8d93a0] uppercase tracking-widest",children:H("exercise",{index:vt+2})}),(0,Oe.jsx)("div",{className:"flex-1 border-t border-dashed border-[#e7e5e0]"})]},`sep-${vt}`),[H]),lo=de?(0,Oe.jsx)("p",{className:"pt-2 pb-1 text-center text-xs text-[#8d93a0] select-none",children:H("poweredBy")}):null,ka=ot!==null,mn=(ot==null?void 0:ot.showVerdict)!==!1,Qa=mn?ot!=null&&ot.passed?"#1f8a4c":"#d23b2b":"#1d2025";return(0,Oe.jsx)("div",{className:"edpire-scope",style:{display:"contents"},children:(0,Oe.jsxs)("div",{ref:re,dir:V,className:Ao("flex flex-col",T?"h-full":"h-dvh"),style:Se?{fontFamily:Se}:void 0,children:[(0,Oe.jsx)(_te,ie({visible:Ut&&!na,hasAiNodes:oo,text:H("evaluating"),aiText:H("aiEvaluating"),contained:T},S)),na&&(0,Oe.jsxs)("div",{className:Ao("fixed inset-0 z-50 flex flex-col items-center justify-center gap-3 bg-red-950/80 backdrop-blur-sm",T&&"absolute"),children:[(0,Oe.jsx)(cl,{size:40,className:"text-red-300"}),(0,Oe.jsx)("p",{className:"text-xl font-black text-white tracking-tight",children:H("timeUp.title")}),(0,Oe.jsx)("p",{className:"text-sm text-red-200",children:H("timeUp.submitting")})]}),(0,Oe.jsxs)("div",{className:"sticky top-0 z-10 flex-shrink-0 flex items-center justify-between px-4 py-2.5 border-b border-[#e7e5e0] bg-[#fbfaf7]",style:le?{backgroundColor:le}:void 0,children:[(0,Oe.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Oe.jsx)("img",{src:(Bn=(Ha=n==null?void 0:n.logoUrl)!=null?Ha:j)!=null?Bn:Pve,alt:(Mr=n==null?void 0:n.name)!=null?Mr:"Edpire",width:24,height:24,loading:"lazy",className:"rounded object-contain"}),(0,Oe.jsxs)("div",{children:[(0,Oe.jsx)("h1",{className:"text-sm font-bold text-[#1d2025]",children:t.title}),(0,Oe.jsx)("p",{className:"text-[11px] text-[#8d93a0]",children:At>0&&(0,Oe.jsxs)("span",{className:"ms-2 font-semibold text-[#565b66]",children:["/ ",D0(At)," ",Y(At)]})})]}),!ka&&Me!==null&&a&&a>0&&i&&(0,Oe.jsx)(jve,{timeLimitMinutes:a,startedAt:i,onExpire:Ve}),!ka&&(l==="saving"||l==="saved")&&(0,Oe.jsxs)("span",{role:"status",className:"hidden sm:inline-flex items-center gap-1 text-[11px] font-medium text-[#8d93a0]",children:[l==="saved"?(0,Oe.jsx)(Vl,{size:12}):(0,Oe.jsx)(Lu,{size:12,className:"animate-spin"}),H(l==="saved"?"answersSaved":"answersSaving")]})]}),(0,Oe.jsxs)("div",{className:"flex items-center gap-2",children:[k&&(0,Oe.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,Oe.jsx)(b2,{size:13}),H("reset")]}),(!ka||f)&&b&&(0,Oe.jsxs)("button",{onClick:b,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,Oe.jsx)(Wi,{size:13}),v!=null?v:H("back")]}),B&&(0,Oe.jsx)("button",{onClick:B,className:"p-1.5 text-[#8d93a0] hover:text-[#1d2025] hover:bg-[#f1efe9] rounded-lg transition-colors",children:(0,Oe.jsx)(Wi,{size:15})}),!ka&&(0,Oe.jsx)("button",{onClick:()=>ft(!0),disabled:Ut,style:oe?{backgroundColor:oe}: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:Ut?(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsx)(Lu,{size:14,className:"animate-spin"}),H("submitting")]}):(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsx)(R1,{size:14}),(0,Oe.jsx)("span",{className:"sm:hidden",children:H("confirmSubmit")}),(0,Oe.jsx)("span",{className:"hidden sm:inline",children:H("submit")})]})})]})]}),gr&&(0,Oe.jsx)("div",{className:"flex-shrink-0 bg-[#fdeeec] border-b border-[#f6cfc9] px-4 py-2 text-sm text-[#a32b1e]",children:gr}),!ka&&l==="failed"&&(0,Oe.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,Oe.jsx)(l2,{size:15,className:"flex-shrink-0"}),H("answersNotSaved")]}),!ka&&st&&(Le.size>0||ct!==null)&&(0,Oe.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:[ct!==null&&(0,Oe.jsx)(cl,{size:15,className:"flex-shrink-0 text-[#565b66]"}),(0,Oe.jsxs)("span",{className:"flex-1 min-w-0",children:[Le.size>0?H("resumeRestored"):H("resumeFresh"),ct!==null&&(0,Oe.jsxs)(Oe.Fragment,{children:[" ",H("resumeTimeLeft",{minutes:ct})]})]}),(0,Oe.jsx)("button",{type:"button",onClick:()=>_t(!1),"aria-label":H("close"),className:"flex-shrink-0 p-1 rounded-md text-[#8d93a0] hover:text-[#1d2025] hover:bg-[#e7e5e0] transition-colors",children:(0,Oe.jsx)(Wi,{size:14})})]}),ka&&ot&&(ot.awaitingManualGrading?(0,Oe.jsx)("div",{className:"flex-shrink-0 border-b bg-[#fbf1dc] border-[#f2e2bf]",children:(0,Oe.jsx)("div",{className:"mx-auto px-4 py-3 sm:px-6 sm:py-4",style:{maxWidth:xe},children:(0,Oe.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2 sm:gap-4",children:[(0,Oe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Oe.jsx)(cl,{size:20,className:"text-[#c8810e] flex-shrink-0"}),(0,Oe.jsx)("span",{className:"text-sm font-semibold text-[#8a5a08]",children:ot.aiPending?H("beingMarked"):H("awaitingReview")})]}),(0,Oe.jsx)("div",{className:"hidden sm:block w-px h-8 bg-[#f2e2bf]"}),(0,Oe.jsx)("p",{className:"text-sm text-[#8a5a08] flex-1 min-w-0",children:ot.aiPending?H("beingMarkedDesc"):H("awaitingReviewDesc")}),d&&(0,Oe.jsxs)("button",{onClick:Fr,style:oe?{backgroundColor:oe}: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,Oe.jsx)(Fc,{size:14}),p!=null?p:H("viewFullReport")]})]})})}):(0,Oe.jsx)("div",{className:Ao("flex-shrink-0 border-b",mn?ot.passed?"bg-[#ecf8f0] border-[#c5e8d1]":"bg-[#fdeeec] border-[#f6cfc9]":"bg-[#f5f4f1] border-[#e7e5e0]"),children:(0,Oe.jsx)("div",{className:"mx-auto px-4 py-3 sm:px-6 sm:py-4",style:{maxWidth:xe},children:(0,Oe.jsxs)("div",{className:"flex flex-wrap sm:flex-nowrap items-center gap-x-4 gap-y-2",children:[(0,Oe.jsxs)("div",{className:"flex items-center gap-2",children:[mn?ot.passed?(0,Oe.jsx)(bd,{size:20,className:"text-[#1f8a4c] flex-shrink-0"}):(0,Oe.jsx)(xd,{size:20,className:"text-[#d23b2b] flex-shrink-0"}):null,(0,Oe.jsx)("span",{className:"text-sm font-semibold",style:{color:Qa},children:mn?ot.passed?H("assessmentPassed"):H("assessmentNotPassed"):H("yourScore")})]}),(0,Oe.jsx)("div",{className:"hidden sm:block w-px h-8 bg-[#e7e5e0]"}),(0,Oe.jsxs)("div",{className:"flex items-baseline gap-1.5",children:[(0,Oe.jsxs)("span",{className:"leading-none tabular-nums text-[1.6rem] sm:text-[2rem]",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',color:Qa},children:[D0(ot.totalScore)," / ",D0(ot.maxScore)]}),(0,Oe.jsx)("span",{className:"text-sm text-[#8d93a0] font-medium",children:Y(ot.maxScore)})]}),(0,Oe.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-[140px]",children:[(0,Oe.jsx)("div",{className:"flex-1 h-2 bg-[#e7e5e0] rounded-full overflow-hidden min-w-[80px]",children:(0,Oe.jsx)("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${ot.percentage}%`,backgroundColor:Qa}})}),(0,Oe.jsxs)("span",{className:"text-sm font-bold tabular-nums flex-shrink-0",style:{color:Qa},children:[ot.percentage,"%"]})]}),d&&(0,Oe.jsxs)("button",{onClick:Fr,style:oe?{backgroundColor:oe}: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,Oe.jsx)(Fc,{size:14}),p!=null?p:H("viewFullReport")]})]})})})),(0,Oe.jsx)("div",{className:Ao("flex-1 overflow-hidden flex flex-col",na&&"pointer-events-none opacity-60"),children:e.annex||ls?(0,Oe.jsx)(Lte,{assessment:e,isSubmitted:ka,setAnswers:ye,validationFeedback:To,renderExercise:wa,renderSeparator:it,primaryColor:oe,contained:T,locale:$9(r),contentMaxWidth:xe,t:H,footer:lo}):N?(0,Oe.jsx)(Ete,{assessment:e,isSubmitted:ka,setAnswers:ye,validationFeedback:To,renderExercise:wa,renderSeparator:it,primaryColor:oe,contained:T,locale:$9(r),contentMaxWidth:xe,t:H,onAddAnnex:N,footer:lo}):(0,Oe.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,Oe.jsxs)("div",{className:"mx-auto p-6 flex flex-col gap-4",style:{maxWidth:xe},children:[(0,Oe.jsx)(yf,{assessment:e,onAnswersChange:ka?void 0:ye,validationFeedback:To,renderExercise:wa,renderSeparator:it,locale:$9(r)}),lo]})})}),rt&&(0,Oe.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:(0,Oe.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,Oe.jsx)("h3",{id:"edpire-submit-confirm-title",className:"text-base font-bold text-[#1d2025] mb-2",children:H("confirmTitle")}),_i>0&&(0,Oe.jsxs)("div",{className:"text-sm text-[#8a5a08] bg-[#fbf1dc] border border-[#f2e2bf] rounded-lg px-3 py-2 mb-3",children:[(0,Oe.jsxs)("p",{className:"flex items-start gap-2 font-semibold",children:[(0,Oe.jsx)(vd,{size:15,className:"flex-shrink-0 mt-px"}),(0,Oe.jsx)("span",{children:_i===1?H("unansweredOne"):H("unansweredMany",{count:_i})})]}),(0,Oe.jsxs)("ul",{className:"mt-1 ps-[23px] flex flex-col gap-0.5",children:[so.slice(0,$D).map(vt=>(0,Oe.jsx)("li",{children:(0,Oe.jsx)("button",{type:"button",onClick:()=>ss(vt.questionId),className:"text-start underline underline-offset-2 hover:text-[#1d2025] cursor-pointer",children:vt.only?H("exercise",{index:vt.exerciseIndex+1}):`${H("exercise",{index:vt.exerciseIndex+1})} \xB7 ${H("question",{index:vt.questionIndex+1})}`})},vt.questionId)),_i>$D&&(0,Oe.jsx)("li",{children:H("unansweredMore",{count:_i-$D})})]})]}),(0,Oe.jsx)("p",{className:"text-sm text-[#565b66] mb-5",children:H("confirmDescription")}),(0,Oe.jsxs)("div",{className:"flex gap-3 justify-end",children:[(0,Oe.jsx)("button",{onClick:()=>ft(!1),className:"px-4 py-2 text-sm font-medium text-[#565b66] hover:bg-[#f1efe9] rounded-lg transition-colors",children:H("confirmCancel")}),(0,Oe.jsxs)("button",{onClick:Na,disabled:Ut,style:oe?{backgroundColor:oe}: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:[Ut?(0,Oe.jsx)(Lu,{size:14,className:"animate-spin"}):(0,Oe.jsx)(R1,{size:14}),H("confirmSubmit")]})]})]})})]})})}function j9(e){return(e!=null?e:[]).map(t=>({exerciseId:t.exercise_id,questions:t.questions.map(r=>({questionId:r.question_id,nodeResults:r.node_results.map(n=>ie(ie(ie(ie({nodeId:n.node_id,status:n.status,score:n.score,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 $te=Pe($t());function HD(e,t){var n,a;let r=j9(e.exercise_feedback);return{submissionId:e.submission_id,totalScore:e.score,maxScore:e.max_score,percentage:e.percentage,passed:e.passed,returnUrl:t!=null?t:null,exerciseFeedback:r,awaitingManualGrading:(n=e.awaiting_manual_grading)!=null?n:!1,aiPending:(a=e.ai_pending)!=null?a:!1}}function jD(e){var t;return{annex:(t=e.annex)!=null?t:void 0,exercises:e.exercises.map(r=>({id:r.id,sharedContext:r.sharedContext,questions:r.questions.map(n=>({id:n.id,version:"1.0",content:n.content,answerKeys:[]}))}))}}function qte({token:e,data:t,baseUrl:r,options:n}){var B,O,N;let{locale:a,branding:i,returnUrl:o,reportLabel:s,backLabel:l,onBack:u,overlayConfig:c,layout:f,mediaHandler:d,onComplete:p,onError:b}=n,v=(B=i!=null?i:t.branding)!=null?B:void 0,k=(O=a!=null?a:t.meta.language)!=null?O:"en",w=(0,mh.useMemo)(()=>jD(t.assessment),[t]),[S]=(0,mh.useState)(()=>new Date().toISOString()),T=(0,mh.useCallback)(async j=>{let H=await fetch(`${r}/api/v1/embed/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e,answers:j})});if(!H.ok){let V=await H.json().catch(()=>({})),re=typeof V.error=="string"?V.error:"Submission failed",xe=H.status===401?"TOKEN_INVALID":H.status===409?"TOKEN_USED":H.status===404?"ASSESSMENT_NOT_FOUND":"UNKNOWN";throw b==null||b({code:xe,message:re}),new Error(re)}let Y=await H.json();return p==null||p(Y),HD(Y,o)},[r,e,p,b,o]),I=(0,mh.useCallback)(j=>{if(o)try{let H=new URL(o);H.searchParams.set("submission_id",j.submissionId),j.awaitingManualGrading||(H.searchParams.set("score",String(j.totalScore)),H.searchParams.set("max_score",String(j.maxScore))),window.location.href=H.toString()}catch(H){window.location.href=o}},[o]);return(0,$te.jsx)(H9,{assessment:w,meta:{title:t.meta.title,category:(N=t.meta.category)!=null?N:null},locale:k,branding:v,timeLimitMinutes:t.meta.settings.time_limit_minutes,startedAt:S,onSubmit:T,onViewReport:o?I:void 0,reportLabel:s,onBack:u,backLabel:l,overlayConfig:c,layout:f,mediaHandler:d})}var UD=Pe(kt());var jte=Pe($t());function Uve(){return Promise.reject(new Error("A review cannot be submitted"))}function Hte({review:e,locale:t,branding:r,layout:n,onBack:a,backLabel:i}){var u,c,f;let o=(0,UD.useMemo)(()=>jD(e.assessment),[e]),s=(0,UD.useMemo)(()=>({answers:e.answers,result:HD({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,exercise_feedback:e.exercise_feedback})}),[e]),l=(u=t!=null?t:e.meta.language)!=null?u:"en";return(0,jte.jsx)(H9,{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,onSubmit:Uve,onBack:a,backLabel:i,layout:n})}var Kte=Pe(kt()),Vte=Pe(uC());var K9=Pe(kt());var U9=Pe($t()),Ute=K9.default.memo(function({content:t,onAnswersChange:r,feedback:n,initialAnswers:a,readOnly:i,className:o,dir:s}){let l=(0,K9.useMemo)(()=>{if(n)return new Map(Object.entries(n))},[n]),u=(0,U9.jsx)(ng,{content:t,onAnswersChange:r,initialAnswers:a,validationFeedback:l,readOnly:i,className:o});return(0,U9.jsx)("div",{className:"edpire-scope",style:{display:"contents"},children:s?(0,U9.jsx)("div",{dir:s,children:u}):u})});function Gte(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,Vte.createRoot)(l);function f(){c.render(Kte.default.createElement(Ute,u))}return f(),{setContent(d){u=Xe(ie({},u),{content:d,feedback:null}),f()},setFeedback(d){u=Xe(ie({},u),{feedback:d}),f()},setInitialAnswers(d){u=Xe(ie({},u),{initialAnswers:d}),f()},unmount(){c.unmount()}}}function Wte(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 Xte(e){var i,o,s,l,u;let t=q9(j9(e.exercise_feedback)),r=new Map;for(let c of e.answers.exerciseAnswers)for(let f of c.questionAnswers)r.set(f.questionId,f.answers);let n=[],a=0;for(let c of e.assessment.exercises){let f=t.get(c.id);for(let d of c.questions){let p=f==null?void 0:f.get(d.id),b=(s=(o=(i=e.exercise_feedback.find(S=>S.exercise_id===c.id))==null?void 0:i.questions.find(S=>S.question_id===d.id))==null?void 0:o.node_results)!=null?s:[],v=0,k=0,w=!1;for(let S of b)v+=S.score,k+=S.max_score,S.status==="awaiting_review"&&(w=!0);n.push({exerciseId:c.id,questionId:d.id,content:d.content,sharedContext:(l=c.sharedContext)!=null?l:null,answers:(u=r.get(d.id))!=null?u:[],feedback:p?Object.fromEntries(p):{},score:v,maxScore:k,status:w?"awaiting_review":k===0?"unscored":v>=k?"correct":v>0?"partial":"incorrect",index:a++})}}return n}function Yte(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 Kve="https://edpire.com";function Jte(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 Vve={mount(e){let{token:t,container:r,baseUrl:n=Kve,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 b=p==="ORIGIN_NOT_ALLOWED"?`Add ${typeof location!="undefined"?location.origin:"this origin"} to Allowed Embed Origins in Edpire, under Integrations then Origins.`:"";Jte(i,d,b);return}u=await c.json()}catch(c){a==null||a({code:"NETWORK_ERROR",message:"Failed to connect to Edpire"}),Jte(i,"Failed to connect to Edpire. Please try again.","");return}s||(i.innerHTML="",o=(0,VD.createRoot)(i),o.render(KD.default.createElement(qte,{token:t,data:u,baseUrl:n,options:e})))})(),{unmount:l}},review(e){let i=e,{container:t}=i,r=Vn(i,["container"]),n=typeof t=="string"?document.querySelector(t):t;if(!n)return{unmount:()=>{}};n.textContent="";let a=(0,VD.createRoot)(n);return a.render(KD.default.createElement(Hte,r)),{unmount(){let o=a;a=null,setTimeout(()=>o==null?void 0:o.unmount(),0)}}}};return Rre(Gve);})();
|
|
4115
|
+
`);var Oe=Pe($t()),Fve="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 qve(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 Pte(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 Nte(e){return e.questions.reduce((t,r)=>t+Pte(r),0)}function D0(e){return Number.isInteger(e)?String(e):parseFloat(e.toFixed(2)).toString()}var $D=5;function Fte(e){return e==="full"?"#1f8a4c":e==="partial"?"#c8810e":"#d23b2b"}function $ve({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,Oe.jsx)("svg",{width:14,height:14,viewBox:"0 0 100 100",fill:"none",stroke:Fte(e),strokeWidth:9,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,Oe.jsx)("path",{d:t})})}function Hve({score:e,weight:t,unit:r,t:n}){if(e){if(e.awaiting)return(0,Oe.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,Oe.jsx)(cl,{size:11}),n("pendingReview")]});let a=e.m>0&&e.s>=e.m?"full":e.s>0?"partial":"none";return(0,Oe.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,Oe.jsx)($ve,{outcome:a}),(0,Oe.jsxs)("span",{className:"font-bold leading-none",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',fontSize:"1.05rem",color:Fte(a)},children:[D0(e.s)," / ",D0(e.m)]})]})}return t>0?(0,Oe.jsxs)("span",{className:"text-xs font-semibold tabular-nums text-[#8d93a0]",children:[D0(t)," ",r(t)]}):null}function Ote(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 jve(e,t){return t.size===0?e:{exerciseAnswers:e.exerciseAnswers.map(r=>Xe(ie({},r),{questionAnswers:r.questionAnswers.map(n=>n.answers.length===0&&t.has(n.questionId)?Xe(ie({},n),{answers:t.get(n.questionId)}):n)}))}}function Uve({timeLimitMinutes:e,startedAt:t,onExpire:r}){let n=e*6e4,a=new Date(t).getTime()+n,[i,o]=(0,cr.useState)(()=>Math.max(a-Date.now(),0)),s=(0,cr.useRef)(r);s.current=r,(0,cr.useEffect)(()=>{if(i<=0){s.current();return}let v=setInterval(()=>{let k=Math.max(a-Date.now(),0);o(k),k<=0&&(clearInterval(v),s.current())},1e3);return()=>clearInterval(v)},[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,b=f>0?`${f}:${String(d).padStart(2,"0")}:${String(p).padStart(2,"0")}`:`${d}:${String(p).padStart(2,"0")}`;return(0,Oe.jsxs)("span",{className:Ao("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,Oe.jsx)(cl,{size:12}),b]})}function H9({assessment:e,meta:t,locale:r="en",branding:n,timeLimitMinutes:a,startedAt:i,initialAnswers:o,onAnswersChange:s,saveState:l,resumed:u=!1,onSubmit:c,review:f,onViewReport:d,reportLabel:p,onBack:b,backLabel:v,allowReset:k,onReset:w,overlayConfig:S,contained:T=!1,layout:I,onClose:B,mediaHandler:O,onAddAnnex:N,fallbackLogoUrl:j}){var Eo,Do,gn,Sa,nr,an,zn,Ha,Bn,Mr;let H=(0,cr.useMemo)(()=>zte(r),[r]),Y=(0,cr.useCallback)(vt=>Ite(r,vt),[r]),V=Bte(r)?"rtl":"ltr",re=(0,cr.useRef)(null),xe=(Eo=I==null?void 0:I.maxWidth)!=null?Eo:Rte,oe=(Do=n==null?void 0:n.branding)==null?void 0:Do.primaryColor,le=(gn=n==null?void 0:n.branding)==null?void 0:gn.accentColor,Se=(Sa=n==null?void 0:n.branding)==null?void 0:Sa.fontFamily,_e=(nr=n==null?void 0:n.branding)==null?void 0:nr.fontUrl,de=((an=n==null?void 0:n.branding)==null?void 0:an.showPoweredBy)!==!1;(0,cr.useEffect)(()=>{if(!_e||typeof document=="undefined"||document.querySelector(`link[href="${_e}"]`))return;let wt=document.createElement("link");wt.rel="stylesheet",wt.href=_e,document.head.appendChild(wt)},[_e]);let[me,Ue]=(0,cr.useState)(()=>{var vt,wt;return(wt=(vt=f==null?void 0:f.answers)!=null?vt:o)!=null?wt:{exerciseAnswers:[]}}),[Le]=(0,cr.useState)(()=>f?new Map:Ote(o)),Ie=(0,cr.useRef)(s);Ie.current=s;let ye=(0,cr.useCallback)(vt=>{var M;let wt=jve(vt,Le);Ue(wt),(M=Ie.current)==null||M.call(Ie,wt)},[Le]),[Me,He]=(0,cr.useState)(null);(0,cr.useEffect)(()=>{He(Date.now())},[]);let[st,_t]=(0,cr.useState)(u&&!f),ct=(0,cr.useMemo)(()=>{if(Me===null||!a||a<=0||!i)return null;let vt=new Date(i).getTime()+a*6e4-Me;return vt>0?Math.max(1,Math.floor(vt/6e4)):null},[Me,a,i]),[Ut,Bt]=(0,cr.useState)(!1),[rt,ft]=(0,cr.useState)(!1),[ot,Tr]=(0,cr.useState)((zn=f==null?void 0:f.result)!=null?zn:null),Rt=(0,cr.useMemo)(()=>Ote(f==null?void 0:f.answers),[f]),[gr,xa]=(0,cr.useState)(null),[na,cn]=(0,cr.useState)(!1),va=(0,cr.useRef)(!1),oo=(0,cr.useMemo)(()=>qve(e),[e]),so=(0,cr.useMemo)(()=>rt?Dte(e,me):[],[rt,e,me]),_i=so.length,ss=(0,cr.useCallback)(vt=>{var E;ft(!1);let wt=(E=re.current)==null?void 0:E.querySelectorAll(`[data-question-id="${CSS.escape(vt)}"]`),M=Array.from(wt!=null?wt:[]).find(Ee=>Ee.getClientRects().length>0);M&&requestAnimationFrame(()=>M.scrollIntoView({block:"start",behavior:"smooth"}))},[]),At=(0,cr.useMemo)(()=>e.exercises.reduce((vt,wt)=>vt+Nte(wt),0),[e]),To=(0,cr.useMemo)(()=>ot?q9(ot.exerciseFeedback):void 0,[ot]),Ra=(0,cr.useMemo)(()=>{if(!ot)return{};let vt={};for(let wt of ot.exerciseFeedback){let M=0,E=0,Ee=!1;for(let q of wt.questions)for(let Z of q.nodeResults)M+=Z.score,E+=Z.maxScore,Z.status==="awaiting_review"&&(Ee=!0);vt[wt.exerciseId]={score:M,maxScore:E,awaiting:Ee}}return vt},[ot]),fi=(0,cr.useMemo)(()=>{if(!ot)return{};let vt={};for(let wt of ot.exerciseFeedback)for(let M of wt.questions){let E=0,Ee=0,q=!1;for(let Z of M.nodeResults)E+=Z.score,Ee+=Z.maxScore,Z.status==="awaiting_review"&&(q=!0);vt[M.questionId]={score:E,maxScore:Ee,awaiting:q}}return vt},[ot]),Na=(0,cr.useCallback)(async()=>{Bt(!0),xa(null);try{let vt=await c(me);Tr(vt),typeof window!="undefined"&&window.scrollTo({top:0,behavior:"smooth"})}catch(vt){xa(vt instanceof Error?vt.message:H("confirmCancel"))}finally{Bt(!1),ft(!1)}},[me,c,H]),Fr=(0,cr.useCallback)(()=>{!ot||!d||d(ot)},[ot,d]),Ve=(0,cr.useCallback)(()=>{var vt;va.current||Ut||ot||(va.current=!0,cn(!0),ft(!1),typeof document!="undefined"&&((vt=document.activeElement)==null||vt.blur()),setTimeout(()=>{Bt(!0),xa(null),c(me).then(wt=>{Tr(wt),typeof window!="undefined"&&window.scrollTo({top:0,behavior:"smooth"})}).catch(wt=>{xa(wt instanceof Error?wt.message:"submit_error")}).finally(()=>{Bt(!1),cn(!1)})},800))},[me,Ut,c,ot]),wa=(0,cr.useCallback)((vt,wt,M)=>{let E=Nte(vt),Ee=Ra[vt.id],q=vt.questions.length>1,Z=(0,cr.isValidElement)(wt)?(0,cr.cloneElement)(wt,{renderQuestion:(yr,Qe,Wr)=>{var ei;let Rn=yr.id,Lt=Le.get(Rn),dn=ie(ie({},O?{mediaHandler:O}:{}),f?{initialAnswers:(ei=Rt.get(Rn))!=null?ei:[],readOnly:!0}:Lt?{initialAnswers:Lt}:{}),Nn=Object.keys(dn).length>0&&(0,cr.isValidElement)(Qe)?(0,cr.cloneElement)(Qe,dn):Qe;if(!q)return(0,Oe.jsx)("div",{"data-question-id":Rn,children:Nn},Rn);let $i=fi[Rn],te=Pte(yr);return(0,Oe.jsxs)("div",{"data-question-id":Rn,children:[(0,Oe.jsxs)("div",{className:"flex items-center gap-2.5 mb-3",children:[(0,Oe.jsx)("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:H("question",{index:Wr+1})}),(0,Oe.jsx)(Hve,{score:$i?{s:$i.score,m:$i.maxScore,awaiting:$i.awaiting}:null,weight:te,unit:Y,t:H})]}),Nn]},Rn)},renderSeparator:yr=>(0,Oe.jsx)("div",{className:"border-t border-[#e7e5e0] my-1"},`qsep-${yr}`)}):wt;return(0,Oe.jsxs)("div",{"data-exercise-id":vt.id,className:"bg-white rounded-[14px] border border-[#e7e5e0] shadow-sm overflow-hidden",children:[(0,Oe.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 bg-[#f1efe9] border-b border-[#e7e5e0]",style:le?{backgroundColor:le}:void 0,children:[(0,Oe.jsx)("span",{className:"text-sm font-bold text-[#1d2025]",children:H("exercise",{index:M+1})}),Ee!=null&&Ee.awaiting?(0,Oe.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,Oe.jsx)(cl,{size:11}),H("pendingReview")]}):Ee?(0,Oe.jsxs)("span",{className:"font-bold leading-none tabular-nums",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',fontSize:"1.15rem",color:Ee.maxScore>0&&Ee.score>=Ee.maxScore?"#1f8a4c":Ee.maxScore>0&&Ee.score>0?"#c8810e":Ee.maxScore>0?"#d23b2b":"#8d93a0"},children:[D0(Ee.score)," / ",D0(Ee.maxScore)]}):E>0?(0,Oe.jsxs)("span",{className:"text-xs font-semibold text-[#8d93a0] tabular-nums",children:["/ ",D0(E)," ",Y(E)]}):null]}),(0,Oe.jsx)("div",{className:"p-4",children:Z})]},vt.id)},[H,Y,Ra,fi,le,O,f,Rt,Le]),ls=(0,cr.useMemo)(()=>qD(e).length>0,[e]),it=(0,cr.useCallback)(vt=>(0,Oe.jsxs)("div",{className:"flex items-center gap-3 py-2",children:[(0,Oe.jsx)("div",{className:"flex-1 border-t border-dashed border-[#e7e5e0]"}),(0,Oe.jsx)("span",{className:"text-[10px] font-bold text-[#8d93a0] uppercase tracking-widest",children:H("exercise",{index:vt+2})}),(0,Oe.jsx)("div",{className:"flex-1 border-t border-dashed border-[#e7e5e0]"})]},`sep-${vt}`),[H]),lo=de?(0,Oe.jsx)("p",{className:"pt-2 pb-1 text-center text-xs text-[#8d93a0] select-none",children:H("poweredBy")}):null,ka=ot!==null,mn=(ot==null?void 0:ot.showVerdict)!==!1,Qa=mn?ot!=null&&ot.passed?"#1f8a4c":"#d23b2b":"#1d2025";return(0,Oe.jsx)("div",{className:"edpire-scope",style:{display:"contents"},children:(0,Oe.jsxs)("div",{ref:re,dir:V,className:Ao("flex flex-col",T?"h-full":"h-dvh"),style:Se?{fontFamily:Se}:void 0,children:[(0,Oe.jsx)(_te,ie({visible:Ut&&!na,hasAiNodes:oo,text:H("evaluating"),aiText:H("aiEvaluating"),contained:T},S)),na&&(0,Oe.jsxs)("div",{className:Ao("fixed inset-0 z-50 flex flex-col items-center justify-center gap-3 bg-red-950/80 backdrop-blur-sm",T&&"absolute"),children:[(0,Oe.jsx)(cl,{size:40,className:"text-red-300"}),(0,Oe.jsx)("p",{className:"text-xl font-black text-white tracking-tight",children:H("timeUp.title")}),(0,Oe.jsx)("p",{className:"text-sm text-red-200",children:H("timeUp.submitting")})]}),(0,Oe.jsxs)("div",{className:"sticky top-0 z-10 flex-shrink-0 flex items-center justify-between px-4 py-2.5 border-b border-[#e7e5e0] bg-[#fbfaf7]",style:le?{backgroundColor:le}:void 0,children:[(0,Oe.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Oe.jsx)("img",{src:(Bn=(Ha=n==null?void 0:n.logoUrl)!=null?Ha:j)!=null?Bn:Fve,alt:(Mr=n==null?void 0:n.name)!=null?Mr:"Edpire",width:24,height:24,loading:"lazy",className:"rounded object-contain"}),(0,Oe.jsxs)("div",{children:[(0,Oe.jsx)("h1",{className:"text-sm font-bold text-[#1d2025]",children:t.title}),(0,Oe.jsx)("p",{className:"text-[11px] text-[#8d93a0]",children:At>0&&(0,Oe.jsxs)("span",{className:"ms-2 font-semibold text-[#565b66]",children:["/ ",D0(At)," ",Y(At)]})})]}),!ka&&Me!==null&&a&&a>0&&i&&(0,Oe.jsx)(Uve,{timeLimitMinutes:a,startedAt:i,onExpire:Ve}),!ka&&(l==="saving"||l==="saved")&&(0,Oe.jsxs)("span",{role:"status",className:"hidden sm:inline-flex items-center gap-1 text-[11px] font-medium text-[#8d93a0]",children:[l==="saved"?(0,Oe.jsx)(Vl,{size:12}):(0,Oe.jsx)(Lu,{size:12,className:"animate-spin"}),H(l==="saved"?"answersSaved":"answersSaving")]})]}),(0,Oe.jsxs)("div",{className:"flex items-center gap-2",children:[k&&(0,Oe.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,Oe.jsx)(b2,{size:13}),H("reset")]}),(!ka||f)&&b&&(0,Oe.jsxs)("button",{onClick:b,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,Oe.jsx)(Wi,{size:13}),v!=null?v:H("back")]}),B&&(0,Oe.jsx)("button",{onClick:B,className:"p-1.5 text-[#8d93a0] hover:text-[#1d2025] hover:bg-[#f1efe9] rounded-lg transition-colors",children:(0,Oe.jsx)(Wi,{size:15})}),!ka&&(0,Oe.jsx)("button",{onClick:()=>ft(!0),disabled:Ut,style:oe?{backgroundColor:oe}: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:Ut?(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsx)(Lu,{size:14,className:"animate-spin"}),H("submitting")]}):(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsx)(R1,{size:14}),(0,Oe.jsx)("span",{className:"sm:hidden",children:H("confirmSubmit")}),(0,Oe.jsx)("span",{className:"hidden sm:inline",children:H("submit")})]})})]})]}),gr&&(0,Oe.jsx)("div",{className:"flex-shrink-0 bg-[#fdeeec] border-b border-[#f6cfc9] px-4 py-2 text-sm text-[#a32b1e]",children:gr}),!ka&&l==="failed"&&(0,Oe.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,Oe.jsx)(l2,{size:15,className:"flex-shrink-0"}),H("answersNotSaved")]}),!ka&&st&&(Le.size>0||ct!==null)&&(0,Oe.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:[ct!==null&&(0,Oe.jsx)(cl,{size:15,className:"flex-shrink-0 text-[#565b66]"}),(0,Oe.jsxs)("span",{className:"flex-1 min-w-0",children:[Le.size>0?H("resumeRestored"):H("resumeFresh"),ct!==null&&(0,Oe.jsxs)(Oe.Fragment,{children:[" ",H("resumeTimeLeft",{minutes:ct})]})]}),(0,Oe.jsx)("button",{type:"button",onClick:()=>_t(!1),"aria-label":H("close"),className:"flex-shrink-0 p-1 rounded-md text-[#8d93a0] hover:text-[#1d2025] hover:bg-[#e7e5e0] transition-colors",children:(0,Oe.jsx)(Wi,{size:14})})]}),ka&&ot&&(ot.awaitingManualGrading?(0,Oe.jsx)("div",{className:"flex-shrink-0 border-b bg-[#fbf1dc] border-[#f2e2bf]",children:(0,Oe.jsx)("div",{className:"mx-auto px-4 py-3 sm:px-6 sm:py-4",style:{maxWidth:xe},children:(0,Oe.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-2 sm:gap-4",children:[(0,Oe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Oe.jsx)(cl,{size:20,className:"text-[#c8810e] flex-shrink-0"}),(0,Oe.jsx)("span",{className:"text-sm font-semibold text-[#8a5a08]",children:ot.aiPending?H("beingMarked"):H("awaitingReview")})]}),(0,Oe.jsx)("div",{className:"hidden sm:block w-px h-8 bg-[#f2e2bf]"}),(0,Oe.jsx)("p",{className:"text-sm text-[#8a5a08] flex-1 min-w-0",children:ot.aiPending?H("beingMarkedDesc"):H("awaitingReviewDesc")}),d&&(0,Oe.jsxs)("button",{onClick:Fr,style:oe?{backgroundColor:oe}: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,Oe.jsx)(Fc,{size:14}),p!=null?p:H("viewFullReport")]})]})})}):(0,Oe.jsx)("div",{className:Ao("flex-shrink-0 border-b",mn?ot.passed?"bg-[#ecf8f0] border-[#c5e8d1]":"bg-[#fdeeec] border-[#f6cfc9]":"bg-[#f5f4f1] border-[#e7e5e0]"),children:(0,Oe.jsx)("div",{className:"mx-auto px-4 py-3 sm:px-6 sm:py-4",style:{maxWidth:xe},children:(0,Oe.jsxs)("div",{className:"flex flex-wrap sm:flex-nowrap items-center gap-x-4 gap-y-2",children:[(0,Oe.jsxs)("div",{className:"flex items-center gap-2",children:[mn?ot.passed?(0,Oe.jsx)(bd,{size:20,className:"text-[#1f8a4c] flex-shrink-0"}):(0,Oe.jsx)(xd,{size:20,className:"text-[#d23b2b] flex-shrink-0"}):null,(0,Oe.jsx)("span",{className:"text-sm font-semibold",style:{color:Qa},children:mn?ot.passed?H("assessmentPassed"):H("assessmentNotPassed"):H("yourScore")})]}),(0,Oe.jsx)("div",{className:"hidden sm:block w-px h-8 bg-[#e7e5e0]"}),(0,Oe.jsxs)("div",{className:"flex items-baseline gap-1.5",children:[(0,Oe.jsxs)("span",{className:"leading-none tabular-nums text-[1.6rem] sm:text-[2rem]",style:{fontFamily:'var(--font-hand, "Caveat", cursive)',color:Qa},children:[D0(ot.totalScore)," / ",D0(ot.maxScore)]}),(0,Oe.jsx)("span",{className:"text-sm text-[#8d93a0] font-medium",children:Y(ot.maxScore)})]}),(0,Oe.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-[140px]",children:[(0,Oe.jsx)("div",{className:"flex-1 h-2 bg-[#e7e5e0] rounded-full overflow-hidden min-w-[80px]",children:(0,Oe.jsx)("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${ot.percentage}%`,backgroundColor:Qa}})}),(0,Oe.jsxs)("span",{className:"text-sm font-bold tabular-nums flex-shrink-0",style:{color:Qa},children:[ot.percentage,"%"]})]}),d&&(0,Oe.jsxs)("button",{onClick:Fr,style:oe?{backgroundColor:oe}: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,Oe.jsx)(Fc,{size:14}),p!=null?p:H("viewFullReport")]})]})})})),(0,Oe.jsx)("div",{className:Ao("flex-1 overflow-hidden flex flex-col",na&&"pointer-events-none opacity-60"),children:e.annex||ls?(0,Oe.jsx)(Lte,{assessment:e,isSubmitted:ka,setAnswers:ye,validationFeedback:To,renderExercise:wa,renderSeparator:it,primaryColor:oe,contained:T,locale:$9(r),contentMaxWidth:xe,t:H,footer:lo}):N?(0,Oe.jsx)(Ete,{assessment:e,isSubmitted:ka,setAnswers:ye,validationFeedback:To,renderExercise:wa,renderSeparator:it,primaryColor:oe,contained:T,locale:$9(r),contentMaxWidth:xe,t:H,onAddAnnex:N,footer:lo}):(0,Oe.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,Oe.jsxs)("div",{className:"mx-auto p-6 flex flex-col gap-4",style:{maxWidth:xe},children:[(0,Oe.jsx)(yf,{assessment:e,onAnswersChange:ka?void 0:ye,validationFeedback:To,renderExercise:wa,renderSeparator:it,locale:$9(r)}),lo]})})}),rt&&(0,Oe.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:(0,Oe.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,Oe.jsx)("h3",{id:"edpire-submit-confirm-title",className:"text-base font-bold text-[#1d2025] mb-2",children:H("confirmTitle")}),_i>0&&(0,Oe.jsxs)("div",{className:"text-sm text-[#8a5a08] bg-[#fbf1dc] border border-[#f2e2bf] rounded-lg px-3 py-2 mb-3",children:[(0,Oe.jsxs)("p",{className:"flex items-start gap-2 font-semibold",children:[(0,Oe.jsx)(vd,{size:15,className:"flex-shrink-0 mt-px"}),(0,Oe.jsx)("span",{children:_i===1?H("unansweredOne"):H("unansweredMany",{count:_i})})]}),(0,Oe.jsxs)("ul",{className:"mt-1 ps-[23px] flex flex-col gap-0.5",children:[so.slice(0,$D).map(vt=>(0,Oe.jsx)("li",{children:(0,Oe.jsx)("button",{type:"button",onClick:()=>ss(vt.questionId),className:"text-start underline underline-offset-2 hover:text-[#1d2025] cursor-pointer",children:vt.only?H("exercise",{index:vt.exerciseIndex+1}):`${H("exercise",{index:vt.exerciseIndex+1})} \xB7 ${H("question",{index:vt.questionIndex+1})}`})},vt.questionId)),_i>$D&&(0,Oe.jsx)("li",{children:H("unansweredMore",{count:_i-$D})})]})]}),(0,Oe.jsx)("p",{className:"text-sm text-[#565b66] mb-5",children:H("confirmDescription")}),(0,Oe.jsxs)("div",{className:"flex gap-3 justify-end",children:[(0,Oe.jsx)("button",{onClick:()=>ft(!1),className:"px-4 py-2 text-sm font-medium text-[#565b66] hover:bg-[#f1efe9] rounded-lg transition-colors",children:H("confirmCancel")}),(0,Oe.jsxs)("button",{onClick:Na,disabled:Ut,style:oe?{backgroundColor:oe}: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:[Ut?(0,Oe.jsx)(Lu,{size:14,className:"animate-spin"}):(0,Oe.jsx)(R1,{size:14}),H("confirmSubmit")]})]})]})})]})})}function j9(e){return(e!=null?e:[]).map(t=>({exerciseId:t.exercise_id,questions:t.questions.map(r=>({questionId:r.question_id,nodeResults:r.node_results.map(n=>ie(ie(ie(ie({nodeId:n.node_id,status:n.status,score:n.score,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 $te=Pe($t());function HD(e,t){var n,a;let r=j9(e.exercise_feedback);return{submissionId:e.submission_id,totalScore:e.score,maxScore:e.max_score,percentage:e.percentage,passed:e.passed,returnUrl:t!=null?t:null,exerciseFeedback:r,awaitingManualGrading:(n=e.awaiting_manual_grading)!=null?n:!1,aiPending:(a=e.ai_pending)!=null?a:!1}}function jD(e){var t;return{annex:(t=e.annex)!=null?t:void 0,exercises:e.exercises.map(r=>({id:r.id,sharedContext:r.sharedContext,questions:r.questions.map(n=>({id:n.id,version:"1.0",content:n.content,answerKeys:[]}))}))}}function qte({token:e,data:t,baseUrl:r,options:n}){var B,O,N;let{locale:a,branding:i,returnUrl:o,reportLabel:s,backLabel:l,onBack:u,overlayConfig:c,layout:f,mediaHandler:d,onComplete:p,onError:b}=n,v=(B=i!=null?i:t.branding)!=null?B:void 0,k=(O=a!=null?a:t.meta.language)!=null?O:"en",w=(0,mh.useMemo)(()=>jD(t.assessment),[t]),[S]=(0,mh.useState)(()=>new Date().toISOString()),T=(0,mh.useCallback)(async j=>{let H=await fetch(`${r}/api/v1/embed/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e,answers:j})});if(!H.ok){let V=await H.json().catch(()=>({})),re=typeof V.error=="string"?V.error:"Submission failed",xe=H.status===401?"TOKEN_INVALID":H.status===409?"TOKEN_USED":H.status===404?"ASSESSMENT_NOT_FOUND":"UNKNOWN";throw b==null||b({code:xe,message:re}),new Error(re)}let Y=await H.json();return p==null||p(Y),HD(Y,o)},[r,e,p,b,o]),I=(0,mh.useCallback)(j=>{if(o)try{let H=new URL(o);H.searchParams.set("submission_id",j.submissionId),j.awaitingManualGrading||(H.searchParams.set("score",String(j.totalScore)),H.searchParams.set("max_score",String(j.maxScore))),window.location.href=H.toString()}catch(H){window.location.href=o}},[o]);return(0,$te.jsx)(H9,{assessment:w,meta:{title:t.meta.title,category:(N=t.meta.category)!=null?N:null},locale:k,branding:v,timeLimitMinutes:t.meta.settings.time_limit_minutes,startedAt:S,onSubmit:T,onViewReport:o?I:void 0,reportLabel:s,onBack:u,backLabel:l,overlayConfig:c,layout:f,mediaHandler:d})}var UD=Pe(kt());var jte=Pe($t());function Kve(){return Promise.reject(new Error("A review cannot be submitted"))}function Hte({review:e,locale:t,branding:r,layout:n,onBack:a,backLabel:i}){var u,c,f;let o=(0,UD.useMemo)(()=>jD(e.assessment),[e]),s=(0,UD.useMemo)(()=>({answers:e.answers,result:HD({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,exercise_feedback:e.exercise_feedback})}),[e]),l=(u=t!=null?t:e.meta.language)!=null?u:"en";return(0,jte.jsx)(H9,{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,onSubmit:Kve,onBack:a,backLabel:i,layout:n})}var Kte=Pe(kt()),Vte=Pe(uC());var K9=Pe(kt());var U9=Pe($t()),Ute=K9.default.memo(function({content:t,onAnswersChange:r,feedback:n,initialAnswers:a,readOnly:i,className:o,dir:s}){let l=(0,K9.useMemo)(()=>{if(n)return new Map(Object.entries(n))},[n]),u=(0,U9.jsx)(ng,{content:t,onAnswersChange:r,initialAnswers:a,validationFeedback:l,readOnly:i,className:o});return(0,U9.jsx)("div",{className:"edpire-scope",style:{display:"contents"},children:s?(0,U9.jsx)("div",{dir:s,children:u}):u})});function Gte(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,Vte.createRoot)(l);function f(){c.render(Kte.default.createElement(Ute,u))}return f(),{setContent(d){u=Xe(ie({},u),{content:d,feedback:null}),f()},setFeedback(d){u=Xe(ie({},u),{feedback:d}),f()},setInitialAnswers(d){u=Xe(ie({},u),{initialAnswers:d}),f()},unmount(){c.unmount()}}}function Wte(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 Xte(e){var i,o,s,l,u;let t=q9(j9(e.exercise_feedback)),r=new Map;for(let c of e.answers.exerciseAnswers)for(let f of c.questionAnswers)r.set(f.questionId,f.answers);let n=[],a=0;for(let c of e.assessment.exercises){let f=t.get(c.id);for(let d of c.questions){let p=f==null?void 0:f.get(d.id),b=(s=(o=(i=e.exercise_feedback.find(S=>S.exercise_id===c.id))==null?void 0:i.questions.find(S=>S.question_id===d.id))==null?void 0:o.node_results)!=null?s:[],v=0,k=0,w=!1;for(let S of b)v+=S.score,k+=S.max_score,S.status==="awaiting_review"&&(w=!0);n.push({exerciseId:c.id,questionId:d.id,content:d.content,sharedContext:(l=c.sharedContext)!=null?l:null,answers:(u=r.get(d.id))!=null?u:[],feedback:p?Object.fromEntries(p):{},score:v,maxScore:k,status:w?"awaiting_review":k===0?"unscored":v>=k?"correct":v>0?"partial":"incorrect",index:a++})}}return n}function Yte(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 Vve="https://edpire.com";function Jte(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 Gve={mount(e){let{token:t,container:r,baseUrl:n=Vve,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 b=p==="ORIGIN_NOT_ALLOWED"?`Add ${typeof location!="undefined"?location.origin:"this origin"} to Allowed Embed Origins in Edpire, under Integrations then Origins.`:"";Jte(i,d,b);return}u=await c.json()}catch(c){a==null||a({code:"NETWORK_ERROR",message:"Failed to connect to Edpire"}),Jte(i,"Failed to connect to Edpire. Please try again.","");return}s||(i.innerHTML="",o=(0,VD.createRoot)(i),o.render(KD.default.createElement(qte,{token:t,data:u,baseUrl:n,options:e})))})(),{unmount:l}},review(e){let i=e,{container:t}=i,r=Vn(i,["container"]),n=typeof t=="string"?document.querySelector(t):t;if(!n)return{unmount:()=>{}};n.textContent="";let a=(0,VD.createRoot)(n);return a.render(KD.default.createElement(Hte,r)),{unmount(){let o=a;a=null,setTimeout(()=>o==null?void 0:o.unmount(),0)}}}};return Rre(Wve);})();
|
|
4116
4116
|
/*! Bundled license information:
|
|
4117
4117
|
|
|
4118
4118
|
react/cjs/react.production.js:
|